* { box-sizing: border-box }
:root { font-family: Inter, "Segoe UI", sans-serif; font-size: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); }
.landing { --bg:#10140f; --ink:#eff2e8; --muted:#b4bdac; --rule:#363f31; --accent:#c0ed88; min-height:100vh; display:flex; flex-direction:column; }
a { color:inherit; text-underline-offset:.3em }
a:focus-visible,select:focus-visible { outline:3px solid currentColor; outline-offset:5px }
header,footer,.hero { width:min(90%,92rem); margin-inline:auto }
header,footer { display:flex; align-items:center; justify-content:space-between; gap:1rem; }
header { min-height:5.6rem; border-bottom:1px solid var(--rule) }
.brand,nav a,.action { text-decoration:none }
.brand { display:inline-flex; align-items:center; gap:.7rem; font:700 .95rem/1.1 "Courier New",monospace; letter-spacing:.09em }
.brand img { width:2.8rem; height:2.8rem }
nav { display:flex; gap:clamp(1rem,3vw,3rem); font-size:.94rem }
nav a:hover { text-decoration:underline }
.hero { display:grid; grid-template-columns:.88fr 1.12fr; align-items:center; flex:1; padding-block:clamp(3rem,6vw,7rem); gap:2rem }
.kicker,figcaption,footer { font-family:"Courier New",monospace }
.kicker { color:var(--accent); text-transform:uppercase; font-size:.82rem; letter-spacing:.13em; line-height:1.6 }
.kicker span { display:inline-block; width:2rem; height:1px; background:currentColor; vertical-align:middle; margin-right:.5rem }
.intro h1 { font-size:clamp(4.1rem,7vw,8rem); line-height:.97; letter-spacing:-.075em; margin:1.5rem 0; font-weight:550 }
.intro h1 i { display:block; font-family:Georgia,serif; font-weight:400; color:var(--accent); letter-spacing:-.08em }
.lede,.summary { max-width:36ch; font-size:clamp(1.12rem,1.45vw,1.45rem); line-height:1.6; color:var(--muted) }
.action { display:inline-block; background:var(--accent); color:#18200e; padding:1rem 1.4rem; margin-top:.8rem; font-weight:650; border-radius:3px }
.action:hover { background:#dcffac }
figure { margin:0 }
.instrument { aspect-ratio:1.18; position:relative; background:radial-gradient(ellipse,#222d1b55,transparent 68%),radial-gradient(#48523c99 .7px,transparent .85px); background-size:auto,16px 16px; border:1px solid var(--rule); overflow:hidden }
.instrument img { width:100%; height:100%; object-fit:cover }
figcaption,footer { font-size:.82rem; color:var(--muted); line-height:1.6 }
.landing figcaption { display:flex; justify-content:space-between; padding:.7rem 0; gap:.8rem }
footer { border-top:1px solid var(--rule); padding:1.25rem 0 }
.reader { --bg:#fafbf9; --ink:#15232b; --muted:#43535d; --rule:#ccd5d7; --accent:#345b4a; color-scheme:light }
.reader.night { --bg:#141a1e; --ink:#edf1ee; --muted:#b4c2c5; --rule:#39484b; --accent:#b3dfad; color-scheme:dark }
.reader .brand img { background:#11170e; border-radius:4px }
.reader header label { display:flex; gap:.65rem; align-items:center; font-size:.94rem }
select { padding:.55rem; background:var(--bg); color:var(--ink); border:1px solid var(--muted); border-radius:4px; font:inherit }
.paper { max-width:44rem; margin:clamp(2.5rem,7vw,6rem) auto; width:90% }
.paper h1 { font-size:clamp(2.8rem,6vw,4.8rem); letter-spacing:-.055em; line-height:1.04; margin:1rem 0 }
.paper section { margin-top:2.3rem; border-top:1px solid var(--rule); padding-top:.9rem }
.paper section p { line-height:1.75; font-size:1.125rem }
.paper figure img { width:100%; height:15rem; object-fit:contain; background:#10140f }
@media(max-width:720px){ .hero {grid-template-columns:1fr; gap:2.1rem} .intro h1 i {display:inline} .reader header {flex-wrap:wrap;padding-block:1rem} .landing header .brand {font-size:.8rem;gap:.25rem} .landing .brand img{width:2rem} footer{flex-wrap:wrap} }
.landing header { min-height:3.65rem }
.landing footer { padding-block:.65rem }
.invitation { color:var(--accent); margin-top:1.5rem; font: .94rem/1.5 "Courier New",monospace }
.register { color:#939c8b; letter-spacing:.12em }
.admin { width:min(90%,72rem); margin:3rem auto }
.admin summary { cursor:pointer; font-size:1.25rem; font-weight:650; padding:.8rem 0 }
.admin form { max-width:40rem }
.admin label { display:grid; gap:.4rem; margin:1rem 0; font-weight:600 }
.admin input,.admin textarea,.admin button { font:inherit; padding:.6rem; border:1px solid #77857e; border-radius:4px }
.admin textarea { min-height:4rem }
.admin button { cursor:pointer; background:#203b2e; color:white; margin-bottom:.5rem }
.admin iframe { width:100%; height:65vh; border:1px solid var(--rule) }
@media(min-width:721px) {
  .hero { padding-block:clamp(1rem,4vh,3rem) }
  .instrument { height:min(62vh,39rem); aspect-ratio:auto }
  .instrument img { object-fit:contain }
  .intro h1 { font-size:clamp(3.5rem,min(7vw,14vh),8rem) }
}
.kicker b { font-weight:inherit }
.editor-bar { background:#e1e9dc; color:#182218; padding:.55rem 5%; display:flex; flex-wrap:wrap; gap:.7rem; align-items:center; font:1rem/1.4 "Segoe UI",sans-serif }
.editor-bar button,.editor-bar input { font:inherit; padding:.35rem .7rem; border-radius:4px; border:1px solid #64745f }
.editor-bar button,.editor-bar summary { cursor:pointer }
.editor-bar #actions:not([hidden]) { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem }
.editor-bar details label { display:block; padding:.25rem }
.editing [data-field] { outline:1px dashed #b2c39d; outline-offset:3px; cursor:text }
.editing [data-field]:focus { outline:2px solid #c0ed88 }
.builder input,.builder button { font:inherit; padding:.48rem .7rem; border-radius:4px; border:1px solid var(--muted); background:var(--bg); color:var(--ink) }
.builder button { margin:.22rem; cursor:pointer }
.builder button:disabled { opacity:.45; cursor:default }
.builder #drop { border:2px dashed var(--muted); padding:1rem; margin-top:1rem }
.block-image { max-width:100%; max-height:24rem; background:#10140f }
.block-text { white-space:pre-wrap }
.builder [contenteditable] { outline:1px dashed var(--muted); outline-offset:3px }
.image-pins {position:relative;display:table;max-width:100%}
.image-pins img {display:block}
.builder .pin {position:absolute;transform:translate(-50%,-50%);border-radius:100%;margin:0;background:#263c25;color:white;font-weight:bold;padding:.2rem .45rem}
.discussion-panel {margin:1.2rem 0;border-top:1px solid var(--rule);padding-top:.8rem}
.discussion-panel small {display:block}
.discussion-panel details {padding:.6rem .4rem;border-bottom:1px solid var(--rule)}
.builder summary {cursor:pointer;font-weight:600}
.builder textarea {display:block;width:100%;min-height:4rem;font:inherit;padding:.5rem}
.discussion-panel details p {white-space:pre-wrap;overflow-wrap:anywhere}
.builder mark {background:#d7eab9;color:#202c20;cursor:pointer}
.editor-bar {background:#17271d;color:#eaf0e6;padding:.65rem 4%;gap:1rem}
.editor-bar a {color:#d0e7bd}.editor-bar button {background:#e3efd9;color:#1c3223;border:0;padding:.5rem .85rem;border-radius:6px;font-weight:600}
.editor-bar input {background:white;color:#17271d}
/* The rally is drawn in normalized court coordinates so returns meet the
   paddles at every aspect ratio. The same clock drives all three elements. */
.rally {position:relative; isolation:isolate; padding:clamp(1.1rem,3vw,2.8rem); border:1px solid #43523a; border-radius:.5rem; background:radial-gradient(ellipse at center,#293923,#10190f 80%); box-shadow:inset 0 0 3rem #080d09}
.court {position:relative; aspect-ratio:1.75; border-block:1px solid #728765; background-image:radial-gradient(#8da87f44 .8px,transparent 1px); background-size:15px 15px}
.baseline {position:absolute; left:50%; inset-block:0; border-left:1px dashed #7f946773}
.playfield {position:absolute; inset:4px 7%}
.paddle,.ball {position:absolute; background:#c7f89c; box-shadow:0 0 10px #9be87985; animation:12s linear infinite; transform:translate(-50%,-50%)}
.paddle {width:5px; height:18%; border-radius:2px}
.west {left:0; top:35%; animation-name:west-return}
.east {left:100%; top:65%; animation-name:east-return}
.ball {left:48%;top:54%;width:8px;height:8px;border-radius:50%;background:#edffbf;animation-name:rally-flight}
@keyframes rally-flight {
  0%,100% {left:0;top:35%} 12.5% {left:50%;top:100%} 25% {left:100%;top:35%}
  32% {left:72%;top:0} 50% {left:0;top:90%} 53% {left:12%;top:100%}
  75% {left:100%;top:27%} 86% {left:56%;top:0}
}
@keyframes west-return {0%,100%{top:35%} 20%{top:52%} 46%,54%{top:90%} 72%{top:56%} 96%{top:35%}}
@keyframes east-return {0%,100%{top:58%} 22%,28%{top:35%} 47%{top:61%} 71%,79%{top:27%}}
.rally input,.rally label {position:relative; z-index:1; cursor:pointer}
.rally input {accent-color:#c0ed88; margin:0 .4rem .75rem 0}
.rally label {color:#c0ccba;font: .76rem/1.4 "Courier New",monospace}
.rally input:checked ~ .court i {animation-play-state:paused}
@media(prefers-reduced-motion:reduce) {
  .rally i {animation:none}
  .rally input,.rally label {display:none}
}
