/* Fateweld World + Professions UI V2. Presentation only; domain owners stay unchanged. */
.world-view-switch,
.world-activity-nav {
  width: 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  box-sizing: border-box;
  border: 1px solid rgba(240, 200, 75, .2);
  border-radius: 14px;
  background: rgba(4, 7, 6, .46);
}

.world-view-switch button,
.world-activity-nav button {
  min-width: 0;
  min-height: 48px;
  border-color: transparent;
  color: var(--muted);
  background: transparent;
}

.world-view-switch button.active,
.world-activity-nav button.active {
  border-color: rgba(240, 200, 75, .64);
  color: var(--gold);
  background: linear-gradient(145deg, rgba(240, 200, 75, .17), rgba(240, 200, 75, .045));
  box-shadow: inset 0 0 22px rgba(240, 200, 75, .06);
}

[data-world-overview-view]:not(.is-world-overview-active),
[data-world-production-panel]:not(.is-world-production-active) {
  display: none !important;
}

.world-activity-nav {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  position: sticky;
  top: 8px;
  z-index: 12;
  backdrop-filter: blur(12px);
}

.world-activity-nav button {
  padding: 9px 12px;
  display: grid;
  gap: 2px;
  text-align: left;
}

.world-activity-nav strong { color: inherit; font-size: 14px; }
.world-activity-nav span { color: var(--muted); font-size: 11px; }

.world-place-workspace {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(145deg, rgba(23, 27, 22, .97), rgba(12, 15, 13, .98));
}

.world-place-workspace::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 255px;
  z-index: -2;
  opacity: .43;
  background-position: center;
  background-size: cover;
  filter: saturate(.82) contrast(1.08);
}

.world-resource-place::before { background-image: url('/assets/world/common_resource_grounds_scene_v1.png'); }
.world-workshop-place::before {
  background-image: url('/assets/world/profession_identity_atlas_v2.jpg');
  background-size: 400% auto;
  background-position: 33.333% 50%;
}

.world-place-workspace::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 270px;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(8, 11, 9, .2), rgba(14, 18, 15, .9) 82%, rgba(14, 18, 15, 1));
}

.world-place-workspace > .panel-title-row {
  min-height: 176px;
  padding: 22px;
  align-items: end;
  border: 1px solid rgba(240, 200, 75, .2);
  border-radius: 16px;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 6, .72));
}

.world-place-workspace > .panel-title-row h2 {
  margin: 0 0 7px;
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(26px, 4vw, 40px);
  color: #fff6dc;
  text-shadow: 0 3px 18px #000;
}

.world-place-workspace > .panel-title-row .label {
  max-width: 620px;
  color: #e8e1ce;
  text-shadow: 0 2px 8px #000;
}

.world-place-workspace .world-progress {
  padding: 8px 11px;
  border: 1px solid rgba(101, 212, 138, .42);
  border-radius: 999px;
  color: #a8edbd;
  background: rgba(12, 29, 18, .82);
}

.world-place-workspace .world-action-row {
  padding: 12px;
  border: 1px solid rgba(240, 200, 75, .18);
  border-radius: 14px;
  background: rgba(5, 8, 6, .36);
}

.profession-hub {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.profession-hub::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 320px;
  z-index: -2;
  opacity: .58;
  background-image: url('/assets/world/profession_identity_atlas_v2.jpg');
  background-size: 400% auto;
  background-position: 0% 4.5%;
  background-repeat: no-repeat;
  filter: saturate(.82) contrast(1.08);
}

.profession-hub::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 335px;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(6, 9, 7, .92) 0%, rgba(6, 9, 7, .54) 43%, rgba(6, 9, 7, .12) 74%),
    linear-gradient(180deg, rgba(11, 14, 12, .08) 18%, var(--panel) 100%);
}

.profession-hub-head {
  min-height: 230px;
  padding: 26px;
  align-items: end;
  border: 1px solid rgba(240, 200, 75, .16);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(4, 7, 5, .04), rgba(5, 8, 6, .72));
}

.profession-hub-head > div:first-child { max-width: 510px; }
.profession-hub-head .label { max-width: 470px; color: #e8e1ce; text-shadow: 0 2px 12px #000; }

.profession-hub-head h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(28px, 4vw, 42px);
  color: #fff6dc;
  text-shadow: 0 3px 18px #000;
}

