* { box-sizing: border-box; }
:root {
  --paper: #faf7ef; --card: #fffcf6; --ink: #292e28; --muted: #625e51; --line: #d7d1c3;
  --clay: #99442e; --green: #304c40; --soft: #e7eddf; --shell: 480px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --gutter: clamp(16px, 5.2vw, 26px); --nav-height: calc(66px + env(safe-area-inset-bottom, 0px));
  font: 16px/1.45 var(--sans); color: var(--ink); background: #e8e4d8; color-scheme: light;
}
html { min-height: 100%; scroll-padding: 14px 0 calc(var(--nav-height) + 20px); }
body { margin: 0; background-image: radial-gradient(#bcb5a966 .65px, transparent .8px); background-size: 5px 5px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button { border: 0; background: none; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #884227; outline-offset: 3px; }
[hidden] { display: none !important; }
.shell { max-width: var(--shell); min-height: 100vh; min-height: 100svh; margin: auto; background: var(--paper); box-shadow: 0 0 0 1px #cfc8b9, 0 10px 55px #4e482819; }
.masthead { min-height: 62px; padding: 8px var(--gutter); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: inline-flex; gap: 9px; align-items: center; min-height: 44px; font: bold 26px/1 var(--serif); letter-spacing: -1.5px; }
.brand-mark { display: inline-block; position: relative; width: 35px; height: 31px; transform: rotate(-5deg); color: var(--clay); }
.brand-mark i { position: absolute; display: block; background: currentColor; border-radius: 2px; }
.brand-mark i:nth-child(1) { width: 26px; height: 6px; top: 4px; left: 5px; transform: skew(-9deg); }
.brand-mark i:nth-child(2) { width: 33px; height: 6px; top: 14px; left: 1px; }
.brand-mark i:nth-child(3) { width: 4px; height: 21px; top: 6px; left: 6px; box-shadow: 18px 0 currentColor; }
.prototype-tag { border: 1px solid #c9c1b2; border-radius: 100px; padding: 3px 9px 4px; color: var(--muted); font-size: .71rem; font-weight: 600; }
main { padding: 0 var(--gutter) calc(var(--nav-height) + 28px); overflow-wrap: anywhere; }
main:focus { outline: none; }
#navigation { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); z-index: 20; width: min(100%, var(--shell)); min-height: var(--nav-height); padding: 5px 7px calc(5px + env(safe-area-inset-bottom, 0px)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; background: #faf7ef; border-top: 1px solid #cfc7b8; }
.nav-link { min-height: 52px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px; font-size: .72rem; color: #605e52; font-weight: 600; border-radius: 12px; }
.nav-icon { display: grid; place-items: center; width: 44px; height: 26px; border-radius: 20px; }
.nav-link[aria-current="page"] { color: #833b27; }
.nav-link[aria-current="page"] .nav-icon { background: #f3e3d5; }
.icon { width: 18px; height: 18px; flex: none; vertical-align: middle; }
.nav-icon .icon { width: 21px; height: 21px; }
.skip { position: fixed; top: -150px; left: 10px; padding: 12px; background: white; z-index: 8; }
.skip:focus { top: 8px; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; }
h1 { font-size: clamp(2.15rem, 9.5vw, 2.8rem); line-height: 1.04; letter-spacing: -.055em; }
h2 { font-size: 1.55rem; line-height: 1.15; letter-spacing: -.04em; }
h3 { font-size: 1.23rem; line-height: 1.22; letter-spacing: -.025em; }
.kicker { color: var(--clay); font: 700 .68rem/1.35 var(--sans); text-transform: uppercase; letter-spacing: .13em; display: inline-flex; align-items: center; gap: 5px; }
.kicker .icon { width: 14px; height: 14px; }
.home-intro { padding: 23px 0 17px; }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) 37%; align-items: center; gap: 4px; }
.home-intro h1 { margin-top: 7px; }
.hero-art, .card-art { width: 100%; height: auto; display: block; }
.home-intro p { margin-top: 9px; max-width: 35ch; color: var(--muted); font-size: .92rem; }
.period-switch { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; padding: 3px; background: #ede9de; border: 1px solid #ded7c9; border-radius: 14px; }
.period-switch button { min-height: 44px; border-radius: 10px; font-size: .9rem; font-weight: 650; }
.period-switch button[aria-pressed="true"] { color: #fffdf5; background: var(--green); }
.filter-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.filter { display: inline-flex; align-items: center; min-height: 44px; position: relative; gap: 6px; padding: 0 12px; border: 1px solid var(--line); background: var(--card); border-radius: 22px; max-width: 100%; color: #474b40; }
.filter .icon { width: 15px; height: 15px; }
.filter select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.filter:focus-within { outline: 3px solid var(--clay); outline-offset: 2px; }
.filter.selected { background: var(--soft); border-color: #9fad99; }
.filter-label { font-size: .84rem; font-weight: 600; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 24px 0 12px; }
.section-head h2 { min-width: 0; }
.section-head small { flex: none; font-size: .78rem; color: var(--muted); }
.card-list, .stack { display: grid; gap: 12px; }
.event-card { display: block; padding: 15px 16px 12px; border: 1px solid #d3ccbd; border-radius: 17px; background: var(--card); box-shadow: 0 2px 0 #453b2607; }
.event-card:hover, .item-link:hover { border-color: #a39781; }
.card-top, .person, .inline, .action-row, .meta-line, .match-line { display: flex; align-items: center; gap: 9px; }
.card-top { justify-content: space-between; gap: 8px; }
.category, .seat, .subtle-tag, .pin-label { display: inline-flex; align-items: center; gap: 5px; font: 650 .74rem/1.35 var(--sans); }
.category { color: var(--muted); }
.category::before, .seat::before { content: ""; height: 7px; width: 7px; border-radius: 50%; background: var(--accent, #8b6a48); flex: none; }
.seat { color: #344e39; border: 1px solid #c4cfb9; border-radius: 18px; padding: 3px 8px; background: #edf2e5; }
.seat::before { width: 5px; height: 5px; background: #4a6747; }
.seat.full { background: #f1e8dc; color: #6a5945; border-color: #d5c9b9; }
.seat.full::before { background: #73664e; }
.card-body { display: grid; grid-template-columns: minmax(0, 1fr) 79px; align-items: center; gap: 8px; margin: 9px 0 11px; }
.card-body h3 { font-size: 1.46rem; line-height: 1.12; margin: 0 0 8px; }
.card-art { transform: rotate(-5deg); }
.event-card:nth-child(even) .card-art { transform: rotate(4deg); }
.meta-line { font-size: .81rem; color: #4f5348; align-items: flex-start; line-height: 1.38; gap: 6px; }
.meta-line + .meta-line { margin-top: 4px; }
.meta-line .icon { width: 15px; height: 15px; margin-top: 1px; }
.card-foot { display: flex; align-items: center; gap: 8px; padding-top: 10px; border-top: 1px dashed var(--line); }
.avatar { width: 34px; height: 34px; display: inline-grid; place-items: center; flex: none; border-radius: 50%; font: bold 1.02rem var(--serif); background: var(--avatar-bg, #e9dac4); color: #463c2d; }
.avatar.large { width: 58px; height: 58px; font-size: 1.65rem; }
.person-text, .row-copy, .rule-copy { min-width: 0; flex: 1; }
.person-text strong, .person-text small, .row-copy strong, .row-copy small { display: block; line-height: 1.38; overflow-wrap: anywhere; }
.person-text strong, .row-copy strong { font-size: .9rem; font-weight: 650; }
.person-text small, .row-copy small { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.card-foot .person-text strong { font-size: .82rem; }
.card-foot .person-text small { font-size: .73rem; }
.arrow-disk { display: inline-grid; place-items: center; flex: none; margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); color: var(--green); }
.back { display: inline-flex; align-items: center; gap: 5px; min-height: 44px; font-size: .86rem; font-weight: 600; color: var(--muted); margin: 6px 0 0; }
.back .icon { width: 16px; height: 16px; }
.page-head { padding: 12px 0 22px; }
.page-head.first { padding-top: 29px; }
.page-head .kicker { margin-bottom: 8px; }
.page-head p, .subtext { color: var(--muted); font-size: .93rem; line-height: 1.48; margin-top: 9px; }
.panel, .empty, .form-box, .ticket { border: 1px solid var(--line); border-radius: 17px; background: var(--card); padding: 16px; }
.empty { border-style: dashed; background: #f5f1e6; }
.empty p, .panel p { color: var(--muted); font-size: .89rem; line-height: 1.48; margin-top: 6px; }
.empty .btn, .empty .text-link, .panel > .btn { margin-top: 12px; }
.btn { min-height: 46px; padding: 10px 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #bfb9aa; border-radius: 12px; background: var(--card); color: var(--ink); font-size: .92rem; font-weight: 650; text-align: center; }
.btn.primary { background: var(--green); color: #fffdf5; border-color: var(--green); }
.btn.primary:hover { background: #213e31; }
.btn.secondary:hover { background: #ede9dd; }
.btn.danger { color: #88361f; background: #f8ece4; border-color: #d4b8aa; }
.btn.small { min-height: 44px; padding: 8px 11px; font-size: .82rem; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .68; cursor: default; }
.text-link { min-height: 44px; align-items: center; display: inline-flex; gap: 6px; color: var(--clay); font-size: .86rem; font-weight: 650; text-decoration: underline; text-underline-offset: 3px; padding: 3px 0; }
.action-row { flex-wrap: wrap; }
.action-row > .btn { flex: 1 1 125px; }
.spaced { margin-top: 16px; }
.flow { display: grid; gap: 16px; }
.field, fieldset { display: grid; gap: 6px; min-width: 0; margin: 0; border: 0; padding: 0; }
.field > span:first-child, .field-title, legend { color: var(--ink); font-size: .9rem; font-weight: 650; }
legend { padding: 0 0 7px; }
.hint { font-size: .81rem; line-height: 1.45; color: var(--muted); }
input:not([type="checkbox"]):not([type="radio"]), select.control, textarea { width: 100%; min-width: 0; min-height: 46px; padding: 10px 12px; background: #fffdf8; border: 1px solid #888372; border-radius: 10px; font-family: var(--sans); font-size: 16px; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: #716d62; opacity: 1; }
input[type="date"], input[type="time"] { appearance: none; -webkit-appearance: none; }
textarea { min-height: 98px; resize: vertical; }
select.control { appearance: auto; padding-right: 6px; }
.two-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
fieldset .choice + .choice { margin-top: 2px; }
.choice, .toggle { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 10px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; cursor: pointer; font-size: .88rem; }
.choice:has(input:checked) { background: #edf1e6; border-color: #899a80; }
.choice input { width: 17px; height: 17px; margin: 0; accent-color: var(--green); flex: none; }
.toggle { justify-content: space-between; }
.toggle input { appearance: none; margin: 0; width: 39px; height: 23px; position: relative; background: #817e71; border-radius: 18px; cursor: pointer; flex: none; }
.toggle input::after { content: ""; width: 17px; height: 17px; position: absolute; top: 3px; left: 3px; background: white; border-radius: 50%; }
.toggle input:checked { background: var(--green); }
.toggle input:checked::after { left: 19px; }
.toggle input:disabled { opacity: .6; cursor: default; }
.form-box { display: grid; gap: 14px; }
.form-box h2 { font-size: 1.31rem; }
.form-error:not(:empty), #storage-note, .info { border: 1px solid #c8cfbb; border-radius: 11px; padding: 11px 12px; background: var(--soft); color: #344836; font-size: .85rem; line-height: 1.45; }
.form-error:empty { display: none; }
.form-error:not(:empty), #storage-note { color: #75351f; background: #f7e7d8; border-color: #d7bd9e; }
#storage-note { margin: 10px var(--gutter) 0; }
.info { display: flex; align-items: flex-start; gap: 8px; }
.info .icon { margin-top: 1px; width: 16px; height: 16px; }
.detail-hero { padding: 18px 17px; background: #f0ebdc; border-radius: 18px 18px 0 0; border: 1px solid #d6ceba; border-bottom-style: dashed; }
.detail-hero .headline { display: grid; grid-template-columns: minmax(0,1fr) 74px; gap: 7px; align-items: center; margin-top: 12px; }
.detail-hero h1 { font-size: clamp(1.95rem, 8.5vw, 2.65rem); }
.ticket { border-top: 0; border-radius: 0 0 18px 18px; display: grid; gap: 14px; }
.detail-line { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 8px; align-items: start; }
.detail-line > .icon { margin-top: 3px; color: var(--green); }
.detail-line small { display: block; color: var(--muted); font-size: .77rem; }
.detail-line strong { display: block; font-size: .95rem; line-height: 1.4; font-weight: 650; }
.subtle-tag, .pin-label { color: var(--clay); }
.rule-list, .plain-list { list-style: none; margin: 0; padding: 0; }
.rule-list li { display: flex; gap: 9px; padding: 10px 0; align-items: flex-start; border-bottom: 1px solid var(--line); font-size: .9rem; }
.rule-list li:last-child, .divided > :last-child { border-bottom: 0; }
.rule-index { color: var(--clay); font: italic 1.05rem var(--serif); min-width: 1.15em; }
.pin-label { display: flex; margin-bottom: 3px; font-size: .72rem; }
.divided > * { padding: 11px 0; border-bottom: 1px solid var(--line); }
.divided > :first-child { padding-top: 0; }
.divided > :last-child { padding-bottom: 0; }
.item-link { display: flex; gap: 10px; align-items: center; min-height: 62px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.item-link > .icon:last-child { color: var(--muted); margin-left: auto; }
.tile-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 11px; color: var(--green); background: var(--soft); }
summary { display: flex; align-items: center; gap: 5px; min-height: 44px; font-weight: 600; color: var(--green); font-size: .87rem; cursor: pointer; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; width: 16px; font: 1.05rem var(--serif); }
details[open] > summary::before { content: "−"; }
.profile-head { display: flex; align-items: center; gap: 12px; }
.profile-head > div { min-width: 0; }
.profile-head h1 { margin-top: 3px; }
.mini-person { padding: 8px 0; min-height: 45px; }
.mini-person .btn { margin-left: auto; }
.match-line { justify-content: space-between; }
.btn[aria-pressed="true"] { background: var(--soft); color: #304b36; border-color: #9ba98f; }
.link-input { font: .78rem/1.3 ui-monospace, monospace !important; color: var(--muted); }
.tear { border: 0; border-top: 1px dashed var(--line); margin: 5px 0; }
dialog { width: min(calc(100% - 32px), 402px); max-height: 85vh; color: var(--ink); border: 1px solid #b5ac99; border-radius: 17px; padding: 20px; background: var(--card); box-shadow: 0 18px 70px #28271338; }
dialog::backdrop { background: #282b247b; }
dialog p { color: var(--muted); font-size: .9rem; margin: 9px 0 16px; line-height: 1.48; overflow-wrap: anywhere; }
.dialog-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.dialog-actions > * { flex: 1; }
#notice { position: fixed; bottom: calc(var(--nav-height) + 9px); width: max-content; max-width: min(calc(100% - 28px), 430px); left: 50%; transform: translateX(-50%); z-index: 6; background: #2e4035; color: #fffdf6; border-radius: 12px; padding: 5px 5px 5px 13px; font-size: .86rem; box-shadow: 0 4px 15px #35322733; display: flex; align-items: center; gap: 7px; }
#notice button { color: inherit; flex: none; width: 44px; height: 44px; }
@media (max-width: 350px) {
  :root { --gutter: 14px; }
  .hero-row { grid-template-columns: minmax(0,1fr) 31%; }
  .card-body { grid-template-columns: minmax(0,1fr) 62px; gap: 5px; }
  .event-card { padding: 13px 12px 11px; }
  .two-fields { grid-template-columns: 1fr; }
  .match-line { align-items: flex-start; flex-wrap: wrap; }
}
@media (min-width: 600px) {
  .home-intro { padding-top: 28px; }
  .card-body { grid-template-columns: minmax(0,1fr) 91px; }
}
