:root {
  color-scheme: light;
  --bg:#faf7ef;
  --panel:#fffdf8;
  --panel-dark:#f8f4eb;
  --line:#e5ddcc;
  --ink:#243a32;
  --muted:#536459;
  --pine:#215745;
  --berry:#a13450;
  --mint:#e7f1e4;
  --rose:#fae9ed;
  --honey:#fff0cc;
  --violet:#edeafa;
  --shadow:#66533812;
  font:16px/1.6 system-ui,"Malgun Gothic",sans-serif;
}
* { box-sizing:border-box }
[hidden] { display:none!important }
body {
  margin:0;
  color:var(--ink);
  background:radial-gradient(#e8dfce 0.7px,transparent 0.7px) 0 0/16px 16px,var(--bg);
}
.shell { width:min(100% - 2rem,68rem); margin-inline:auto }
.skip { position:fixed; top:.5rem; left:.5rem; transform:translateY(-200%); z-index:10; background:var(--panel); padding:.4rem }
.skip:focus { transform:none }
a { color:var(--pine); text-underline-offset:.2em }
button,input,select,textarea { font:inherit }
button {
  border:1px solid #d7cdb8;
  background:var(--panel);
  color:var(--pine);
  padding:.56rem .9rem;
  min-height:44px;
  box-shadow:0 2px 0 var(--shadow);
  cursor:pointer;
  border-radius:7px;
}
button:hover { border-color:#76937d; background:#eff5eb }
button:disabled { opacity:.55; cursor:default }
button.primary { background:var(--pine); color:#fffdf6; border-color:var(--pine); font-weight:800 }
button.primary:hover { background:#173e32 }
button.danger { background:var(--rose); color:#922e48; border-color:#d797a6 }
button.danger:hover { background:#f5dce3 }
button[aria-pressed="true"], button[aria-current="page"] { border-color:#a9bfa5; color:#184b39; background:var(--mint) }
:focus-visible { outline:3px solid #a7445b; outline-offset:3px }
.site-header { border-bottom:1px solid var(--line); background:var(--panel) }
.header-row { min-height:70px; display:flex; justify-content:space-between; align-items:center; gap:.75rem }
.brand { text-decoration:none; display:flex; align-items:center; gap:.7rem; color:var(--berry); line-height:1.2 }
.brand strong { font-size:1.22rem; display:block; color:var(--ink) }
.brand small { font:750 .72rem/1.4 ui-monospace,monospace; letter-spacing:.14em; color:var(--berry) }
.brand-icon { display:grid; place-items:center; flex:none; width:40px; height:40px; border:1px solid #ebd3a0; background:var(--honey); border-radius:9px }
.brand-icon img { width:34px; height:34px }
.pixel { image-rendering:pixelated; display:block }
.session { display:flex; align-items:center; gap:.65rem; font-size:.875rem; min-width:0 }
.session span { overflow-wrap:anywhere }
.connection { min-height:2.45rem; padding-block:.47rem .3rem; color:var(--muted); font-size:.875rem }
.connection.error, .form-error { color:#9c2e43 }
h1,h2,h3,p { margin-top:0 }
h1,h2,h3,p,.stat { word-break:keep-all }
h1 { color:var(--pine); font-size:clamp(2rem,6vw,3.55rem); line-height:1.12; margin-bottom:.75rem; letter-spacing:-.055em; text-wrap:balance }
h2 { color:var(--pine); font-size:clamp(1.45rem,3.5vw,2.15rem); line-height:1.25; margin-bottom:.68rem; letter-spacing:-.035em }
h3 { font-size:1.09rem; margin-bottom:.25rem; overflow-wrap:anywhere }
p { margin-bottom:.75rem; overflow-wrap:anywhere }
small,.muted { color:var(--muted) }
.eyebrow { color:var(--berry); text-transform:uppercase; font:750 .78rem/1.4 ui-monospace,monospace; letter-spacing:.145em; margin-bottom:.62rem }
.hero {
  border:1px solid #dcdcc4;
  border-radius:15px;
  box-shadow:0 4px 0 #d9cfb74d;
  background:#fff7e8;
  overflow:hidden;
  margin-bottom:1.25rem;
}
.hero-copy { padding:clamp(1.1rem,4vw,2.65rem); align-self:center }
.hero-copy p:last-child { margin:0 }
.hero-scene { position:relative; display:grid; overflow:hidden; background:#eff6e9 }
.hero-art { width:100%; height:auto; display:block; image-rendering:pixelated; align-self:stretch; object-fit:cover; aspect-ratio:338/180 }
.hero-scene::after {
  content:"";
  position:absolute; inset:0; pointer-events:none; opacity:.65;
  background-image:radial-gradient(circle at 12px 20px,#fffdf5 1px,transparent 1.5px),
    radial-gradient(circle at 71px 51px,#fffdf5 1.1px,transparent 1.6px);
  background-size:131px 97px,149px 121px;
}
.hero h1 { text-shadow:2px 2px #ecd4ab }
.event { color:var(--berry); font-weight:750 }
.event span { white-space:nowrap }
.gate-panel { max-width:38rem; margin:1.2rem auto 0 }
.navigation { display:grid; grid-template-columns:repeat(5,1fr); gap:.45rem; position:sticky; top:0; z-index:2; padding:.55rem 0 .8rem; background:var(--bg) }
.navigation button { font-weight:760; display:flex; gap:.45rem; flex-wrap:wrap; align-items:center; justify-content:center }
.nav-icon { color:var(--berry); font-size:1.05rem }
.page-head { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:start; gap:.75rem; padding-block:.6rem }
.page-head p { margin:0 }
.stats,.tiles,.member-grid,.form-grid { display:grid; gap:.8rem; grid-template-columns:repeat(3,minmax(0,1fr)); margin:0 0 1.2rem }
.stats { grid-template-columns:repeat(4,minmax(0,1fr)) }
.pane,.stat,.tile {
  background:var(--panel);
  border:1px solid var(--line);
  border-radius:11px;
  padding:clamp(.85rem,2vw,1.3rem);
  box-shadow:0 2px 0 var(--shadow);
  min-width:0;
  overflow-wrap:anywhere;
}
.pane { margin-bottom:.9rem }
.stat { border-color:#e5ddc9 }
.stat strong { color:var(--pine); display:block; font-size:clamp(1.08rem,3.5vw,1.58rem); font-variant-numeric:tabular-nums }
.stat:first-child { background:#fff5df }
.stat:first-child strong { color:#80502d }
.tile { display:flex; align-items:center; gap:.8rem; min-height:6.4rem; color:var(--ink); text-decoration:none }
.tile:hover { border-color:#9aac90; background:#fcfdf6 }
.tile strong { display:block; margin-bottom:.13rem }
.tile-icon { display:grid; place-items:center; flex:none; width:53px; height:53px; background:var(--honey); border:1px solid #f0dbaf; border-radius:9px }
.tile:nth-child(2) .tile-icon { background:var(--rose); border-color:#efd6dc }
.tile:nth-child(3) .tile-icon { background:var(--violet); border-color:#ded6f2 }
.tile-icon img { width:42px; height:42px }
.section-title { margin-top:1.4rem; font-size:1.35rem }
.tabs,.actions,.line,.chips { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem }
.tabs { margin:.4rem 0 1.05rem }
.line { justify-content:space-between; align-items:start }
.line > div { min-width:0 }
.chip { padding:.12rem .48rem; background:#f6f2e9; border:1px solid var(--line); border-radius:5px; font-size:.875rem; color:var(--muted) }
.chip.gold { color:#7d5127; background:var(--honey); border-color:#ecd4a3 }
.meta { font-size:.875rem; color:var(--muted); margin:.15rem 0 .6rem }
.member-card { margin:0 }
.member-card h3 { display:flex; align-items:center; gap:.45rem }
.avatar { display:grid; place-items:center; flex:none; width:32px; height:32px; background:#eff4e9; border-radius:6px; color:var(--pine) }
.avatar img { width:27px; height:27px }
.progress { display:block; width:100%; accent-color:var(--pine); height:.65rem }
.progress::-webkit-progress-bar { background:#e8efe1; border-radius:12px }
.progress::-webkit-progress-value { background:#4d8864; border-radius:12px }
.empty { border-style:dashed; background:#fcfaf4 }
.schedule-time { margin-bottom:.4rem; color:var(--berry); font-weight:750; font-size:.95rem }
.preserve { white-space:pre-wrap }
.comments { border-top:1px solid var(--line); margin-top:.85rem; padding-top:.75rem }
.comment { padding:.65rem .7rem; margin:.5rem 0; background:var(--panel-dark); border-left:2px solid #a1b798 }
.comment p { margin-bottom:.3rem }
.proposal-image { display:block; object-fit:cover; max-width:100%; width:16rem; height:8.5rem; border:1px solid var(--line); border-radius:7px; margin:.6rem 0 }
.cost-values { display:grid; grid-template-columns:1fr 1fr; gap:.5rem; margin-bottom:.7rem }
.cost-values p { margin:0 }
label { display:block; font-weight:700; margin:0 0 .85rem }
input:not([type="checkbox"]),select,textarea {
  display:block; width:100%; padding:.58rem .65rem; min-height:44px; margin-top:.25rem;
  background:#fffefa; border:1px solid #aba792; border-radius:7px; color:var(--ink);
}
textarea { resize:vertical; min-height:5rem }
input[type="checkbox"] { accent-color:var(--pine); width:1.2rem; height:1.2rem; vertical-align:middle; margin:0 .4rem 0 0 }
.form-grid { grid-template-columns:repeat(2,minmax(0,1fr)); margin-bottom:0 }
dialog {
  width:min(100% - 1.6rem,39rem); max-height:calc(100dvh - 1.6rem); overscroll-behavior:contain; overflow:auto;
  background:var(--panel); color:var(--ink); border:1px solid #ddcca9; border-radius:13px; padding:1.25rem;
  box-shadow:0 12px 42px #283f3033;
}
dialog::backdrop { background:#273c3773 }
body:has(dialog[open]) { overflow:hidden }
.form-error { margin:.65rem 0 }
.compare { font-size:.875rem; max-height:11rem; overflow:auto; padding:.5rem; background:var(--panel-dark); white-space:pre-wrap }
.roster { margin:0 0 .7rem }
footer { color:var(--muted); margin:2rem 0 1.2rem; padding-top:.7rem; border-top:1px solid var(--line); font-size:.875rem }
footer span { margin-inline:.35rem; color:var(--berry) }
@media (min-width:760px) {
  .hero { display:grid; grid-template-columns:1fr 1.14fr; min-height:16rem }
}
@media (max-width:599px) {
  .shell { width:calc(100% - 1.5rem) }
  .header-row { min-height:61px }
  .navigation {
    position:fixed; inset:auto 0 0; border-top:1px solid var(--line); padding:.35rem .45rem max(.45rem,env(safe-area-inset-bottom));
    gap:.26rem; background:var(--panel); box-shadow:0 -2px 12px var(--shadow);
  }
  .navigation button { flex-direction:column; gap:.05rem; font-size:.88rem; padding:.25rem .08rem; min-width:0; min-height:51px; box-shadow:none }
  .stats,.member-grid { grid-template-columns:repeat(2,minmax(0,1fr)) }
  .tiles { grid-template-columns:1fr; gap:.55rem }
  .tile { min-height:0 }
  body:has(#party:not([hidden])) footer { margin-bottom:5.3rem }
}
@media (prefers-reduced-motion:no-preference) {
  button,.tile { transition:border-color .15s,background-color .15s }
  .hero-scene::after { animation:snow 23s linear infinite }
  @keyframes snow { to { background-position:18px 97px,-18px 121px } }
}

