/* hearthandhound.online: the same cozy look as Lanternrest's page (stage/town.html), in dark and light. */
:root {
  --bg: #15100c; --bg-2: #1f1712; --panel: #291c14; --panel-2: #33241a;
  --edge: rgba(242, 191, 102, 0.35); --edge-soft: rgba(242, 191, 102, 0.2); --edge-strong: #f2bf66;
  --fg: #f3e9dc; --muted: #bfae98; --title: #ffd98c; --accent: #e4b27a; --on-accent: #241810;
  --leaf: #9cc47a; --bar-bg: rgba(255, 255, 255, 0.08); --bar-from: #c98f4e; --bar-to: #e4b27a;
  --rule: rgba(255, 255, 255, 0.06); --glow: rgba(255, 210, 140, 0.18); --shadow: rgba(0, 0, 0, 0.35);
  --warn: #f0a37a; --twitch: #9146ff; --on-twitch: #ffffff; --lane: #4a3523;
  --page: radial-gradient(ellipse at top, #2a1d14 0%, #15100c 60%);
  --radius: 12px;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6eedf; --bg-2: #efe2c9; --panel: #fffaf0; --panel-2: #fdf5e6;
    --edge: rgba(150, 100, 45, 0.3); --edge-soft: rgba(150, 100, 45, 0.18); --edge-strong: #b9802f;
    --fg: #2e2116; --muted: #6f5a44; --title: #7a4512; --accent: #a8612a; --on-accent: #fffaf0;
    --leaf: #4f8a2e; --bar-bg: rgba(90, 60, 30, 0.12); --bar-from: #c98f4e; --bar-to: #a8612a;
    --rule: rgba(90, 60, 30, 0.12); --glow: rgba(214, 150, 70, 0.22); --shadow: rgba(90, 60, 30, 0.12);
    --warn: #b4532a; --lane: #c9a874;
    --page: radial-gradient(ellipse at top, #fff6e3 0%, #f6eedf 60%);
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--page) fixed, var(--bg); color: var(--fg);
  font: 16px/1.5 ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh; overflow-x: hidden;
}
a { color: var(--accent); }
a:hover { color: var(--title); }
main { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }
h1, h2, h3 { color: var(--title); line-height: 1.2; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
h1 { font-size: clamp(28px, 7vw, 40px); letter-spacing: 0.01em; }
h2 { font-size: 20px; margin-bottom: 8px; }
h3 { font-size: 14px; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin: 18px 0 8px; }
p { margin: 0 0 10px; }
code { background: var(--bg-2); border: 1px solid var(--edge-soft); border-radius: 6px; padding: 0 5px; font-size: 0.92em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
[hidden] { display: none !important; }
.sprite { image-rendering: pixelated; image-rendering: crisp-edges; display: block; max-width: none; }

/* top bar */
nav.top {
  max-width: 760px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px;
}
.brand { display: inline-flex; align-items: flex-end; gap: 8px; color: var(--title); font-weight: 700; text-decoration: none; }
.brand .sprite { margin-bottom: 2px; }
.links { display: inline-flex; gap: 16px; flex-wrap: wrap; justify-content: flex-end; }
.links a { text-decoration: none; font-weight: 600; }
.links a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }

/* landing */
.hero { text-align: center; padding: 8px 0 18px; }
.lane {
  display: flex; justify-content: center; align-items: flex-end; gap: 6px; height: 104px;
  border-bottom: 3px solid var(--lane); margin: 0 auto 14px; max-width: 520px; overflow: hidden;
}
.lane .sprite { margin-bottom: -2px; }
.small-lane { height: 80px; max-width: 200px; }
.tagline { color: var(--muted); max-width: 520px; margin: 6px auto 14px; font-size: 18px; }
.flash { display: inline-block; background: var(--panel); border: 1px solid var(--edge); border-radius: 10px; padding: 8px 14px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; font: inherit; font-weight: 700;
  line-height: 1.2; color: var(--on-accent); background: var(--accent); border: 1px solid transparent;
  border-radius: 10px; padding: 10px 18px; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.button:hover { background: var(--title); color: var(--on-accent); }
.button.twitch { background: var(--twitch); color: var(--on-twitch); }
.button.twitch:hover { background: #772ce8; color: var(--on-twitch); }
.button.discord { background: #5865f2; color: #ffffff; }
.button.discord:hover { background: #4752c4; color: #ffffff; }
.button.quiet { background: transparent; color: var(--accent); border: 1px solid var(--edge); }
.button.quiet:hover { color: var(--title); border-color: var(--edge-strong); }
.button:focus-visible, a:focus-visible { outline: 2px solid var(--edge-strong); outline-offset: 2px; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 16px; }
.with-pic { display: flex; gap: 14px; align-items: flex-start; }
.with-pic .pic {
  flex: none; width: 76px; height: 84px; display: grid; place-items: end center; padding-bottom: 6px;
  background: radial-gradient(ellipse at 50% 85%, var(--glow), transparent 70%), var(--bg-2);
  border: 1px solid var(--edge); border-radius: 10px;
}

/* panels */
.panel {
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--edge); border-radius: var(--radius);
  padding: 18px; margin: 0 0 16px; box-shadow: 0 6px 24px var(--shadow);
}
.prose h2 { margin-top: 20px; }
.prose ul { padding-left: 20px; margin: 0 0 10px; }
.prose li { margin-bottom: 6px; }

/* /me */
.banner { display: flex; align-items: center; gap: 8px; border-radius: 10px; padding: 8px 14px; margin: 0 0 16px; font-size: 14px; }
.banner.live { color: var(--muted); padding-left: 2px; }
.banner.resting { display: block; background: var(--panel); border: 1px dashed var(--edge); }
.me { display: flex; gap: 16px; align-items: center; }
.me .portrait, .panel.me .portrait {
  flex: none; width: 92px; height: 104px; display: grid; place-items: end center; padding-bottom: 6px;
  background: radial-gradient(ellipse at 50% 85%, var(--glow), transparent 70%), var(--bg-2);
  border: 1px solid var(--edge); border-radius: 10px;
}
button.portrait { position: relative; font: inherit; color: inherit; cursor: pointer; }
button.portrait:hover, button.portrait:focus-visible { border-color: var(--edge-strong); }
button.portrait:focus-visible { outline: 2px solid var(--edge-strong); outline-offset: 2px; }
.portrait .edit {
  position: absolute; left: 50%; bottom: -9px; transform: translateX(-50%); font-size: 11px; font-weight: 700;
  line-height: 1; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  white-space: nowrap; box-shadow: 0 2px 6px var(--shadow);
}
.who { min-width: 0; }
.who h1 { font-size: clamp(24px, 6vw, 32px); }
.job { font-size: 17px; margin: 4px 0 2px; }
.seen { display: flex; align-items: center; gap: 6px; margin: 4px 0 0; }
.dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; }
.dot.here { background: var(--leaf); box-shadow: 0 0 8px var(--leaf); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 16px 0 0; }
.facts div { background: var(--bg-2); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.facts dt { color: var(--muted); font-size: 13px; }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.hint { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 14px; }
.badges, .chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.badge { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 13px;
         background: rgba(242, 191, 102, 0.12); border: 1px solid var(--edge); color: var(--title); }
.badge .when { color: var(--muted); font-size: 12px; }
.chip { background: var(--bg-2); border: 1px solid var(--edge-soft); border-radius: 999px; padding: 3px 10px; font-size: 14px; }
.chip.soon { border-style: dashed; color: var(--muted); }
.chip.warn { color: var(--warn); border-color: var(--warn); }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.person { display: flex; gap: 10px; align-items: center; background: var(--bg-2); border-radius: 10px; padding: 8px 10px; min-width: 0; }
.person .sprite { flex: none; }
.person b { display: block; }
.grow { flex: 1; min-width: 0; }
.meter { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; font-size: 12px; color: var(--muted); margin-top: 4px; }
.meter .word { text-align: right; color: var(--fg); }
.meter .bar { grid-column: 1 / -1; margin-top: 2px; }
.meter.wide { margin-top: 12px; font-size: 14px; }
.bar { height: 8px; background: var(--bar-bg); border-radius: 999px; overflow: hidden; display: block; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--bar-from), var(--bar-to)); border-radius: inherit; }
ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li { padding: 6px 0; border-top: 1px solid var(--rule); }
ul.plain li:first-child { border-top: 0; }
.herd { display: flex; gap: 12px; align-items: center; }
.herd .pics { flex: none; display: flex; align-items: flex-end; justify-content: center; gap: 2px; width: 110px; }
.news li { display: flex; justify-content: space-between; gap: 12px; }
.news li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.news .where { display: inline-block; font-size: 12px; color: var(--accent); background: var(--bg-2); border-radius: 999px; padding: 0 8px; margin-right: 4px; }
.news .when { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; padding-top: 2px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-top: 8px; }
.stat { background: var(--bg-2); border-radius: 10px; padding: 10px 12px; }
.stat .n { font-size: 24px; font-weight: 700; color: var(--title); line-height: 1.1; }
.stat .l { color: var(--muted); font-size: 13px; }
.season { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 14px; font-weight: 600; color: #241810; }
.season.spring { background: #a8d48a; } .season.summer { background: #f2cf6b; }
.season.fall { background: #e8995a; } .season.winter { background: #cfe1ef; }

/* Talk with Orzo */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.chat-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.chat-head .pic {
  flex: none; width: 56px; height: 60px; display: grid; place-items: end center; padding-bottom: 4px;
  background: radial-gradient(ellipse at 50% 85%, var(--glow), transparent 70%), var(--bg-2);
  border: 1px solid var(--edge); border-radius: 10px;
}
.chat-head h2 { margin-bottom: 2px; }
.chat-head p { margin: 0; }
.messages {
  margin: 0 0 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px;
  max-height: 420px; overflow-y: auto; background: var(--bg-2); border-radius: 10px; border: 1px solid var(--edge-soft);
}
.msg { margin: 0; max-width: 85%; padding: 8px 12px; border-radius: 14px; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.4; }
.msg.orzo { align-self: flex-start; background: var(--panel); border: 1px solid var(--edge); border-bottom-left-radius: 4px; }
.msg.you { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-bottom-right-radius: 4px; }
.msg.sending { opacity: 0.75; }
.msg.typing { color: var(--muted); font-style: italic; }
.msg.unseen { opacity: 0.55; text-decoration: line-through; }
.composer {
  background: var(--bg-2); border: 1px solid var(--edge); border-radius: var(--radius); padding: 4px;
}
.composer:focus-within { border-color: var(--edge-strong); box-shadow: 0 0 0 3px var(--glow); }
.composer textarea {
  display: block; width: 100%; resize: none; min-height: 64px; max-height: 200px; font: inherit; line-height: 1.45;
  color: var(--fg); background: transparent; border: 0; border-radius: 8px; padding: 10px 12px; margin: 0;
}
.composer textarea:focus, .composer textarea:focus-visible { outline: none; }
.composer textarea::placeholder { color: var(--muted); opacity: 1; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 4px 4px 4px 12px; }
.composer-foot .button { min-height: 40px; padding: 8px 20px; }
.linkish:focus-visible, select:focus-visible, input:focus-visible { outline: 2px solid var(--edge-strong); outline-offset: 1px; }
.button:disabled { opacity: 0.6; cursor: default; }
.chat-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; }
.chat-foot p { margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; }
.linkish.small { font-size: 14px; }
.tiny { font-size: 12px; }
.linkish:hover { color: var(--title); }

/* Make changes */
.notice { background: var(--bg-2); border: 1px dashed var(--edge); border-radius: 10px; padding: 8px 12px; font-size: 14px; margin: 10px 0; }
form.act { margin: 12px 0 0; }
form.act > label { display: block; font-weight: 700; font-size: 14px; color: var(--accent); margin-bottom: 4px; }
form.act .row { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
form.act .row .button { flex: none; }
form.act p { margin: 6px 0 0; }
form.act input, form.act select {
  font: inherit; line-height: 1.2; min-height: 44px; color: var(--fg); background-color: var(--bg-2);
  border: 1px solid var(--edge); border-radius: 10px; padding: 9px 12px; min-width: 0;
}
form.act select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--accent) 50%), linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat;
}
form.act select optgroup { font-weight: 700; color: var(--accent); }
form.act select option { color: var(--fg); background: var(--panel); }
form.act input { flex: 1 1 200px; }
form.act select { flex: 1 1 150px; }
form.act input::placeholder { color: var(--muted); }
form.act input:disabled, form.act select:disabled { opacity: 0.6; }
.buttons { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
form.act.inline { margin: 0; }
h3 + .buttons { margin-top: 0; }
#action-status:empty { display: none; }
#action-status { margin: 0 0 6px; }
.log li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.log .what { min-width: 0; overflow-wrap: anywhere; }
.log .result { display: block; color: var(--muted); font-size: 14px; }
.state { flex: none; font-size: 13px; border-radius: 999px; padding: 1px 10px; border: 1px solid var(--edge-soft); white-space: nowrap; }
.state.queued, .state.running { color: var(--muted); border-style: dashed; }
.state.done { color: var(--leaf); border-color: var(--leaf); }
.state.failed { color: var(--warn); border-color: var(--warn); }

/* Pick your look (a dialog over /me) */
dialog.picker {
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); padding: 0;
  color: var(--fg);
  background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--edge-strong);
  border-radius: 16px; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.5); overflow: hidden;
}
dialog.picker::backdrop { background: rgba(10, 6, 3, 0.6); }
dialog.picker form.act { margin: 0; padding: 18px; display: flex; flex-direction: column; max-height: calc(100vh - 34px);
                         max-height: calc(100dvh - 34px); }
.picker-head, .picker > form > p, .picker-foot { flex: none; }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.picker-head h2 { margin: 0; }
.picker .close {
  flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--edge); background: var(--bg-2);
  color: var(--fg); font: inherit; font-size: 22px; line-height: 1; cursor: pointer;
}
.picker .close:hover { border-color: var(--edge-strong); color: var(--title); }
.picker .close:focus-visible { outline: 2px solid var(--edge-strong); outline-offset: 2px; }
.picker > form > p { margin: 8px 0 0; }
.looks {
  margin: 12px 0 0; padding: 4px; min-width: 0; min-height: 0; overflow-y: auto; flex: 1 1 auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px;
}
.look { position: relative; display: grid; place-items: end center; height: 84px; padding-bottom: 6px; cursor: pointer;
        background: radial-gradient(ellipse at 50% 85%, var(--glow), transparent 70%), var(--bg-2);
        border: 2px solid var(--edge-soft); border-radius: 10px; }
