@import url("/palette.css");
@font-face{font-family:Cinzel;src:url("/fonts/cinzel.ttf") format("truetype");font-display:swap}
@font-face{font-family:Barlow;src:url("/fonts/barlow.ttf") format("truetype");font-display:swap}

:root {
  color-scheme: dark;
  --ink: #151414;
  --paper: #efe7d9;
  --muted: #bdb1a8;
  --quiet: #a49890;
  --surface: #1d1a1b;
  --raised: #252020;
  --line: #453936;
  --red: #a33c38;
  --bright: #f3a298;
  --signal: #91c8ab;
  --amber: #f0c387;
  --display: Cinzel, Georgia, serif;
  --body: Barlow, "Segoe UI", sans-serif;
  --shell: min(100% - 72px, 1240px);
  font-family: var(--body);
  color: var(--paper);
  background: var(--ink);
  scrollbar-color: var(--line) var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }
button, input, select { font: inherit; color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 4px; }
a:hover { color: var(--bright); }
img { display: block; max-width: 100%; }
h1, h2, h3, p, ul, ol, dl { margin-top: 0; }
h1, h2 { font-family: var(--display); line-height: 1.14; letter-spacing: -.023em; }
h1 { font-size: clamp(2.25rem, 5vw, 4.45rem); margin-bottom: .38em; text-wrap: balance; }
h2 { font-size: clamp(1.45rem, 3vw, 2.4rem); margin-bottom: .35em; text-wrap: balance; }
h3 { font-size: 1.25rem; line-height: 1.15; margin-bottom: .3em; }
p { line-height: 1.5; color: var(--muted); max-width: 65ch; margin-bottom: 1rem; }
code, kbd, time, .count, .amount { font-variant-numeric: tabular-nums; }
code, kbd { font-family: ui-monospace, Consolas, monospace; }
code { color: var(--bright); overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--bright); outline-offset: 4px; }
::selection { color: var(--ink); background: var(--bright); }
[hidden] { display: none !important; }
.visually-hidden, .skip:not(:focus) {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip { position: absolute; left: 1rem; top: 1rem; background: var(--paper); color: var(--ink); padding: .6rem 1rem; z-index: 9; }
.skip:hover { color: var(--ink); }
.masthead { background: #131213; border-bottom: 1px solid var(--line); position: relative; z-index: 2; }
.masthead-inner, .footer-inner { width: var(--shell); margin: auto; display: flex; align-items: center; gap: 28px; }
.masthead-inner { min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; line-height: 1.2; }
.brand img { flex: none; }
.brand small { font-size: max(.78em, 11px); }
.masthead nav { margin-inline: auto; display: flex; align-items: center; align-self: stretch; gap: 24px; }
.masthead nav a { display: grid; place-items: center; min-height: 44px; text-decoration: none; border-bottom: 2px solid transparent; color: var(--muted); }
.masthead nav a:is(:hover,[aria-current]) { color: var(--paper); border-color: var(--red); }
.environment { font-size: .83rem; letter-spacing: .05em; color: var(--bright); border: 1px solid #754842; border-radius: 2px; padding: 5px 10px; white-space: nowrap; }
.shell { width: var(--shell); margin-inline: auto; }
.loading { width: var(--shell); margin: 48px auto; }
.hero { position: relative; isolation: isolate; min-height: 548px; display: grid; align-items: end; overflow: hidden; border-bottom: 1px solid var(--line); background: #1e2020; }
.hero::before, .hero::after { position: absolute; content: ""; z-index: -1; inset: 0; }
.hero::before { background: url("/art/hero.svg") center 56% / cover no-repeat; }
.hero::after { background: linear-gradient(90deg,#151414 1%,#151414ee 23%,#1514149a 49%,#15141417 75%),linear-gradient(0deg,#151414f0 0%,transparent 48%); }
.hero-body { padding-block: 94px 58px; position: relative; }
.hero h1 { max-width: 9.5ch; font-size: clamp(3rem, 8.1vw, 6rem); line-height: .95; margin-bottom: .25em; text-wrap: initial; }
.hero p { max-width: 38ch; font-size: 1.22rem; color: var(--paper); }
.hero-caption { position: absolute; right: 0; bottom: 58px; max-width: 20ch; border-top: 1px solid #9d8277; padding-top: 10px; font-size: .87rem; color: var(--paper); text-align: right; }
.hero-caption b { display: block; color: var(--bright); font-weight: 700; }
.hero-actions, .inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hero-actions { margin-top: 26px; gap: 16px; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 44px; padding: 9px 15px; text-decoration: none; border: 1px solid var(--line);
  border-radius: 4px; background: var(--raised); color: var(--paper); font-weight: 700; cursor: pointer;
}
.button.primary { background: var(--red); color: #fff5eb; border-color: var(--red); }
.button:not(:disabled):hover { background: #35292a; border-color: var(--bright); color: var(--paper); }
.button.primary:not(:disabled):hover { background: #b2453e; }
.button:disabled { color: #ad9d96; background: #201c1b; border-color: #392e2d; cursor: not-allowed; }
.text-link { min-height: 44px; display: inline-grid; align-items: center; color: var(--paper); }
.section { padding-block: 42px 62px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px 28px; margin-bottom: 18px; flex-wrap: wrap; }
.section-heading p, .section-heading h2 { margin-bottom: 0; }
.home-ledger { display: grid; grid-template-columns: minmax(0,1.75fr) minmax(220px,.85fr); gap: clamp(28px,5vw,76px); }
.channel-list { padding: 0; list-style: none; border-top: 1px solid var(--line); margin-bottom: 0; }
.channel-list li { border-bottom: 1px solid var(--line); }
.channel-link { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; min-height: 76px; padding-inline: 6px; text-decoration: none; }
.channel-link:hover { background: var(--surface); }
.channel-link strong { font-size: 1.22rem; display: block; }
.channel-link small { color: var(--muted); }
.channel-link img { width: 40px; height: 40px; }
.state-label { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: .9rem; color: var(--muted); }
.state-label::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; border: 1px solid currentColor; }
.state-label[data-state="online"] { color: var(--signal); }
.state-label[data-state="online"]::before { background: currentColor; }
.state-label[data-state="unknown"] { color: var(--amber); }
.field-note { border-top: 1px solid var(--red); padding-block: 15px; color: var(--muted); }
.field-note h2 { font-size: 1.35rem; }
.field-note p:last-child { margin-bottom: 0; }
footer { background: #131213; border-top: 1px solid var(--line); }
.footer-inner { min-height: 86px; justify-content: space-between; color: var(--muted); font-size: .91rem; }
.footer-inner .brand { color: var(--paper); }

.page-head { border-bottom: 1px solid var(--line); padding-block: 38px 26px; background: var(--surface); }
.page-head h1 { margin-bottom: 7px; }
.page-head p:last-child { margin-bottom: 0; }
.trail { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; margin-bottom: 10px; color: var(--muted); font-size: .94rem; }
.channel-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 20px; }
.tabs { display: flex; flex-wrap: wrap; gap: 0 22px; border-bottom: 1px solid var(--line); }
.tabs a { display: grid; min-height: 48px; align-items: center; padding-inline: 2px; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a:is(:hover,[aria-current]) { color: var(--paper); border-color: var(--red); }
.workspace { display: grid; grid-template-columns: minmax(0,1.65fr) minmax(260px,1fr); gap: clamp(22px,4vw,54px); padding-block: 26px 56px; }
.workspace > *, .workspace > * > * { min-width: 0; }
.division { border-top: 1px solid var(--line); padding-block: 18px 22px; }
.division + .division { margin-top: 5px; }
.workspace .division:first-child { border-top-color: var(--red); }
.readout { display: flex; align-items: stretch; flex-wrap: wrap; gap: 12px 26px; margin-bottom: 18px; padding-block: 12px; border-block: 1px solid var(--line); }
.readout div { flex: 1; min-width: max-content; }
.readout dt { color: var(--muted); font-size: .87rem; margin-bottom: 3px; }
.readout dd { margin: 0; color: var(--paper); font-size: 1.14rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.primary-operations { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 12px; }
.action-list, .records, .catalog-grid { list-style: none; padding: 0; margin-bottom: 0; }
.action-list li { border-top: 1px solid var(--line); padding-block: 10px; display: flex; gap: 8px 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.action-list li small { display: block; color: var(--muted); }
.action-list .button { margin-left: auto; }
.action-form { display: flex; flex-wrap: wrap; gap: 7px 9px; align-items: end; }
.action-form label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: .93rem; min-width: 0; }
.action-form select, .action-form input { width: min(100%, 17rem); max-width: 100%; }
.action-form input[type="number"] { width: 7.5rem; }
.inventory { list-style: none; padding: 0; margin-bottom: 18px; }
.inventory li { display: flex; align-items: center; gap: 12px; padding-block: 8px; border-block-start: 1px solid var(--line); }
.inventory img { width: 44px; height: 44px; object-fit: cover; }
.inventory .count { color: var(--amber); margin-left: auto; }
.records li { padding-block: 11px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.records li:first-child { border-top: 1px solid var(--line); }
.records p { margin: 0; }
.records time { margin-left: .5rem; color: var(--quiet); font-size: .82rem; }
.command-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.command-form label { flex-basis: 100%; color: var(--paper); }
.command-form input { flex: 1 1 9rem; min-width: 0; }
input, select { min-height: 44px; background: #191617; border: 1px solid #685551; border-radius: 4px; padding: 8px 10px; caret-color: var(--bright); }
input::placeholder { color: #b7a59d; }
input[readonly] { color: var(--muted); }
.notice { padding: 10px 12px; border: 1px solid #6e5048; background: #271c1c; color: #f5c4b9; margin-block: 10px 14px; overflow-wrap: anywhere; }
.notice[data-kind="success"] { border-color: #4f6d5b; background: #1b2520; color: var(--signal); }
.notice:empty { display: none; }
.guide-grid { display: grid; grid-template-columns: minmax(0,2fr) minmax(220px,1fr); gap: clamp(20px,5vw,64px); }
.catalog-controls { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin-bottom: 20px; }
.catalog-controls label { display: flex; flex-direction: column; gap: 5px; }
.catalog-controls input { width: min(64vw,260px); }
.catalog-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,185px),1fr)); gap: 14px; }
.catalog-grid li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.catalog-grid img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #242020; }
.catalog-grid .object { object-fit: contain; }
#shop-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 225px), 1fr)); }
#shop-grid img { height: auto; aspect-ratio: 1; background: #19151c; }
.wardrobe-workspace { grid-template-columns: minmax(0, 1fr); }
.wardrobe-workspace > aside { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); gap: 28px; }
.wardrobe { margin-bottom: clamp(34px, 6vw, 76px); }
.page-head.wardrobe-header { padding-block: clamp(14px, 2.7vw, 26px) clamp(12px, 2vw, 20px); }
.wardrobe-header h1 { font-size: clamp(1.62rem, 4.5vw, 3.2rem); }
.wardrobe .primary { background: #4f6252; border-color: #819680; color: #fff9e8; }
.wardrobe .primary:hover { background: #627963; }
.wardrobe-heading { display: flex; align-items: end; justify-content: space-between; gap: 12px 18px; flex-wrap: wrap; margin-bottom: 18px; }
.wardrobe-heading p { margin: 0; }
.wardrobe-layout { display: grid; grid-template-columns: minmax(265px, .77fr) minmax(0, 1.23fr); gap: clamp(18px, 4vw, 45px); align-items: start; }
.wardrobe-dressing { position: sticky; top: 12px; }
.wardrobe-stage { position: relative; isolation: isolate; overflow: hidden; aspect-ratio: 360 / 440; width: min(100%, 420px); margin-inline: auto; border: 1px solid #7d8069; border-radius: 12px; background: #191e20; }
.wardrobe-stage img { position: absolute; inset: 0; width: 100%; height: 100%; }
.wardrobe-stage img[data-fitted-face] { transform: translateY(-1.5%) scale(.81); transform-origin: 51% 8%; }
.wardrobe-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; z-index: 1; }
.wardrobe-stage canvas:active { cursor: grabbing; }
.wardrobe-stage canvas:focus-visible { outline-offset: -5px; }
.wardrobe-stage img[data-companion="true"] { z-index: 2; pointer-events: none; }
.wardrobe-stage canvas { image-rendering: pixelated; }
.wardrobe-stage span { position: absolute; inset: auto 12px 12px auto; padding: 5px 10px; border: 1px solid #6e7460; background: #171d1b; color: var(--paper); font-size: .9rem; z-index: 3; pointer-events: none; }
.wardrobe-view { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.wardrobe-view button[aria-pressed="true"] { background: #344638; border-color: #829680; color: #fff9e8; }
.wardrobe-view button[data-turn] { min-width: 44px; font-size: 1.35rem; padding-inline: 0; }
.wardrobe-details { padding: 14px 0 4px; min-height: 88px; }
.wardrobe-details p { margin-bottom: 8px; }
.editable-art { display: inline-block; font-size: .92rem; color: #dbcfaa; padding-block: 6px; }
.appearance-controls { display: grid; grid-template-columns: repeat(auto-fit,minmax(126px,1fr)); gap: 8px 12px; margin-block: 8px 12px; }
.appearance-controls label { display: grid; gap: 4px; color: var(--paper); }
.appearance-controls select { min-height: 44px; }
.appearance-form { margin-top: 4px; }
.wardrobe-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 16px; }
.wardrobe-filters label { display: grid; gap: 4px; }
.wardrobe-filters select { min-height: 44px; }
.wardrobe-filters .wardrobe-toggle { display: flex; align-items: center; min-height: 44px; gap: 6px; }
.wardrobe-toggle input { accent-color: var(--bright); }
.wardrobe-tally { font-variant-numeric: tabular-nums; margin-block: 12px; }
.wardrobe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 145px), 1fr)); gap: 10px; list-style: none; padding: 0; margin: 0; }
.wardrobe-item { width: 100%; height: 100%; display: flex; flex-direction: column; text-align: left; padding: 0 0 10px; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.wardrobe-item:hover, .wardrobe-item[aria-pressed="true"] { border-color: #a1aa8e; background: #29312a; }
.wardrobe-item img { width: 100%; height: auto; aspect-ratio: 1; object-fit: contain; background: #211f22; }
.wardrobe-item b { font-size: .95rem; line-height: 1.2; padding: 8px 9px 3px; overflow-wrap: anywhere; }
.wardrobe-item small { padding-inline: 9px; color: var(--amber); margin-top: auto; }
.wardrobe-workspace .inventory li { flex-wrap: wrap; }
@media (max-width: 680px) {
  .page-head.wardrobe-header { padding-block: 12px; }
  .wardrobe-header h1 { font-size: 1.62rem; }
  .wardrobe-header p { font-size: .88rem; }
  .wardrobe-layout { grid-template-columns: minmax(0, 1fr); }
  .wardrobe-dressing { position: static; }
  .wardrobe-stage { width: min(100%, 288px); }
  .wardrobe-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 130px), 1fr)); }
}
.catalog-entry { padding: 13px 14px; display: flex; flex: 1; flex-direction: column; gap: 7px; overflow-wrap: anywhere; }
.catalog-entry p { margin: 0; font-size: .96rem; }
.catalog-entry small { color: var(--quiet); }
.catalog-entry .inline-actions { margin-top: auto; }
.catalog-entry .button { padding-inline: 10px; }
.catalog-entry .amount { color: var(--amber); }
.tool-row { display: flex; flex-wrap: wrap; align-items: start; gap: 8px 10px; margin-top: 10px; }
.tool-row input { flex: 1 1 12rem; min-width: 0; }
.overlay-options { margin-top: 16px; }
.notice a { color: inherit; }
.wallet { padding-block: 14px; border-block: 1px solid var(--line); margin-bottom: 18px; }
.wallet strong { display: block; font-size: 1.3rem; margin-bottom: 8px; }
details summary { cursor: pointer; min-height: 36px; }
details[open] summary { margin-bottom: 8px; }
progress { accent-color: var(--bright); max-width: 100%; }

@media (max-width: 830px) {
  :root { --shell: calc(100% - 38px); }
  .masthead-inner { gap: 12px; }
  .masthead nav { gap: 13px; }
  .masthead .brand span { max-width: 11ch; }
  .environment { font-size: .78rem; }
  .hero-caption { bottom: 30px; }
  .home-ledger, .workspace, .guide-grid { gap: 22px; }
}
@media (max-width: 640px) {
  .masthead-inner { flex-wrap: wrap; padding-top: 8px; }
  .masthead .brand span { max-width: none; }
  .masthead nav { order: 3; width: 100%; margin-top: -6px; }
  .masthead .environment { margin-left: auto; }
  .hero { min-height: 482px; }
  .hero::before { background-position: 75% center; }
  .hero::after { background: linear-gradient(90deg,#151414a9,#15141442),linear-gradient(0deg,#151414 0%,#151414a0 45%,transparent 82%); }
  .hero-body { padding-block: 100px 32px; }
  .hero-caption { display: none; }
  .hero p { font-size: 1.12rem; }
  .section { padding-block: 29px 40px; }
  .home-ledger, .workspace, .guide-grid { grid-template-columns: 1fr; }
  .page-head { padding-block: 25px 21px; }
  .footer-inner { align-items: start; justify-content: start; flex-direction: column; gap: 7px; padding-block: 16px; }
}
@media (max-width: 370px) {
  :root { --shell: calc(100% - 26px); }
  .masthead .brand { font-size: .87rem; }
  .masthead .brand img { width: 31px; height: 31px; }
}