.profession-hub-layout {
  grid-template-columns: minmax(430px, .92fr) minmax(440px, 1.08fr);
}

.profession-directory {
  max-height: min(840px, calc(100vh - 100px));
  overflow: auto;
  padding-right: 5px;
  scrollbar-width: thin;
}

.profession-workspace {
  position: sticky;
  top: 8px;
  border-color: rgba(240, 200, 75, .28);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .24);
}

.profession-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.profession-card { min-height: 226px; }

[data-profession-visual],
[data-world-activity-visual]::before {
  --profession-visual-x: 0%;
  --profession-visual-y: 0%;
  background-image: url('/assets/world/profession_identity_atlas_v2.jpg');
  background-size: 400% auto;
  background-position: var(--profession-visual-x) var(--profession-visual-y);
  background-repeat: no-repeat;
}

[data-profession-visual="hunter"] { --profession-visual-x: 0%; --profession-visual-y: 0%; }
[data-profession-visual="lumberjack"] { --profession-visual-x: 33.333%; --profession-visual-y: 0%; }
[data-profession-visual="fisher"] { --profession-visual-x: 66.667%; --profession-visual-y: 0%; }
[data-profession-visual="miner"] { --profession-visual-x: 100%; --profession-visual-y: 0%; }
[data-profession-visual="blacksmith"] { --profession-visual-x: 0%; --profession-visual-y: 50%; }
[data-profession-visual="craftsman"] { --profession-visual-x: 33.333%; --profession-visual-y: 50%; }
[data-profession-visual="jeweler"] { --profession-visual-x: 66.667%; --profession-visual-y: 50%; }
[data-profession-visual="cook"] { --profession-visual-x: 100%; --profession-visual-y: 50%; }
[data-profession-visual="herbalist"] { --profession-visual-x: 0%; --profession-visual-y: 100%; }
[data-profession-visual="alchemist"] { --profession-visual-x: 33.333%; --profession-visual-y: 100%; }
[data-profession-visual="healer"] { --profession-visual-x: 66.667%; --profession-visual-y: 100%; }
[data-profession-visual="gardener"] { --profession-visual-x: 100%; --profession-visual-y: 100%; }

.profession-card {
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 118px minmax(0, 1fr);
  gap: 0;
  overflow: hidden;
}

.profession-card-visual {
  align-self: stretch;
  min-width: 0;
  min-height: 118px;
  border-bottom: 1px solid rgba(240, 200, 75, .18);
  box-shadow: inset 0 -24px 30px rgba(7, 10, 8, .2);
  filter: saturate(.88) contrast(1.05);
}

.profession-card-copy { padding: 12px; }
.profession-card-copy p {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.profession-card.selected { box-shadow: inset 0 0 0 2px rgba(240, 200, 75, .78), 0 10px 24px rgba(0, 0, 0, .22); }

.profession-slot.has-visual {
  padding: 0;
  grid-template-columns: 68px minmax(0, 1fr);
  overflow: hidden;
}

.profession-slot-visual {
  align-self: stretch;
  min-height: 86px;
  border-right: 1px solid rgba(240, 200, 75, .17);
}

.profession-slot-copy {
  min-width: 0;
  padding: 10px 10px 10px 0;
  display: grid;
  align-content: center;
  gap: 4px;
}

.profession-workspace-header {
  position: relative;
  min-height: 280px;
  padding: 22px;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(240, 200, 75, .25);
  border-radius: 13px;
  background: #0b0f0c;
}

.profession-workspace-header::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 7, 5, .04) 15%, rgba(5, 8, 6, .38) 56%, rgba(5, 8, 6, .94) 100%);
}

.profession-workspace-visual {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  filter: saturate(.84) contrast(1.08);
}

.profession-workspace-header > div {
  max-width: 580px;
  position: relative;
  z-index: 1;
  text-shadow: 0 2px 14px #000;
}

.profession-workspace-header h3 {
  margin: 2px 0 0;
  font-size: clamp(30px, 5vw, 48px);
  color: #fff4d5;
}

