/* The Guild page (client/guild.ts). One frame (.gd) that fills the window under the tabs and never scrolls:
   client/guild.ts guildFit sets --gh and pages each framed list inside its own card. Three widths:
   wide (1001+), mid (761-1000: itch windows 800x600 and 860x585) and phone (up to 760). */
.gd { --gap: 12px; width: calc(100% - var(--gd-aside, 0px)); display: grid; gap: var(--gap); height: var(--gh, 520px); max-height: 820px; min-height: 0; align-content: start; }
.gd .gd-card { display: flex; flex-direction: column; min-width: 0; min-height: 0; padding: 10px 14px 12px; overflow: hidden; }
.gd .cp-h { flex: none; margin-bottom: 8px; min-height: 24px; flex-wrap: nowrap; }
.gd .cp-h > .muted { margin-left: 0; font-size: 13px; white-space: nowrap; }
.gd .cp-h .pill { margin-left: 0; }
.gd .cp-h h4 { white-space: nowrap; }
.gd .hint { margin: 6px 0; font-size: 13px; }
.gd .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gd .tbl2 { flex: none; display: table; width: 100%; margin: 0; overflow: visible; font-size: 13.5px; }
.gd .tbl2 th { padding: 3px 6px 5px; font: 700 12.5px var(--pixel, var(--sans)); letter-spacing: .04em; white-space: nowrap; border-bottom: 1px solid var(--rule, var(--line)); }
.gd .tbl2 td { height: 34px; padding: 3px 6px; vertical-align: middle; }
.gd .tbl2 tr.me td { background: color-mix(in srgb, var(--rg-ink, var(--accent)) 11%, transparent); }
.gd .tbl2 tr.on td { background: color-mix(in srgb, var(--gilt, var(--gold)) 30%, transparent); }
.gd .tbl2 td .coinv img { width: 14px; height: 14px; }
.gd .gname { min-width: 0; gap: 7px; }
.gd .gname b { overflow: hidden; text-overflow: ellipsis; }
.gd .gname .picon { flex: none; }
.gd .gdot { box-shadow: 0 0 0 2px color-mix(in srgb, var(--good) 25%, transparent); }
.gd .pill.amber { background: color-mix(in srgb, #b9852a 22%, transparent); color: var(--warn); }
.gd-glink b, .gd-glink { font-weight: 600; }
.gd-lbl { font: 700 12.5px var(--pixel, var(--sans)); letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.gd .fit-pager { flex: none; height: 30px; margin-top: 6px; }

/* Crest: the guild's shield with its tag. */
.gd-crest { flex: none; width: 22px; height: 25px; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.gd-crest.lg { width: 66px; height: 74px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.gd-crest:not(.lg) text { display: none; }

/* Tiles: a label over one number. */
.gd-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.gd-tiles.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gd-tile { display: flex; flex-direction: column; justify-content: center; gap: 1px; min-width: 0; padding: 6px 10px; border-radius: 2px; background: var(--inlay, var(--panel-2)); box-shadow: inset 0 0 0 1px var(--rule-soft, var(--line)); }
.gd-tile span { font: 700 12px var(--pixel, var(--sans)); letter-spacing: .05em; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-tile b { font: 700 21px/1.05 var(--display, var(--sans)); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); white-space: nowrap; }
.gd-tile em { font: 500 12px var(--sans); font-style: normal; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-tile.ok b { color: var(--good); }
.gd-tile.low b, .gd-tile.low em { color: var(--bad); }
.gd-big { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.gd-big b { font: 700 30px/1 var(--display, var(--sans)); font-variant-numeric: lining-nums tabular-nums; color: var(--rg-ink, var(--ink)); white-space: nowrap; }
.gd-big span { font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }

/* Guild identity: crest, name, poster, owner. On the banner and on any guild's page. */
.gd-id { min-width: 0; }
.gd-id h2 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0; font-size: 26px; line-height: 1.1; color: var(--ink); }
.gd-id h2 .gtag { font: 800 .72em var(--sans); margin-right: 0; color: var(--rg-rubric, var(--gold)); }
.gd-poster { margin: 3px 0 0; font: italic 500 14.5px var(--sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-sub { margin: 3px 0 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gd-banner { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.25fr) auto; align-items: center; gap: 4px 16px; padding: 10px 16px; min-width: 0; }
.gd-bact { display: flex; flex-direction: column; gap: 6px; align-self: start; }
.gd-bact .btn { white-space: nowrap; }

/* ---------- Guild tab ---------- */
.gd-home { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto minmax(0, 1fr); grid-template-areas: "ban ban ban" "qs bank war" "news news mates"; }
.gd-home > .gd-banner { grid-area: ban; }
.gd-home .gd-bank { grid-area: bank; } .gd-home .gd-wsum { grid-area: war; } .gd-home .gd-mates { grid-area: mates; } .gd-home .gd-news { grid-area: news; }
.gd-home > .psec-tabs { grid-column: 1 / -1; margin: 0; }
.gd-bank .gbar { flex: none; height: 18px; margin: 8px 0 0; }
.gd-bank .gbar > span { line-height: 16px; }
.gd-give { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-top: 10px; }
.gd-give .btn { min-width: 40px; }
.gd-give-c { display: inline-flex; align-items: center; gap: 5px; }
.gd-give-c input { width: 68px; height: 28px; padding: 2px 8px; }
.gd-givers { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 10px; min-height: 22px; font-size: 13px; overflow: hidden; max-height: 22px; }
.gd-giver { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.gd-giver .coinv img { width: 13px; height: 13px; }
.gd-have { margin: 8px 0 0; font-size: 13px; color: var(--muted); }
.gd-wsum .gd-tiles { margin-top: 8px; }
.gd-lu { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-top: 8px; min-width: 0; }
.gd-lu .ar-team { margin: 0; flex-wrap: nowrap; gap: 0; }
.gd-lu .ar-mon { width: 46px; }
.gd-wsum .actions { margin-top: auto; padding-top: 8px; }
.gd-plist { flex: none; list-style: none; margin: 0; padding: 0; }
.gd-plist li { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 2px; border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 30%, transparent); font-size: 13.5px; }
.gd-plist li:first-child { border-top: 0; }
.gd-plist .gname { flex: 1 1 auto; }
.gd-lv { flex: none; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.gd-news li .t { flex: none; width: 34px; color: var(--muted); font-size: 12.5px; text-align: right; }
.gd-news li span:last-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Short windows have no room under the three cards for the news. */
@media (max-height: 779px) and (min-width: 761px) { .gd-home { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "ban ban ban" "qs bank war"; } .gd-home .gd-news, .gd-home .gd-mates { display: none; } }
@media (max-height: 779px) { .gd-home .gd-news { display: none; } }

/* ---------- Members ---------- */
.gd-mem { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); grid-template-areas: "list roster"; }
.gd-mem.mg { grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "list roster" "list apps"; }
.gd-mem .gd-members { grid-area: list; } .gd-mem .gd-roster { grid-area: roster; align-self: start; } .gd-mem .gd-apps { grid-area: apps; }
/* List cards are as tall as their rows, up to the frame: a short list leaves no blank vellum. */
.gd-members, .gd-apps, .gd-dir, .gd-prof, .gd-news, .gd-mates, .gd-wlast, .gd-wseason { align-self: start; max-height: 100%; }
.gd-mem > .psec-tabs { grid-column: 1 / -1; margin: 0; }
.gd-seatc { width: 30px; text-align: center !important; padding-left: 2px !important; padding-right: 2px !important; }
.gd-seat { display: inline-grid; place-items: center; min-width: 19px; height: 19px; padding: 0 3px; border-radius: 10px; font: 700 11.5px/1 var(--sans); font-style: normal; font-variant-numeric: lining-nums; color: #f1e4c2; background: var(--rg-ink, var(--accent)); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3); }
.gd-seat:empty { min-width: 9px; width: 9px; height: 9px; padding: 0; transform: rotate(45deg); border-radius: 1px; }
.gd-mtbl .gd-who { width: 99%; max-width: 0; }
.gd-mtbl .gd-who .gname { display: flex; overflow: hidden; }
.gd .gname > a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd .gname > .pill, .gd .gname > .gdot { flex: none; }
.gd-mtbl .gd-role { padding-left: 0; }
.gd-mtbl .opt-a, .gd-mtbl .opt-j { color: var(--muted); white-space: nowrap; }
.gd-mgc { text-align: right; white-space: nowrap; }
.gd-mgc { width: 34px; }
.gd .gd-more { min-width: 30px; height: 24px; padding: 0 6px; font-size: 16px; line-height: 1; }
.gd-mtbl tr.picked td { box-shadow: inset 0 1px 0 var(--warn), inset 0 -1px 0 var(--warn); }
.gd-members .gnote { margin: 0; font-size: 13px; }
@media (max-width: 1500px) { .gd-mtbl .opt-j { display: none; } }
@media (max-width: 1240px) { .gd-mtbl .opt-a { display: none; } }
@media (max-width: 1100px) { .gd-mtbl .opt-g { display: none; } }
.gd-seats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.gd-seats li, .gd-seatbtn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.gd-seats li { height: 96px; padding: 4px 3px 5px; border-radius: 2px; background: var(--inlay, var(--panel-2)); box-shadow: inset 0 0 0 1px var(--rule-soft, var(--line)); }
.gd-seats li:has(> .gd-seatbtn) { padding: 0; }
.gd-seatbtn { width: 100%; height: 100%; padding: 4px 3px 5px; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.gd-seatbtn:hover { background: var(--inlay-hi, var(--panel-3)); }
.gd-seats .gd-seat { position: absolute; top: 4px; left: 4px; }
.gd-seats b { flex: none; max-width: 100%; margin-top: 1px; font-size: 12.5px; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-seats em { flex: none; font-style: normal; font-size: 11.5px; line-height: 1.1; color: var(--muted); white-space: nowrap; }
.gd-seats li.empty { justify-content: center; background: none; box-shadow: none; outline: 1px dashed var(--rule, var(--line)); outline-offset: -1px; }
.gd-seats li.empty .gd-seat { background: none; color: var(--muted); box-shadow: inset 0 0 0 1px var(--rule, var(--line)); }
.gd-open { font: italic 500 13px var(--sans); color: var(--muted); }
.gd-seats li.picked { box-shadow: inset 0 0 0 2px var(--warn); }
.gd-seats .picon-md { height: 50px; transform-origin: 50% 100%; }
.gd-apps .gd-plist li { height: auto; min-height: 34px; padding: 3px 2px; flex-wrap: wrap; row-gap: 2px; }
.gd-apps .gacts { flex: none; gap: 5px; }

/* ---------- War ---------- */
.gd-war { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "next next" "last last"; }
.gd-war .gd-wnext { grid-area: next; } .gd-war .gd-wlast { grid-area: last; } .gd-war .gd-wseason { grid-area: season; }
.gd .gd-wnext { display: grid; grid-template-columns: auto minmax(0, 1.25fr) minmax(0, 1fr) auto; align-items: center; gap: 6px 18px; padding-top: 8px; padding-bottom: 8px; }
.gd-when h4 { margin: 0 0 2px; }
.gd-when .gd-big b { font-size: 32px; }
.gd-pills { display: flex; gap: 5px; margin-top: 4px; }
.gd-wnext .gd-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gd-wnext .gd-lu { margin: 0; justify-content: center; flex-wrap: nowrap; }
.gd-wnext .actions { flex-direction: column; align-items: stretch; }
.gd-wt .gd-gn { width: 99%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-wlast .gd-tiles { flex: none; margin-bottom: 8px; }
.gd-wlast .seg button, .gd-sort button { padding: 2px 10px; font-size: 12.5px; min-height: 0; height: 24px; }
.gd-wfoot { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; min-height: 22px; font-size: 13px; }
.gd-wfoot .gd-over { margin-left: auto; }
.gd-medal { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.gd-logh { flex: none; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 13px; }
.gd-log { flex: none; list-style: none; margin: 0; padding: 0; font-size: 13px; }
.gd-log li { display: flex; gap: 8px; align-items: baseline; padding: 4px 4px; border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 30%, transparent); }
.gd-log li:first-child { border-top: 0; }
.gd-log li.fall { color: var(--bad); font-weight: 600; }
.gd-log .t { flex: none; width: 34px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; }
/* A short window keeps the tables: your own line is highlighted in them, so the tiles and footers step aside,
   and every row is a little lower. */
@media (max-height: 779px) {
  .gd-wlast .gd-tiles, .gd-wfoot { display: none; }
  .gd .tbl2 td { height: 29px; padding-top: 1px; padding-bottom: 1px; }
  .gd-plist li { height: 30px; }
  .gd .fit-pager { height: 28px; margin-top: 4px; }
  .gd .fit-pager .btn { min-height: 26px; height: 26px; }
}

/* ---------- Guilds: the directory and any guild's page ---------- */
.gd-dirpage { grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); }
.gd-bar { flex: none; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.gd-bar .fbar { flex: 1 1 auto; margin: 0; min-width: 0; }
.gd-bar .fsearch { width: 100%; max-width: 320px; }
.gd-list tbody tr { cursor: pointer; }
.gd-list tbody tr:hover td { background: var(--inlay, var(--panel-2)); }
.gd-list tbody tr.on:hover td { background: color-mix(in srgb, var(--gilt, var(--gold)) 30%, transparent); }
.gd-list .gd-n { width: 26px; color: var(--muted); padding-right: 2px; }
.gd-list .gd-cr { width: 26px; padding: 2px 0 0 4px; line-height: 0; }
.gd-list .gd-gn { width: 99%; max-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-list .gd-rc { text-align: right; white-space: nowrap; }
.gd-boost { display: inline-block; width: 8px; height: 8px; margin-left: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 30%, transparent); vertical-align: 1px; }
.gd-phead { flex: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 14px; margin-bottom: 8px; }
.gd-phead .gd-tiles { grid-column: 1 / -1; }
.gd-join { align-self: start; }
.gd-back { display: none; flex: none; margin: -2px 0 6px; font: 700 14px var(--pixel, var(--sans)); color: var(--accent); text-decoration: none; }
.gd-prof.empty { align-items: center; justify-content: center; }

/* ---------- Found a guild ---------- */
.gd-found { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: auto; max-width: 1100px; }
.gd-found .gd-card { overflow: visible; }
.gd-found .gform label.off { opacity: .45; }
.gd-found .actions { margin-top: 4px; }
.gd-preview .gd-tiles { margin-top: 2px; }
.gd-dlg .gform label.off { opacity: .45; }
/* Managing a member: who they are, their numbers, then one button per action. */
.gd-mhead { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.gd-mhead > div { display: flex; flex-direction: column; min-width: 0; }
.gd-mhead b { font: 700 20px/1.15 var(--display, var(--sans)); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gd-mhead span { font-size: 13px; color: var(--muted); }
.gd-mdlg .gd-tile b { font-size: 16px; }
.gd-mdlg .gd-tile b .coinv img { width: 14px; height: 14px; }
.gd-macts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.gd-macts .btn { white-space: nowrap; }
@media (max-width: 480px) { .gd-mdlg .gd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gd-macts { grid-template-columns: minmax(0, 1fr); } }
.gd-setnote { grid-column: 2; align-self: end; margin: 0 0 7px; font-size: 13px; color: var(--muted); }

/* ---------- mid: 761 to 1000 wide ---------- */
@media (max-width: 1000px) {
  .gd { --gap: 8px; }
  .gd .gd-card { padding: 8px 10px 10px; }
  .gd-banner { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.5fr) auto; gap: 4px 10px; padding: 6px 10px; }
  .gd-crest.lg { width: 50px; height: 56px; }
  .gd-id h2 { font-size: 22px; }
  .gd-tile { padding: 4px 8px; }
  .gd-tile b { font-size: 18px; }
  .gd-big b { font-size: 26px; }
  .gd-give-c input { width: 64px; padding: 2px 6px; }
  .gd-home .gd-wsum .gd-lu .gd-lbl { display: none; }
  .gd-lu .ar-mon { width: 42px; }
  .gd-mem { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
  .gd-seats li { height: 88px; }
  .gd-seats .picon-pal { display: none; }
  .gd .gd-wnext { gap: 4px 10px; grid-template-columns: auto minmax(0, 1fr) auto auto; }
  .gd-when .gd-big b { font-size: 26px; }
  .gd-wnext .gd-lu .gd-lbl { display: none; }
  .gd-wnext .gd-lu .ar-mon { width: 38px; } .gd-wnext .gd-lu .ar-mon img { width: 34px; height: 34px; }
  .gd-phead { grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.5fr) auto; }
  .gd-preview .gd-phead { grid-template-columns: auto minmax(0, 1fr); }
  .gd-phead .gd-tiles { grid-column: 3; grid-row: 1; }
  .gd-phead .gd-join { grid-column: 4; }
  .gd-wt .opt-f { display: none; }
  /* One pane at a time: the list, or the guild picked from it. */
  .gd-dirpage { grid-template-columns: minmax(0, 1fr); }
  .gd-dirpage.open .gd-dir, .gd-dirpage:not(.open) .gd-prof { display: none; }
  .gd-back { display: block; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .gd, .gd-home, .gd-mem, .gd-war { display: flex; flex-direction: column; }
  .gd > .psec.on { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  /* A card is as tall as what it holds, up to the room under the tabs; its list pages inside it. */
  .gd > .psec.on > .gd-card { flex: 0 1 auto; align-self: stretch; max-height: none; }
  .gd > .gd-card { flex: 0 1 auto; align-self: stretch; max-height: none; }
  .gd > .psec-tabs { flex: none; }
  .gd .tbl2 { font-size: 13px; }
  .gd .tbl2 td { height: 32px; padding: 2px 4px; }
  .gd .tbl2 th { padding: 2px 4px 4px; }
  .gd .btn.tiny, .gd .btn.small { min-height: 30px; }
  .gd-banner { grid-template-columns: auto minmax(0, 1fr) auto; padding: 6px 8px; gap: 4px 8px; flex: none; }
  .gd-banner .gd-tiles { grid-column: 1 / -1; grid-row: 2; }
  .gd-banner .gd-bact { grid-row: 1; grid-column: 3; }
  .gd-crest.lg { width: 40px; height: 45px; }
  .gd-id h2 { font-size: 19px; gap: 5px; }
  .gd-poster { font-size: 13px; }
  .gd-banner .gd-sub { display: none; }
  .gd-tile { padding: 3px 6px; }
  .gd-tile span { font-size: 11px; }
  .gd-tile b { font-size: 16px; }
  .gd-tile em { font-size: 11px; }
  .gd-home .gd-news { display: none; }
  .gd-home .gd-card > .cp-h h4 { display: none; }
  .gd-home .gd-card > .cp-h { margin-bottom: 4px; }
  .gd-home .gd-mates > .cp-h { display: none; }
  /* Boost and War: the state pill sits beside the big number, not on a line of its own. */
  .gd-home .gd-bank, .gd-home .gd-wsum { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; align-items: center; }
  .gd-home .gd-bank > *, .gd-home .gd-wsum > * { grid-column: 1 / -1; }
  .gd-home .gd-bank > .cp-h, .gd-home .gd-wsum > .cp-h { grid-column: 2; grid-row: 1; margin: 0 0 0 8px; }
  .gd-home .gd-bank > .gd-big, .gd-home .gd-wsum > .gd-big { grid-column: 1; grid-row: 1; }
  .gd-home .gd-big b { font-size: 26px; }
  .gd-give .gd-lbl, .gd-have { display: none; }
  .gd-give { gap: 4px; margin-top: 8px; }
  .gd-give .btn { min-width: 42px; padding-left: 8px; padding-right: 8px; }
  .gd-give-c { gap: 4px; }
  .gd-give-c input { width: 60px; height: 30px; }
  .gd-givers { margin-top: 8px; }
  .gd-home .gd-wsum .gd-lu .gd-lbl { display: inline; }
  .gd-home .gd-wsum .actions { margin-top: 0; }
  .gd-mtbl .opt-p, .gd-mtbl .opt-g, .gd-mtbl .opt-a, .gd-mtbl .opt-j { display: none; }
  .gd-mtbl .gd-seatc { width: 24px; }
  .gd-mtbl .gd-who .pill { display: none; }
  .gd-mem .gd-card > .cp-h h4, .gd-war .psec > .gd-card > .cp-h h4 { display: none; }
  .gd-mem .gd-roster { align-self: stretch; }
  .gd-seats li { height: 88px; }
  .gd .gd-wnext { grid-template-columns: minmax(0, 1fr) auto; align-content: start; gap: 8px; }
  .gd-wnext .gd-tiles { grid-column: 1 / -1; }
  .gd-wnext .gd-lu { justify-content: flex-start; grid-column: 1 / -1; }
  .gd-wnext .gd-lu .gd-lbl { display: inline; }
  .gd-wnext .actions { grid-column: 1 / -1; flex-direction: row; }
  .gd-when h4 { display: none; }
  .gd-phead { grid-template-columns: auto minmax(0, 1fr) auto; }
  .gd-phead .gd-tiles { grid-column: 1 / -1; grid-row: auto; }
  .gd-phead .gd-join { grid-column: 3; }
  .gd-list .opt-p, .gd-list .opt-w, .gd-list .gd-n { display: none; }
  .gd-bar { flex-wrap: wrap; }
  .gd-sort button { height: 30px; }
  .gd-prof .opt-p { display: none; }
  .gd-phead { gap: 4px 8px; margin-bottom: 6px; }
  .gd-prof .gd-sub { font-size: 12px; }
  .gd-found { display: block; }
  .gd-found .gd-preview { display: none; }
  .gd-found .gform { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 8px; }
  .gd-found .gd-card > .cp-h { display: none; }
}
/* Short phones: the banner keeps the name and the buttons; its numbers are on the guild's own page under Guilds. */
@media (max-width: 760px) and (max-height: 700px) {
  .gd-banner .gd-tiles { display: none; }
}
@media (max-width: 760px) and (max-height: 600px) {
  .gd-givers + .gd-givers, .gd-home .gd-wsum .gd-lu { display: none; }
  .gd-phead .gd-tiles, .gd-prof .gd-sub { display: none; }
  .gd-home .gd-wsum .gd-tiles { margin-top: 6px; }
}
@media (max-width: 350px) {
  .gd-mtbl .picon-pal { display: none; }
}

/* ---------- the emblem and its maker ---------- */
/* A crest the owner or a co-owner can edit: the whole crest is the button, with a pencil on its corner. */
.gd-crest-btn { position: relative; flex: none; display: inline-flex; padding: 0; border: 0; background: none; color: inherit; cursor: pointer; border-radius: 8px; }
.gd-crest-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gd-pen { position: absolute; right: -5px; bottom: -3px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--panel-2, var(--panel)); border: 1px solid var(--line-2); color: var(--gold); }
.gd-pen svg { width: 12px; height: 12px; }
.gd-crest-btn:hover .gd-pen { background: var(--gold); color: #1d130a; }

.gd-embbtn { display: inline-flex; align-items: center; gap: 6px; }
.gd-embbtn .gd-crest { width: 16px; height: 18px; filter: none; }
.dialog.gd-em-dlg { width: min(520px, calc(100vw - 32px)); }
.gd-em, .gd-em > * { min-width: 0; }
.gd-em { display: grid; gap: 8px; color: var(--ink); }
.gd-em [hidden] { display: none !important; }
.gd-em-view { display: flex; align-items: center; justify-content: center; gap: 16px; }
.gd-em-view > span { display: inline-flex; }
.gd-em-view .btn { white-space: nowrap; }
.gd-em-big { width: 84px; height: 94px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .4)); }
.gd-em-sizes { align-items: center; gap: 8px; }
.gd-em-sizes em { font-style: normal; font-size: 12px; color: var(--muted); }
.gd-em-mid { width: 36px; height: 40px; }
.gd-em-sm { width: 22px; height: 25px; }
.gd-em-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.gd-em-o { position: relative; display: grid; place-items: center; border: 1px solid var(--line-2); border-radius: 8px; background: rgba(0, 0, 0, .18); cursor: pointer; }
.gd-em-o input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.gd-em-o.on { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; }
.gd-em-o:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.gd-em-o.tab { height: 34px; font-size: 14px; font-weight: 600; color: var(--muted); }
.gd-em-o.tab.on { color: var(--ink); background: rgba(201, 169, 94, .14); }
.gd-em-pane { display: grid; gap: 6px; align-content: start; min-height: 218px; }
.gd-em-pane h5 { margin: 2px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.gd-em-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.gd-em-opts .gd-em-o { height: 52px; }
.gd-em-mini { width: 34px; height: 38px; }
.gd-em-opts.sym { grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 5px; }
.gd-em-opts.sym .gd-em-o { height: auto; aspect-ratio: 1; }
.gd-em-opts.sym svg { width: 78%; height: 78%; }
.gd-em-none { font-size: 11px; color: var(--muted); }
.gd-em-opts.sw { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.gd-em-opts.sw .gd-em-o { height: 26px; border-radius: 6px; }
.gd-em-opts.sw i { width: 100%; height: 100%; border-radius: 5px; }
.gd-em-opts.sw .gd-em-o.on { box-shadow: 0 0 0 2px var(--gold); border-color: #1d130a; }
.gd-em-note { margin: 0; font-size: 13px; color: var(--muted); text-align: center; }
@media (max-width: 560px) {
  .gd-em-big { width: 60px; height: 68px; }
  .gd-em-view { gap: 10px; }
  .gd-em-opts.sym { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .gd-em-opts { grid-template-columns: repeat(auto-fill, minmax(40px, 1fr)); }
  .gd-em-opts.sw { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .gd-em-sizes em { display: none; }
  .gd-em-pane { min-height: 0; }
}
@media (max-height: 620px) {
  .gd-em-big { width: 52px; height: 58px; }
  .gd-em-opts .gd-em-o { height: 44px; }
  .gd-em-opts.sw .gd-em-o { height: 22px; }
  .gd-em-mini { width: 28px; height: 32px; }
  .gd-em { gap: 6px; }
  .gd-em-pane { gap: 4px; }
  .gd-em-opts .gd-em-o { height: 40px; }
  .gd-em-opts.sym .gd-em-o { height: auto; }
}
@media (max-height: 620px) and (min-width: 360px) and (max-width: 560px) {
  .gd-em-opts.sym { grid-template-columns: repeat(8, minmax(0, 1fr)); }
}

/* The Guild Boost card's switch: diamond bank (+10%) or coin bank (+5%). A dot marks a boost that is running. */
.gd-cur { display: inline-flex; margin-left: 10px; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; flex: none; }
.gd-cur button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; font: 600 12.5px/20px var(--sans); color: var(--muted); position: relative; }
.gd-cur button img { width: 14px; height: 14px; }
.gd-cur button.on { background: var(--panel-2, rgba(255,255,255,.08)); color: var(--ink); }
.gd-cur button:focus-visible { outline: 2px solid var(--accent, #6cf); outline-offset: -2px; }
.gd-cur .gd-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--good, #5c5); display: inline-block; }
@media (max-width: 700px) { .gd-home .gd-card > .cp-h .gd-cur { margin-left: 0; } }
/* Narrow cards (itch-size windows): the switch names the boost, so the title steps aside for it. */
/* A small window: three cards share the row, so the bank card keeps one line of givers and still shows what you hold. */
@media (min-width: 761px) and (max-width: 1000px) and (max-height: 640px) { .gd-home .gd-givers + .gd-givers { display: none; } }
/* Just over phone width the page keeps a strip free at the bottom, so the row of cards is at its shortest: no givers, no line-up. */
@media (min-width: 761px) and (max-width: 799px) and (max-height: 779px) { .gd-home .gd-givers, .gd-home .gd-wsum .gd-lu { display: none; } }
@media (min-width: 761px) and (max-width: 799px) and (max-height: 610px) { .gd-home .gd-have { display: none; } }
/* Three cards share the row since the Quests card: under 1241 the boost card's header (two boost chips and the On pill) has no room for its title. */
@media (max-width: 1240px) { .gd-bank > .cp-h h4 { display: none; } .gd-bank > .cp-h .gd-cur { margin-left: 0; } }

/* ---------- Quests (client/guildquests.ts): the day's three quests, the guild's level, the Honor store ---------- */
.lane-hunt { --lane: #3f6a2c; } .lane-craft { --lane: #8a5a16; } .lane-battle { --lane: #7b2b22; }
.gq-hv { gap: 4px; white-space: nowrap; }
.coinv .gq-hi { width: 16px; height: 16px; }
.gd-quests { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(316px, 1.1fr); grid-template-rows: auto minmax(0, max-content); grid-template-areas: "strip strip strip store" "q0 q1 q2 store"; }
.gd-quests > .psec-tabs { grid-column: 1 / -1; margin: 0; }
.gd-quests .gq-strip { grid-area: strip; }
.gd-quests .gq-store { grid-area: store; }
.gd-quests .gq-store { align-self: start; max-height: 100%; }

/* The strip: the guild's level and its XP, the time left today, who was counted, and yesterday's chests. */
.gq-strip { display: flex; align-items: stretch; gap: 0 18px; min-width: 0; padding: 8px 16px; }
.gq-strip > div { display: flex; flex-direction: column; justify-content: center; padding-left: 18px; border-left: 1px solid var(--rule-soft, var(--line)); white-space: nowrap; }
.gq-day > b, .gq-size > b { font: 700 22px/1.1 var(--display, var(--sans)); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.gq-day > span, .gq-size > span { font-size: 12.5px; color: var(--muted); }
.gq-lvl { flex: 1 1 auto; display: grid; grid-template-columns: auto minmax(90px, 1fr) auto; align-items: center; gap: 4px 16px; min-width: 0; padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.gq-lvl:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.gq-lvn { display: flex; flex-direction: column; white-space: nowrap; }
.gq-lvn small, .gq-next small { font: 700 12px var(--pixel, var(--sans)); letter-spacing: .05em; color: var(--muted); }
.gq-lvn b { font: 700 30px/1 var(--display, var(--sans)); font-variant-numeric: lining-nums; color: var(--rg-ink, var(--ink)); }
.gq-xp { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gq-xpbar, .gq-bar { display: block; background: rgba(58, 40, 22, .16); box-shadow: inset 0 0 0 1px rgba(58, 40, 22, .38); overflow: hidden; }
.gq-xpbar { height: 10px; border-radius: 2px; }
.gq-xpbar i { display: block; height: 100%; background: linear-gradient(180deg, #d2ae54, #a47c22); }
.gq-xp em { font: 500 12.5px var(--sans); font-style: normal; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gq-next { display: flex; flex-direction: column; font-size: 13.5px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.gq-lvl:hover .gq-next { text-decoration: underline; }

/* A quest: its lane, the count, the track with its three goals (seals that show the Honor they pay), your own part, and who helps most. */
.gq-h { flex: none; display: flex; align-items: center; gap: 8px; min-height: 24px; }
.gq-lane { display: inline-flex; align-items: center; gap: 6px; font: 700 12.5px var(--pixel, var(--sans)); letter-spacing: .06em; text-transform: uppercase; color: var(--lane); white-space: nowrap; }
.gq-li { flex: none; width: 22px; height: 22px; }
.gq-h .spacer { flex: 1 1 auto; }
.gq-title { flex: none; margin: 4px 0 0; font: 700 22px/1.15 var(--display, var(--sans)); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gq-count { flex: none; display: flex; align-items: baseline; gap: 7px; margin-top: 2px; min-width: 0; }
.gq-count b { font: 700 28px/1.05 var(--display, var(--sans)); font-variant-numeric: lining-nums tabular-nums; color: var(--lane); }
.gq-count span { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gq-track { --cs: 48px; flex: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; }
.gq-seg { display: grid; grid-template-columns: minmax(6px, 1fr) auto; align-items: start; min-width: 0; }
.gq-bar { height: 8px; margin-top: calc(var(--cs) / 2 - 1px); }
.gq-seg:first-child .gq-bar { border-radius: 4px 0 0 4px; }
.gq-bar i { display: block; height: 100%; background: linear-gradient(180deg, color-mix(in srgb, var(--lane) 72%, #f0d9a0), var(--lane)); }
.gq-tier { position: relative; display: flex; flex-direction: column; align-items: center; min-width: calc(var(--cs) + 4px); }
.gq-tier:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.gq-seal { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; width: var(--cs); height: var(--cs); border-radius: 50%; background: radial-gradient(circle at 50% 32%, #f6ecd2, #dfcb9c); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--lane) 50%, #8a7244), inset 0 0 0 3.5px rgba(255, 250, 235, .55), 0 1px 2px rgba(40, 26, 12, .3); transition: background .3s, box-shadow .3s; }
.gq-si { display: block; width: 20px; height: 20px; margin: -1px 0 -2px; }
.gq-seal i { font: 700 13.5px/1 var(--sans); font-style: normal; font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.gq-tier b { margin-top: 3px; font: 700 12.5px/1.2 var(--sans); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); white-space: nowrap; }
.gq-tier em { display: flex; align-items: center; height: 17px; font-style: normal; font-size: 12px; }
.gq-tier em.gq-word { justify-content: center; white-space: nowrap; font: 700 10.5px/1 var(--pixel, var(--sans)); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.gq-tier.s-paid .gq-word, .gq-tier.s-wait .gq-word { color: var(--lane, var(--ink)); }
/* The stretch goal's XP boost: a small green tag on its seal, top left (it is the last seal, so the right is the card edge; the paid tick takes bottom right). */
.gq-bb { position: absolute; top: -7px; right: 62%; display: inline-flex; align-items: center; gap: 1px; padding: 1px 4px 1px 2px; border-radius: 8px; background: #3f6a2c; box-shadow: 0 0 0 1.5px #f4ead0; font: 700 10.5px/1.2 var(--sans); text-decoration: none; color: #fff; white-space: nowrap; }
.gq-bb .gq-bi2 { width: 12px; height: 12px; }
.gq-bi2 { width: 14px; height: 14px; }
.gq-tier.s-far .gq-seal { background: radial-gradient(circle at 50% 32%, #efe5cc, #d9cba6); box-shadow: inset 0 0 0 2px rgba(92, 72, 44, .42), 0 1px 1px rgba(40, 26, 12, .15); }
.gq-tier.s-far .gq-si { filter: grayscale(.7); opacity: .7; }
.gq-tier.s-far .gq-seal i, .gq-tier.s-far b { color: var(--muted); }
.gq-tier.s-paid .gq-seal { background: radial-gradient(circle at 50% 28%, #fff3c4, #ecc559 62%, #c6952a); box-shadow: inset 0 0 0 2px #8f6a17, inset 0 0 0 3.5px rgba(255, 246, 205, .7), 0 0 9px rgba(236, 190, 70, .85), 0 1px 2px rgba(40, 26, 12, .35); }
.gq-tier.s-paid .gq-seal i { color: #4a3208; }
.gq-tier.s-paid b { color: var(--rg-rubric, var(--gold)); }
.gq-tier.s-wait .gq-seal, .gq-tier.s-out .gq-seal { box-shadow: inset 0 0 0 2px #b27a1a, 0 1px 2px rgba(40, 26, 12, .3); outline: 2px dashed rgba(178, 122, 26, .7); outline-offset: 2px; }
.gq-tick { position: absolute; right: -4px; bottom: -3px; display: grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: #3f7a2e; box-shadow: 0 0 0 1.5px #f4ead0; font: 700 11px/1 var(--sans); font-style: normal; text-decoration: none; color: #fff; }
.gq-me { flex: none; display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 45%, transparent); font-size: 13.5px; }
.gq-me > b { font-variant-numeric: lining-nums tabular-nums; color: var(--ink); white-space: nowrap; }
.gq-me > b.gq-ok { color: var(--good); white-space: nowrap; }
.gq-me .gd-lbl[data-tip] { cursor: help; }
/* Your part, in plain words (Cole 11-23: the old pill read like a button). It gives way first when the card is narrow. */
.gq-part { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gq-fin { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.gq-fin img { width: 14px; height: 14px; }
.gq-part .ps { display: none; }
.gq-helpers { flex: 0 1 auto; display: flex; flex-direction: column; min-height: 0; margin-top: 8px; overflow: hidden; }
.gq-tops { flex: none; list-style: none; margin: 4px 0 0; padding: 0; }
.gq-tops li { display: flex; align-items: center; gap: 8px; height: 30px; font-size: 13.5px; border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 30%, transparent); }
.gq-tops li:first-child { border-top: 0; }
.gq-tops .gname { flex: 1 1 auto; }
.gq-tops .n { flex: none; color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
.gq-card.done .gq-count span { color: var(--good); font-weight: 600; }

/* The Honor store: six shelves, each with its price in Honor. */
.gq-purse { display: inline-flex; align-items: center; font-size: 16px; }
.gq-purse .gq-hi { width: 20px; height: 20px; }
.gq-shelf { flex: none; list-style: none; margin: 0; padding: 0; }
.gq-shelf li { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-rows: auto auto; align-items: center; column-gap: 10px; height: 56px; border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 30%, transparent); }
.gq-shelf li:first-child { border-top: 0; }
.gq-ic { width: 36px; height: 36px; }
.gq-shelf .gq-ic { grid-row: 1 / 3; justify-self: center; }
.gq-it { grid-row: 1 / 3; display: flex; flex-direction: column; min-width: 0; }
.gq-it b { font: 700 15px/1.2 var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gq-it span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12.5px; line-height: 1.25; color: var(--muted); overflow: hidden; }
.gq-shelf .gq-price { grid-column: 3; grid-row: 1; align-self: end; justify-self: end; min-width: 76px; justify-content: center; }
.gq-price .gq-hv { color: inherit; }
.gq-stock { grid-column: 3; grid-row: 2; align-self: start; justify-self: end; font-size: 12px; color: var(--muted); white-space: nowrap; }
.gq-shelf li.off .gq-ic { filter: grayscale(.7); opacity: .6; }
.gq-shelf li.off .gq-it b { color: var(--muted); }

/* Buying, and the level ladder. */
.dialog.gq-dlg { width: min(440px, calc(100vw - 32px)); }
.dialog.gq-pdlg { width: min(560px, calc(100vw - 32px)); }
.gq-buy { display: flex; align-items: center; gap: 12px; }
.gq-buy .gq-ic { width: 48px; height: 48px; }
.gq-buy .gq-it b { font-size: 18px; white-space: normal; }
.gq-buy .gq-it span { font-size: 13.5px; white-space: normal; }
.gq-bosses { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.gq-boss { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px 6px; border-radius: 2px; background: var(--inlay, var(--panel-2)); box-shadow: inset 0 0 0 1px var(--rule-soft, var(--line)); cursor: pointer; }
.gq-boss input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.gq-boss:has(input:checked) { box-shadow: inset 0 0 0 2px var(--rg-ink, var(--gold)); background: var(--inlay-hi, var(--panel-3)); }
.gq-boss:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.gq-boss.off { opacity: .55; cursor: default; }
.gq-boss.off input { cursor: default; }
.gq-boss em { font: 500 11.5px var(--sans); font-style: normal; color: var(--muted); }
.gq-bi { width: 40px; height: 40px; }
.gq-boss b { font-size: 14px; color: var(--ink); }
.gq-buyline { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 6px; margin: 12px 0 0; font-size: 13.5px; color: var(--muted); }
.gq-perks { display: grid; gap: 10px; min-width: 0; }
.gq-perks .gd-tile b { font-size: 19px; }
.gq-ladder { list-style: none; margin: 0; padding: 0; }
.gq-ladder li { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: baseline; gap: 10px; padding: 5px 8px; font-size: 13.5px; color: var(--muted); border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 30%, transparent); }
.gq-ladder li:first-child { border-top: 0; }
.gq-ladder li b { font: 700 14px var(--pixel, var(--sans)); letter-spacing: .03em; white-space: nowrap; }
.gq-ladder li.on { color: var(--ink); }
.gq-ladder li.on b { color: var(--good); }
.gq-ladder li.on b::after { content: ' ✓'; }
.gq-ladder li.next { color: var(--ink); background: color-mix(in srgb, var(--gilt, var(--gold)) 26%, transparent); }
.gq-ladder li.next b { color: var(--rg-rubric, var(--gold)); }
.gq-note { margin: 0; font-size: 13px; color: var(--muted); }

/* The moment chests open: a dark card over the page, gone in three seconds or on a tap. */
.gq-note-pay { position: fixed; left: 50%; top: 64px; z-index: 900; transform: translateX(-50%); pointer-events: none; animation: gq-drop .35s cubic-bezier(.2, 1.4, .4, 1), gq-fade .5s ease-in 3.7s forwards reverse; }
.gq-mbox { display: flex; align-items: center; gap: 12px; min-width: 220px; max-width: calc(100vw - 24px); padding: 10px 18px 10px 14px; border-radius: 4px; background: linear-gradient(180deg, #3a2a1c, #241811); box-shadow: inset 0 0 0 1px #6b5330, inset 0 0 0 3px #1a110b, 0 8px 24px rgba(0, 0, 0, .5); color: #e9dcc0; }
.gq-mbox > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.gq-mi { flex: none; width: 40px; height: 40px; filter: drop-shadow(0 0 8px rgba(240, 196, 80, .7)); }
.gq-mhonor { font: 700 22px/1.1 var(--display, var(--sans)); font-variant-numeric: lining-nums; color: #f3d98a; white-space: nowrap; }
.gq-mboost { font-size: 13.5px; font-weight: 600; color: #9fd38a; white-space: nowrap; }
.gq-mbox em { font-style: normal; font-size: 12.5px; color: #ac9a7e; white-space: nowrap; }
@keyframes gq-fade { from { opacity: 0; } }
@keyframes gq-drop { from { transform: translateY(-14px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .gq-note-pay { animation: none; } }

/* The Quests card on the Guild tab: the three tracks, small. */
.gd-home .gd-qsum { grid-area: qs; }
.gq-mini { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: space-around; gap: 6px; list-style: none; margin: 0; padding: 0; min-height: 0; }
.gq-mini li { min-width: 0; }
.gq-mh { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 14px; }
.gq-mh .gq-li { width: 20px; height: 20px; }
.gq-mh .t { flex: 1 1 auto; min-width: 0; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gq-mh b { flex: none; font-variant-numeric: lining-nums tabular-nums; color: var(--lane); }
.gq-mh small { font-size: 12px; font-weight: 500; color: var(--muted); }
.gq-track.gq-tmini { --cs: 28px; margin-top: 2px; }
.gq-track.gq-tmini .gq-bar { height: 6px; }
.gq-track.gq-tmini .gq-tier b { margin-top: 1px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.gq-track.gq-tmini .gq-si { display: none; }
.gq-track.gq-tmini .gq-seal i { font-size: 12px; }
.gq-track.gq-tmini .gq-tick { right: -5px; bottom: -3px; width: 13px; height: 13px; font-size: 8.5px; }
.gq-foot { flex: none; display: flex; align-items: center; gap: 8px; margin-top: 8px; padding-top: 8px; border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 45%, transparent); }
.gq-foot .spacer { flex: 1 1 auto; }

/* The level tile opens the ladder; a big crest wears the frame its guild's level earned. */
.gd-tile-btn { border: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.gd-tile-btn:hover { background: var(--inlay-hi, var(--panel-3)); }
.gd-tile-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.gd-lvc { color: var(--muted); }
.gd-cf { position: relative; flex: none; display: inline-flex; margin: 4px 9px; }
.gd-frame { position: absolute; left: -20.83%; top: -18.52%; width: 141.67%; height: 133.33%; overflow: visible; pointer-events: none; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4)); }
.gd-cf.f4, .gd-cf.f5 { margin-left: 16px; margin-right: 16px; }
.gd-cf.f5 { margin-top: 12px; }
.gq-title a { color: inherit; text-decoration: none; }
.gq-title .t-brief { display: none; }
.gq-title a:hover { text-decoration: underline; }
.gq-count i { font-style: normal; }
/* Short windows: the track and your own part stay, the helpers step aside. */
@media (max-height: 779px) { .gq-tops li:nth-child(n+4) { display: none; } }
@media (max-height: 700px) { .gq-tops { display: none; } }
@media (max-height: 640px) and (min-width: 761px) { .gq-helpers { display: none; } }

/* Mid windows (761 to 1240): the quests, or the store, each on its own section. Four columns need 1241+:
   narrower, the store's names ("Tournament Ticket") and the quest counts were cut short. */
@media (max-width: 1240px) {
  .gd-quests { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-template-rows: auto auto minmax(0, max-content); grid-template-areas: "tabs tabs tabs" "strip strip strip" "q0 q1 q2"; }
  .gd-quests > .psec-tabs { display: grid; grid-area: tabs; }
  .gd-quests > .psec:not(.on) { display: none; }
  .gd-quests .gq-store { grid-area: 2 / 1 / -1 / -1; }
  .gq-shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; }
  .gq-shelf li:nth-child(2) { border-top: 0; }
}
@media (max-width: 1000px) {
  .gq-strip { gap: 0 12px; padding: 6px 12px; }
  .gq-strip > div { padding-left: 12px; }
  .gq-lvl { gap: 4px 12px; }
  .gq-lvn b { font-size: 26px; }
  .gq-title { font-size: 19px; }
  .gq-count b { font-size: 24px; }
  .gq-track { --cs: 44px; margin-top: 6px; }
  .gq-me { margin-top: 6px; padding-top: 6px; }
  .gd-cf { margin: 3px 7px; }
  .gd-cf.f4, .gd-cf.f5 { margin-left: 12px; margin-right: 12px; }
  .gd-cf.f5 { margin-top: 9px; }
}

/* Short mid windows: the lane, the title and Go share one line, so "Your part" still fits under the track
   (1001-1200 wide and under 800 the page keeps 80 px under the cards for the chat button). */
@media (min-width: 761px) and (max-width: 1240px) and (max-height: 700px) {
  .gd .gq-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "lane title go" "count count count" "track track track" "me me me"; align-content: start; column-gap: 8px; }
  .gq-card .gq-h { display: contents; }
  .gq-card .gq-h .spacer { display: none; }
  .gq-card .gq-lane { grid-area: lane; font-size: 0; gap: 0; }
  .gq-card .gq-go { grid-area: go; }
  .gq-card .gq-title { grid-area: title; margin: 0; font-size: 19px; }
  .gq-card .gq-count { grid-area: count; }
  .gq-card .gq-count b { font-size: 21px; }
  .gq-card .gq-track { grid-area: track; --cs: 38px; margin-top: 4px; }
  .gq-card .gq-me { grid-area: me; margin-top: 4px; padding-top: 5px; }
  .gq-card .gq-helpers { display: none; }
  .gd .gq-card { min-height: 0; padding-top: 8px; padding-bottom: 8px; }
  .gq-card .gq-tick { right: -6px; bottom: -4px; width: 14px; height: 14px; font-size: 9px; }
}
@media (min-width: 761px) and (max-width: 1100px) and (max-height: 700px) {
  .gq-title .t-full { display: none; }
  .gq-title .t-brief { display: inline; }
}
@media (min-width: 761px) and (max-width: 1000px) and (max-height: 700px) {
  .gq-me:has(.gq-fin) .gq-part, .gq-me:has(.gq-chipb) .gq-part { display: none; }
  .gq-part .pl { display: none; }
  .gq-part .ps { display: inline; }
}

/* Phone: one compact card a quest (lane, title and count on a line, then the track), and a one-line strip. */
@media (max-width: 760px) {
  .gd-quests { display: flex; flex-direction: column; }
  .gd-quests > .psec.on > .gq-strip { flex: none; }
  .gq-shelf { display: block; }
  .gq-shelf li:nth-child(2) { border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 30%, transparent); }
  .gq-strip { gap: 0 10px; padding: 5px 10px; align-items: center; }
  .gq-strip > div { padding-left: 10px; }
  .gq-strip > .gq-size, .gq-next, .gq-lvn small { display: none; }
  .gq-lvl { grid-template-columns: auto minmax(60px, 1fr); gap: 0 10px; }
  .gq-lvn { flex-direction: row; align-items: baseline; }
  .gq-lvn b { font-size: 22px; }
  .gq-lvn b::before { content: 'Lv '; font: 700 12px var(--pixel, var(--sans)); letter-spacing: .05em; color: var(--muted); }
  .gq-xpbar { height: 8px; }
  .gq-xp { gap: 2px; }
  .gq-xp em { font-size: 12px; }
  .gq-day > b { font-size: 17px; }
  .gq-day > span { font-size: 11.5px; }
  .gq-xp em { display: none; }
  .gq-strip .btn.small { min-height: 30px; }
  .gd .gq-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "h title count" "track track track" "me me me"; align-items: center; column-gap: 8px; padding: 7px 10px 8px; }
  .gq-card .gq-h { grid-area: h; min-height: 0; }
  .gq-card .gq-lane { font-size: 0; gap: 0; }
  .gq-card .gq-h .spacer, .gq-card .gq-go { display: none; }
  .gq-card .gq-title { grid-area: title; margin: 0; font-size: 17px; }
  .gq-card .gq-count { grid-area: count; margin: 0; gap: 4px; }
  .gq-card .gq-count b { font-size: 19px; }
  .gq-card .gq-count span { font-size: 12.5px; }
  .gq-card .gq-count i { display: none; }
  .gq-card .gq-track { grid-area: track; --cs: 40px; margin-top: 4px; }
  .gq-card .gq-si { width: 16px; height: 16px; }
  .gq-card .gq-seal i { font-size: 12.5px; }
  .gq-card .gq-me { grid-area: me; margin-top: 4px; padding-top: 5px; font-size: 13px; }
  .gq-card .gq-helpers { display: none; }
  .gq-tier em { height: 15px; }
}
@media (max-width: 760px) and (max-height: 700px) {
  .gq-card .gq-track { --cs: 32px; margin-top: 2px; }
  .gq-card .gq-si { display: none; }
  .gq-card .gq-bb { display: none; }
  .gq-card .gq-tick { right: -5px; bottom: -3px; width: 13px; height: 13px; font-size: 8.5px; }
  .gq-card .gq-tier em { display: none; }
  .gd .gq-card { padding: 4px 10px 5px; }
  .gq-card .gq-me { margin-top: 2px; padding-top: 3px; }
  .gq-card .gq-me .gq-fin { height: 20px; padding-top: 0; padding-bottom: 0; }
  .gq-shelf li { height: 50px; }
  .gq-strip { padding: 3px 10px; }
  .gq-day > span { display: none; }
  .gq-day > b::after { content: ' left'; font: 500 12px var(--sans); color: var(--muted); }
  .gd-quests { --gap: 6px; }
}
@media (max-width: 760px) and (max-height: 650px) {
  .gq-card .gq-track { --cs: 28px; }
  .gq-card .gq-seal i { font-size: 12px; }
  .gq-card .gq-tier b { font-size: 11.5px; line-height: 1.1; }
  .gq-card .gq-me { font-size: 12.5px; }
}
@media (max-width: 760px) and (max-height: 600px) {
  .gq-card .gq-me, .gq-card .gq-tier b { display: none; }
  /* Chip in keeps its row: it is the only way to put materials in from here. */
  .gq-card .gq-me:has(.gq-chipb) { display: flex; margin-top: 2px; padding-top: 3px; }
  .gq-card .gq-me .gq-chipb { height: 20px; min-height: 20px; padding-top: 0; padding-bottom: 0; }
  .gq-card .gq-track { --cs: 24px; margin-top: 2px; }
  .gd .gq-card { padding: 4px 10px 5px; }
  .gq-card .gq-title { font-size: 16px; }
  .gq-card .gq-count b { font-size: 17px; }
}
/* Five tabs on a narrow phone stay on one line. */
@media (max-width: 420px) {
  [data-theme] .subtabs.gd-tabs { flex-wrap: nowrap; gap: 0; justify-content: space-between; }
  [data-theme] .subtabs.gd-tabs a { padding-left: 4px; padding-right: 4px; white-space: nowrap; }
  .gd-tabs .unread { margin-left: 2px; }
}
@media (max-width: 350px) {
  .gq-xp { display: none; }
  .gq-lvl { flex: 0 0 auto; grid-template-columns: auto; }
  .gq-strip { justify-content: space-between; }
}
.gq-foot .btn { white-space: nowrap; }
@media (max-width: 1000px) { .gq-mini { gap: 2px; } }
@media (max-height: 640px) {
  .gq-track.gq-tmini { --cs: 24px; margin-top: 0; }
  .gq-track.gq-tmini .gq-tier b { display: none; }
  .gq-foot { margin-top: 4px; padding-top: 5px; }
}
/* 1001 to 1200 wide: the top bar takes two rows there, so the short-window rules start sooner. */
@media (min-width: 1001px) and (max-width: 1200px) and (max-height: 690px) {
  .gq-track.gq-tmini { --cs: 24px; margin-top: 0; }
  .gq-track.gq-tmini .gq-tier b { display: none; }
  .gq-foot { margin-top: 4px; padding-top: 5px; }
  .gd-home .gd-givers + .gd-givers { display: none; }
}
/* 761 to 799 wide: the page keeps 80 px under the cards for the chat button and the banner takes two rows, so the
   Quests card goes small sooner, and when short drops its header (the Quests tab is right above). */
@media (min-width: 761px) and (max-width: 799px) {
  .gq-mh { gap: 5px; font-size: 13px; }
}
@media (min-width: 761px) and (max-width: 799px) and (max-height: 770px) {
  .gq-track.gq-tmini { --cs: 24px; margin-top: 0; }
  .gq-track.gq-tmini .gq-tier b { display: none; }
  .gq-foot { margin-top: 4px; padding-top: 5px; }
}
@media (min-width: 761px) and (max-width: 799px) and (max-height: 700px) { .gd-home .gd-qsum > .cp-h { display: none; } }
@media (max-width: 760px) and (max-height: 600px) {
  .gd-home .gd-qsum > .cp-h, .gd-qsum .gq-track, .gd-banner .gd-poster { display: none; }
  .gq-mh { font-size: 13px; line-height: 18px; }
  .gq-mh .gq-li { width: 16px; height: 16px; }
  .gq-mini { gap: 0; justify-content: flex-start; }
  .gd-cf { margin: 2px 6px; }
}
@media (max-width: 480px) { .gq-perks .gd-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gq-ladder li { grid-template-columns: 48px minmax(0, 1fr); padding: 4px 6px; font-size: 13px; } }

/* ---------- War report (client/warreport.ts): Replay, Results, Log, Season in one card ---------- */
.gd-war .wr { align-self: stretch; max-height: none; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.wr .wr-head { flex: none; gap: 10px; flex-wrap: nowrap; }
.wr .wr-head .seg button { height: 26px; padding: 0 12px; font-size: 12.5px; min-height: 0; }
.wr .wr-how { height: 26px; min-height: 0; padding: 0 10px; font-size: 12.5px; white-space: nowrap; }
.wr .wr-when { white-space: nowrap; }
.wr-sub { flex: none; display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 13px; }
.wr-sub b { font: 600 17px var(--display, var(--sans)); color: var(--ink); }
.wr-wait { display: grid; place-items: center; }

/* Replay: the war table, the guild bars with the scrubber under them, and the moments. */
.wr-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: auto minmax(0, 1.3fr) minmax(220px, .8fr); gap: 18px; padding-top: 2px; }
.wr-stage { display: grid; place-items: center; min-height: 0; }
.wr-table { position: relative; }
.wr-table > svg { position: absolute; inset: 0; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .4)); overflow: visible; }
.wr-arrow { fill: none; stroke: #c9a95e; stroke-width: 1.6; stroke-opacity: .72; stroke-linecap: round; }
.wr-arrow.me { stroke: #f0cf6c; stroke-width: 2.6; stroke-opacity: 1; }
.wr-hpbg { fill: #170f08; stroke: #3d2b18; stroke-width: 4.5; }
.wr-hp { fill: none; stroke: #8fbf62; stroke-width: 4.5; stroke-linecap: round; transition: stroke-dasharray .25s linear; }
.wr-node.me .wr-hpbg { stroke: #5e4a1c; } .wr-node.me .wr-hp { stroke: #f0cf6c; }
.wr-node.hit .wr-hpbg { fill: #5c1a10; }
.wr-node.out { opacity: .38; } .wr-node.out .wr-hp { stroke: transparent; }
/* A node is a zero-size anchor on its ring point: the crest centres on it exactly, the label hangs below. */
.wr-nc { position: absolute; width: 0; height: 0; pointer-events: auto; }
.wr-nc .gd-crest { position: absolute; left: 0; top: 0; display: block; transform: translate(-50%, -50%); width: calc(28px * var(--k)); height: calc(32px * var(--k)); }
.wr-table .gd-crest text { display: inline; }
.wr-nc b { position: absolute; left: 0; top: calc(27px * var(--k)); transform: translateX(-50%); font: 700 calc(11px * max(var(--k), .85)) var(--sans); line-height: 1.1; color: #f3e6c2; text-shadow: 0 1px 0 #120b05, 0 0 3px #120b05; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.wr-nc b.fell { color: #f2a48c; }
.wr-nc.out .gd-crest { filter: grayscale(.85) brightness(.6); }
.wr-mid-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; pointer-events: none; text-align: center; }
.wr-mid-c b { font: 700 calc(30px * var(--k)) var(--display, var(--sans)); color: #f3e6c2; font-variant-numeric: lining-nums tabular-nums; line-height: 1; text-shadow: 0 2px 0 #120b05; }
.wr-mid-c small { margin-top: 4px; font: 600 calc(11.5px * max(var(--k), .9)) var(--sans); color: #c9a95e; letter-spacing: .04em; }
.wr-mid-c .wr-win .gd-crest { width: calc(46px * var(--k)); height: calc(52px * var(--k)); filter: drop-shadow(0 0 8px rgba(240, 207, 108, .55)); }
.wr-mid { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.wr-bars { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: 2px; overflow: hidden; }
.wr-bar { flex: none; display: flex; align-items: center; gap: 8px; height: 27px; padding: 0 8px 0 5px; border-radius: 5px; font-size: 13px; color: var(--ink); }
.wr-bar.me { background: color-mix(in srgb, var(--gilt, var(--gold)) 26%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 60%, transparent); }
.wr-bar.out { opacity: .5; }
.wr-bar.more { justify-content: center; font-size: 12px; }
.wr-bar > .gd-crest { width: 20px; height: 23px; }
.wr-bn { flex: none; width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wr-front { flex: none; width: 78px; display: flex; gap: 1px; }
.wr-sp { width: 26px; height: 26px; image-rendering: pixelated; object-fit: contain; }
.wr-sp.xs { width: 20px; height: 20px; vertical-align: -6px; margin-right: 3px; }
.wr-sp.md { width: 52px; height: 52px; flex: none; }
.wr-track { flex: 1 1 auto; min-width: 30px; height: 9px; border-radius: 5px; background: color-mix(in srgb, var(--ink) 14%, transparent); overflow: hidden; }
.wr-track > span { display: block; height: 100%; border-radius: 5px; background: linear-gradient(#9bc76c, #6f9a45); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .18); transition: width .25s linear; }
.wr-bar.me .wr-track > span { background: linear-gradient(#f0cf6c, #c99a2e); }
.wr-num { flex: none; width: 50px; text-align: right; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.wr-num b { font: 700 15px var(--display, var(--sans)); } .wr-num small { font-size: 11px; color: var(--muted); }
.wr-ko { flex: none; width: 56px; text-align: right; white-space: nowrap; font-size: 11px; color: var(--muted); font-variant-numeric: lining-nums tabular-nums; }
.wr-ko b { font: 700 14px var(--display, var(--sans)); color: var(--ink); }
.wr-st { flex: none; width: 74px; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; font-size: 11.5px; color: var(--muted); }
.wr-st .gd-crest { width: 16px; height: 18px; }
.wr-tt { font: 800 10.5px var(--sans); letter-spacing: .03em; color: var(--ink); }
.wr-arr { color: var(--rg-rubric, #8a3a26); font-weight: 700; font-size: 14px; }
.wr-bar.out .wr-st { color: var(--bad); }
.wr-time { flex: none; display: flex; padding-right: var(--wr-chat, 0px); align-items: center; gap: 9px; padding-top: 6px; margin-top: 4px; border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 35%, transparent); }
.wr .wr-play { flex: none; width: 34px; height: 28px; min-height: 0; padding: 0; display: grid; place-items: center; }
.wr-play svg { width: 12px; height: 12px; }
.wr .wr-speed button { height: 26px; min-height: 0; padding: 0 8px; font-size: 12px; }
.wr-tnow, .wr-tend { flex: none; width: 34px; font: 600 12.5px var(--sans); font-variant-numeric: lining-nums tabular-nums; color: var(--ink); }
.wr-tend { color: var(--muted); }
.wr-scrub { position: relative; flex: 1 1 auto; height: 32px; cursor: pointer; touch-action: none; }
.wr-scrub:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 4px; }
.wr-rail { position: absolute; left: 0; right: 0; top: 22px; height: 5px; border-radius: 3px; background: color-mix(in srgb, var(--ink) 16%, transparent); }
.wr-rail > span { display: block; height: 100%; border-radius: 3px; background: var(--rg-rubric, #8a3a26); }
.wr-knob { position: absolute; top: 18px; width: 13px; height: 13px; margin-left: -6.5px; border-radius: 50%; background: #f3e6c2; border: 2px solid #6b2a1c; box-shadow: 0 1px 2px rgba(0, 0, 0, .4); }
.wr-mark { position: absolute; top: 0; margin-left: -8px; opacity: .45; pointer-events: none; }
.wr-mark.past { opacity: 1; }
.wr-mark .gd-crest { display: block; width: 16px; height: 18px; }
.wr-mark.me .gd-crest { filter: drop-shadow(0 0 2px #f0cf6c); }
.wr-moments { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 6px; padding-left: 14px; border-left: 1px solid color-mix(in srgb, var(--rule, var(--line)) 50%, transparent); overflow: hidden; }
.wr-moments ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; color: var(--ink); }
.wr-moments li { display: flex; gap: 7px; align-items: flex-start; line-height: 1.25; }
.wr-moments .mt { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wr-moments .gd-crest { width: 18px; height: 20px; margin-top: 1px; }
.wr-moments .t { flex: none; width: 32px; text-align: right; padding-top: 1px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wr-moments small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wr-moments li.fall b { color: var(--bad); } .wr-moments li.mine b { color: var(--good, #4f7a2e); } .wr-moments li.end b { color: var(--rg-rubric, #8a3a26); }
.wr-moments .wr-none { font-size: 12.5px; line-height: 1.35; }

/* Results: the podium, your guild's GP spelled out, the medal, and every guild's survival + combat. */
.wp-main { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; padding-top: 2px; }
.wp-how { display: none; }
.wp-left { min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.wp-right { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.wp-podium { flex: none; display: flex; align-items: flex-end; justify-content: center; gap: 6px; }
.wp-pod { width: 92px; display: flex; flex-direction: column; align-items: center; gap: 1px; text-align: center; font-size: 12.5px; line-height: 1.15; color: var(--ink); }
.wp-pod b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-pod .gd-crest { width: 34px; height: 38px; margin-bottom: 2px; }
.wp-pod.p1 .gd-crest { width: 40px; height: 45px; filter: drop-shadow(0 0 6px rgba(201, 154, 46, .5)); }
.wp-pod .wp-gp { font-size: 11.5px; color: var(--muted); }
.wp-step { width: 100%; margin-top: 4px; border-radius: 4px 4px 0 0; display: grid; place-items: center; background: linear-gradient(#5a3d22, #3a2614); color: #f3e6c2; font: 700 15px var(--display, var(--sans)); box-shadow: inset 0 1px 0 #8a6a3a; }
.wp-pod.p1 .wp-step { background: linear-gradient(#b08a38, #6b5120); }
.wp-pod.me b { color: var(--rg-rubric, #8a3a26); }
.wp-you { flex: none; display: flex; flex-direction: column; gap: 2px; padding: 7px 10px; border-radius: 6px; background: color-mix(in srgb, var(--gilt, var(--gold)) 22%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 55%, transparent); font-size: 13px; color: var(--ink); }
.wp-warn { color: var(--bad); font-size: 12px; }
.wp-medal { flex: none; display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.3; color: var(--ink); }
.wp-t .wp-g { width: 99%; max-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wp-t .wp-g .gd-crest { width: 18px; height: 20px; vertical-align: -5px; margin-right: 6px; }
.wp-t tr.me td { background: color-mix(in srgb, var(--gilt, var(--gold)) 26%, transparent); }

/* "How wars work" */
.hw-dlg { width: min(720px, calc(100vw - 32px)); }
.hw-grid { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 18px; align-items: start; }
.hw-ring { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.hw-ring small { font-size: 12px; line-height: 1.3; color: var(--muted); }
.hw-table { position: relative; width: 140px; height: 140px; }
.hw-table svg { position: absolute; inset: 0; }
.hw-n { position: absolute; width: 0; height: 0; }
.hw-n .gd-crest { position: absolute; left: 0; top: 0; display: block; transform: translate(-50%, -50%); width: 24px; height: 27px; }
.hw-n .gd-crest text { display: inline; }
.hw-n.me .gd-crest { filter: drop-shadow(0 0 4px #f0cf6c); }
.hw-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; line-height: 1.38; }
.hw-gp { margin-top: 12px; padding-top: 10px; border-top: 1px solid color-mix(in srgb, var(--rule, var(--line)) 50%, transparent); display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; }
.hw-gp p { margin: 0; font-size: 12.5px; color: var(--muted); }
.hw-gp .tbl2 td, .hw-gp .tbl2 th { padding: 3px 8px; }

/* Narrower windows: the moments step aside; short ones get lower rows. */
@media (max-width: 1100px) {
  .wr { --wr-chat: 78px; }
  .wr-bars { padding-right: var(--wr-chat); }
  .wr-main { grid-template-columns: auto minmax(0, 1fr); gap: 14px; }
  .wr-moments { display: none; }
  .wp-main { grid-template-columns: 240px minmax(0, 1fr); gap: 14px; }
  .wp-medal { display: none; }
}
@media (max-width: 1000px) { .wp-t .opt-n { display: none; } .wr-ko { display: none; } }
@media (max-height: 700px) and (min-width: 761px) {
  .wr-bar { height: 21px; font-size: 12px; } .wr-bar > .gd-crest { width: 17px; height: 19px; }
  .wr-sp { width: 21px; height: 21px; } .wr-front { width: 63px; }
  .wr-track { height: 7px; } .wr-num b { font-size: 13.5px; } .wr-bn { width: 104px; }
  .wr-time { padding-top: 3px; margin-top: 2px; } .wr-scrub { height: 28px; } .wr-rail { top: 19px; } .wr-knob { top: 15px; }
  .wp-you .muted, .wp-you .gd-lbl, .wp-podium .wp-gp { display: none; }
  .wp-main { grid-template-columns: 270px minmax(0, 1fr); }
  .wp-pod .gd-crest { width: 26px; height: 29px; } .wp-pod.p1 .gd-crest { width: 30px; height: 34px; }
}
@media (max-width: 900px) and (min-width: 761px) { .wr-front { display: none; } .wr .wr-head .seg button { padding: 0 9px; } }
@media (max-width: 760px) {
  .wr { --wr-chat: 0px; }
  .gd > .psec.on > .gd-card.wr-replay { flex: 1 1 auto; }
  .wr-replay .wr-mid { flex: 1 1 auto; }
  .wr .wr-head { flex-wrap: wrap; row-gap: 6px; }
  .wr .wr-head .wr-tabs { order: 5; width: 100%; display: flex; }
  .wr .wr-head .wr-tabs button { flex: 1; }
  .wr .wr-head .wr-how, .wr .wr-when { display: none; }
  .wr .wr-head { margin-bottom: 6px; }
  .wp-how { display: block; align-self: flex-start; }
  .wr-main { display: flex; flex-direction: column; gap: 4px; }
  .wr-stage { flex: none; }
  .wr-bar { height: 21px; padding: 0 4px; gap: 6px; font-size: 12px; }
  .wr-bar > .gd-crest { width: 16px; height: 18px; }
  .wr-front { display: none; }
  .wr-bn { width: 96px; flex: 1 1 auto; } .wr-track { flex: 0 1 90px; height: 6px; }
  .wr-num { width: 44px; } .wr-num b { font-size: 13px; } .wr-st { width: 58px; }
  .wr-time { gap: 6px; } .wr .wr-speed button:first-child { display: none; }
  .wp-main { display: flex; flex-direction: column; gap: 8px; }
  .wp-left { flex: none; } .wp-medal, .wp-you .muted { display: none; }
  .wp-podium { display: none; }
  .wp-t .opt-f { display: none; }
  .hw-grid { grid-template-columns: 1fr; justify-items: center; gap: 10px; }
  .hw-ring small { display: none; }
  .hw-steps { font-size: 13px; gap: 5px; }
}

/* No war fought anywhere yet: a short card, never a tall empty panel. */
.gd-war .wr.wr-empty { align-self: start; }
.wr-empty .hint { margin: 2px 0 4px; }
.wr .wr-oth { white-space: nowrap; flex: none; }
@media (max-width: 1000px) { .wr .wr-head .wr-when:has(+ .wr-oth) { display: none; } }
@media (max-width: 760px) { .wr.wr-empty .wr-head .wr-how { display: inline-flex; } .wr.wr-empty .wr-head { margin-bottom: 4px; } }

/* How wars work: "In short" first, "Full rules" one tap away (radio buttons, pure CSS), so neither view scrolls. */
.hw-view { display: inline-flex; position: relative; margin: 0 0 12px; }
.hw-view input { position: absolute; opacity: 0; pointer-events: none; }
.hw-view label { display: inline-flex; align-items: center; height: 28px; padding: 0 14px; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; }
.hw-view input:checked + label { color: var(--ink); background: url(themes/codex/vellum.svg) 0 0 / 300px, linear-gradient(180deg, var(--vellum-hi, #efe2c0), var(--vellum, #e2d1a8)); box-shadow: inset 0 0 0 1px var(--edge, #3a2a1c); }
.hw-view input:focus-visible + label { box-shadow: inset 0 0 0 2px var(--gilt, #c99a2e); }
.hw-view label { outline: none !important; }
.hw-dlg:has(#hw-v-f:checked) .hw-short, .hw-dlg:has(#hw-v-p:checked) .hw-short, .hw-dlg:has(#hw-v-s:checked) .hw-full { display: none; }
/* The smallest phones split the full rules in two: the rules, then the points. */
.hw-view .hw-vp { display: none; }
@media (max-width: 760px) and (max-height: 620px) {
  .hw-view .hw-vp { display: inline-flex; }
  .hw-view label { white-space: nowrap; padding: 0 6px; }
  .hw-gp .tbl2 td, .hw-gp .tbl2 th { padding: 3px 5px; }
  .hw-dlg:has(#hw-v-f:checked) .hw-gp, .hw-dlg:has(#hw-v-p:checked) .hw-steps { display: none; }
  .hw-dlg:has(#hw-v-p:checked) .hw-full .hw-gp { margin-top: 0; padding-top: 0; border-top: 0; }
}
.hw-list { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; font-size: 14px; line-height: 1.4; }
.hw-tips { margin-top: 12px; padding: 8px 10px; border-radius: 6px; background: color-mix(in srgb, var(--gold) 14%, transparent); display: flex; flex-direction: column; gap: 3px; font-size: 13px; line-height: 1.35; }
.hw-full .hw-gp { margin-top: 12px; }
@media (max-width: 760px) { .hw-x { display: none; } .hw-full .hw-steps { font-size: 12.5px; gap: 4px; line-height: 1.32; } .hw-full .hw-gp { margin-top: 8px; padding-top: 6px; font-size: 12.5px; gap: 3px; } .hw-full .hw-gp p { font-size: 12px; } .hw-list { font-size: 13px; gap: 5px; } .hw-view { display: flex; } .hw-view label { flex: 1; justify-content: center; } }
@media (max-width: 760px) and (max-height: 700px) { .hw-short .hw-ring { display: none; } .hw-tips { margin-top: 8px; } }

/* ---------- Guild Clash (client/clash.ts) ---------- */
.gc .gc-head { gap: 10px; }
.gc .gc-head .btn, .gc .cp-h .btn { height: 26px; min-height: 0; padding: 0 10px; font-size: 12.5px; white-space: nowrap; }
.gc-score { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 4px 0 10px; padding: 10px 12px; border-radius: 4px;
  background: radial-gradient(120% 140% at 50% 0%, #3f2c19 0%, #1d140b 70%); box-shadow: inset 0 0 0 1px #6b5330, 0 2px 6px rgba(0, 0, 0, .35); color: #f3e6c2; }
.gc-team { display: flex; align-items: center; gap: 10px; min-width: 0; }
.gc-team.them { justify-content: flex-end; text-align: right; }
.gc-team > div { display: flex; flex-direction: column; min-width: 0; }
.gc-team b { font: 700 16px var(--display, var(--sans)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-team span { font-size: 12px; color: #c9a95e; white-space: nowrap; }
.gc-cr.gd-crest, .gc-team .gd-crest { flex: none; width: 40px; height: 46px; }
.gc-team.lead .gd-crest { filter: drop-shadow(0 0 7px rgba(240, 207, 108, .6)); }
.gc-mid { display: flex; flex-direction: column; align-items: center; }
.gc-big { display: flex; align-items: center; gap: 10px; }
.gc-big b { font: 700 34px/1 var(--display, var(--sans)); font-variant-numeric: lining-nums tabular-nums; color: #d9c79c; }
.gc-big b.up { color: #f6d77a; text-shadow: 0 0 10px rgba(240, 207, 108, .45); }
.gc-bigstar { width: 22px; height: 22px; background: #f0cf6c; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.gc-mid small { margin-top: 4px; font: 600 11.5px var(--sans); color: #c9a95e; letter-spacing: .03em; white-space: nowrap; }
.gc-stars { display: inline-flex; gap: 2px; vertical-align: -2px; }
.gc-stars i { width: 14px; height: 14px; background: color-mix(in srgb, var(--muted) 45%, transparent); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.gc-stars i.on { background: linear-gradient(#f6d77a, #d79a1e); }
.gc-stars:has(i.on) { filter: drop-shadow(0 1px 0 rgba(60, 35, 5, .55)); }
.gc-stars.lg i { width: 22px; height: 22px; }
.gc-you { margin: 0 0 8px; font-size: 13.5px; }
.gc-you.good { color: var(--good); }
.gc-tabs { margin-bottom: 6px; }
.gc-tabs button { height: 26px; padding: 0 12px; font-size: 12.5px; min-height: 0; }
.gc-bases, .gc-attacks { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.gc-base { display: grid; grid-template-columns: 22px minmax(90px, 1.1fr) minmax(0, 1.4fr) auto minmax(96px, auto); align-items: center; gap: 10px; padding: 5px 8px; border-radius: 3px;
  background: var(--inlay, var(--panel-2)); box-shadow: inset 0 0 0 1px var(--rule-soft, var(--line)); }
.gc-base.me { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 60%, transparent); }
.gc-base.cleared .gc-team5 { opacity: .5; }
.gc-base.cleared .gc-who b { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--muted) 70%, transparent); }
.gc-n { font: 700 13px var(--pixel, var(--sans)); color: var(--muted); text-align: center; }
.gc-who { display: flex; flex-direction: column; min-width: 0; }
.gc-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gc-who span { font-size: 12px; white-space: nowrap; }
.gc-team5 { display: flex; gap: 1px; min-width: 0; overflow: hidden; }
.gc-got { display: flex; flex-direction: column; align-items: center; gap: 1px; font-size: 11.5px; }
.gc-odds { font-size: 11px; }
.gc-act { display: flex; justify-content: flex-end; }
.gc-act .btn { min-height: 0; height: 28px; padding: 0 12px; }
.gc-done, .gc-left { font-size: 12px; white-space: nowrap; }
.gc-note { margin-top: 6px; }
.gc-at { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px auto; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 3px; font-size: 13px; background: var(--inlay, var(--panel-2)); }
.gc-at.me { box-shadow: inset 3px 0 0 var(--gold); }
.gc-at.them { box-shadow: inset 3px 0 0 #b0543c; }
.gc-at-w { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gc-at-p { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.gc-watch { margin: 0 0 10px; padding: 8px; border-radius: 4px; background: var(--inlay, var(--panel-2)); box-shadow: inset 0 0 0 1px var(--rule-soft, var(--line)); }
.gc-wh { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.gc-wh .btn { height: 26px; min-height: 0; padding: 0 10px; font-size: 12.5px; }
.gc-verdict { display: flex; align-items: center; gap: 10px; margin: 8px 0 0; }
.gc-hs { display: none; }
/* Watching an attack on a desktop: the card takes both columns and the board sizes to the room under the page head. */
.gd-war.gc-page:has(.gc-watching) :is(.gc-season, .gd-wnext) { display: none; }
.gd-war.gc-page:has(.gc-watching) { grid-template-rows: minmax(0, 1fr); grid-template-areas: "clash clash"; }
.gc-watch { margin: 0; padding: 0; background: none; box-shadow: none; }
@media (min-width: 761px) {
  .gc-watching .bv-frame { width: min(100%, max(530px, calc((100vh - 340px) * 16 / 9))); margin: 0 auto; }
  .gc-watching .bv-cv { width: 100%; }
}
@media (max-height: 760px) { .gc-watch .bv-chips, .gc-watch details.ar-log { display: none; } }
.gc-last { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; font-size: 13px; }
.gc-bye { display: flex; align-items: center; gap: 14px; margin: 6px 0; }
.gc-bye p { margin: 0; }
.gc-how .hw-steps { margin: 0 0 10px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.gc-how-t { margin: 6px 0; }
@media (max-width: 760px) {
  .gd > .psec.on > .gd-card.gc { flex: 1 1 auto; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }
  .gc-score { gap: 6px; padding: 5px 8px; margin: 0 0 6px; }
  .gc-team { gap: 6px; }
  .gc-team b { font-size: 13px; }
  .gc-team span { display: none; }
  .gc-team .gd-crest { width: 28px; height: 32px; }
  .gc-big { gap: 6px; }
  .gc-big b { font-size: 26px; }
  .gc-bigstar { width: 16px; height: 16px; }
  .gc-mid small { font-size: 10.5px; }
  .gc-you:not(.muted) { display: none; }
  .gc-you { font-size: 12.5px; margin-bottom: 6px; }
  .gc-head .btn { padding: 0 8px; }
  .gc-watching { --bv-room: 430px; --bv-room-after: 470px; }
  .gc-watch .bv-chips, .gc-watch .bv-meter, .gc-watch details.ar-log { display: none; }
  .gc-base { grid-template-columns: 18px minmax(0, 1fr) auto minmax(74px, auto); grid-template-areas: 'n who got act' 'n team team team'; row-gap: 4px; gap: 4px 8px; padding: 5px 6px; }
  .gc-n { grid-area: n; } .gc-who { grid-area: who; } .gc-team5 { grid-area: team; } .gc-got { grid-area: got; } .gc-odds { grid-area: odds; justify-self: end; } .gc-act { grid-area: act; }
  .gc-team5 .wr-sp { width: 24px; height: 24px; }
  .gc-at { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px; padding: 5px 6px; }
  .gc-at-p, .gc-at-tag { display: none; }
  .gc-lp { display: inline-flex; }
  .gc-hx { display: none; }
  .gc-hs { display: inline; }
  .gc-tabs { margin-bottom: 4px; }
  .gc-how-t td, .gc-how-t th { padding: 2px 6px; }
}

.gd-war.gc-page { grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "next next" "clash season"; }
.gd-war.gc-page .gc { grid-area: clash; align-self: stretch; min-height: 0; max-height: none; overflow: hidden; display: flex; flex-direction: column; }
.gc > * { flex-shrink: 0; }
.gd-war.gc-page .gc-season { grid-area: season; }
.gc-score .gd-crest text, .gc-bye .gd-crest text { display: inline; }
@media (max-width: 360px) { .gc-watching { --bv-room: 455px; } }
/* How clashes work fits short phones without scrolling. */
@media (max-height: 620px) {
  .gc-how { font-size: 13px; line-height: 1.3; }
  .gc-how .hw-steps { gap: 2px; margin-bottom: 6px; }
  .gc-how-t { margin: 2px 0; }
  .gc-how-p { margin: 4px 0 0; }
}
/* No clash to show, or a bye: a short card, not a stretched empty one. */
.gd-war.gc-page .gc.gc-none, .gd-war.gc-page .gc.gc-short { align-self: start; }
.gc-ph { display: none; }
@media (max-width: 760px) {
  .gd > .psec.on > .gd-card.gc.gc-none, .gd > .psec.on > .gd-card.gc.gc-short { flex: 0 0 auto; }
  .gc-ph { display: inline; }
}
/* The narrowest phones: the tag, not a cut-off guild name. */
@media (max-width: 360px) {
  .gc-team b { font-size: 0; }
  .gc-team b::after { content: attr(data-tag); font-size: 13px; }
}

/* Chip in (client/guildquests.ts chipIn): the three piles you hold and what this takes from each, the amount, a
   slider from one to the most that still counts, and quick picks. */
.gq-chipb { flex: none; white-space: nowrap; margin-left: auto; }
.gq-chipb + .gq-fin { margin-left: 6px; }
.gq-chip { display: grid; gap: 10px; }
.gq-cms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.gq-cm { display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 7px 9px;
  border: 1px solid color-mix(in srgb, var(--rule, var(--line)) 60%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--vellum-hi, #f4e9cf) 55%, transparent); min-width: 0; }
.gq-cm > img { grid-row: 1 / 3; width: 28px; height: 28px; image-rendering: pixelated; }
.gq-cm > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.1; }
.gq-cm b { font: 700 16px/1.15 var(--sans); color: var(--ink); font-variant-numeric: tabular-nums; }
.gq-cm em { font-style: normal; font-size: 12px; color: var(--muted); }
.gq-cmt { grid-column: 2; font-style: normal; font: 700 12.5px/1.1 var(--sans); color: #a8402c; min-height: 14px; font-variant-numeric: tabular-nums; }
.gq-cn { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 2px; }
.gq-cn b { font: 700 34px/1 var(--serif, var(--sans)); color: #a06a12; font-variant-numeric: tabular-nums; }
.gq-cn span { font-size: 14px; color: var(--muted); }
.gq-chip input[type=range].gq-range { -webkit-appearance: none; appearance: none; width: 100%; height: 30px; min-height: 30px; margin: 0; padding: 0; cursor: pointer; touch-action: pan-y; border: 0; box-shadow: none; outline: none;
  background: linear-gradient(90deg, #c8901f var(--p, 0%), color-mix(in srgb, var(--ink, #3a2a1a) 18%, transparent) var(--p, 0%)) no-repeat 11px center / calc(100% - 22px) 8px; border-radius: 0; }
.gq-chip input[type=range].gq-range::-webkit-slider-runnable-track { height: 30px; background: transparent; border: 0; }
.gq-chip input[type=range].gq-range::-moz-range-track { height: 8px; background: transparent; border: 0; }
.gq-chip input[type=range].gq-range::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: 3px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe3a0, #d9a031 70%); border: 2px solid var(--ink, #3a2a1a); box-shadow: 0 1px 3px rgb(0 0 0 / .35); }
.gq-chip input[type=range].gq-range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ffe3a0, #d9a031 70%); border: 2px solid var(--ink, #3a2a1a); }
.gq-chip input[type=range].gq-range:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.gq-cchips { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gq-chip .gq-buyline { justify-content: center; margin: 0; }
@media (max-width: 420px) {
  .gq-cm { grid-template-columns: 1fr; grid-template-rows: auto; justify-items: center; text-align: center; padding: 6px 4px; row-gap: 2px; }
  .gq-cm > img { grid-row: auto; }
  .gq-cm > span { align-items: center; }
  .gq-cmt { grid-column: auto; }
}
.gq-chip input[type=range].gq-range:focus { outline: 0; }
/* Beside Chip in, the short count ("640/1.2k counted"). */
.gq-me:has(.gq-chipb) .gq-part .pl { display: none; }
.gq-me:has(.gq-chipb) .gq-part .ps { display: inline; }
/* Narrow phones: the short quest title, so it isn't cut off. */
@media (max-width: 350px) {
  .gq-title .t-full { display: none; }
  .gq-title .t-brief { display: inline; }
}
/* Tile words only wide screens have room for. */
.gd-wide { text-decoration: none; }
@media (max-width: 760px) { .gd-wide { display: none; } }
.gd-tile.wrap em { white-space: normal; line-height: 1.15; text-wrap: balance; }
