:root {
  color-scheme: dark;
  font: 100%/1.55 system-ui, sans-serif;
  color: #f4f3e4;
  background: #142626;
  --panel: #203634;
  --line: #435956;
  --muted: #bfcebf;
  --accent: #d9f48e;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(ellipse at 69% 7%, #30463a 0, transparent 52%); }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
button, input, a, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: .16rem solid #b3d9ff; outline-offset: .22rem; }
.wrap { inline-size: min(100% - clamp(2rem, 9vw, 6rem), 65rem); margin-inline: auto; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-block: 1.35rem; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: .6rem; align-items: center; font-weight: 760; text-decoration: none; }
.brand span { padding: .15em .38em; color: #19291b; background: var(--accent); border-radius: .3em; letter-spacing: -.06em; }
.quiet-link { color: var(--muted); font-size: .9rem; text-underline-offset: .25em; }
.hero { padding-block: clamp(2rem, 7vw, 4.4rem) clamp(1.2rem, 3vw, 2rem); }
h1, h2, h3, p { margin: 0; }
.kicker, .label, .count { font: 700 .77rem/1.4 ui-monospace, monospace; letter-spacing: .1em; }
.kicker { color: var(--accent); }
h1 { font-size: clamp(2.6rem, 8.7vw, 6.4rem); line-height: 1; letter-spacing: -.075em; margin-block: .2em; }
h1 em { color: var(--accent); font-weight: 500; font-family: Georgia, serif; letter-spacing: -.08em; }
.hero > p:last-child { color: var(--muted); font-size: clamp(1rem, 2vw, 1.2rem); }
.board { background: var(--panel); border: 1px solid var(--line); border-radius: 1.25rem; overflow: clip; }
.board-top { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .4rem 1rem; padding: .8rem clamp(1rem, 5vw, 2.6rem); border-bottom: 1px solid var(--line); }
.label { color: var(--muted); }
.count { color: var(--accent); }
progress { display: block; appearance: none; inline-size: 100%; border: 0; block-size: .25rem; background: #324945; color: var(--accent); }
progress::-webkit-progress-bar { background: #324945; }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.board-content { display: grid; gap: .8rem; justify-items: start; padding: clamp(1.15rem, 5vw, 2.6rem); }
h2 { font-size: clamp(1.45rem, 3.8vw, 2.5rem); line-height: 1.13; letter-spacing: -.045em; }
.board-content p:not(.kicker), .rules p, .privacy p { color: var(--muted); max-inline-size: 65ch; }
fieldset { border: 0; margin: .3rem 0 .4rem; padding: 0; min-inline-size: 0; }
legend, label:not(.categories label) { font-size: .87rem; font-weight: 700; }
legend { margin-block-end: .45rem; }
.categories, .actions { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.categories label { cursor: pointer; display: flex; gap: .42rem; padding: .52rem .75rem; border: 1px solid var(--line); border-radius: .55rem; align-items: center; }
.categories label:has(:checked) { border-color: var(--accent); background: #334840; }
input[type="radio"] { accent-color: var(--accent); margin: 0; }
button { background: #293e3b; border: 1px solid var(--line); border-radius: .64rem; padding: .7rem 1rem; cursor: pointer; font-weight: 720; }
button:hover:not(:disabled) { border-color: var(--accent); }
button:disabled { opacity: .68; cursor: wait; }
.primary { color: #172518; background: var(--accent); border-color: transparent; }
.primary span { margin-inline-start: .5em; }
input:not([type="radio"]) { padding: .65rem .8rem; color: inherit; background: #142626; border: 1px solid var(--line); border-radius: .6rem; inline-size: min(100%, 37rem); }
input::placeholder { color: #9eafa5; }
#share-form, #share-result { display: grid; gap: .65rem; justify-items: start; inline-size: 100%; margin-block: .35rem; }
.share-row { inline-size: 100%; }
.feedback { color: var(--accent); border-top: 1px solid var(--line); padding: .7rem clamp(1rem, 5vw, 2.6rem); }
.feedback.error { color: #ffc1ad; }
.history { margin-block-start: 1rem; border: 1px solid var(--line); border-radius: .8rem; padding: .7rem 1rem; }
.history summary { cursor: pointer; }
.history li { padding-block: .28rem; color: var(--muted); overflow-wrap: anywhere; }
.rules, .privacy { padding-block: clamp(1.7rem, 6vw, 3.4rem); }
.rule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.4rem; margin-block-start: 1rem; }
.rule-grid h3 { margin-block-end: .3em; }
.privacy p { margin-block: 1em; }
footer { border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem; color: var(--muted); padding-block: 1rem; font-size: .88rem; }

[data-embed] :is(.masthead, .hero, .rules, footer) { display: none; }
[data-embed] .wrap { inline-size: auto; }
[data-embed] .board { border: 0; border-radius: 0; }
[data-embed] .history { margin-inline: .9rem; }