@media (max-width: 760px) {
  .world-activity-nav { position: relative; top: auto; }
  .world-activity-nav button { min-height: 54px; padding: 8px; text-align: center; }
  .world-activity-nav span { font-size: 10px; }
  .world-place-workspace > .panel-title-row { min-height: 150px; padding: 15px; }
  .world-place-workspace > .panel-title-row { align-items: end; }
  .world-place-workspace .world-progress { max-width: 46%; text-align: right; }
  .profession-hub::before { height: 265px; background-position: 0% 3.5%; }
  .profession-hub::after { height: 278px; }
  .profession-hub-head { min-height: 190px; padding: 17px; }
  .profession-baseline { white-space: normal; }
  .profession-hub-layout { display: block; }
  .profession-directory { max-height: none; overflow: visible; padding: 0; }
  .profession-card-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(236px, 76vw);
    grid-template-columns: none;
    gap: 8px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding: 2px 2px 10px;
  }
  .profession-card { min-height: 232px; grid-template-columns: minmax(0, 1fr); grid-template-rows: 124px minmax(0, 1fr); scroll-snap-align: start; }
  .profession-card-visual { min-width: 0; min-height: 124px; }
  .profession-workspace { position: relative; top: auto; margin-top: 14px; }
  .profession-career-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profession-workspace-header { min-height: 250px; padding: 17px; }
}

