/* つい俳 · quiet, tactile, and legible. The logo is replaceable in assets/mark.svg. */
@charset "UTF-8";
:root {
  --paper: #f5f2e9; --surface: #fcfaf4; --surface-soft: #eeeade;
  --ink: #292e25; --muted: #64705f; --moss: #516048; --moss-deep: #3d4d35;
  --moss-wash: #e6eadf; --rust: #a24b39; --rust-wash: #f2e3dc;
  --line: #dbddd0; --line-strong: #bcc3b2; --white: #fffef9;
  --shadow: 0 18px 56px #292e2510; --shadow-raised: 0 22px 72px #292e251c;
  --font-sans: 'Noto Sans JP', 'Yu Gothic', 'Hiragino Kaku Gothic ProN', sans-serif;
  --font-serif: 'Shippori Mincho', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  --radius: 4px; --sidebar-width: 218px; --season: #ad7356;
  color-scheme: light;
}
[data-theme="dark"] {
  --paper: #1c211c; --surface: #252c24; --surface-soft: #2d352b;
  --ink: #ecefe3; --muted: #b2bca9; --moss: #bac9a3; --moss-deep: #d1ddc0;
  --moss-wash: #354330; --rust: #e3a28e; --rust-wash: #483329;
  --line: #414a3b; --line-strong: #69745f; --white: #1c241b;
  --shadow: 0 18px 56px #0002; --shadow-raised: 0 22px 72px #0005; --season: #c6946e;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 14px/1.85 var(--font-sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body::before { content: ''; position: fixed; z-index: -1; inset: 0; pointer-events: none; opacity: .2; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath filter='url(%23n)' opacity='.12' d='M0 0h180v180H0z'/%3E%3C/svg%3E"); }
body.modal-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-underline-offset: 4px; }
button, input, textarea, select { border-radius: var(--radius); }
input, textarea, select { width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); min-height: 48px; padding: 11px 13px; outline: none; transition: border-color .18s, box-shadow .18s; }
input:hover, textarea:hover, select:hover { border-color: var(--moss); }
input:focus, textarea:focus, select:focus { border-color: var(--moss); box-shadow: 0 0 0 3px color-mix(in srgb, var(--moss) 16%, transparent); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
textarea { min-height: 116px; resize: vertical; }
input[type="checkbox"], input[type="radio"] { width: 20px; height: 20px; min-height: 20px; accent-color: var(--moss); cursor: pointer; flex: 0 0 auto; }
input[type="range"] { accent-color: var(--moss); border: 0; padding: 0; box-shadow: none; }
input[type="number"] { font-variant-numeric: tabular-nums; }
button:disabled, input:disabled, select:disabled { opacity: .5; cursor: not-allowed; }
button[aria-busy="true"] { cursor: progress; }
:focus-visible { outline: 2px solid var(--rust); outline-offset: 5px; }
img, svg { max-width: 100%; }
img { height: auto; }
svg.icon, .icon { width: 19px; height: 19px; display: inline-block; flex: 0 0 auto; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.55; letter-spacing: .06em; font-weight: 600; }
h1, h2, .serif { font-family: var(--font-serif); }
h1 { font-size: clamp(28px, 3.1vw, 43px); margin-bottom: 16px; }
h2 { font-size: clamp(22px, 2vw, 28px); margin-bottom: 16px; }
h3 { font-size: 16px; margin-bottom: 12px; }
h4 { font-size: 14px; }
p { margin-bottom: 16px; }
small { font-size: 12px; }
hr { height: 1px; border: 0; background: var(--line); margin: 32px 0; }
::selection { background: var(--moss-wash); color: var(--moss-deep); }
.sr-only, .screen-reader { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; clip-path: inset(50%) !important; }
.skip-link { position: fixed; z-index: 1500; left: 16px; top: -80px; padding: 12px 20px; background: var(--ink); color: var(--paper); }
.skip-link:focus { top: 16px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 10px; line-height: 1.6; letter-spacing: .23em; font-weight: 600; color: var(--moss); text-transform: uppercase; margin-bottom: 13px; }
.display { font-family: var(--font-serif); font-weight: 500; font-size: clamp(34px, 4.5vw, 58px); line-height: 1.65; letter-spacing: .1em; }
.number { font-variant-numeric: tabular-nums; }
.text-rust { color: var(--rust); }
.text-moss { color: var(--moss); }
.small-text { font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.hidden, [hidden] { display: none !important; }

/* Shell */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 50; width: var(--sidebar-width); padding: 34px 24px 26px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.sidebar::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: var(--season); }
.logo-lockup, .brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font: 600 25px/1.3 var(--font-serif); letter-spacing: .12em; border: 0; background: none; padding: 0; min-height: 44px; }
.logo-lockup img, .brand img { width: 42px; height: 42px; object-fit: contain; }
.logo-subtitle { display: block; margin: 7px 0 0 54px; font-size: 9px; letter-spacing: .19em; color: var(--muted); }
.sidebar nav { margin-top: 55px; display: flex; flex-direction: column; gap: 7px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 13px; min-height: 48px; padding: 10px 13px; border: 0; text-decoration: none; background: none; color: var(--muted); font-size: 13px; border-radius: 3px; text-align: left; }
.nav-item:hover { background: var(--surface-soft); color: var(--ink); }
.nav-item.active, .nav-item[aria-current="page"] { color: var(--moss-deep); background: var(--moss-wash); font-weight: 600; }
.nav-item.active::before, .nav-item[aria-current="page"]::before { content: ''; position: absolute; left: -24px; top: 12px; bottom: 12px; width: 3px; background: var(--moss); }
.nav-label { color: var(--muted); font-size: 9px; letter-spacing: .2em; margin: 27px 13px 9px; }
.nav-divider { height: 1px; background: var(--line); margin: 15px 13px 0; }
.sidebar-foot { margin-top: auto; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; letter-spacing: .05em; }
.sidebar-foot .btn { justify-content: flex-start; padding-left: 0; }
.sidebar-foot p { margin-bottom: 5px; }
.sidebar-caption { writing-mode: vertical-rl; align-self: flex-end; font-family: var(--font-serif); color: var(--muted); letter-spacing: .18em; font-size: 12px; margin: 40px 20px 40px 0; }
.main { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { min-height: 77px; padding: 15px clamp(22px, 4vw, 60px); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; background: color-mix(in srgb, var(--paper) 94%, transparent); }
.topbar-title { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); min-width: 0; }
.topbar-title strong { color: var(--ink); font-weight: 500; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.topbar-actions { display: flex; gap: 8px; align-items: center; flex: 0 0 auto; }
.topbar .avatar { width: 36px; height: 36px; font-size: 13px; }
.topbar .icon-btn { width: 44px; }
.mobile-brand { display: none; }
#view { width: min(100%, 1100px); margin: 0 auto; padding: 38px 60px 70px; animation: appear .24s ease both; }
#view > :last-child { margin-bottom: 0; }
.bottom-nav { display: none; }
.demo-banner { min-height: 34px; text-align: center; display: flex; align-items: center; justify-content: center; gap: 16px; padding: 5px 20px; background: var(--moss-wash); color: var(--moss-deep); border-bottom: 1px solid var(--line); font-size: 11px; }
.demo-banner button, .demo-banner a { min-height: 30px; padding: 2px 10px; font-size: 11px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin: 3px 0 32px; }
.page-head h1 { margin: 0; }
.page-head p { margin: 7px 0 0; }
.page-head .toolbar { margin-bottom: 3px; }
.back-link { display: inline-flex; gap: 8px; align-items: center; min-height: 44px; padding: 0; background: none; border: 0; color: var(--muted); font-size: 12px; margin-bottom: 15px; }

/* Buttons and labels */
.btn, .icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); padding: 11px 20px; text-decoration: none; font-size: 12px; font-weight: 500; letter-spacing: .03em; line-height: 1.65; border-radius: 3px; transition: background .16s, color .16s, border-color .16s, transform .16s; }
.btn:hover:not(:disabled), .icon-btn:hover:not(:disabled) { background: var(--surface-soft); border-color: var(--moss); }
.btn:active:not(:disabled), .icon-btn:active:not(:disabled) { transform: translateY(1px); }
.btn.primary { background: var(--moss); color: var(--paper); border-color: var(--moss); }
.btn.primary:hover:not(:disabled) { background: var(--moss-deep); border-color: var(--moss-deep); }
.btn.secondary { background: transparent; border-color: var(--moss); color: var(--moss-deep); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover:not(:disabled) { border-color: transparent; color: var(--ink); background: var(--surface-soft); }
.btn.danger { color: var(--rust); border-color: color-mix(in srgb, var(--rust) 45%, transparent); background: var(--rust-wash); }
.btn.danger:hover:not(:disabled) { background: var(--rust); color: var(--paper); border-color: var(--rust); }
.btn.small { min-height: 44px; padding: 8px 13px; font-size: 11px; }
.btn.large { min-height: 54px; padding: 14px 28px; font-size: 14px; }
.btn.full { width: 100%; }
.btn.text { background: none; border-color: transparent; padding: 5px 0; color: var(--moss); }
.icon-btn { width: 46px; padding: 0; flex: 0 0 auto; background: none; border-color: transparent; }
.toolbar { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.toolbar.end { justify-content: flex-end; }
.toolbar.between { justify-content: space-between; }
.badge, .chip, .theme-tag, .award-chip { display: inline-flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 9px; color: var(--moss-deep); font-size: 10px; line-height: 1.5; letter-spacing: .05em; background: var(--moss-wash); border-radius: 2px; white-space: nowrap; font-weight: 500; }
.badge.rust, .badge.select, .chip.rust { background: var(--rust-wash); color: var(--rust); }
.badge.neutral, .badge.archived { background: var(--surface-soft); color: var(--muted); }
.badge.result { background: var(--surface-soft); color: var(--ink); }
.theme-tag { background: transparent; border: 1px solid var(--line-strong); font-weight: 400; }
.award-chip { background: transparent; border: 1px solid color-mix(in srgb, var(--rust) 45%, var(--line)); color: var(--rust); font-size: 10px; }
.chip button { display: inline-flex; min-height: 28px; min-width: 28px; align-items: center; justify-content: center; border: 0; background: none; padding: 0; }
.avatar { width: 42px; height: 42px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--moss-wash); color: var(--moss); font-family: var(--font-serif); font-size: 17px; overflow: hidden; flex-shrink: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.large { width: 68px; height: 68px; font-size: 26px; }
.name-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; margin: -5px -9px; border: 1px solid transparent; background: transparent; min-height: 44px; font-size: 12px; }
.name-chip:hover { background: var(--moss-wash); border-color: var(--line); }
.name-chip .icon { width: 13px; height: 13px; color: var(--muted); }
.supporter { font-family: var(--font-sans); font-size: 15px; }

/* Home, considered whitespace and two distinct content rhythms */
.hero { position: relative; min-height: 306px; display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 16px; margin: -4px 0 34px; }
.hero-copy { position: relative; z-index: 1; padding: 20px 0 24px; }
.hero .display { font-size: clamp(31px, 3.35vw, 46px); margin-bottom: 17px; }
.hero .eyebrow { margin-bottom: 20px; }
.hero p:not(.eyebrow) { font-size: 12px; color: var(--muted); line-height: 2.1; }
.hero-art { position: relative; height: 305px; align-self: stretch; display: flex; align-items: center; justify-content: center; overflow: visible; }
.hero-art > img { width: 330px; height: 330px; object-fit: contain; max-width: 114%; }
.hero-art .poem-strip { position: absolute; z-index: 2; left: 32%; top: 26px; width: 86px; min-height: 236px; height: 236px; transform: rotate(7deg); box-shadow: 8px 13px 28px #292e2519; }
.hero-art .poem-strip:nth-of-type(2) { left: 59%; top: 44px; transform: rotate(-5deg); width: 73px; height: 221px; min-height: 221px; z-index: 1; }
.hero-art .poem-text { font-size: 17px; }
.hero-art .poem-number { font-size: 9px; width: 22px; height: 22px; min-height: 22px; }
.hero-season { position: absolute; bottom: 4px; right: 8px; font-family: var(--font-serif); font-size: 11px; color: var(--muted); letter-spacing: .15em; }
.next-action { display: flex; align-items: center; gap: 23px; position: relative; padding: 24px 28px; margin-bottom: 39px; background: var(--moss-wash); border-left: 3px solid var(--moss); }
.next-action > .icon, .next-action-icon { width: 39px; height: 39px; color: var(--moss); flex-shrink: 0; }
.next-action .eyebrow { font-size: 9px; margin-bottom: 5px; }
.next-action h2, .next-action h3 { font-family: var(--font-serif); font-size: 18px; margin-bottom: 3px; }
.next-action p { margin: 0; font-size: 11px; color: var(--muted); }
.next-action .btn { margin-left: auto; flex-shrink: 0; }
.next-action-copy { flex: 1; }
.next-action-time { color: var(--moss-deep); font-size: 19px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.section { margin-bottom: 43px; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 19px; }
.section-head h2 { margin: 0; font-size: 23px; }
.section-head .muted { font-size: 11px; }
.section-head .eyebrow { margin-bottom: 4px; }
.section-head .btn { font-size: 11px; }
.section-number { display: inline-block; margin-right: 14px; font-family: var(--font-sans); font-size: 10px; color: var(--moss); letter-spacing: .07em; vertical-align: middle; }
.tabs { display: flex; align-items: stretch; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; overflow-x: auto; scrollbar-width: thin; }
.tabs button, .tabs a { min-height: 47px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; padding: 10px 0; white-space: nowrap; font-size: 12px; color: var(--muted); text-decoration: none; }
.tabs .active, .tabs [aria-selected="true"], .tabs [aria-current="page"] { border-bottom-color: var(--moss); color: var(--moss-deep); font-weight: 600; }
.tabs button:hover { color: var(--ink); }
.tabs .count { display: inline-block; margin-left: 6px; padding: 0 5px; background: var(--surface-soft); font-size: 9px; line-height: 17px; border-radius: 2px; }
.event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.event-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--moss); padding: 24px; border-radius: 3px; transition: border-color .18s, box-shadow .18s, transform .18s; }
.event-card:hover { border-color: var(--line-strong); border-top-color: var(--moss); box-shadow: var(--shadow); }
.event-card.select, .event-card[data-phase="select"] { border-top-color: var(--rust); }
.event-card.result, .event-card[data-phase="result"] { border-top-color: var(--line-strong); }
.event-card.archived { border-top-color: var(--line-strong); }
.event-card .event-meta, .event-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 19px; color: var(--muted); font-size: 10px; }
.event-card h3 { font: 600 23px/1.55 var(--font-serif); margin-bottom: 9px; letter-spacing: .06em; }
.event-card p { font-size: 11px; color: var(--muted); }
.event-card .event-theme { margin-bottom: 23px; color: var(--ink); font-size: 12px; }
.event-theme span, .event-theme small { color: var(--muted); margin-right: 9px; font-size: 10px; }
.event-card .toolbar { border-top: 1px solid var(--line); padding-top: 15px; margin-top: 20px; justify-content: space-between; }
.event-card .toolbar .btn { padding: 5px 0; min-height: 35px; border: 0; background: transparent; color: var(--moss); }
.event-card .event-status { color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 6px; }
.event-card .event-status .icon { width: 14px; height: 14px; }
.event-card .event-code { font-size: 10px; font-variant-numeric: tabular-nums; letter-spacing: .12em; }
.event-card .event-code::before { content: '#'; margin-right: 3px; opacity: .5; }
.event-foot { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.phase-track, .phase-progress, .event-progress { display: flex; gap: 6px; margin: 16px 0; }
.phase-track > *, .phase-progress > *, .event-progress > * { flex: 1; position: relative; padding-top: 10px; font-size: 9px; color: var(--muted); text-align: center; }
.phase-track > *::before, .phase-progress > *::before, .event-progress > *::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--line); }
.phase-track .active, .phase-track .done, .phase-progress .active, .phase-progress .done, .event-progress .active, .event-progress .done { color: var(--moss); }
.phase-track .active::before, .phase-track .done::before, .phase-progress .active::before, .phase-progress .done::before, .event-progress .active::before, .event-progress .done::before { background: var(--moss); }
.season-note { display: flex; align-items: center; gap: 22px; border-top: 1px solid var(--line); padding: 26px 0 0; margin-top: 42px; }
.season-note p { font-family: var(--font-serif); font-size: 13px; line-height: 2; letter-spacing: .07em; margin: 0; }
.season-note .icon { color: var(--season); width: 27px; height: 27px; }
.home-footnote { margin-top: 36px; color: var(--muted); font-size: 10px; letter-spacing: .06em; text-align: right; }

