/* The Ember Roll.
   One idea carries the page: rank is heat. A level-1 character is a dull coal,
   the level cap is white-hot, and every bar, dot and rule takes its color from
   where it sits on that ramp (set from app.js). Everything else stays quiet:
   char-brown ground, bone text, old-print names, plain rules instead of cards. Branding (2026-11-08) follows
   the game: Elephant Grove logo and crest from assets/ui, headings in Cinzel.

   Char  #1b1416   Ash   #2b2124   Smoke #9d8f89   Bone #ebe1d1
   Coal  #7a2016   Ember #e2571c   Flame #f6a52b   White heat #fff0c2 */
@font-face { font-family: "Fell"; src: url("/fonts/im_fell_english-normal-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Fell"; font-style: italic; src: url("/fonts/im_fell_english-italic-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Cinzel"; font-weight: 400 900; src: url("/fonts/cinzel.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 400; src: url("/fonts/alegreya_sans-normal-400.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 500; src: url("/fonts/alegreya_sans-normal-500.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Alegreya Sans"; font-weight: 700; src: url("/fonts/alegreya_sans-normal-700.woff2") format("woff2"); font-display: swap; }

:root {
  --char: #1b1416;
  --ash: #2b2124;
  --rule: #40333a;
  --smoke: #9d8f89;
  --bone: #ebe1d1;
  --coal: #7a2016;
  --ember: #e2571c;
  --flame: #f6a52b;
  --white-heat: #fff0c2;
  --good: #8fcf8a;
  --bad: #e8806c;
  --ramp: linear-gradient(90deg, #6e1d16 0%, #c8401a 35%, #f0892b 65%, #f8c555 85%, #fff0c2 100%);
  --name: "Fell", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --text: "Alegreya Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Cinzel", "Trajan Pro", "Palatino Linotype", Georgia, serif;
  --gold: #e8bb6c;          /* the wordmark gold (sampled off the logo), for headings only */
}
* { box-sizing: border-box; }
html { color-scheme: dark; background: var(--char); }
body { margin: 0; color: var(--bone); font: 400 1.0625rem/1.5 var(--text); font-variant-numeric: lining-nums; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(18px, 4vw, 48px); }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; margin: 0; letter-spacing: .02em; }
h2 { font-size: 1.5rem; line-height: 1.2; }
section { margin: 0 0 72px; }

/* --- masthead ----------------------------------------------------------- */
.masthead { padding-top: clamp(22px, 4vw, 48px); padding-bottom: clamp(28px, 4vw, 48px); }
.brand { display: block; flex: none; width: clamp(210px, 24vw, 260px); margin: 0 0 0 -8px; padding: 0; border: 0; }  /* the logo is the page title now (2026-11-08); it has its own clear space, so pull the crest back to the text edge */
.brand picture, .brand img { display: block; width: 100%; height: auto; }
@media (max-width: 360px) { .brand { width: 52px; margin-left: 0; } }  /* the wordmark stops reading this small; the crest carries it (game brand rule) */
h1 { font-size: clamp(1.5rem, 3.2vw, 2.3rem); line-height: 1.05; letter-spacing: .02em; font-weight: 700; color: var(--gold); text-shadow: 0 2px 0 #0d0809, 0 0 22px rgba(240, 137, 43, .2); padding-left: clamp(12px, 2vw, 22px); border-left: 1px solid rgba(232, 187, 108, .35); }
.mast-row { display: flex; flex-wrap: wrap; gap: 24px 56px; align-items: flex-start; justify-content: space-between; margin-top: 22px; }
.wiki { max-width: 340px; }
.wiki { border-left: 2px solid var(--ember); padding: 4px 0 4px 18px; color: var(--smoke); }
.wiki p { margin: 0 0 8px; }
.wiki a { color: var(--bone); font: 400 1.35rem var(--name); text-decoration: none; border-bottom: 1px solid var(--ember); }
.wiki a:hover { color: var(--white-heat); }
.status { margin: 0; max-width: 46ch; color: var(--smoke); font-size: 1.125rem; }
.status button { color: var(--bone); border-bottom: 1px solid var(--ember); }
.status button:hover { color: var(--white-heat); }
.status .lit { color: var(--good); }
.status .out { color: var(--bad); }

.notice { margin: 0 0 40px; padding: 12px 0 12px 16px; border-left: 3px solid var(--flame); color: var(--white-heat); max-width: 70ch; }

/* --- rising this week, and where the world is ----------------------------
   Two things that turn over by themselves, so the top of the page still says
   something new with a thousand players: who climbed most these seven days,
   and which places are full. Risers reuse the board's rows; a place is a row
   whose lit rule is how many stand there, and a click narrows the board. */
.hero { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(32px, 6vw, 88px); }
.rising, .places { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.rising .rank { font-size: 2.25rem; }
.rising .name { font-size: 1.85rem; }
.place { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 16px; width: 100%; padding: 12px 0 13px; }
.place::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule); }
.place::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 3px; width: var(--w, 0%); background: var(--heat); border-radius: 0 2px 2px 0; box-shadow: 0 0 12px var(--heat); }
.pname { font: 400 1.35rem/1.2 var(--name); overflow-wrap: anywhere; }
.pval { white-space: nowrap; font-size: 1.125rem; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; text-align: right; }
.pval small { margin-left: 10px; font-size: 1rem; font-weight: 400; color: var(--good); }
.place:hover .pname, .place.picked .pname { color: var(--white-heat); }
.place.picked::after { background: var(--white-heat); box-shadow: 0 0 14px var(--white-heat); }

/* --- the standings ------------------------------------------------------ */
.boardhead { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline; justify-content: space-between; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.tab { color: var(--smoke); padding: 4px 0; border-bottom: 2px solid transparent; }
.tab:hover { color: var(--bone); }
.tab[aria-selected="true"] { color: var(--bone); border-bottom-color: var(--ember); }
.hint { color: var(--smoke); margin: 6px 0 14px; min-height: 1.5em; }
.boardtools { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; margin: 6px 0 14px; }
.boardtools .hint { margin: 0; }
.find input { font: inherit; color: var(--bone); background: var(--ash); border: 1px solid var(--rule); border-radius: 4px; padding: 7px 12px; width: min(280px, 100%); }
.find input::placeholder { color: var(--smoke); }
.find input:focus { outline: 2px solid var(--flame); outline-offset: 1px; border-color: transparent; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.filter { margin: 0 0 14px; color: var(--white-heat); }
.filter button, .more { color: var(--bone); border-bottom: 1px solid var(--ember); }
.filter button:hover, .more:hover { color: var(--white-heat); }
.more { margin-top: 20px; font-size: 1.0625rem; }

.board { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.row { position: relative; display: grid; grid-template-columns: 3.2rem minmax(0, 1fr) auto; column-gap: 12px; align-items: center; width: 100%; padding: 16px 0 18px; }
/* The rule under each row is the bar: its lit length is the score. */
.row::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--rule); }
.row::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 3px; width: var(--w, 0%); background: var(--heat); border-radius: 0 2px 2px 0; box-shadow: 0 0 12px var(--heat); }
.row:hover .name { color: var(--white-heat); }
.rank { font: 500 1.75rem/1 var(--text); color: var(--smoke); font-variant-numeric: tabular-nums lining-nums; }
.rank.top { color: var(--heat); }
.name { font-family: var(--name); font-size: 1.6rem; line-height: 1.15; overflow-wrap: anywhere; }
.sub { display: block; font: 400 1rem/1.35 var(--text); color: var(--smoke); font-variant-numeric: lining-nums; }
.live { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--good); margin-left: 10px; vertical-align: middle; }
.val { text-align: right; white-space: nowrap; font-size: 1.25rem; font-weight: 500; font-variant-numeric: tabular-nums lining-nums; }
.val small { display: block; font-size: 1rem; font-weight: 400; color: var(--smoke); }
.empty { padding: 28px 0; color: var(--smoke); border-bottom: 1px solid var(--rule); max-width: 60ch; }

/* --- when the world plays: 7 days by 24 hours, each hour lit by how busy -- */
.activity-box { position: relative; }
.activity { display: grid; grid-template-columns: 2.6rem repeat(24, minmax(0, 1fr)); gap: 3px; max-width: 920px; }
.activity .hr { font-size: .875rem; color: var(--smoke); font-variant-numeric: tabular-nums lining-nums; white-space: nowrap; }
.activity .dy { font-size: .95rem; color: var(--smoke); align-self: center; }
.activity .cell { aspect-ratio: 1 / 1; border-radius: 3px; background: var(--ash); }
.activity .cell.unseen { background: none; box-shadow: inset 0 0 0 1px var(--rule); opacity: .55; }
.activity .cell:hover { outline: 2px solid var(--white-heat); outline-offset: 1px; }
.activity-key { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 14px; color: var(--smoke); font-size: .95rem; }
.activity-key .ramp { display: inline-block; width: 120px; height: 10px; border-radius: 2px; background: linear-gradient(90deg, #a8361a 0%, #f0892b 45%, #f8c555 75%, #fff0c2 100%); }
.activity-key .unseen-key::before { content: ""; display: inline-block; width: 12px; height: 12px; margin: 0 6px -1px 16px; border-radius: 3px; box-shadow: inset 0 0 0 1px var(--rule); }
.gridtip, .climb .tip { position: absolute; transform: translate(-50%, calc(-100% - 8px)); background: var(--char); border: 1px solid var(--rule); border-radius: 4px; padding: 5px 10px; font-size: .95rem; white-space: nowrap; pointer-events: none; z-index: 2; }

/* --- chronicle and margin ----------------------------------------------- */
.lower { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(32px, 6vw, 88px); }
.lower h2 { margin-bottom: 14px; }
.margin section { margin-bottom: 48px; }
.feed, .firsts, .news { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 12px 0; border-bottom: 1px solid var(--rule); max-width: 62ch; font-size: 1.125rem; }
.feed li.first { color: var(--white-heat); }
.feed li.none { color: var(--smoke); border-bottom: 0; }
.feed time, .news time { display: block; color: var(--smoke); font-size: 1rem; }
.firsts li { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; padding: 9px 0; border-bottom: 1px solid var(--rule); }
.firsts b { font: 400 1.25rem var(--name); color: var(--heat); }
.firsts .open { color: var(--smoke); font-family: var(--name); font-style: italic; }
/* Guilds reuse the places' lit rule: its length is the guild's levels added up. */
#guilds .pname .sub { margin-top: 2px; }
#guilds .pval small { margin-left: 6px; color: var(--smoke); }
#guilds .place:hover .pname { color: var(--white-heat); }
.news { border-top: 1px solid var(--rule); }
.update { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); column-gap: 32px; padding: 26px 0 28px; border-bottom: 1px solid var(--rule); }
.update .when { font: 500 1.125rem/1.6 var(--text); color: var(--flame); padding-top: 4px; }
.update .what { max-width: 74ch; }
.update h3 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 8px; }
.update .lead { margin: 0 0 8px; font-size: 1.1875rem; line-height: 1.55; }
.update ul { margin: 0; padding-left: 1.1em; line-height: 1.55; }
.update ul li { margin: 0 0 6px; padding-left: 4px; }
.update ul li::marker { color: var(--ember); }
.update .added { margin: 12px 0 0; }
.update .added .k { color: var(--smoke); }
.update .must { margin: 14px 0 0; padding: 8px 0 8px 14px; border-left: 3px solid var(--flame); color: var(--white-heat); }
a.wl { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(226, 87, 28, .55); }
a.wl:hover { color: var(--white-heat); border-bottom-color: var(--flame); }
button.wl { border-bottom: 1px solid rgba(226, 87, 28, .55); }
button.wl:hover { color: var(--white-heat); border-bottom-color: var(--flame); }
.tiered, .tiered a.wl { color: var(--tier); }
.loading { color: var(--smoke); }

.foot { color: var(--smoke); padding-bottom: 56px; }
.foot p { margin: 0; }

/* --- a character's sheet ------------------------------------------------- */
dialog { width: min(780px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); border: 1px solid var(--rule); border-top: 3px solid var(--heat, var(--ember)); border-radius: 4px; background: var(--ash); color: var(--bone); padding: 0; }
dialog::backdrop { background: rgba(12, 7, 8, .82); }
#sheetBody { padding: clamp(20px, 4vw, 40px); }
.close { position: sticky; top: 10px; float: right; margin: 10px 12px 0 0; width: 40px; height: 40px; text-align: center; font-size: 1.6rem; line-height: 1; color: var(--smoke); z-index: 1; }
.close:hover { color: var(--white-heat); }
.sheethead h2 { font-size: clamp(2.4rem, 8vw, 4rem); line-height: 1; overflow-wrap: anywhere; }
.sheethead p { margin: 6px 0 0; color: var(--smoke); max-width: 60ch; }
.sheethead p:first-of-type { color: var(--bone); font-size: 1.1875rem; margin-top: 10px; }
/* The character as the game draws them, top right: lit from below by their own heat. */
.sheethead.with-portrait { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: start; }
.portrait { margin: 26px 34px 0 0; width: 180px; height: 236px; background: radial-gradient(ellipse 60% 14% at 50% 92%, color-mix(in srgb, var(--heat, var(--ember)) 45%, transparent), transparent 70%); }
.portrait img { display: block; width: 100%; height: 100%; object-fit: contain; }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 18px 24px; margin: 28px 0 8px; padding: 18px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.figure span { display: block; color: var(--smoke); }
.figure b { display: block; font: 500 1.5rem/1.2 var(--text); font-variant-numeric: tabular-nums lining-nums; }
.figure small { display: block; color: var(--smoke); font-size: 1rem; }
.sheet h3 { font-size: 1.35rem; margin: 30px 0 8px; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0 32px; margin: 0; }
.kv div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--rule); padding: 6px 0; }
.kv dt { color: var(--smoke); }
.kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums lining-nums; }
.pos { color: var(--good); } .neg { color: var(--bad); }
.listed { margin: 0; color: var(--bone); max-width: 68ch; }
/* The climb: one stepped line in the character's own heat, quiet grid behind. */
.climb { position: relative; margin-top: 6px; }
.climb svg { display: block; width: 100%; height: auto; overflow: visible; }
.climb .grid { stroke: var(--rule); stroke-width: 1; }
.climb .tick { fill: var(--smoke); font: 400 13px var(--text); }
.climb .line { fill: none; stroke: var(--heat); stroke-width: 2; stroke-linejoin: round; }
.climb .dot { fill: var(--heat); stroke: var(--ash); stroke-width: 2; }
.climb .cross { stroke: var(--smoke); stroke-width: 1; stroke-dasharray: 3 3; }
/* Copy link: a quiet outlined button that warms up on hover, like the rows. */
.share { display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 7px 14px 7px 12px; font-size: 1rem; font-weight: 500; color: var(--bone); background: var(--char); border: 1px solid var(--rule); border-radius: 4px; max-width: 100%; overflow-wrap: anywhere; transition: border-color .15s, color .15s, box-shadow .15s; }
.share:hover { color: var(--white-heat); border-color: var(--ember); box-shadow: 0 0 10px rgba(226, 87, 28, .35); }
.share .icon { flex: none; fill: none; stroke: var(--flame); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.share .icon circle { fill: var(--flame); stroke: none; }
.share.done { border-color: var(--good); }
.share.done .icon { stroke: var(--good); }
.listed button, .sheethead p button { border-bottom: 1px solid rgba(226, 87, 28, .55); }
.listed button:hover, .sheethead p button:hover { color: var(--white-heat); }
.muted { color: var(--smoke); }

/* --- a guild's page: the sheet's frame, a roster in the board's rows ------- */
.sheethead .kicker { margin: 0 0 4px; font: italic 400 1.25rem var(--name); color: var(--flame); }
.roster { margin-top: 4px; }
.roster .row { grid-template-columns: 5.2rem minmax(0, 1fr) auto; padding: 12px 0 14px; }
.roster .name { font-size: 1.4rem; }
.roster .rank { font: 500 .95rem/1.2 var(--text); letter-spacing: .06em; text-transform: uppercase; }
.roster .rank.rk-leader { color: var(--heat); }
.roster div.row .name { color: var(--smoke); }
.guildpage .feed li { font-size: 1.0625rem; }

@media (max-width: 760px) {
  section { margin-bottom: 56px; }
  .lower { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
  .rising .rank { font-size: 1.6rem; }
  .rising .name { font-size: 1.5rem; }
  .update { grid-template-columns: 1fr; row-gap: 4px; }
  .update h3 { font-size: 1.5rem; }
  .portrait { width: 124px; height: 162px; margin: 34px 30px 0 0; }
  .sheethead.with-portrait { column-gap: 8px; }
  .row { grid-template-columns: 2.4rem minmax(0, 1fr) auto; }
  .rank { font-size: 1.4rem; }
  .name { font-size: 1.35rem; }
  .tag { font-size: 1.0625rem; line-height: 26px; }
  .roster .row { grid-template-columns: 4.4rem minmax(0, 1fr) auto; }
  .activity { grid-template-columns: 2rem repeat(24, minmax(0, 1fr)); gap: 2px; }
  .activity .hr { font-size: .75rem; }
  .activity .dy { font-size: .8rem; }
  .activity .cell { border-radius: 2px; }
  .roster .name { font-size: 1.25rem; }
}

/* Bars ease to their new length when the board changes. Nothing else moves by itself. */
@media (prefers-reduced-motion: no-preference) {
  .row::after, .place::after { transition: width .45s ease; }
}

/* The chronicle in a card about six entries tall: it scrolls inside itself so
   the page doesn't, and fades at the bottom while there's more below. */
.feed-card { position: relative; max-height: 30.5rem; overflow-y: auto; overscroll-behavior: contain; background: var(--ash); border: 1px solid var(--rule); border-radius: 4px; padding: 2px 20px; scrollbar-width: thin; scrollbar-color: var(--rule) transparent; }
.feed-card:focus-visible { outline-offset: 2px; }
.feed-card .feed li:last-child { border-bottom: 0; }
.feed-card.more { -webkit-mask-image: linear-gradient(#000 calc(100% - 56px), transparent); mask-image: linear-gradient(#000 calc(100% - 56px), transparent); }
.feed-more { margin: 10px 0 0; min-height: 0; font-size: .95rem; }

/* New in the world in the same kind of card: updates run long, so it's taller. */
.news-card { max-height: 40rem; padding: 0 24px; }
.news-card .news { border-top: 0; }
.news-card .update:last-child { border-bottom: 0; }
@media (max-width: 760px) { .news-card { max-height: 34rem; padding: 0 16px; } }
/* On a sheet: the same card, a little shorter (about five entries). */
.sheet-card { max-height: 24rem; padding: 2px 18px; background: var(--char); border-color: var(--rule); box-shadow: inset 0 1px 6px rgba(0, 0, 0, .35); }
.sheet-card .feed li { font-size: 1.0625rem; max-width: none; }

/* --- the server row, like a LANtern service: light, name, up, world, bars -- */
.server-box { margin: 30px 0 0; }
.svc-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.svc-head h2 { font: 500 .85rem/1 var(--text); letter-spacing: .12em; text-transform: uppercase; color: var(--smoke); }
.svc-head span { color: var(--smoke); font-size: .9rem; }
.svc { display: grid; grid-template-columns: minmax(0, 1.5fr) 8.5rem 8.5rem minmax(160px, 2fr) 4.5rem; column-gap: 24px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.svc b { display: block; font-weight: 500; font-size: 1.1rem; font-variant-numeric: tabular-nums lining-nums; }
.svc small { display: block; color: var(--smoke); font-size: .9rem; font-variant-numeric: tabular-nums lining-nums; }
.svc-name { display: grid; grid-template-columns: 22px minmax(0, 1fr); align-items: center; }
.svc-name small { grid-column: 2; overflow-wrap: anywhere; }
.svc .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--smoke); }
.svc .dot.up { background: var(--good); box-shadow: 0 0 9px var(--good); }
.svc .dot.down { background: var(--bad); box-shadow: 0 0 9px var(--bad); }
.svc.up .svc-up b { color: var(--good); }
.svc.down .svc-up b { color: var(--bad); }
.bars { display: grid; grid-template-columns: repeat(48, minmax(0, 1fr)); gap: 2px; height: 26px; }
.bars i { border-radius: 2px; background: var(--rule); opacity: .45; }
.bars i.ok { background: var(--good); opacity: .85; }
.bars i.part { background: var(--flame); opacity: .9; }
.bars i.down { background: var(--bad); opacity: .9; }
.bars i:last-child.ok { opacity: 1; box-shadow: 0 0 8px var(--good); }
.svc-pct { text-align: right; }
.strip-link { font: inherit; color: var(--bone); border-bottom: 1px solid rgba(226, 87, 28, .55); text-align: left; }
.strip-link:hover { color: var(--white-heat); border-bottom-color: var(--flame); }
@media (max-width: 760px) {
  .svc { grid-template-columns: minmax(0, 1fr) auto; row-gap: 12px; }
  .svc-name { grid-column: 1 / -1; }
  .svc-world { text-align: right; }
  .bars { grid-column: 1; }
}

/* --- the title row: the name on the left, the search box on its right ----- */
.title-row { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 14px 32px; }
.title-row .search { flex: 0 1 320px; min-width: 220px; margin: 0; }
.title-block { flex: none; display: flex; align-items: center; gap: clamp(8px, 1.4vw, 16px); }
.title-block h1 { white-space: nowrap; }
@media (max-width: 860px) { .title-row { flex-wrap: wrap; } .title-row .search { flex: 1 1 100%; max-width: none; } }

/* --- search everything: one box, results drop down beneath it ------------- */
.search { position: relative; }
.search input { width: 100%; font: inherit; color: var(--bone); background: var(--ash); border: 1px solid var(--rule); border-radius: 4px; padding: 10px 14px; }
.search input::placeholder { color: var(--smoke); }
.search input:focus { outline: 2px solid var(--flame); outline-offset: 1px; border-color: transparent; }
.results { position: absolute; right: 0; width: max(100%, min(460px, calc(100vw - 32px))); top: calc(100% + 6px); z-index: 5; list-style: none; margin: 0; padding: 4px 0; max-height: 26rem; overflow-y: auto; background: var(--ash); border: 1px solid var(--rule); border-radius: 4px; box-shadow: 0 12px 32px rgba(0, 0, 0, .55); }
.results li.none { padding: 12px 16px; color: var(--smoke); }
.results .hit { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr); column-gap: 12px; width: 100%; padding: 9px 16px; color: var(--bone); text-decoration: none; text-align: left; }
.results .hit:hover, .results .hit:focus-visible { background: var(--char); outline: none; }
.results .hit:hover .hname, .results .hit:focus-visible .hname { color: var(--white-heat); }
.results .kind { grid-row: span 2; align-self: center; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; color: var(--flame); }
.results .hname { font: 400 1.2rem/1.25 var(--name); overflow-wrap: anywhere; }
.results .hnote { grid-column: 2; color: var(--smoke); font-size: .95rem; }

/* --- ask to join: the wiki note's partner, same ember edge --------------- */
.mast-left { flex: 1 1 380px; max-width: 560px; }
.join { margin: 0; border-left: 2px solid var(--ember); padding: 4px 0 4px 18px; color: var(--smoke); }
.join p { margin: 0 0 8px; }
.join .kicker { font: italic 400 1.35rem var(--name); color: var(--bone); margin-bottom: 4px; }
.join .share { margin-top: 4px; }
.join form { display: grid; gap: 12px; margin-top: 10px; max-width: 460px; }
.join label { display: grid; gap: 4px; color: var(--bone); font-size: 1rem; }
.join label small { color: var(--smoke); font-size: .9rem; }
.join input, .join textarea { font: inherit; color: var(--bone); background: var(--ash); border: 1px solid var(--rule); border-radius: 4px; padding: 8px 12px; resize: vertical; }
.join input:focus, .join textarea:focus { outline: 2px solid var(--flame); outline-offset: 1px; border-color: transparent; }
.join .trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.join .fine { font-size: .9rem; margin: 0; }
.join-msg { color: var(--good); margin: 4px 0 0; }
.join-msg.bad { color: var(--bad); }
.join-actions { display: flex; gap: 16px; align-items: center; }
.join-actions .share { margin: 0; }
.join-cancel { color: var(--smoke); border-bottom: 1px solid var(--rule); }
.join-cancel:hover { color: var(--bone); }