@media (max-width: 460px) {
  .world-view-switch { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .world-activity-nav span { display: none; }
  .world-activity-nav button { min-height: 48px; }
  .world-place-workspace > .panel-title-row {
    min-height: 142px;
    display: grid;
    align-content: end;
  }
  .world-place-workspace .world-progress { max-width: 100%; justify-self: start; text-align: left; }
  .profession-hub-head { min-height: 178px; display: grid; align-content: end; }
  .profession-card-grid { grid-auto-columns: minmax(238px, 84vw); }
  .profession-slot.has-visual { grid-template-columns: 58px minmax(0, 1fr); }
}

@media (max-height: 460px) and (orientation: landscape) {
  .world-activity-nav { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  .world-place-workspace > .panel-title-row { min-height: 112px; }
  .profession-hub-head { min-height: 150px; }
  .profession-card-grid { grid-auto-columns: minmax(260px, 42vw); }
}

/* World UI V2: Services, Society and Chronicle */
[data-world-service-panel]:not(.is-world-service-active),
[data-world-society-panel]:not(.is-world-society-active) { display: none !important; }

.world-entity-nav {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(240, 200, 75, .24);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(20, 26, 21, .97), rgba(7, 10, 8, .96));
}
.world-entity-nav button {
  position: relative;
  min-height: 124px;
  padding: 72px 13px 12px;
  overflow: hidden;
  display: grid;
  align-content: end;
  gap: 2px;
  text-align: left;
  border-color: rgba(240, 200, 75, .16);
  background: rgba(5, 8, 6, .75);
  isolation: isolate;
}
.world-entity-nav button::before,
.world-choice-scene,
.world-identity-hero::before {
  content: "";
  background-image: linear-gradient(180deg, transparent 30%, rgba(3, 5, 4, .94) 100%), var(--world-identity-image);
  background-size: cover;
  background-position: center;
}
.world-entity-nav button::before { position: absolute; inset: 0; z-index: -1; filter: saturate(.88) contrast(1.06); }
.world-entity-nav button.active { border-color: rgba(240, 200, 75, .8); box-shadow: inset 0 0 0 1px rgba(240, 200, 75, .35), 0 8px 24px rgba(0,0,0,.28); }
.world-entity-nav button.active::after { content: ""; position: absolute; inset: 0 0 auto; height: 3px; background: var(--gold); }
.world-entity-nav strong { color: #fff3cf; font-size: 15px; }
.world-entity-nav span { color: rgba(246, 239, 218, .72); font-size: 11px; line-height: 1.3; }

[data-world-identity-visual="maintenance"] { --world-identity-image: url("world/world_maintenance_identity_v2.jpg"); }
[data-world-identity-visual="medical"] { --world-identity-image: url("world/world_medical_identity_v2.jpg"); }
[data-world-identity-visual="workshop"] { --world-identity-image: url("world/world_workshop_identity_v2.jpg"); }
[data-world-identity-visual="guild"] { --world-identity-image: url("world/world_guild_identity_v2.jpg"); }
[data-world-identity-visual="events"] { --world-identity-image: url("world/world_events_identity_v2.jpg"); }
[data-world-identity-visual="mercenary"] { --world-identity-image: url("world/world_mercenary_identity_v2.jpg"); }
[data-world-identity-visual="history"] { --world-identity-image: url("world/world_history_identity_v2.jpg"); }
[data-world-identity-visual="guild-project"] { --world-identity-image: url("world/world_guild_project_identity_v2.jpg"); }

.world-identity-workspace { padding: 0; overflow: hidden; }
.world-identity-workspace > :not(.world-identity-hero) { margin-left: clamp(14px, 2.4vw, 26px); margin-right: clamp(14px, 2.4vw, 26px); }
.world-identity-hero { position: relative; min-height: 240px; padding: clamp(22px, 4vw, 42px); align-items: end; overflow: hidden; isolation: isolate; }
.world-identity-hero::before { position: absolute; inset: 0; z-index: -2; }
.world-identity-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(5,8,6,.96) 0%, rgba(5,8,6,.68) 52%, rgba(5,8,6,.18) 100%); }
.world-identity-hero h2 { margin: 4px 0; color: #fff6dd; font-family: Georgia, serif; font-size: clamp(32px, 5vw, 58px); line-height: .98; }
.world-identity-hero .label { max-width: 620px; color: rgba(246,239,218,.78); }
.world-v2-content-stack { display: grid; gap: 14px; margin-top: 18px; margin-bottom: 18px; }
.world-v2-disclosure { border: 1px solid rgba(240,200,75,.18); border-radius: 14px; background: rgba(6,10,7,.46); }
.world-v2-disclosure > summary { min-height: 58px; padding: 12px 15px; display: grid; gap: 2px; align-content: center; cursor: pointer; color: #fff0c5; font-weight: 800; }
.world-v2-disclosure > summary small { color: var(--muted); font-size: 11px; font-weight: 500; }
.world-v2-disclosure > :not(summary) { margin: 0 14px 14px; }
.world-provider-tools { margin-top: 16px; }
.world-service-decision-grid, .workshop-v2-storage { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.world-service-step { position: relative; padding: 17px; border: 1px solid rgba(240,200,75,.18); border-radius: 15px; background: rgba(2,5,3,.45); }
.world-service-step > div:first-of-type { padding-left: 34px; }
.world-service-step h3, .world-service-step h4 { margin: 0 0 4px; color: #fff1c7; }
.world-service-step p { margin: 0 0 12px; color: var(--muted); font-size: 12px; }
.world-step-number { position: absolute; top: 16px; left: 16px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: rgba(240,200,75,.16); color: var(--gold); font-weight: 900; }
.world-entity-choice-grid { display: grid; gap: 8px; max-height: 330px; overflow: auto; }
.world-entity-choice { min-height: 72px; padding: 8px; display: grid; grid-template-columns: 58px minmax(0,1fr); gap: 10px; align-items: center; text-align: left; background: rgba(255,255,255,.025); }
.world-entity-choice.active { border-color: var(--gold); background: linear-gradient(145deg, rgba(240,200,75,.14), rgba(240,200,75,.035)); }
.world-entity-choice > span:last-child { min-width: 0; display: grid; gap: 3px; }
.world-entity-choice strong { overflow: hidden; color: #fff4d4; text-overflow: ellipsis; white-space: nowrap; }
.world-entity-choice small { color: var(--muted); }
.world-choice-scene, .world-choice-art { width: 58px; height: 58px; border: 1px solid rgba(240,200,75,.24); border-radius: 10px; overflow: hidden; background-color: rgba(0,0,0,.4); }
.world-choice-scene { display: block; }
.world-choice-art img, .world-service-item-art img { width: 100%; height: 100%; object-fit: contain; }
.world-service-inspector { margin-top: 14px; padding: clamp(15px,3vw,24px); border: 1px solid rgba(240,200,75,.3); border-radius: 16px; background: radial-gradient(circle at 0 0, rgba(240,200,75,.09), transparent 42%), rgba(5,9,6,.72); }
.world-service-inspector-head { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 16px; align-items: center; }
.world-service-item-art { width: 100px; height: 100px; }
.world-service-inspector h3 { margin: 4px 0 8px; color: #fff4d7; font-family: Georgia,serif; font-size: clamp(24px,4vw,36px); }
.world-status-chip { display: inline-flex; padding: 4px 9px; border: 1px solid rgba(119,213,157,.35); border-radius: 999px; color: #8de0ae; font-size: 11px; }
.world-service-condition-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.world-service-condition-grid > div { display: grid; grid-template-columns: 1fr auto; gap: 6px; color: var(--muted); }
.world-service-condition-grid i { grid-column: 1/-1; height: 7px; overflow: hidden; border-radius: 99px; background: #050806; }
.world-service-condition-grid b { display: block; height: 100%; background: linear-gradient(90deg,#c77b2b,#f3d66b); }
.world-service-terms { margin-top: 15px; display: grid; gap: 8px; }
.world-service-terms > div { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); }
.world-service-terms strong { color: #f7efd8; text-align: right; }
.world-service-terms strong.missing { color: #ef8d8d; }
.world-service-terms .world-service-total { padding-top: 10px; border-top: 1px solid rgba(240,200,75,.18); font-size: 16px; }
.world-service-primary-actions { margin-top: 12px; }
.workshop-v2-storage { margin-top: 18px; }
.world-v2-empty { min-height: 72px; display: grid; place-items: center; padding: 18px; border: 1px dashed rgba(240,200,75,.2); border-radius: 12px; color: var(--muted); text-align: center; }

.world-history-workspace .history-tabs { position: relative; z-index: 1; }
.history-event-list { display: grid; gap: 18px; margin-top: 18px; margin-bottom: 18px; }
.history-day > h3 { margin: 0 0 9px; color: #d9c998; font-family: Georgia,serif; font-size: 20px; }
.history-timeline { position: relative; display: grid; gap: 8px; padding-left: 18px; }
.history-timeline::before { content: ""; position: absolute; top: 10px; bottom: 10px; left: 6px; width: 1px; background: linear-gradient(var(--gold),rgba(240,200,75,.08)); }
.history-event { position: relative; border: 1px solid rgba(240,200,75,.15); border-radius: 13px; background: rgba(4,8,5,.56); }
.history-event::before { content: ""; position: absolute; left: -16px; top: 24px; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(240,200,75,.12); }
.history-event > summary { min-height: 68px; padding: 11px 14px; display: grid; grid-template-columns: 38px minmax(0,1fr) auto; gap: 10px; align-items: center; cursor: pointer; list-style: none; }
.history-event > summary::-webkit-details-marker { display:none; }
.history-event-icon { width: 36px; height: 36px; display:grid; place-items:center; border-radius:50%; background:rgba(240,200,75,.1); color:var(--gold); font-size:18px; }
.history-event-copy { min-width:0; display:grid; gap:2px; }
.history-event-copy small { color:#cfb868; text-transform:uppercase; letter-spacing:.08em; font-size:9px; }
.history-event-copy strong { color:#f5ecd2; line-height:1.35; }
.history-event time { color:var(--muted); font-size:11px; }
.history-event-detail { margin:0 14px 12px 62px; padding:10px 0 0; display:flex; justify-content:space-between; gap:12px; border-top:1px solid rgba(240,200,75,.12); color:var(--muted); font-size:11px; }
.history-event-battle .history-event-icon { color:#ed8a76; background:rgba(211,75,55,.13); }
.history-event-recovery .history-event-icon { color:#83d6aa; background:rgba(73,170,117,.13); }
.history-event-trade .history-event-icon { color:#f0c84b; }
.history-event-craft .history-event-icon { color:#d99453; background:rgba(190,107,48,.14); }
.history-event-guild .history-event-icon { color:#b8a4ea; background:rgba(127,95,192,.14); }

@media (max-width: 760px) {
  .world-entity-nav { grid-auto-flow: column; grid-auto-columns: minmax(190px, 72vw); grid-template-columns: none; overflow-x: auto; scroll-snap-type: x proximity; }
  .world-entity-nav button { scroll-snap-align: start; }
  .world-identity-hero { min-height: 230px; padding: 20px; align-items: end; }
  .world-identity-hero::after { background: linear-gradient(0deg,rgba(5,8,6,.98) 0%,rgba(5,8,6,.55) 68%,rgba(5,8,6,.12) 100%); }
  .world-service-decision-grid, .workshop-v2-storage { grid-template-columns: 1fr; }
  .world-service-inspector-head { grid-template-columns: 78px minmax(0,1fr); }
  .world-service-item-art { width:78px; height:78px; }
  .world-service-condition-grid { grid-template-columns:1fr; }
  .history-event > summary { grid-template-columns:34px minmax(0,1fr) auto; padding:10px; }
  .history-event-detail { margin-left:54px; }
}

@media (max-height: 460px) and (orientation: landscape) {
  .world-entity-nav { grid-template-columns:repeat(4,minmax(0,1fr)); grid-auto-flow:row; overflow:visible; }
  .world-entity-nav button { min-height:92px; padding-top:48px; }
  .world-identity-hero { min-height:175px; }
  .world-service-decision-grid, .workshop-v2-storage { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .world-view-switch *, .world-activity-nav * { scroll-behavior: auto; }
}

/* Progressive disclosure: one place, activity or profession depth at a time. */
.world-district-routes,
.world-resource-overview {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(240, 200, 75, .18);
  border-radius: 14px;
  background: rgba(5, 8, 6, .3);
}

.world-district-routes > summary,
.world-resource-overview > summary {
  min-height: 48px;
  padding: 12px 15px;
  box-sizing: border-box;
  cursor: pointer;
  color: var(--gold);
  font-weight: 850;
}

.world-district-routes .world-district-grid,
.world-resource-overview > :not(summary) { margin: 0 12px 12px; }

.world-place-activities,
.profession-depth-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.profession-depth-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.world-place-activities button,
.profession-depth-nav button {
  min-width: 0;
  min-height: 76px;
  padding: 13px 14px;
  display: grid;
  align-content: center;
  gap: 4px;
  text-align: left;
  border-color: rgba(240, 200, 75, .16);
  background: rgba(255, 255, 255, .025);
}

.world-place-activities button[data-world-activity-visual] {
  position: relative;
  min-height: 104px;
  padding-left: 112px;
  overflow: hidden;
}

.world-place-activities button[data-world-activity-visual]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 96px;
  border-right: 1px solid rgba(240, 200, 75, .18);
  filter: saturate(.8) contrast(1.07);
}

[data-world-activity-visual="fiber"]::before { --profession-visual-x: 0%; --profession-visual-y: 100%; }
[data-world-activity-visual="forestry"]::before { --profession-visual-x: 33.333%; --profession-visual-y: 0%; }
[data-world-activity-visual="depot"]::before { --profession-visual-x: 33.333%; --profession-visual-y: 50%; }

.world-place-activities button.active,
.profession-depth-nav button.active {
  border-color: rgba(240, 200, 75, .66);
  background: linear-gradient(145deg, rgba(240, 200, 75, .17), rgba(240, 200, 75, .045));
  box-shadow: inset 3px 0 0 var(--gold);
}

.world-place-activities strong,
.profession-depth-nav strong { color: #fff3cf; font-size: 15px; }
.world-place-activities span,
.profession-depth-nav span { color: var(--muted); font-size: 11px; line-height: 1.35; }

[data-world-gathering-panel]:not(.is-world-gathering-active),
[data-profession-hub-view]:not(.is-profession-hub-view-active) {
  display: none !important;
}

.world-gathering-paths { display: contents; }

.world-gathering-path,
.world-materials-depot {
  padding: clamp(16px, 3vw, 26px);
  border: 1px solid rgba(240, 200, 75, .24);
  border-radius: 16px;
  background: radial-gradient(circle at 100% 0, rgba(240, 200, 75, .07), transparent 46%), rgba(5, 8, 6, .36);
}

.world-gathering-path > p,
.world-materials-depot p { max-width: 680px; margin: 7px 0 16px; color: var(--muted); }

.profession-current-directory { margin-top: 14px; }
.profession-current-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.profession-current-grid .profession-card { min-height: 126px; }
.profession-current-empty { display: grid; gap: 5px; }
.profession-current-empty span { color: var(--muted); }

.world-place-workspace > .panel-title-row { min-height: 285px; }

@media (max-width: 760px) {
  .world-place-workspace > .panel-title-row { min-height: 250px; }
  .world-place-activities {
    grid-auto-flow: column;
    grid-auto-columns: minmax(190px, 78vw);
    grid-template-columns: none;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    padding-bottom: 5px;
  }
  .world-place-activities button { min-height: 84px; scroll-snap-align: start; }
  .profession-current-grid { grid-template-columns: 1fr; }
}

@media (max-width: 460px) {
  .profession-depth-nav { grid-template-columns: 1fr; }
  .profession-depth-nav button { min-height: 66px; }
  .world-district-routes .world-district-grid { grid-template-columns: 1fr; }
}

@media (max-height: 460px) and (orientation: landscape) {
  .world-place-workspace > .panel-title-row { min-height: 180px; }
  .world-place-activities {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-flow: row;
    overflow: visible;
  }
}