/* Shared sections, forms, and account */
.panel { padding: 25px 28px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); }
.panel > :last-child { margin-bottom: 0; }
.panel-title { margin-bottom: 23px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack.tight { gap: 10px; }
.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; align-items: start; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.form-grid .full, .form-grid .span-2 { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field + .field { margin-top: 20px; }
.form-grid .field + .field, .stack .field + .field { margin-top: 0; }
.field > label, label.field, .field-label { font-size: 12px; font-weight: 500; color: var(--ink); }
.field .hint, .field small, .hint { font-size: 11px; color: var(--muted); line-height: 1.75; }
.field .error, .field-error { color: var(--rust); font-size: 11px; }
.field [aria-invalid="true"] { border-color: var(--rust); }
.field .optional { font-size: 9px; padding: 2px 5px; margin-left: 6px; color: var(--muted); background: var(--surface-soft); }
.field-row { display: flex; align-items: center; gap: 12px; }
.field-row .field { flex: 1; margin: 0; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 29px; padding-top: 22px; border-top: 1px solid var(--line); }
.notice { display: flex; align-items: flex-start; gap: 11px; padding: 14px 17px; border-left: 2px solid var(--moss); background: var(--moss-wash); color: var(--moss-deep); font-size: 12px; margin-bottom: 22px; }
.notice .icon { margin-top: 3px; width: 17px; height: 17px; }
.notice p { margin: 0; }
.notice.warning, .notice.error { color: var(--rust); background: var(--rust-wash); border-color: var(--rust); }
.notice.neutral { background: var(--surface-soft); color: var(--muted); border-color: var(--line-strong); }
.empty { min-height: 250px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; text-align: center; border: 1px dashed var(--line-strong); }
.empty > .icon { width: 40px; height: 40px; color: var(--moss); margin-bottom: 18px; }
.empty img { max-height: 125px; width: 145px; margin: -15px 0 10px; }
.empty h2, .empty h3 { font-family: var(--font-serif); font-size: 19px; margin-bottom: 9px; }
.empty p { color: var(--muted); font-size: 12px; max-width: 360px; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 26px 0; padding: 20px 0; }
.metric { padding: 0 20px; border-right: 1px solid var(--line); text-align: center; }
.metric:last-child { border-right: 0; }
.metric strong, .metric-value { display: block; font-size: 31px; line-height: 1.3; color: var(--moss-deep); font-weight: 400; font-variant-numeric: tabular-nums; }
.metric > span, .metric-label { display: block; font-size: 10px; color: var(--muted); margin-top: 8px; }
.metric strong small { font-size: 11px; margin-left: 4px; }
.progress { height: 4px; border-radius: 0; background: var(--line); overflow: hidden; }
.progress > span, .progress > div { display: block; height: 100%; background: var(--moss); transition: width .3s; }
.progress-label { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted); margin-bottom: 9px; }
.namecard { position: relative; min-height: 249px; background: var(--surface); border: 1px solid var(--line); padding: 34px 39px; overflow: hidden; box-shadow: var(--shadow); }
.namecard::before { content: ''; position: absolute; width: 230px; height: 230px; right: -79px; top: -63px; border: 1px solid var(--line-strong); border-radius: 50%; }
.namecard::after { content: ''; position: absolute; width: 210px; height: 210px; right: -66px; top: -55px; border: 1px solid var(--line); border-radius: 50%; }
.namecard .eyebrow { margin-bottom: 24px; }
.namecard h2, .namecard-name { font-family: var(--font-serif); font-size: 31px; letter-spacing: .12em; margin-bottom: 6px; }
.namecard .real-name { color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.namecard .award-chip { margin-top: 18px; }
.namecard .avatar { position: absolute; right: 32px; bottom: 34px; }
.namecard-seal { position: absolute; right: 35px; top: 35px; writing-mode: vertical-rl; padding: 7px 4px; border: 1px solid var(--rust); color: var(--rust); font: 12px/1.1 var(--font-serif); letter-spacing: .15em; transform: rotate(-5deg); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.title-collection { display: flex; flex-wrap: wrap; gap: 10px; }
.title-option { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; background: var(--surface); border: 1px solid var(--line); border-radius: 3px; padding: 15px 18px; min-width: 135px; min-height: 76px; }
.title-option small { color: var(--muted); font-size: 9px; }
.title-option.selected, .title-option[aria-pressed="true"] { border-color: var(--moss); background: var(--moss-wash); }
.history-list { display: flex; flex-direction: column; }
.history-item { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 19px 0; border-bottom: 1px solid var(--line); }
.history-item:first-child { border-top: 1px solid var(--line); }
.history-item h3 { font-size: 14px; margin-bottom: 3px; }
.history-item p { font-size: 10px; margin: 0; color: var(--muted); }
.theme-options { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-option { min-height: 66px; min-width: 95px; display: flex; flex-direction: column; gap: 6px; align-items: center; justify-content: center; background: var(--surface); border: 1px solid var(--line); font-size: 11px; }
.theme-option.active { border-color: var(--moss); background: var(--moss-wash); }

/* The poems are physical, vertical strips, never generic cards. */
.poem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); gap: 21px; align-items: start; }
.poem-strip { position: relative; display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; min-height: 315px; padding: 17px 12px 18px; background: var(--surface); border: 1px solid var(--line); border-top: 2px solid var(--line-strong); box-shadow: 2px 6px 12px #292e2506; color: var(--ink); border-radius: 1px; text-align: center; transition: border-color .18s, background .18s, transform .18s, box-shadow .18s; }
button.poem-strip:hover { border-color: var(--moss); transform: translateY(-3px); box-shadow: var(--shadow); }
.poem-strip.selected, .poem-strip[aria-pressed="true"] { border-color: var(--moss); background: color-mix(in srgb, var(--surface) 88%, var(--moss-wash)); }
.poem-strip[data-level="toku"], .poem-strip.toku { border-top-color: var(--rust); }
.poem-strip[data-level="jo"], .poem-strip.jo { border-top-color: var(--moss); }
.poem-number { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; border: 1px solid var(--line); border-radius: 50%; font-family: var(--font-sans); font-size: 10px; color: var(--muted); line-height: 1; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.poem-text { writing-mode: vertical-rl; text-orientation: mixed; font-family: var(--font-serif); font-size: 19px; font-weight: 500; line-height: 1.9; letter-spacing: .09em; min-height: 215px; height: 215px; max-width: 100%; overflow: hidden; text-align: start; margin: 0 auto; white-space: pre-wrap; overflow-wrap: anywhere; }
.poem-author { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; font-size: 10px; margin-top: 19px; color: var(--muted); }
.poem-strip .name-chip { font-size: 10px; margin: -6px 0; padding: 5px 3px; }
.poem-stamp, .selection-stamp { position: absolute; left: 9px; top: 49px; writing-mode: vertical-rl; border: 1px solid var(--rust); color: var(--rust); padding: 4px 3px; font-family: var(--font-serif); font-size: 11px; line-height: 1.2; letter-spacing: .13em; transform: rotate(-6deg); background: var(--surface); }
.poem-stamp.jo, .poem-stamp.nami, .selection-stamp.jo, .selection-stamp.nami { border-color: var(--moss); color: var(--moss); }
.poem-strip.own { background: var(--surface-soft); }
.poem-strip.own::after { content: '自分の句'; position: absolute; top: 19px; right: 10px; font-size: 8px; color: var(--muted); writing-mode: vertical-rl; }
.poem-score { font-size: 23px; font-variant-numeric: tabular-nums; color: var(--moss-deep); margin-top: 15px; }
.poem-score small { font-size: 9px; color: var(--muted); margin-left: 3px; }
.poem-expand { position: absolute; bottom: 5px; right: 4px; width: 32px; height: 32px; color: var(--muted); }
.poem-detail { display: flex; justify-content: center; padding: 13px; }
.poem-detail .poem-strip { width: 156px; min-height: 363px; }
.poem-detail .poem-text { font-size: 23px; height: 265px; }
.submission-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(200px, .75fr); gap: 36px; }
.submission-preview { position: sticky; top: 28px; display: flex; justify-content: center; gap: 10px; padding: 27px 20px; background: var(--surface-soft); }
.submission-preview .poem-strip { width: 124px; min-height: 328px; }
.submission-preview .poem-text { height: 234px; }
.poem-input { position: relative; border-left: 3px solid var(--line-strong); padding: 17px 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.poem-input + .poem-input { margin-top: 18px; }
.poem-input label { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.poem-input .input-number { font-family: var(--font-serif); font-size: 18px; color: var(--moss); }
.poem-input textarea, .poem-input input { background: transparent; padding: 9px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; box-shadow: none; font-family: var(--font-serif); font-size: 20px; }
.poem-input textarea { min-height: 94px; }
.char-meter { margin-top: 10px; display: flex; align-items: center; gap: 12px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }
.char-meter .progress { flex: 1; position: relative; height: 3px; }
.char-meter .progress::after { content: ''; position: absolute; height: 9px; top: -3px; left: 56.666%; width: 1px; background: var(--line-strong); }
.save-status { display: inline-flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); }
.save-status .icon { width: 13px; height: 13px; }
.theme-banner { display: flex; align-items: center; gap: 12px; font-family: var(--font-serif); padding: 17px 0; margin: 0 0 27px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 22px; }
.theme-banner small { font-family: var(--font-sans); font-size: 10px; color: var(--muted); padding-right: 12px; border-right: 1px solid var(--line-strong); }
.submission-seal { width: 69px; height: 69px; display: flex; align-items: center; justify-content: center; border: 2px solid var(--rust); color: var(--rust); font-family: var(--font-serif); font-size: 19px; letter-spacing: .12em; transform: rotate(-8deg); margin: 0 auto 25px; animation: stamp .3s ease; }

/* Selection */
.selection-layout { padding-bottom: 146px; }
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 0 22px; }
.segmented { display: inline-flex; background: var(--surface-soft); padding: 4px; border: 1px solid var(--line); border-radius: 3px; gap: 3px; }
.segmented button { border: 0; background: transparent; color: var(--muted); min-height: 38px; padding: 7px 13px; font-size: 11px; }
.segmented button.active, .segmented button[aria-pressed="true"] { background: var(--surface); color: var(--moss-deep); box-shadow: 0 1px 4px #292e2508; }
.selection-tray { position: fixed; z-index: 60; bottom: 20px; left: calc(var(--sidebar-width) + 30px); right: 30px; max-width: 980px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow-raised); padding: 15px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 13px 20px; border-radius: 4px; }
.tray-info { display: flex; gap: 16px; align-items: center; font-size: 11px; }
.tray-info strong { font-family: var(--font-serif); font-size: 16px; font-weight: 500; }
.tray-counts { display: flex; flex-wrap: wrap; gap: 10px; }
.tray-count { display: inline-flex; gap: 5px; font-size: 10px; align-items: center; }
.tray-count strong { font-family: var(--font-sans); font-size: 12px; color: var(--moss); }
.tray-poems { display: flex; gap: 7px; flex: 1; min-width: 110px; overflow-x: auto; padding: 3px 0; }
.tray-poem { display: inline-flex; align-items: center; justify-content: center; width: 32px; min-width: 32px; min-height: 47px; padding: 3px; border: 1px solid var(--line-strong); background: var(--paper); font-size: 10px; border-top: 2px solid var(--moss); }
.tray-poem.toku { border-top-color: var(--rust); }
.tray-empty { font-size: 10px; color: var(--muted); }
.selection-tray .btn { min-height: 42px; }
.level-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 20px 0; }
.level-options button { min-height: 53px; background: var(--surface); border: 1px solid var(--line-strong); color: var(--moss); font-size: 12px; }
.level-options button.active, .level-options button[aria-pressed="true"] { background: var(--moss-wash); border-color: var(--moss); }
.level-options button[data-level="toku"].active { color: var(--rust); background: var(--rust-wash); border-color: var(--rust); }
.selection-comment { border-top: 1px solid var(--line); padding-top: 22px; }
.swipe-layout { display: flex; flex-direction: column; align-items: center; padding: 13px 0 36px; }
.swipe-deck { position: relative; width: min(100%, 332px); height: 403px; margin: 24px 0 23px; touch-action: pan-y; }
.swipe-deck::before, .swipe-deck::after { content: ''; position: absolute; inset: 5px 15px 0; background: var(--surface-soft); border: 1px solid var(--line-strong); border-radius: 3px; transform: rotate(-5deg); }
.swipe-deck::after { transform: rotate(5deg); inset: 9px 15px 0; }
.swipe-card { position: relative; z-index: 2; height: 100%; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); padding: 22px 25px; border-radius: 3px; text-align: center; user-select: none; transition: transform .3s cubic-bezier(.23,.8,.3,1); }
.swipe-card .poem-text { height: 278px; font-size: 25px; }
.swipe-card .poem-number { margin-bottom: 16px; }
.swipe-card .poem-author { margin-top: 17px; }
.swipe-card .poem-strip { border: 0; box-shadow: none; height: 100%; padding: 0; min-height: 0; }
.swipe-controls { display: flex; justify-content: center; gap: 26px; margin: 11px 0 17px; }
.swipe-controls button { display: flex; align-items: center; justify-content: center; flex-direction: column; width: 65px; height: 65px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); font-size: 9px; gap: 3px; }
.swipe-controls button .icon { width: 22px; height: 22px; }
.swipe-controls .like { color: var(--moss); border-color: var(--moss); background: var(--moss-wash); }
.swipe-controls .hold { color: var(--rust); border-color: var(--rust); background: var(--rust-wash); }
.swipe-progress { display: flex; flex-wrap: wrap; gap: 5px; max-width: 260px; justify-content: center; }
.swipe-progress span { width: 5px; height: 5px; border-radius: 50%; background: var(--line-strong); }
.swipe-progress .done { background: var(--moss); }
.swipe-progress .current { background: var(--rust); }
.keyboard-hint { color: var(--muted); font-size: 10px; }
kbd { font-family: var(--font-sans); display: inline-block; min-width: 18px; border: 1px solid var(--line); border-radius: 2px; font-size: 10px; text-align: center; padding: 0 3px; }

