/*
 * The landing page's game window: the game's own screens, small, that a visitor can press.
 *
 * Steel panels with a silver double frame and four corner ticks, the game's tabs down the side, the
 * bulletin of news beside it. Widths are the window's own (container queries), not the viewport's,
 * so it lays out the same wherever the section puts it: a rail and the screen and the bulletin
 * across, the bulletin under them on a tablet, one column and a row of tabs on a phone.
 */
.lw {
  --lw-ink: #0D1117;
  --lw-ink-2: #141A22;
  --lw-ink-3: #1B222C;
  --lw-ink-4: #232B37;
  --lw-edge: #5C646E;
  --lw-silver: #C9CDD3;
  --lw-text: #ECEFF3;
  --lw-text-2: #A8B0BA;
  --lw-text-3: #8A93A3;
  --lw-good: #8FD4B0;
  --lw-bad: #D65A60;
  --lw-label: var(--font-oswald), 'Oswald', 'Arial Narrow', sans-serif;
  --lw-prose: var(--font-crimson), Georgia, serif;
  --lw-ui: var(--font-exo), 'Exo 2', sans-serif;
  container: lw / inline-size;
  color: var(--lw-text);
  text-align: left;
}
.lw *, .lw *::before, .lw *::after { box-sizing: border-box; }
/* Resets with no specificity, so they never beat a class of ours or of the shared buttons (.silver-btn). */
:where(.lw h3, .lw h4, .lw p, .lw figure, .lw ul) { margin: 0; padding: 0; }
:where(.lw button) { font: inherit; color: inherit; cursor: pointer; }
:where(.lw img) { display: block; max-width: none; }
.lw :focus-visible { outline: 2px solid var(--lw-silver); outline-offset: 2px; }