.look:hover { border-color: var(--edge); }
.look input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.look:has(input:checked) { border-color: var(--edge-strong); background-color: var(--panel-2); box-shadow: 0 0 0 3px var(--glow); }
.look:has(input:focus-visible) { outline: 2px solid var(--edge-strong); outline-offset: 2px; }
.picker .form-status:empty { display: none; }
.picker .form-status { margin: 10px 0 0; color: var(--warn); }
.picker-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* Credits (/credits) */
.thanks .tagline { max-width: 600px; }
.credits h2 { margin-bottom: 10px; }
.credit-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.credit-table th { text-align: left; color: var(--accent); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em;
                   padding: 6px 10px 6px 0; border-bottom: 1px solid var(--edge-soft); }
.credit-table td { padding: 8px 10px 8px 0; vertical-align: top; border-top: 1px solid var(--rule); overflow-wrap: anywhere; }
.credit-table tr:first-child td { border-top: 0; }
.credit-table td:first-child { font-weight: 600; width: 30%; }
.credit-table td:last-child { white-space: normal; color: var(--muted); width: 18%; }
.tracks li { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.tracks li > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.tracks .license { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; padding-top: 2px; }

footer { text-align: center; color: var(--muted); font-size: 13px; padding: 8px 16px 32px; }
footer p { margin: 0 0 6px; }

/* bar widths, in steps of 5 (no inline styles: the page's CSP allows only this stylesheet) */
.p0{width:0}.p5{width:5%}.p10{width:10%}.p15{width:15%}.p20{width:20%}.p25{width:25%}.p30{width:30%}
.p35{width:35%}.p40{width:40%}.p45{width:45%}.p50{width:50%}.p55{width:55%}.p60{width:60%}.p65{width:65%}
.p70{width:70%}.p75{width:75%}.p80{width:80%}.p85{width:85%}.p90{width:90%}.p95{width:95%}.p100{width:100%}

@media (max-width: 480px) {
  nav.top { gap: 8px; }
  .brand span, .links a { font-size: 15px; white-space: nowrap; }
  .links { gap: 12px; flex-wrap: nowrap; }
  .panel { padding: 14px; }
  .me { gap: 12px; }
  .me .portrait { width: 76px; height: 96px; padding-bottom: 4px; }
  .herd .pics { width: auto; min-width: 64px; }
  .lane { height: 88px; gap: 4px; }
  .hero .lane .sprite:first-child, .hero .lane .sprite:last-child { display: none; }
  .hero .lane .sprite:only-child { display: block; }
  .news li { flex-direction: column; gap: 0; }
  .news .when { padding-top: 0; }
  .messages { max-height: 360px; padding: 10px; }
  .msg { max-width: 92%; }
  form.act .row > * { flex: 1 1 100%; }
  form.act .row .button { flex: 1 1 100%; }
  .composer-foot .tiny { display: none; }
  .composer-foot { justify-content: flex-end; }
  .buttons form.act.inline { flex: 1 1 auto; }
  .buttons .button { width: 100%; }
  dialog.picker form.act { padding: 14px; }
  .looks { grid-template-columns: repeat(auto-fill, minmax(58px, 1fr)); gap: 6px; }
  .look { height: 78px; }
  .credit-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .credit-table, .credit-table tbody, .credit-table tr, .credit-table td { display: block; width: auto !important; }
  .credit-table tr { padding: 10px 0; border-top: 1px solid var(--rule); }
  .credit-table tr:first-child { border-top: 0; padding-top: 0; }
  .credit-table td { border: 0; padding: 2px 0; }
  .credit-table td:not(:first-child)::before { content: attr(data-label) ": "; color: var(--accent); font-size: 13px; font-weight: 600; }
  .tracks li { flex-direction: column; gap: 0; }
  form.act[data-action=plant] select { flex: 1 1 40%; }
}