/* Results */
.result-heading { text-align: center; padding: 13px 0 26px; }
.result-heading h1 { margin-bottom: 8px; }
.result-heading p { font-size: 12px; color: var(--muted); }
.result-podium { display: flex; align-items: flex-end; justify-content: center; gap: 27px; margin: 4px auto 42px; padding: 28px 20px 30px; border-bottom: 1px solid var(--line); position: relative; }
.result-podium::before { content: ''; position: absolute; width: 350px; height: 350px; border-radius: 50%; border: 1px solid var(--line); left: 50%; top: 0; transform: translateX(-50%); z-index: -1; }
.podium-item { text-align: center; width: 151px; min-width: 0; }
.podium-item:nth-child(2) { margin-bottom: 33px; }
.podium-item .poem-strip { min-height: 337px; border-top-color: var(--rust); }
.podium-label { font-family: var(--font-serif); color: var(--rust); margin-bottom: 13px; font-size: 23px; }
.podium-label small { font-family: var(--font-sans); font-size: 9px; color: var(--muted); display: block; margin-top: 3px; }
.podium-item .poem-text { font-size: 21px; height: 217px; }
.podium-item .poem-score { margin-top: 0; }
.my-result { display: flex; align-items: center; gap: 23px; padding: 23px 26px; background: var(--moss-wash); margin: 24px 0 33px; }
.my-result h3 { font-family: var(--font-serif); margin: 0 0 4px; font-size: 19px; }
.my-result p { font-size: 11px; color: var(--muted); margin: 0; }
.my-result .metric { margin-left: auto; padding: 0; border: 0; }
.result-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 25px; }
.result-entry { display: flex; align-items: start; gap: 18px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.result-entry > .poem-strip { width: 128px; flex-shrink: 0; min-height: 304px; }
.result-entry .poem-text { height: 203px; font-size: 18px; }
.result-detail { padding-top: 10px; flex: 1; min-width: 0; }
.result-detail .poem-score { margin: 0 0 10px; }
.result-detail .name-chip { margin-bottom: 3px; }
.result-counts { color: var(--muted); font-size: 9px; margin: 10px 0 17px; }
.comments { display: flex; flex-direction: column; gap: 9px; margin-top: 15px; }
.comment { position: relative; padding: 11px 13px; background: var(--surface-soft); color: var(--ink); font-size: 10px; border-radius: 2px; overflow-wrap: anywhere; }
.comment::before { content: ''; position: absolute; left: -5px; top: 12px; width: 10px; height: 10px; background: var(--surface-soft); transform: rotate(45deg); }
.comment p { margin: 0; }
.comment small { display: block; margin-top: 5px; font-size: 9px; color: var(--muted); }
.comments-more { min-height: 44px; background: none; padding: 5px 0; text-align: left; font-size: 10px; border: 0; color: var(--moss); }
.ranking-list { margin-top: 23px; }
.ranking-row { display: flex; align-items: center; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.ranking-number { width: 32px; font-family: var(--font-serif); font-size: 25px; color: var(--moss); }
.ranking-row .ranking-score { margin-left: auto; font-size: 19px; font-variant-numeric: tabular-nums; }

/* Administration */
.admin-layout { display: flex; flex-direction: column; gap: 25px; }
.admin-tabs { gap: 24px; margin-bottom: 28px; }
.admin-tabs button { min-width: 46px; }
.admin-control { display: flex; align-items: center; gap: 10px; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.admin-control .btn.primary { margin-left: auto; }
.setting-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.setting-toggle { display: flex; align-items: center; gap: 13px; padding: 14px 0; min-height: 64px; border-bottom: 1px solid var(--line); cursor: pointer; }
.setting-toggle input { order: 2; margin-left: auto; }
.setting-toggle > div, .setting-toggle > span { flex: 1; }
.setting-toggle strong { display: block; font-size: 12px; font-weight: 500; }
.setting-toggle small { display: block; color: var(--muted); font-size: 10px; margin-top: 4px; }
.setting-toggle:last-child { border-bottom: 0; }
.privacy-box { border-left: 2px solid var(--moss); padding: 5px 0 5px 18px; margin: 17px 0; }
.privacy-box h3 { font-size: 13px; margin-bottom: 7px; }
.privacy-box p { color: var(--muted); font-size: 11px; margin-bottom: 0; }
.metric-row { display: flex; gap: 30px; align-items: center; justify-content: center; padding: 22px 0; }
.ring { width: 105px; height: 105px; flex: 0 0 105px; border-radius: 50%; background: conic-gradient(var(--moss) var(--progress, 0%), var(--line) 0); display: flex; align-items: center; justify-content: center; position: relative; }
.ring::before { content: ''; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.ring > * { z-index: 1; }
.ring strong { font-size: 25px; font-weight: 400; font-variant-numeric: tabular-nums; }
.ring small { font-size: 10px; color: var(--muted); }
.ring-label { text-align: center; font-size: 11px; color: var(--muted); margin-top: 11px; }
.timeline { padding-left: 15px; border-left: 1px solid var(--line-strong); margin: 25px 10px 15px; }
.timeline-item { position: relative; padding: 0 0 25px 13px; }
.timeline-item::before { content: ''; position: absolute; width: 7px; height: 7px; border-radius: 50%; top: 8px; left: -19px; background: var(--line-strong); }
.timeline-item.active::before { background: var(--moss); box-shadow: 0 0 0 4px var(--moss-wash); }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item strong { font-size: 12px; font-weight: 500; }
.timeline-item small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.table-wrap { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
.data-table, .admin-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 12px; }
.data-table th, .admin-table th { color: var(--muted); font-size: 10px; font-weight: 500; padding: 12px 14px; border-bottom: 1px solid var(--line-strong); background: var(--surface-soft); white-space: nowrap; }
.data-table td, .admin-table td { padding: 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.data-table td:first-child, .data-table th:first-child, .admin-table td:first-child, .admin-table th:first-child { padding-left: 12px; }
.data-table .btn, .admin-table .btn { white-space: nowrap; }
.data-table .muted { font-size: 10px; }
.data-table select { min-height: 44px; min-width: 100px; padding: 5px 9px; font-size: 12px; }
.member-list { display: flex; flex-direction: column; }
.member-row { display: flex; align-items: center; gap: 13px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.member-row .toolbar { margin-left: auto; }
.member-row h3 { margin: 0; font-size: 13px; }
.member-row p { margin: 4px 0 0; font-size: 10px; color: var(--muted); }
.danger-zone { padding: 25px 28px; border: 1px solid color-mix(in srgb, var(--rust) 38%, var(--line)); background: color-mix(in srgb, var(--rust-wash) 50%, var(--surface)); }
.danger-zone h2, .danger-zone h3 { color: var(--rust); }
.danger-zone p { color: var(--muted); font-size: 12px; }
.danger-row { display: flex; gap: 20px; align-items: center; justify-content: space-between; padding: 18px 0; border-bottom: 1px solid color-mix(in srgb, var(--rust) 15%, var(--line)); }
.danger-row:last-child { border-bottom: 0; padding-bottom: 0; }
.danger-row h3 { margin-bottom: 4px; font-size: 13px; }
.danger-row p { margin: 0; font-size: 11px; }
.danger-row .btn { flex-shrink: 0; }
.steps { display: flex; gap: 0; margin: 5px 0 30px; counter-reset: step; }
.steps > * { counter-increment: step; position: relative; flex: 1; padding: 14px 8px 14px 0; border-bottom: 2px solid var(--line); color: var(--muted); font-size: 11px; }
.steps > *::before { content: '0' counter(step); margin-right: 8px; font-size: 9px; color: var(--muted); }
.steps > .active { border-bottom-color: var(--moss); color: var(--moss-deep); }
.steps > .done { border-bottom-color: var(--line-strong); color: var(--moss); }
.wizard-layout { display: grid; grid-template-columns: 1.35fr 1fr; gap: 35px; align-items: start; }
.wizard-preview { position: sticky; top: 20px; padding: 22px; border-left: 1px solid var(--line); }
.wizard-preview .eyebrow { font-size: 9px; }
.wizard-preview .event-card { margin-top: 20px; }
.review-list { margin: 0; }
.review-list > div { display: flex; justify-content: space-between; gap: 20px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.review-list dt { color: var(--muted); font-size: 11px; }
.review-list dd { margin: 0; text-align: right; font-size: 12px; }
.ladder-row { display: grid; grid-template-columns: 1fr 130px 44px; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.ladder-row:first-child { padding-top: 0; }
.ladder-row input { min-height: 44px; }
.inline-field { display: flex; align-items: center; gap: 8px; }
.inline-field input { min-width: 0; }
.inline-field span, .inline-field small { flex-shrink: 0; font-size: 11px; color: var(--muted); }
.award-preview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.award-preview > * { padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); }
.award-preview h3 { font-family: var(--font-serif); font-size: 17px; }
.award-preview p { color: var(--muted); font-size: 11px; margin-bottom: 9px; }
.projection { width: min(1050px, 100%); padding: 34px; }
.projection-header { text-align: center; border-bottom: 1px solid var(--line); padding-bottom: 23px; margin-bottom: 30px; }
.projection-header h2 { font-size: 27px; margin-bottom: 4px; }
.projection-header p { margin: 0; font-size: 12px; color: var(--muted); }
.projection-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 45px; align-items: center; }
.projection-qr { text-align: center; border-right: 1px solid var(--line); padding: 8px 36px 8px 0; }
.projection-qr > svg, .projection-qr > img { background: #fff; width: 220px; height: auto; max-width: 100%; padding: 16px; }
.qr-image { display: inline-block; background: #fff; padding: 12px; }
.qr-image svg { display: block; width: 210px; height: 210px; max-width: 100%; }
.join-code { font-size: 27px; letter-spacing: .2em; font-weight: 500; font-variant-numeric: tabular-nums; margin: 15px 0 0; }
.projection-qr small { display: block; font-size: 10px; color: var(--muted); margin-top: 5px; }
.projection-timer { text-align: center; }
.timer-digits { font-size: clamp(62px, 7vw, 100px); line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.04em; color: var(--moss-deep); font-weight: 400; margin: 0 0 20px; }
.timer-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 25px 0 13px; }
.timer-presets button { min-height: 44px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 12px; }
.timer-presets button.active { background: var(--moss-wash); border-color: var(--moss); }
.projection-timer .toolbar { justify-content: center; margin-top: 15px; }
.projection-timer .inline-field { max-width: 230px; margin: 0 auto; }

/* Login and registration */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-visual { position: relative; padding: 50px clamp(28px, 5vw, 80px); overflow: hidden; background: #252d25; color: #f5f2e9; display: flex; flex-direction: column; justify-content: space-between; }
.login-visual .logo-lockup { color: #f5f2e9; }
.login-visual .logo-lockup img { filter: brightness(2.7) saturate(.35); }
.login-visual .eyebrow { color: #bdc8ac; }
.login-visual h1 { font-size: clamp(34px, 4vw, 58px); font-weight: 500; letter-spacing: .15em; line-height: 1.85; position: relative; z-index: 1; }
.login-visual .login-art { position: absolute; width: 360px; height: 360px; opacity: .23; bottom: 4%; right: -110px; }
.login-visual p { font-size: 12px; color: #bdc8ac; letter-spacing: .07em; position: relative; z-index: 1; }
.login-content { display: flex; flex-direction: column; justify-content: center; padding: 65px clamp(30px, 6vw, 95px); }
.login-content h2 { font-size: 30px; margin-bottom: 16px; }
.login-content > p { color: var(--muted); font-size: 12px; line-height: 2; }
.google-btn { margin: 26px 0 21px; width: 100%; gap: 14px; min-height: 54px; background: var(--surface); }
.google-logo { font-family: Arial, sans-serif; font-size: 20px; font-weight: 700; color: #4285f4; }
.login-note { font-size: 10px; color: var(--muted); line-height: 1.9; }
.login-demo { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.login-demo .btn { padding-left: 0; }
.login-footer { margin-top: 38px; font-size: 9px; color: var(--muted); }
.registration { max-width: 830px; margin: 0 auto; min-height: 85vh; display: flex; flex-direction: column; justify-content: center; padding: 60px 30px; }
.registration > .logo-lockup { margin-bottom: 48px; align-self: flex-start; }
.registration .split { grid-template-columns: 1.1fr 1fr; gap: 40px; }
.registration .namecard { align-self: center; min-height: 275px; }
.registration .steps { margin: 0 0 23px; }
.registration p { color: var(--muted); font-size: 12px; }
.registration .btn.primary { margin-top: 25px; }
.registration .privacy-note { margin-top: 22px; color: var(--muted); font-size: 10px; }

/* Dialogs and responsive bottom sheets. */
.modal-backdrop, .modal-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; background: #1b251c66; padding: 30px; backdrop-filter: blur(5px); animation: fade-in .15s; }
.dialog, .sheet { position: relative; background: var(--paper); color: var(--ink); width: min(540px, 100%); max-height: calc(100dvh - 60px); overflow-y: auto; padding: 30px; border: 1px solid var(--line); box-shadow: var(--shadow-raised); border-radius: 5px; animation: dialog-in .2s ease; }
.dialog.wide, .sheet.wide { width: min(1040px, 100%); }
.dialog .projection { padding: 0; }
.dialog:has(.projection) { width: min(1040px, 100%); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 23px; }
.dialog-header h2 { font-size: 23px; margin: 0; }
.dialog-header .icon-btn { margin: -9px -12px -9px 0; }
.dialog-close { position: absolute; right: 15px; top: 15px; z-index: 2; }
.dialog h2 { padding-right: 25px; }
.dialog p { color: var(--muted); font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 26px; }
.sheet-handle { display: none; }
.join-input { font-size: 27px; letter-spacing: .18em; text-transform: uppercase; text-align: center; padding: 15px; height: 66px; }
.menu-popover { position: absolute; top: 100%; right: 0; min-width: 210px; padding: 9px; background: var(--surface); border: 1px solid var(--line); z-index: 100; box-shadow: var(--shadow-raised); }
.menu-popover button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 44px; border: 0; background: transparent; padding: 10px; text-align: left; font-size: 12px; }
.menu-popover button:hover { background: var(--surface-soft); }
#toast-root { position: fixed; z-index: 1000; bottom: 28px; left: 50%; transform: translateX(-50%); width: max-content; max-width: min(90vw, 460px); display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 14px 22px; background: var(--ink); color: var(--paper); font-size: 12px; box-shadow: var(--shadow-raised); border-radius: 3px; animation: dialog-in .2s ease; }
.toast.error { background: var(--rust); color: var(--paper); }
.toast .icon { width: 17px; height: 17px; }
.initial-loading { min-height: 90vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.initial-wordmark { font-family: var(--font-serif); font-size: 28px; letter-spacing: .2em; }
.skeleton { background: linear-gradient(90deg, var(--surface-soft) 25%, var(--line) 50%, var(--surface-soft) 75%); background-size: 200% 100%; animation: shimmer 1.7s infinite; border-radius: 2px; }
.skeleton-line { height: 3px; width: 100px; }
.skeleton-card { min-height: 200px; }
.skeleton-text { height: 12px; margin-bottom: 10px; width: 80%; }
.error-page { width: min(700px, 100%); margin: 0 auto; padding: 50px 25px 80px; }
.error-page > .logo-lockup { margin-bottom: 35px; }
.error-art { width: 180px; height: 180px; margin: 0 auto 0; }
.error-page h1 { font-size: 31px; margin-bottom: 20px; }
.error-page .btn { margin-top: 17px; }
[data-theme="dark"] .hero-art > img, [data-theme="moon"] .hero-art > img { opacity: .58; }
[data-theme="dark"] .logo-lockup img, [data-theme="moon"] .logo-lockup img, [data-theme="dark"] .brand img, [data-theme="moon"] .brand img { filter: brightness(1.9) saturate(.7); }

@keyframes appear { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes dialog-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes stamp { from { opacity: 0; transform: rotate(-8deg) scale(1.3); } to { opacity: 1; transform: rotate(-8deg) scale(1); } }

@media (min-width: 1500px) {
  :root { --sidebar-width: 242px; }
  .sidebar { padding: 39px 32px 28px; }
  .nav-item.active::before, .nav-item[aria-current="page"]::before { left: -32px; }
  #view { padding-top: 42px; }
}
@media (max-width: 1190px) {
  :root { --sidebar-width: 188px; }
  .sidebar { padding: 28px 17px 23px; }
  .logo-lockup, .brand { font-size: 23px; gap: 7px; }
  .logo-lockup img, .brand img { width: 37px; height: 37px; }
  .nav-item.active::before, .nav-item[aria-current="page"]::before { left: -17px; }
  #view { padding-left: 34px; padding-right: 34px; }
  .topbar { padding-left: 34px; padding-right: 34px; }
  .hero { grid-template-columns: 1.2fr 1fr; }
  .hero .display { font-size: 35px; }
  .hero-art { height: 288px; }
  .hero-art .poem-strip { left: 23%; }
  .hero-art .poem-strip:nth-of-type(2) { left: 57%; }
  .result-list { grid-template-columns: 1fr; }
  .result-entry { gap: 27px; }
  .result-detail { padding-top: 20px; }
  .result-entry > .poem-strip { width: 145px; }
}
@media (max-width: 900px) {
  .sidebar { width: 78px; padding: 27px 12px; align-items: center; }
  :root { --sidebar-width: 78px; }
  .sidebar .logo-lockup > span, .sidebar .brand > span, .logo-subtitle, .sidebar .nav-item > span, .sidebar .nav-label, .sidebar-foot p, .sidebar-caption { display: none; }
  .sidebar .logo-lockup img, .sidebar .brand img { width: 44px; height: 44px; }
  .sidebar nav { width: 100%; margin-top: 39px; }
  .sidebar .nav-item { justify-content: center; padding: 12px; }
  .sidebar .nav-item.active::before { left: -12px; }
  .sidebar-foot { width: 100%; display: flex; flex-direction: column; align-items: center; }
  .sidebar-foot .btn { padding: 9px; }
  .sidebar-foot .btn span { display: none; }
  .hero .display { font-size: 33px; }
  .hero-art .poem-strip { width: 77px; }
  .next-action { gap: 15px; padding: 21px; }
  .next-action > .icon { display: none; }
  .next-action-time { display: none; }
  .split, .profile-grid { gap: 20px; }
  .namecard { padding: 27px; }
  .namecard h2 { font-size: 27px; }
  .wizard-layout { grid-template-columns: 1fr; }
  .wizard-preview { position: static; border: 0; padding: 20px 0 0; border-top: 1px solid var(--line); }
  .wizard-preview .event-card { max-width: 430px; }
  .projection-body { gap: 28px; }
  .projection-qr { padding-right: 26px; }
  .timer-digits { font-size: 72px; }
  .login { grid-template-columns: 1fr 1fr; }
  .login-visual { padding: 39px 28px; }
  .login-visual h1 { font-size: 34px; }
  .login-content { padding: 50px 30px; }
  .login-content h2 { font-size: 26px; }
}
@media (max-width: 700px) {
  :root { --sidebar-width: 0px; }
  body { font-size: 13px; }
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: 70px; }
  .topbar { position: sticky; top: 0; z-index: 90; min-height: 63px; padding: 8px 20px; gap: 10px; backdrop-filter: blur(12px); border-top: 3px solid var(--season); }
  .topbar-title { font-size: 10px; gap: 9px; }
  .topbar-title .topbar-label { display: none; }
  .topbar-title .badge { font-size: 8px; padding: 3px 6px; }
  .mobile-brand { display: inline-flex; align-items: center; }
  .mobile-brand img { width: 33px; height: 33px; }
  .mobile-brand span { font: 600 19px var(--font-serif); letter-spacing: .07em; margin-left: 5px; }
  .topbar-actions { gap: 1px; }
  .topbar-actions > .btn:not(.icon-btn) { padding: 5px 8px; min-height: 40px; font-size: 10px; }
  .topbar-actions .avatar { width: 31px; height: 31px; font-size: 12px; }
  .topbar-actions .icon-btn { width: 40px; min-height: 42px; }
  #view { padding: 26px 22px 48px; }
  .bottom-nav { position: fixed; z-index: 100; bottom: 0; left: 0; right: 0; min-height: 65px; padding: 4px 20px max(5px, env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--surface); border-top: 1px solid var(--line); }
  .bottom-nav button, .bottom-nav a { background: none; border: 0; border-radius: 0; color: var(--muted); display: flex; flex-direction: column; gap: 3px; align-items: center; justify-content: center; font-size: 9px; min-height: 53px; padding: 7px 8px; text-decoration: none; }
  .bottom-nav .icon { width: 20px; height: 20px; }
  .bottom-nav .active, .bottom-nav [aria-current="page"] { color: var(--moss-deep); }
  .bottom-nav .active .icon { background: var(--moss-wash); box-shadow: 0 0 0 7px var(--moss-wash); border-radius: 4px; }
  .demo-banner { gap: 9px; padding: 5px 12px; font-size: 9px; }
  .demo-banner .btn { min-height: 29px; padding: 3px 7px; font-size: 9px; }
  .page-head { margin-bottom: 26px; gap: 14px; align-items: start; }
  .page-head h1 { font-size: 27px; }
  .page-head .toolbar { gap: 5px; }
  .page-head .btn { min-height: 44px; padding: 7px 11px; font-size: 10px; }
  .page-head p { font-size: 11px; }
  .eyebrow { font-size: 9px; }
  .hero { min-height: 247px; grid-template-columns: 1.35fr .9fr; gap: 0; margin: -9px -4px 20px 0; }
  .hero-copy { padding: 20px 0; }
  .hero .display { font-size: clamp(27px, 6vw, 36px); letter-spacing: .07em; line-height: 1.75; white-space: nowrap; margin-bottom: 13px; }
  .hero .eyebrow { font-size: 8px; letter-spacing: .17em; margin-bottom: 15px; }
  .hero p:not(.eyebrow) { font-size: 10px; max-width: 240px; }
  .hero-art { height: 236px; align-self: center; }
  .hero-art > img { position: absolute; width: 250px; height: 250px; max-width: none; right: -15px; }
  .hero-art .poem-strip { top: 25px; left: 15%; width: 57px; height: 192px; min-height: 192px; padding: 10px 5px; }
  .hero-art .poem-strip:nth-of-type(2) { width: 49px; height: 183px; min-height: 183px; left: 55%; top: 41px; }
  .hero-art .poem-text { font-size: 12px; height: 148px; min-height: 0; }
  .hero-art .poem-number { width: 19px; min-width: 19px; height: 19px; min-height: 19px; margin-bottom: 8px; font-size: 7px; }
  .hero-art .poem-author { font-size: 7px; margin-top: 7px; }
  .hero-season { font-size: 8px; bottom: -2px; right: 8px; }
  .next-action { align-items: start; padding: 18px 19px; margin-bottom: 30px; gap: 10px; flex-wrap: wrap; }
  .next-action h2, .next-action h3 { font-size: 17px; }
  .next-action .eyebrow { font-size: 8px; }
  .next-action p { font-size: 10px; }
  .next-action .btn { margin: 4px 0 0 auto; min-height: 43px; padding: 8px 13px; font-size: 11px; }
  .next-action-copy { flex-basis: 65%; }
  .section { margin-bottom: 34px; }
  .section-head { margin-bottom: 15px; gap: 10px; }
  .section-head h2 { font-size: 21px; }
  .section-head .muted { font-size: 9px; }
  .section-head .btn { font-size: 10px; padding: 7px 0; }
  .section-number { margin-right: 8px; font-size: 9px; }
  .tabs { gap: 22px; margin-bottom: 21px; }
  .tabs button { font-size: 11px; }
  .event-grid { gap: 14px; }
  .event-card { padding: 18px; }
  .event-card h3 { font-size: 20px; }
  .event-card .event-meta { font-size: 9px; gap: 6px; margin-bottom: 15px; }
  .event-card .event-code { font-size: 8px; letter-spacing: .08em; }
  .event-card .event-theme { font-size: 11px; margin-bottom: 19px; }
  .event-card .toolbar { margin-top: 13px; padding-top: 11px; gap: 5px; }
  .event-card .event-status { font-size: 9px; }
  .event-card .toolbar .btn { font-size: 10px; }
  .event-card .toolbar .btn .icon { width: 14px; height: 14px; }
  .season-note { gap: 16px; padding-top: 23px; margin-top: 29px; }
  .season-note p { font-size: 11px; }
  .home-footnote { margin-top: 25px; font-size: 9px; }
  .panel { padding: 22px; }
  .form-grid { gap: 19px 15px; }
  .split, .profile-grid { grid-template-columns: 1fr; gap: 25px; }
  .metrics { padding: 17px 0; margin: 25px 0; }
  .metric { padding: 0 11px; }
  .metric strong { font-size: 27px; }
  .metric > span { font-size: 9px; }
  .namecard { min-height: 239px; padding: 31px; }
  .namecard h2 { font-size: 31px; }
  .form-actions { flex-wrap: wrap; }
  .poem-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
  .poem-strip { min-height: 297px; padding: 13px 8px 14px; }
  .poem-text { font-size: 17px; line-height: 1.8; height: 202px; min-height: 202px; }
  .poem-number { margin-bottom: 15px; min-width: 23px; width: 23px; height: 23px; font-size: 9px; }
  .poem-author { font-size: 9px; margin-top: 15px; }
  .poem-stamp { font-size: 9px; left: 5px; top: 47px; padding: 3px 2px; }
  .submission-layout { grid-template-columns: 1fr; gap: 27px; }
  .submission-preview { position: static; padding: 24px 20px; }
  .submission-preview .poem-strip { width: 100px; }
  .poem-input { padding: 16px; }
  .poem-input input, .poem-input textarea { font-size: 19px; }
  .theme-banner { font-size: 21px; margin-bottom: 23px; }
  .selection-layout { padding-bottom: 156px; }
  .selection-tray { left: 12px; right: 12px; bottom: calc(72px + env(safe-area-inset-bottom)); padding: 12px 14px; gap: 10px 11px; }
  .tray-info { width: 100%; justify-content: space-between; font-size: 10px; }
  .tray-info strong { font-size: 14px; }
  .tray-counts { gap: 8px; }
  .tray-count { font-size: 9px; }
  .tray-poems { gap: 6px; }
  .tray-poem { min-height: 42px; }
  .selection-tray .btn { padding: 8px 12px; font-size: 10px; }
  .filter-bar { align-items: start; gap: 9px; }
  .filter-bar .muted { font-size: 10px; }
  .segmented button { min-height: 38px; padding: 7px 10px; font-size: 10px; }
  .result-podium { gap: 15px; padding: 16px 0 24px; margin-bottom: 30px; }
  .result-podium::before { width: 280px; height: 280px; }
  .podium-item { width: 123px; }
  .podium-item .poem-strip { min-height: 320px; padding-left: 6px; padding-right: 6px; }
  .podium-item .poem-text { font-size: 18px; height: 215px; }
  .podium-label { font-size: 21px; margin-bottom: 9px; }
  .podium-label small { font-size: 8px; }
  .podium-item .poem-author, .podium-item .name-chip { font-size: 9px; }
  .podium-item .award-chip { font-size: 8px; padding: 3px 4px; }
  .result-heading { padding-top: 0; padding-bottom: 17px; }
  .result-heading h1 { font-size: 29px; }
  .my-result { padding: 19px; gap: 15px; }
  .my-result h3 { font-size: 17px; }
  .my-result .metric strong { font-size: 28px; }
  .result-entry { gap: 23px; }
  .result-entry > .poem-strip { width: 123px; }
  .admin-tabs { gap: 21px; }
  .admin-control { flex-wrap: wrap; }
  .setting-grid { gap: 16px; }
  .setting-toggle { padding: 13px 0; }
  .metric-row { gap: 25px; }
  .ring { width: 99px; height: 99px; flex-basis: 99px; }
  .danger-zone { padding: 21px; }
  .danger-row { flex-direction: column; align-items: flex-start; gap: 11px; }
  .danger-row .btn { align-self: flex-end; }
  .steps > * { font-size: 10px; }
  .steps > *::before { margin-right: 4px; }
  .ladder-row { grid-template-columns: 1fr 95px 44px; gap: 8px; }
  .award-preview { gap: 12px; }
  .award-preview > * { padding: 14px; }
  .projection { padding: 0; }
  .projection-header { padding-bottom: 19px; margin-bottom: 24px; }
  .projection-header h2 { font-size: 23px; }
  .projection-body { grid-template-columns: 1fr; gap: 27px; }
  .projection-qr { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 25px; }
  .projection-qr > svg, .projection-qr > img { width: 190px; }
  .qr-image svg { width: 170px; height: 170px; }
  .join-code { font-size: 25px; }
  .timer-digits { font-size: 77px; margin-bottom: 15px; }
  .timer-presets { margin-top: 20px; }
  .login { grid-template-columns: 1fr; }
  .login-visual { min-height: 325px; padding: 28px 28px 32px; }
  .login-visual .logo-lockup { margin-bottom: 30px; font-size: 22px; }
  .login-visual h1 { font-size: 33px; line-height: 1.65; margin-bottom: 16px; }
  .login-visual p { font-size: 10px; margin: 0; }
  .login-visual .login-art { right: -65px; bottom: -100px; width: 320px; height: 320px; }
  .login-content { padding: 35px 28px 43px; }
  .login-content h2 { font-size: 24px; margin-bottom: 12px; }
  .google-btn { margin-top: 15px; }
  .login-demo { margin-top: 19px; padding-top: 18px; }
  .login-footer { margin-top: 23px; }
  .registration { min-height: 90vh; padding: 34px 25px; }
  .registration > .logo-lockup { margin-bottom: 30px; }
  .registration .split { grid-template-columns: 1fr; gap: 28px; }
  .registration .namecard { min-height: 220px; }
  .modal-backdrop, .modal-overlay { padding: 16px; }
  .dialog { max-height: calc(100dvh - 32px); padding: 25px; }
  .sheet { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; max-height: calc(100dvh - 60px); padding: 25px 25px max(25px, env(safe-area-inset-bottom)); border-radius: 12px 12px 0 0; }
  .sheet-handle { display: block; width: 37px; height: 4px; border-radius: 5px; background: var(--line-strong); margin: -12px auto 22px; }
  .dialog h2 { font-size: 23px; }
  #toast-root { bottom: calc(86px + env(safe-area-inset-bottom)); max-width: calc(100vw - 32px); }
  .toast { padding: 12px 17px; font-size: 11px; }
}
@media (max-width: 430px) {
  #view { padding-left: 20px; padding-right: 20px; }
  .hero { grid-template-columns: 1.45fr .8fr; }
  .hero .display { font-size: 28px; }
  .hero-art { height: 225px; }
  .hero-art > img { right: -30px; width: 235px; height: 235px; }
  .hero-art .poem-strip { width: 50px; left: 5%; top: 26px; }
  .hero-art .poem-strip:nth-of-type(2) { width: 44px; left: 50%; top: 47px; }
  .hero-art .poem-text { font-size: 11px; }
  .hero-season { right: 0; }
  .event-grid { grid-template-columns: 1fr; }
  .event-card { padding: 23px; }
  .event-card h3 { font-size: 23px; }
  .event-card .event-meta { font-size: 10px; }
  .event-card .event-theme { font-size: 12px; }
  .event-card .event-status, .event-card .toolbar .btn { font-size: 11px; }
  .event-card .event-code { font-size: 10px; }
  .event-card .toolbar { margin-top: 19px; padding-top: 14px; }
  .next-action-copy { flex-basis: 100%; }
  .next-action .btn { margin-top: 4px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full, .form-grid .span-2 { grid-column: auto; }
  .poem-grid { gap: 11px; }
  .poem-strip { min-height: 285px; padding: 12px 6px; }
  .poem-text { font-size: 16px; height: 196px; min-height: 196px; }
  .poem-strip .name-chip { font-size: 8px; }
  .poem-author { font-size: 8px; }
  .podium-item .poem-strip { min-height: 308px; }
  .podium-item .poem-text { font-size: 17px; height: 210px; }
  .result-podium { gap: 10px; }
  .podium-item:nth-child(2) { margin-bottom: 27px; }
  .podium-item .poem-author, .podium-item .name-chip { font-size: 8px; }
  .result-entry { gap: 17px; }
  .result-entry > .poem-strip { width: 110px; }
  .setting-grid { grid-template-columns: 1fr; }
  .timer-digits { font-size: 67px; }
  .metric strong { font-size: 25px; }
  .metric > span { font-size: 8px; }
  .table-wrap { margin-left: -5px; margin-right: -5px; }
  .data-table td, .data-table th { padding: 11px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .skeleton { background: var(--surface-soft); }
  button.poem-strip:hover { transform: none; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .selection-tray, .toolbar, .demo-banner { display: none !important; }
  .main { margin: 0; padding: 0; }
  #view { max-width: none; padding: 0; }
  body { background: white; color: black; }
  .poem-strip, .event-card { break-inside: avoid; box-shadow: none; }
}