/* frame */
.lw-orn { position: relative; border: 1px solid rgba(201,205,211,.5); background: linear-gradient(180deg, var(--lw-ink-3), var(--lw-ink-2)); }
.lw-orn::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(201,205,211,.16); pointer-events: none; z-index: 6; }
.lw-k { position: absolute; width: 14px; height: 14px; border: 2px solid var(--lw-silver); pointer-events: none; z-index: 7; }
.lw-k-a { left: -2px; top: -2px; border-right: 0; border-bottom: 0; }
.lw-k-b { right: -2px; top: -2px; border-left: 0; border-bottom: 0; }
.lw-k-c { left: -2px; bottom: -2px; border-right: 0; border-top: 0; }
.lw-k-d { right: -2px; bottom: -2px; border-left: 0; border-top: 0; }
.lw-dia { width: 8px; height: 8px; transform: rotate(45deg); background: #F4F6F9; box-shadow: 0 0 10px rgba(244,246,249,.5); flex: none; }
.lw-dot { width: 8px; height: 8px; background: var(--lw-good); border-radius: 50%; box-shadow: 0 0 10px var(--lw-good); flex: none; }
.lw-cap { font: 600 10px var(--lw-label); letter-spacing: .22em; text-transform: uppercase; color: var(--lw-text-2); }
.lw-more { font: 600 11px var(--lw-label); letter-spacing: .18em; text-transform: uppercase; color: var(--lw-silver); border: 0; border-bottom: 1px solid rgba(201,205,211,.4); padding: 0 0 3px; background: none; text-decoration: none; justify-self: start; }
.lw-more:hover { color: #fff; border-color: #fff; }

/* layout */
.lw-grid { display: grid; grid-template-columns: 88px minmax(0,1fr); gap: 14px; align-items: stretch; }
.lw-rail { display: grid; gap: 8px; align-content: start; }
.lw-tab { display: grid; justify-items: center; gap: 6px; padding: 12px 4px 10px; background: linear-gradient(180deg, var(--lw-ink-3), var(--lw-ink-2)); border: 1px solid rgba(92,100,110,.6); font: 600 9px var(--lw-label); letter-spacing: .14em; text-transform: uppercase; color: var(--lw-text-3); transition: color .2s, border-color .2s; }
.lw-tab img { width: 38px; height: 38px; }
.lw-tab:hover { color: var(--lw-text); border-color: rgba(201,205,211,.6); }
.lw-tab[aria-selected="true"] { color: #fff; border-color: var(--lw-silver); background: linear-gradient(180deg, #2b3340, #1b222c); box-shadow: 0 0 22px rgba(201,205,211,.18), inset 0 0 0 1px rgba(201,205,211,.25); }
.lw-win { min-height: 580px; display: grid; grid-template-columns: minmax(0,1fr); grid-template-rows: auto minmax(0,1fr); overflow: hidden; }
/* the event takes the height its text and answers need, not the other tabs' */
.lw-win:has(.lw-event) { min-height: 0; }
.lw-bar { position: relative; z-index: 5; display: flex; align-items: center; gap: 18px; padding: 10px 18px; border-bottom: 1px solid rgba(92,100,110,.55); background: rgba(8,11,15,.8); font: 600 10px var(--lw-label); letter-spacing: .18em; text-transform: uppercase; color: var(--lw-text-2); }
.lw-bar b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.lw-grow { flex: 1; }
.lw-live { display: flex; align-items: center; gap: 8px; }
.lw-body { position: relative; min-height: 0; min-width: 0; }

/* bulletin */
.lw-vest { display: grid; gap: 14px; align-content: start; }
.lw-vest h3 { font: 700 12px var(--lw-label); letter-spacing: .3em; text-transform: uppercase; color: #fff; display: flex; align-items: center; gap: 10px; }
.lw-letter { position: relative; padding: 20px 20px 18px; display: grid; gap: 8px; align-content: start; background: linear-gradient(180deg, var(--lw-ink-4), var(--lw-ink-2)); border: 1px solid rgba(201,205,211,.32); text-decoration: none; color: inherit; transition: border-color .2s, transform .2s; }
.lw-letter::before { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(201,205,211,.1); pointer-events: none; }
a.lw-letter:hover { border-color: rgba(244,246,249,.7); transform: translateY(-2px); }
.lw-seal { position: absolute; right: 14px; top: 14px; width: 11px; height: 11px; transform: rotate(45deg); background: var(--lw-silver); box-shadow: 0 0 10px rgba(244,246,249,.5); }
.lw-letter small { font: 600 10px var(--lw-label); letter-spacing: .22em; text-transform: uppercase; color: var(--lw-text-3); }
.lw-letter h4 { font: 600 16px/1.3 var(--lw-label); color: #fff; padding-right: 24px; }
.lw-letter p { font: 400 15px/1.45 var(--lw-prose); color: rgba(236,239,243,.6); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lw-letter.is-skeleton { min-height: 108px; }
.lw-letter.is-skeleton i { display: block; height: 10px; background: rgba(255,255,255,.08); }
.lw-letter.is-skeleton i:first-of-type { width: 40%; } .lw-letter.is-skeleton i:last-of-type { width: 80%; }

@container lw (max-width: 1100px) {
  .lw-grid { grid-template-columns: 88px minmax(0,1fr); }
  .lw-vest { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0,1fr)); }
  .lw-vest > h3, .lw-vest > .lw-more, .lw-vest > .lw-empty { grid-column: 1 / -1; }
}
@container lw (max-width: 720px) {
  .lw-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .lw-rail { grid-auto-flow: column; grid-auto-columns: 1fr; }
  .lw-tab { padding: 9px 2px 7px; letter-spacing: .06em; font-size: 8px; min-width: 0; }
  .lw-tab img { width: 30px; height: 30px; }
  .lw-win { min-height: 0; }
  .lw-bar { gap: 8px 12px; padding: 9px 12px; font-size: 9px; letter-spacing: .1em; flex-wrap: wrap; }
  .lw-vest { grid-template-columns: 1fr; }
}

/* chronicle: the game's event window, over the map */
.lw {
  --lw-parch: url("../map/mapPergrament.webp");
  --lw-plate:
    linear-gradient(rgba(20,26,34,0.82), rgba(20,26,34,0.82)),
    var(--lw-parch),
    linear-gradient(180deg, #1B222C, #141A22);
}
.lw-event { position: relative; height: 100%; min-width: 0; display: flex; flex-direction: column; }
.lw-scene { position: relative; flex: 1 1 auto; width: 100%; display: flex; flex-direction: column; }
.lw-scene-head { position: relative; flex: none; display: flex; align-items: center; gap: 12px; padding: 12px 20px 11px 14px; border-bottom: 1px solid rgba(201,209,219,.2); background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.2)); }
.lw-scene-mark { flex: none; display: grid; place-items: center; width: 30px; height: 30px; margin: 0 4px; transform: rotate(45deg); border: 1px solid rgba(201,209,219,.7); background: radial-gradient(circle at 50% 40%, #3E4A58, #151B22 75%); box-shadow: 0 0 0 3px #0D1117, 0 0 0 4px rgba(201,209,219,.25); }
.lw-scene-mark svg { transform: rotate(-45deg); color: #C9D1DB; }
.lw-scene-head h3 { flex: 1 1 auto; min-width: 0; font: 600 22px var(--lw-label); letter-spacing: .08em; text-transform: uppercase; color: #E8ECF2; text-shadow: 0 2px 8px #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw-scene-field { position: relative; flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr) minmax(120px, 190px); grid-template-rows: auto minmax(0, 1fr); align-items: end; background-size: cover; background-position: center 45%; }
.lw-scene-field::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(13,17,23,.25) 0%, rgba(13,17,23,.5) 45%, rgba(13,17,23,.92) 100%), radial-gradient(ellipse at 50% 42%, rgba(13,17,23,.6) 25%, transparent 62%); }
.lw-scene-field > * { position: relative; z-index: 1; }
.lw-scene-lead { grid-column: 1 / -1; grid-row: 1; align-self: start; padding: 16px 26px 0; max-width: 96ch; margin: 0 auto; text-align: center; font: 400 15.5px/1.55 Georgia, "Times New Roman", serif; color: #E8ECF2; text-shadow: 0 1px 3px #000, 0 0 12px rgba(0,0,0,.8); }
.lw-scene-lead p + p { margin-top: .65em; }
.lw-fig { grid-row: 2; margin: 0; align-self: end; display: flex; flex-direction: column; align-items: stretch; min-width: 0; filter: drop-shadow(0 10px 18px rgba(0,0,0,.65)); }
.lw-fig-face { position: relative; display: block; width: 100%; aspect-ratio: 1; }
.lw-fig-face img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.lw-fig[data-side="them"] .lw-fig-face { transform: scaleX(-1); }
.lw-fig figcaption { position: relative; align-self: center; width: 90%; margin: -26px 0 12px; padding: 6px 10px 7px; display: grid; justify-items: center; text-align: center; color: #E8ECF2; background-image: var(--lw-plate); background-size: auto, 1024px auto, auto; background-repeat: no-repeat, repeat, no-repeat; background-blend-mode: normal, overlay, normal; background-clip: padding-box; border: 1px solid rgba(201,209,219,.22); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.lw-fig-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 14px var(--lw-label); letter-spacing: .1em; text-transform: uppercase; }
.lw-fig figcaption small { font: 500 10px var(--lw-ui); letter-spacing: .14em; text-transform: uppercase; color: #78808A; }
.lw-scene-middle { grid-row: 2; align-self: stretch; display: flex; flex-direction: column; justify-content: flex-end; gap: 14px; min-width: 0; padding: 12px 4px 34px; }
.lw-answers { display: grid; gap: 6px; }
.lw-q-wrap { position: relative; }
.lw-q { display: block; width: 100%; text-align: left; padding: 9px 12px; color: #E8ECF2; background-image: var(--lw-plate); background-size: auto, 1024px auto, auto; background-repeat: no-repeat, repeat, no-repeat; background-blend-mode: normal, overlay, normal; background-clip: padding-box; border: 1px solid rgba(201,209,219,.22); box-shadow: 0 2px 8px rgba(0,0,0,.35); transition: border-color .15s, box-shadow .15s; }
.lw-q:hover, .lw-q:focus-visible { border-color: rgba(201,209,219,.7); box-shadow: inset 0 0 18px rgba(201,209,219,.08), 0 2px 8px rgba(0,0,0,.35); }
.lw-q-top { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.lw-q-label { font: 400 13px/1.3 var(--lw-ui); color: #E8ECF2; }
.lw-q-nth { display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 10px; border: 1px solid rgba(201,209,219,.35); color: #C9D1DB; font-size: 11px; vertical-align: 1px; }
.lw-q-odds { display: inline-flex; align-items: center; gap: 6px; font: 400 12px var(--lw-ui); letter-spacing: .1em; text-transform: uppercase; color: #78808A; white-space: pre-wrap; }
.lw-q-skill { width: 18px; height: 18px; flex: none; border-radius: 50%; object-fit: cover; }
.lw-q-attr { font-weight: 600; color: #C9D1DB; }
.lw-q-attr[data-attr="learning"] { color: #8FB8E0; } .lw-q-attr[data-attr="charm"] { color: #E0A0C4; }
.lw-q-chance { font-weight: 600; color: #C9D1DB; font-variant-numeric: tabular-nums; }
.lw-q-chance[data-band="safe"], .lw-q-chance[data-band="easy"] { color: var(--lw-good); }
.lw-q-chance[data-band="hard"] { color: #D9B27A; } .lw-q-chance[data-band="desperate"] { color: var(--lw-bad); }
/* What an answer will do: a card over it where a pointer hovers, printed inside it where nothing can. */
.lw-tip { position: absolute; z-index: 20; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); width: max-content; max-width: min(340px, 90cqw); display: none; gap: 16px; padding: 10px 12px; pointer-events: none; color: #EDEEF4; font: 400 13px/1.45 var(--lw-ui); background-image: var(--lw-plate); background-size: auto, 1024px auto, auto; background-repeat: no-repeat, repeat, no-repeat; background-blend-mode: normal, overlay, normal; background-clip: padding-box; border: 1px solid #5C646E; box-shadow: 0 0 0 1px rgba(0,0,0,.75), 0 18px 48px rgba(0,0,0,.6); }
@media (hover: hover) { .lw-q-wrap:hover .lw-tip, .lw-q-wrap:focus-within .lw-tip { display: flex; } }
.lw-q-stakes { display: none; }
@media (hover: none) { .lw-q-stakes { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; } }
.lw-half { flex: 1; min-width: 120px; display: grid; gap: 2px; align-content: start; }
.lw-half-head { font: 600 12px var(--lw-ui); text-transform: uppercase; letter-spacing: .14em; margin-bottom: 2px; }
.lw-half-head[data-tone="good"] { color: var(--lw-good); } .lw-half-head[data-tone="ill"] { color: var(--lw-bad); }
.lw-half-row { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: #A8B0BA; }
.lw-half-row b { font-weight: 500; font-variant-numeric: tabular-nums; }
.lw-half-row b[data-sign="good"] { color: #2FD07E; } .lw-half-row b[data-sign="ill"] { color: #F0544C; }
.lw-half-nothing { font-size: 14px; font-style: italic; color: #78808A; }
.lw-result { display: grid; gap: 12px; padding: 14px; background: rgba(13,17,23,.78); border: 1px solid rgba(201,209,219,.3); font: italic 400 17px/1.5 Georgia, "Times New Roman", serif; color: #d6dbe2; text-align: left; }
.lw-stamp { font: 600 10px var(--lw-label); letter-spacing: .24em; text-transform: uppercase; color: var(--lw-good); font-style: normal; display: flex; align-items: center; gap: 8px; }
.lw-actions { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; font-style: normal; }
.lw-hint { position: absolute; z-index: 2; left: 0; right: 0; bottom: 8px; justify-content: center; display: flex; align-items: center; gap: 8px; font: 600 10px var(--lw-label); letter-spacing: .16em; text-transform: uppercase; color: #E8ECF2; text-shadow: 0 1px 6px #000; pointer-events: none; }
@container lw (max-width: 720px) {
  .lw-event { min-height: 0; }
  .lw-hint { position: static; grid-column: 1 / -1; grid-row: 4; padding: 0 14px 12px; text-align: center; flex-wrap: wrap; }
  .lw-scene-field { grid-template-rows: auto auto auto auto; }
  .lw-scene-head { padding: 10px 12px; gap: 10px; }
  .lw-scene-head h3 { font-size: 18px; }
  .lw-scene-mark { width: 28px; height: 28px; }
  .lw-scene-field { min-height: 0; align-items: start; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto; background-size: auto 230px; background-repeat: no-repeat; background-position: center top; }
  .lw-scene-field::before { background: linear-gradient(180deg, rgba(13,17,23,.2) 0, rgba(13,17,23,.55) 140px, #0D1117 230px); }
  .lw-fig { grid-row: 1; padding: 6px 8px 0; }
  .lw-fig[data-side="me"] { grid-column: 1; } .lw-fig[data-side="them"] { grid-column: 2; }
  .lw-fig-face { width: min(40vw, 170px); align-self: center; }
  .lw-fig figcaption { margin-bottom: 4px; } .lw-fig-name { font-size: 12px; }
  .lw-scene-lead { grid-row: 2; padding: 6px 14px 0; font-size: 16px; }
  .lw-scene-middle { grid-column: 1 / -1; grid-row: 3; padding: 10px 14px 14px; }
  .lw-q { padding: 12px 14px; }
}

/* kin */
.lw-kin { display: grid; grid-template-columns: minmax(0,1fr) 270px; min-width: 0; min-height: 100%; }
.lw-tree { padding: 24px 20px; display: grid; justify-items: center; align-content: start; background: radial-gradient(ellipse at 50% 30%, rgba(60,68,80,.4), transparent 70%); }
.lw-card { position: relative; width: 112px; display: grid; justify-items: center; text-align: center; background: linear-gradient(180deg, var(--lw-ink-3), var(--lw-ink-2)); border: 1px solid rgba(201,205,211,.35); padding: 0 0 8px; transition: border-color .2s, box-shadow .2s; }
.lw-card-face { width: 100%; aspect-ratio: 1; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, #3a4454, #161c25); border-bottom: 1px solid rgba(201,205,211,.25); }
.lw-card-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; transform: scale(1.05); }
.lw-card b { font: 600 11px var(--lw-label); letter-spacing: .08em; color: #fff; margin-top: 7px; }
.lw-card span { font: 500 10px var(--lw-ui); color: var(--lw-text-3); padding: 0 4px; }
.lw-card:hover { border-color: rgba(244,246,249,.8); }
.lw-card[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 26px rgba(201,205,211,.3); }
.lw-card[aria-pressed="true"] .lw-card-face { background: radial-gradient(ellipse at 50% 60%, #566175, #1d2531); }
.lw-bracket { height: 22px; width: 100%; max-width: 380px; border: 1px solid rgba(152,160,170,.7); border-bottom: 0; }
.lw-stem { width: 0; height: 22px; border-left: 1px solid rgba(152,160,170,.7); }
.lw-gen { display: flex; gap: 18px; align-items: flex-start; justify-content: center; }
.lw-couple { display: flex; align-items: center; }
.lw-ring { width: 26px; display: grid; place-items: center; }
.lw-ring::before { content: ""; width: 8px; height: 8px; transform: rotate(45deg); background: var(--lw-silver); box-shadow: 0 0 8px rgba(244,246,249,.5); }
.lw-fam { display: flex; gap: 32px; align-items: flex-start; justify-content: center; width: 100%; }
.lw-col { display: grid; justify-items: center; }
.lw-dos { border-left: 1px solid rgba(92,100,110,.55); padding: 20px 20px 22px; display: grid; gap: 14px; align-content: start; background: rgba(8,11,15,.35); }
.lw-dos-face { width: 100%; aspect-ratio: 1; overflow: hidden; background: radial-gradient(ellipse at 50% 60%, #566175, #161c25); border: 1px solid rgba(201,205,211,.4); }
.lw-dos-face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 10%; }
.lw-dos h4 { font: 700 18px/1.2 var(--lw-label); letter-spacing: .05em; color: #fff; text-transform: uppercase; }
.lw-traits { display: flex; flex-wrap: wrap; gap: 10px; }
.lw-trait { display: grid; justify-items: center; gap: 3px; width: 62px; font: 600 8px var(--lw-label); letter-spacing: .06em; text-transform: uppercase; color: var(--lw-text-2); text-align: center; overflow-wrap: anywhere; }
.lw-trait img { width: 44px; height: 44px; border: 1px solid rgba(201,205,211,.35); background: var(--lw-ink-2); }
.lw-regard { display: grid; gap: 5px; font: 600 10px var(--lw-label); letter-spacing: .16em; text-transform: uppercase; color: var(--lw-text-2); }
.lw-regard i { display: block; height: 6px; background: rgba(255,255,255,.1); position: relative; }
.lw-regard i::after { content: ""; position: absolute; inset: 0 calc(100% - var(--v)) 0 0; background: linear-gradient(90deg, #6f7886, var(--lw-silver)); }
.lw-regard.is-hostile i::after { background: linear-gradient(90deg, #8a3a40, var(--lw-bad)); }
@container lw (max-width: 1100px) {
  .lw-kin { grid-template-columns: minmax(0,1fr); }
  .lw-dos { border-left: 0; border-top: 1px solid rgba(92,100,110,.55); grid-template-columns: 120px minmax(0,1fr); align-items: start; }
  .lw-dos-face { grid-row: span 4; }
}
@container lw (max-width: 720px) {
  .lw-card { width: clamp(60px, 22cqw, 84px); } .lw-card b { font-size: 9px; } .lw-card span { font-size: 9px; }
  .lw-gen, .lw-fam { gap: 8px; }
  .lw-tree { min-width: 0; }
  .lw-tree { padding: 16px 8px; }
  .lw-dos { grid-template-columns: 96px minmax(0,1fr); padding: 14px; }
  .lw-dos-face { grid-row: auto; }
  .lw-traits, .lw-regard { grid-column: 1 / -1; }
  .lw-traits { flex-wrap: nowrap; gap: 8px; justify-content: flex-start; }
  .lw-trait { width: 58px; flex: none; }
  .lw-ring { width: 16px; }
  .lw-bracket { max-width: 230px; }
}

/* lands */
.lw-lands { min-width: 0; display: grid; grid-template-rows: auto minmax(0,1fr) auto; height: 100%; min-height: 0; }
.lw-legend { padding: 12px 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; border-bottom: 1px solid rgba(92,100,110,.55); background: rgba(8,11,15,.45); }
.lw-legend h4 { font: 700 11px var(--lw-label); letter-spacing: .26em; text-transform: uppercase; color: #fff; margin-right: 8px; }
.lw-realm { display: grid; grid-template-columns: 22px auto; gap: 8px; align-items: center; text-align: left; padding: 5px 12px 5px 8px; border: 1px solid rgba(92,100,110,.5); background: rgba(27,34,44,.6); transition: border-color .2s, background .2s; }
.lw-realm img { width: 20px; height: 24px; object-fit: contain; }
.lw-realm b { font: 600 11px var(--lw-label); letter-spacing: .06em; color: #fff; white-space: nowrap; }
.lw-realm:hover { border-color: rgba(244,246,249,.6); }
.lw-realm[aria-pressed="true"] { border-color: var(--lw-silver); background: rgba(90,100,116,.4); box-shadow: inset 0 -3px 0 var(--c); }
.lw-mapwrap { position: relative; display: grid; align-items: center; overflow: auto; background: #647c77; scrollbar-width: thin; }
.lw-map { position: relative; width: 100%; min-width: 600px; aspect-ratio: 1800/1000; container-type: inline-size; }
.lw-map > img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lw-mark { position: absolute; transform: translate(-50%,-50%); background: none; border: 0; padding: 0; display: grid; justify-items: center; gap: 2px; transition: opacity .25s, transform .2s; }
.lw-mark img { filter: drop-shadow(0 2px 2px rgba(0,0,0,.65)); }
.lw-mark.is-city img { width: 3cqw; height: 3.6cqw; } .lw-mark.is-town img { width: 2.2cqw; height: 2.6cqw; } .lw-mark.is-village img { width: 1.6cqw; height: 1.9cqw; }
.lw-mark em { font: 600 9px var(--lw-label); letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(13,17,23,.85); border: 1px solid rgba(201,205,211,.4); padding: 2px 6px; white-space: nowrap; font-style: normal; }
.lw-mark:hover { transform: translate(-50%,-50%) scale(1.2); z-index: 3; }
.lw-mark.is-dim { opacity: .22; }
.lw-mark:not(.is-city) em { display: none; } .lw-mark:hover em { display: block; }
.lw-stat { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 10px 18px; border-top: 1px solid rgba(92,100,110,.55); background: rgba(8,11,15,.45); font: 600 10px var(--lw-label); letter-spacing: .16em; text-transform: uppercase; color: var(--lw-text-2); }
.lw-stat b { color: #fff; font-variant-numeric: tabular-nums; }
@container lw (max-width: 720px) {
  .lw-map { min-width: 0; }
  .lw-mapwrap { overflow: hidden; }
  .lw-legend { padding: 10px 12px; gap: 6px; } .lw-legend h4 { width: 100%; }
  .lw-mark.is-city img { width: max(15px, 4.6cqw); height: max(18px, 5.5cqw); } .lw-mark.is-town img { width: max(11px, 3.2cqw); height: max(13px, 3.8cqw); } .lw-mark.is-village img { width: max(9px, 2.4cqw); height: max(11px, 2.8cqw); }
  .lw-mark.is-city em { display: none; } .lw-mark:hover em { display: block; }
  .lw-stat { padding: 9px 12px; font-size: 9px; }
}

/* studio */
.lw-studio { display: grid; grid-template-columns: 176px minmax(0,1fr); min-height: 100%; }
.lw-subnav { border-right: 1px solid rgba(92,100,110,.55); padding: 12px; display: grid; gap: 8px; align-content: start; background: rgba(8,11,15,.5); }
.lw-sub { display: grid; grid-template-columns: 28px minmax(0,1fr); gap: 7px; align-items: center; text-align: left; padding: 8px 9px; border: 1px solid rgba(92,100,110,.5); background: rgba(27,34,44,.6); font: 600 9px var(--lw-label); letter-spacing: .06em; text-transform: uppercase; color: var(--lw-text-2); transition: color .2s, border-color .2s, background .2s; }
.lw-sub img { width: 28px; height: 28px; }
.lw-sub span { min-width: 0; overflow-wrap: anywhere; }
.lw-sub[aria-pressed="true"] { color: #fff; border-color: var(--lw-silver); background: rgba(90,100,116,.4); box-shadow: 0 0 18px rgba(201,205,211,.15); }
.lw-locked { margin-top: 8px; display: flex; gap: 7px; align-items: center; font: 600 9px var(--lw-label); letter-spacing: .12em; text-transform: uppercase; color: var(--lw-text-3); }
.lw-locked svg { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.lw-pane { position: relative; min-width: 0; min-height: 520px; display: grid; grid-template-rows: auto minmax(0,1fr); }
.lw-pane-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 18px; border-bottom: 1px solid rgba(92,100,110,.45); font: 700 11px var(--lw-label); letter-spacing: .24em; text-transform: uppercase; color: #fff; background: rgba(8,11,15,.35); }
.lw-pane-head span:last-child { color: var(--lw-text-3); font-weight: 600; letter-spacing: .14em; font-size: 9px; }
.lw-chars { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 26px; padding: 24px; align-items: start; }
.lw-portrait-wrap { display: grid; justify-items: center; gap: 12px; }
.lw-portrait { position: relative; width: min(100%, 340px); aspect-ratio: 1; background: radial-gradient(ellipse at 50% 55%, #566175, #161c25 78%); border: 1px solid rgba(201,205,211,.5); overflow: hidden; }
.lw-portrait::before { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(201,205,211,.18); z-index: 20; pointer-events: none; }
.lw-portrait img { position: absolute; inset: 0; width: 100%; height: 100%; }
.lw-ctl { display: grid; gap: 14px; }
.lw-field { display: grid; gap: 5px; font: 600 9px var(--lw-label); letter-spacing: .18em; text-transform: uppercase; color: var(--lw-text-3); }
.lw-field input[type=text] { background: rgba(8,11,15,.8); border: 1px solid rgba(92,100,110,.7); color: #fff; padding: 9px 11px; font: 500 14px var(--lw-ui); width: 100%; border-radius: 0; }
.lw-steps { display: grid; gap: 10px; }
.lw-step { display: grid; gap: 5px; font: 600 9px var(--lw-label); letter-spacing: .18em; text-transform: uppercase; color: var(--lw-text-3); }
.lw-step div { display: grid; grid-template-columns: 34px minmax(0,1fr) 34px; border: 1px solid rgba(92,100,110,.7); background: rgba(8,11,15,.6); }
.lw-step button { background: transparent; border: 0; color: var(--lw-silver); font: 700 16px var(--lw-ui); height: 36px; }
.lw-step button:hover { background: rgba(201,205,211,.14); color: #fff; }
.lw-step output { display: grid; place-items: center; text-align: center; font: 600 11px var(--lw-label); letter-spacing: .06em; color: #fff; text-transform: none; padding: 0 4px; border-inline: 1px solid rgba(92,100,110,.5); font-variant-numeric: tabular-nums; }
.lw-picks { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.lw-pick { display: grid; justify-items: center; gap: 3px; min-width: 0; overflow: hidden; padding: 5px 2px 4px; border: 1px solid rgba(92,100,110,.55); background: rgba(8,11,15,.55); font: 600 7.5px var(--lw-label); letter-spacing: 0; text-transform: uppercase; color: var(--lw-text-3); text-align: center; transition: color .2s, border-color .2s, background .2s; }
.lw-pick img { width: 40px; height: 40px; opacity: .55; }
.lw-pick[aria-pressed="true"] { border-color: var(--lw-silver); color: #fff; background: rgba(90,100,116,.35); }
.lw-pick[aria-pressed="true"] img { opacity: 1; }
.lw-btn-ghost { font: 600 11px var(--lw-label); letter-spacing: .14em; text-transform: uppercase; padding: 10px 20px; background: transparent; color: #F4F6F9; border: 1px solid rgba(244,246,249,.4); transition: background .2s, box-shadow .2s; }
.lw-btn-ghost:hover { background: rgba(244,246,249,.1); box-shadow: 0 0 20px rgba(244,246,249,.2); }
@container lw (max-width: 720px) { .lw-chars { grid-template-columns: 1fr; padding: 14px; gap: 16px; } .lw-portrait { width: min(72%, 280px); } .lw-picks { gap: 6px; } }

.lw-edit { position: relative; display: grid; grid-template-rows: minmax(0,1fr) auto; min-height: 0; }
.lw-canvas { position: relative; min-height: 300px; overflow: hidden; border-bottom: 1px solid rgba(92,100,110,.5); background: #647c77; }
.lw-canvas > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity .35s; }
.lw-tools { position: absolute; z-index: 5; left: 12px; top: 12px; display: grid; gap: 6px; }
.lw-tool { width: 44px; height: 44px; display: grid; place-items: center; background: rgba(13,17,23,.92); border: 1px solid rgba(201,205,211,.4); color: var(--lw-silver); }
.lw-tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.lw-tool[aria-pressed="true"] { background: var(--lw-silver); color: #0E1013; border-color: #fff; }
.lw-layers { position: absolute; z-index: 5; right: 12px; top: 12px; display: grid; gap: 8px; padding: 12px 14px; background: rgba(13,17,23,.92); border: 1px solid rgba(201,205,211,.4); min-width: 150px; }
.lw-layers b { font: 700 9px var(--lw-label); letter-spacing: .24em; text-transform: uppercase; color: #fff; }
.lw-layer { display: flex; align-items: center; gap: 9px; text-align: left; background: none; border: 0; padding: 2px 0; font: 600 10px var(--lw-label); letter-spacing: .1em; text-transform: uppercase; color: var(--lw-text-2); }
.lw-layer i { width: 14px; height: 14px; border: 1px solid var(--lw-silver); display: grid; place-items: center; flex: none; }
.lw-layer[aria-pressed="true"] { color: #fff; }
.lw-layer[aria-pressed="true"] i::after { content: ""; width: 7px; height: 7px; background: var(--lw-silver); }
.lw-layer:disabled { cursor: default; }
.lw-estat { display: flex; flex-wrap: wrap; gap: 6px 22px; padding: 12px 18px; font: 600 10px var(--lw-label); letter-spacing: .16em; text-transform: uppercase; color: var(--lw-text-2); }
.lw-estat b { color: #fff; }
@container lw (max-width: 720px) { .lw-tool { width: 36px; height: 36px; } .lw-tool svg { width: 18px; height: 18px; } .lw-tools { left: 8px; top: 8px; gap: 5px; } .lw-layers { right: 8px; top: 8px; padding: 8px 10px; min-width: 0; } .lw-layers b { display: none; } .lw-layer { font-size: 9px; } .lw-estat { padding: 10px 12px; font-size: 9px; } }

.lw-inv { display: grid; grid-template-columns: minmax(0,1fr) 270px; min-height: 0; }
.lw-slots { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; padding: 22px; align-content: start; }
.lw-slot { aspect-ratio: 1; display: grid; place-items: center; position: relative; background: radial-gradient(ellipse at 50% 55%, #2b3340, #10151c); border: 1px solid rgba(201,205,211,.35); transition: border-color .2s, box-shadow .2s; padding: 0; }
.lw-slot img { width: 66%; height: 66%; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.6)); }
.lw-slot::after { content: ""; position: absolute; inset: 4px; border: 1px solid rgba(201,205,211,.1); pointer-events: none; }
.lw-slot.is-empty { background: rgba(8,11,15,.5); border-style: dashed; border-color: rgba(92,100,110,.55); color: var(--lw-text-3); font: 400 22px var(--lw-ui); cursor: default; }
.lw-slot[aria-pressed="true"] { border-color: #fff; box-shadow: 0 0 24px rgba(201,205,211,.3), inset 0 0 20px rgba(201,205,211,.1); }
.lw-idet { border-left: 1px solid rgba(92,100,110,.55); padding: 22px 20px; display: grid; gap: 14px; align-content: start; background: rgba(8,11,15,.35); }
.lw-idet-icon { width: 96px; height: 96px; display: grid; place-items: center; border: 1px solid rgba(201,205,211,.45); background: radial-gradient(ellipse at 50% 55%, #566175, #161c25); }
.lw-idet-icon img { width: 76px; height: 76px; object-fit: contain; }
.lw-idet h4 { font: 700 17px/1.2 var(--lw-label); letter-spacing: .05em; color: #fff; text-transform: uppercase; }
.lw-eff { list-style: none; display: grid; gap: 7px; font: 500 14px var(--lw-ui); }
.lw-eff .is-good { color: var(--lw-good); } .lw-eff .is-bad { color: var(--lw-bad); }
.lw-idet p { font: 400 16px/1.45 var(--lw-prose); color: rgba(236,239,243,.68); }
@container lw (max-width: 1100px) { .lw-inv { grid-template-columns: 1fr; } .lw-idet { border-left: 0; border-top: 1px solid rgba(92,100,110,.55); } .lw-slots { grid-template-columns: repeat(6, minmax(0,1fr)); } }
@container lw (max-width: 720px) { .lw-slots { padding: 14px; gap: 8px; grid-template-columns: repeat(3, minmax(0,1fr)); } }

.lw-ai { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); min-height: 0; }
.lw-dials { padding: 22px; display: grid; gap: 16px; align-content: start; }
.lw-tones { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.lw-tone { padding: 11px 6px; border: 1px solid rgba(92,100,110,.7); background: rgba(8,11,15,.55); font: 700 10px var(--lw-label); letter-spacing: .14em; text-transform: uppercase; color: var(--lw-text-2); transition: color .2s, background .2s; }
.lw-tone[aria-pressed="true"] { background: var(--lw-silver); color: #0E1013; border-color: #fff; }
.lw-themes { display: flex; flex-wrap: wrap; gap: 8px; }
.lw-theme { padding: 7px 12px; border: 1px solid rgba(92,100,110,.7); background: rgba(8,11,15,.55); font: 600 10px var(--lw-label); letter-spacing: .12em; text-transform: uppercase; color: var(--lw-text-3); transition: color .2s, background .2s, border-color .2s; }
.lw-theme[aria-pressed="true"] { color: #fff; border-color: var(--lw-silver); background: rgba(90,100,116,.4); }
.lw-dial { display: grid; gap: 6px; font: 600 9px var(--lw-label); letter-spacing: .18em; text-transform: uppercase; color: var(--lw-text-3); }
.lw-dial div { display: flex; justify-content: space-between; } .lw-dial output { color: #fff; font-variant-numeric: tabular-nums; }
.lw-dial input[type=range] { width: 100%; accent-color: #C9CDD3; }
.lw-sample { border-left: 1px solid rgba(92,100,110,.55); padding: 22px; display: grid; gap: 12px; align-content: start; background: rgba(8,11,15,.35); }
.lw-sample .lw-cap { display: flex; align-items: center; gap: 8px; }
.lw-sample-text { font: 400 20px/1.55 var(--lw-prose); color: #E8ECF2; min-height: 7.5em; }
@container lw (max-width: 1100px) { .lw-ai { grid-template-columns: 1fr; } .lw-sample { border-left: 0; border-top: 1px solid rgba(92,100,110,.55); } }
@container lw (max-width: 720px) {
  .lw-dials, .lw-sample { padding: 14px; } .lw-sample-text { font-size: 18px; }
  .lw-studio { grid-template-columns: 1fr; }
  .lw-subnav { grid-template-columns: repeat(4, minmax(0,1fr)); border-right: 0; border-bottom: 1px solid rgba(92,100,110,.55); padding: 8px; gap: 6px; }
  .lw-sub { grid-template-columns: 1fr; justify-items: center; padding: 7px 2px; font-size: 8px; letter-spacing: .04em; text-align: center; }
  .lw-locked { display: none; }
  .lw-pane { min-height: 0; }
}
@container lw (max-width: 1100px) and (min-width: 721px) {
  .lw-studio { grid-template-columns: 148px minmax(0,1fr); }
  .lw-sub { grid-template-columns: 22px minmax(0,1fr); font-size: 8px; padding: 7px; } .lw-sub img { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) { .lw * { transition: none !important; } }
