/* The contest pages share the main site's type and color system. */
.contest-page { --contest-purple: #a0a0d7; --contest-lilac: #d7c9e9; --contest-paper: #fbfaf6; background: #f7f5ef; }
.contest-page button, .contest-page input { font: inherit; }
.contest-page button { cursor: pointer; }
.contest-page button:disabled { cursor: not-allowed; opacity: .52; }
.contest-page :focus-visible { outline: 3px solid #7868bd; outline-offset: 3px; }
.contest-shell { width: min(100% - 3rem, 75rem); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

.contest-hero { margin-top: 4rem; min-height: 560px; overflow: hidden; color: #f8f5f2; background: radial-gradient(circle at 83% 35%, #323a51 0, transparent 35%), #18202d; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; align-items: center; min-height: 560px; gap: 4rem; }
.hero-copy { padding: 5rem 0; position: relative; z-index: 1; }
.contest-eyebrow, .section-index { font-size: .76rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
.contest-eyebrow { display: flex; align-items: center; gap: .8rem; color: #e3bda6; margin: 0 0 1.5rem; }
.live-dot { width: 8px; height: 8px; border-radius: 100%; background: #d98b65; box-shadow: 0 0 0 6px #d98b652b; }
.hero-copy h2 { max-width: 650px; font-size: clamp(3.25rem, 6.5vw, 6.35rem); margin: 0; line-height: .99; }
.hero-copy h2 em { display: block; color: #d2bde8; font-family: 'Fraunces', Georgia, serif; font-size: .72em; font-weight: 400; line-height: 1.35; }
.hero-lead { color: #c4c9d1; font-size: 1.12rem; max-width: 34rem; margin: 1.6rem 0 0; line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 2rem; }
.hero-link { font-size: .92rem; font-weight: 600; color: #f8f5f2; border-bottom: 1px solid #9b9fa8; padding: .45rem 0; }
.hero-link:hover { color: #e3bda6; }
.hero-small { color: #9da6b3; font-size: .78rem; margin: 2rem 0 0; }
.hero-art { width: 100%; min-height: 490px; position: relative; display: grid; place-items: center; isolation: isolate; }
.hero-visual { min-width: 0; padding: 1.2rem 0 2.2rem; }
.runner-feature { position: relative; z-index: 1; width: min(72%, 360px); transform: rotate(-7deg); }
.runner-label { margin: 0 0 .3rem; color: #eebfa3; font-size: .7rem; font-weight: 800; letter-spacing: .15em; }
.runner-caption { padding: 1.2rem .2rem 0; color: #f8f5f2; text-align: left; }
.runner-name { margin: 0; font-size: clamp(1.25rem, 2.5vw, 1.8rem); font-weight: 700; line-height: 1.2; overflow-wrap: anywhere; }
.runner-date { margin: .3rem 0 0; color: #c5cbd6; font-size: .8rem; }
.art-orbit { position: absolute; border: 1px solid #ffffff20; border-radius: 50%; transform: rotate(-19deg); }
.orbit-one { width: 84%; aspect-ratio: 1; }
.orbit-two { width: 116%; aspect-ratio: 1; }
.art-sheet { position: relative; width: 100%; aspect-ratio: 4 / 5; overflow: hidden; background: #d0d9d1; border: 12px solid #f7f2e8; box-shadow: 22px 26px 0 #ffffff18, 0 30px 70px #0006; }
.art-sheet > img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #232c36; }
.sheet-scene { position: absolute; inset: 0; overflow: hidden; background: #443b66; }
.sheet-sun { position: absolute; width: 34%; aspect-ratio: 1; top: 14%; right: 12%; border-radius: 50%; background: #eeba80; }
.sheet-hill { position: absolute; display: block; width: 115%; height: 66%; border-radius: 50% 50% 0 0; }
.hill-one { background: #b28ba0; left: -45%; top: 45%; transform: rotate(16deg); }
.hill-two { background: #626d82; right: -52%; top: 57%; transform: rotate(-16deg); }
.sheet-mark { position: absolute; z-index: 1; bottom: 1rem; right: 1.2rem; font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: 2rem; color: #fff; }
.hero-scribble { position: absolute; top: 8%; left: 3%; color: #eed6b4; font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: clamp(1.5rem, 2.8vw, 2.8rem); line-height: 1.05; transform: rotate(-10deg); }
.scribble-star { display: block; font-family: sans-serif; font-style: normal; font-size: 1.5rem; margin: .5rem 0 0 3.5rem; }
.art-stamp { position: absolute; right: 1%; bottom: 9%; display: grid; place-items: center; width: 88px; aspect-ratio: 1; border: 1px solid #dbcbd8; border-radius: 50%; color: #dbcbd8; font-size: .8rem; transform: rotate(15deg); }

.state-strip { display: flex; align-items: center; gap: 1rem; padding: 1.05rem 1.3rem; margin: 1.5rem 0 0; border-radius: .8rem; border: 1px solid #d7d2c7; background: #fffdf9; }
.state-strip[data-kind="open"] { background: #edf3ed; border-color: #c9decf; }
.state-strip[data-kind="closed"] { background: #f6f0e5; border-color: #e4d4b9; }
.state-strip[data-kind="error"] { background: #fbefeb; border-color: #edc6bd; }
.state-icon { display: grid; place-items: center; flex: none; font-size: 1.55rem; color: var(--accent); width: 2.5rem; height: 2.5rem; }
.state-strip strong { display: block; line-height: 1.25; }
.state-strip p { color: #62656a; margin: .2rem 0 0; font-size: .88rem; line-height: 1.4; }
.state-retry { margin-left: auto; flex: none; border: 1px solid #c6bdb2; border-radius: .5rem; padding: .5rem .8rem; background: #fff; color: var(--ink); font-weight: 600; }

.winner-section, .enter-section, .rules-section, .archive-section, .timing-section { padding-top: clamp(4.5rem, 8vw, 7.5rem); }
.winner-section { padding-top: calc(var(--header-h) + 2.3rem); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.8rem; }
.section-index { color: var(--accent); margin: 0 0 .65rem; }
.section-heading h2 { margin: 0; font-size: clamp(2.25rem, 4.1vw, 3.9rem); line-height: 1.06; }
.section-aside { color: var(--muted); font-family: 'Fraunces', Georgia, serif; font-style: italic; font-size: .95rem; padding-bottom: .35rem; }
.winner-card { overflow: hidden; border-radius: 1.2rem; background: #fffdf9; border: 1px solid #ded6cb; box-shadow: 0 18px 45px #18202d16; }
.winner-visual { height: clamp(380px, 58vw, 680px); background: #222a32; overflow: hidden; }
.winner-visual > img { width: 100%; height: 100%; object-fit: contain; background: #222a32; }
.winner-placeholder { height: 100%; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1rem; background: radial-gradient(circle at 65% 40%, #e7d3c2 0 17%, transparent 17.5%), linear-gradient(140deg, #abbeb5 0 48%, #797f94 48%); color: #fff; }
.winner-placeholder span { font-size: 7rem; line-height: 1; opacity: .72; }
.winner-placeholder small { font-weight: 700; letter-spacing: .2em; font-size: .65rem; }
.winner-copy { position: relative; display: block; padding: 1.5rem clamp(1.5rem, 3vw, 2.5rem) 1.7rem; }
.winner-kicker { color: var(--accent-deep); font-size: .72rem; font-weight: 700; letter-spacing: .18em; }
.winner-copy h3 { font-size: clamp(2.2rem, 3.4vw, 3.5rem); margin: .4rem 0 .3rem; line-height: 1.12; }
.winner-copy > p:not(.winner-kicker) { color: var(--ink-soft); margin: 0; }
.winner-seal { position: absolute; right: 2.5rem; bottom: 2rem; display: inline-block; padding: .55rem .9rem; border: 1px solid #c7bcb0; border-radius: 999px; color: #625a53; letter-spacing: .12em; font-size: .68rem; font-weight: 700; }

.entry-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 1.4rem; align-items: start; }
.entry-card { padding: clamp(1.5rem, 4vw, 3rem); border: 1px solid #ded9cf; border-radius: 1rem; background: #fffdf9; box-shadow: 0 15px 40px #2430430a; }
.entry-topline { display: flex; justify-content: space-between; align-items: center; gap: .8rem; color: var(--accent); font-size: .7rem; font-weight: 700; letter-spacing: .14em; }
.entry-status { color: var(--muted); letter-spacing: .02em; }
.schedule-panel { display: flex; justify-content: space-between; gap: 1.5rem; background: #e9edf0; border-radius: .7rem; padding: 1.2rem 1.4rem; margin: 1.4rem 0 2rem; }
.schedule-panel div { display: grid; gap: .2rem; }
.schedule-panel small { color: #59636c; font-size: .68rem; letter-spacing: .14em; font-weight: 700; }
.schedule-panel strong { font-size: 1.08rem; line-height: 1.35; }
.schedule-panel span:not(.schedule-icon) { color: #58616b; font-size: .84rem; }
.schedule-icon { flex: none; color: #778895; font-size: 2rem; line-height: 1; }
.entry-card fieldset { padding: 0; border: 0; margin: 0; }
.field-label { display: flex; justify-content: space-between; gap: .5rem; font-weight: 700; margin-bottom: .55rem; }
.field-label span { font-size: .7rem; color: var(--muted); font-weight: 500; }
.entry-card input[type="text"], .judge-panel input { width: 100%; padding: .82rem 1rem; border: 1px solid #c9c7bf; border-radius: .55rem; background: #fff; color: var(--ink); outline: none; }
.entry-card input[type="text"]:focus, .judge-panel input:focus { border-color: #8e7caf; box-shadow: 0 0 0 3px #8e7caf24; }
.field-hint { color: var(--muted); font-size: .78rem; margin: .5rem 0 2rem; }
.upload-zone { min-height: 174px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; padding: 1.4rem; border: 1.5px dashed #bdb4ab; border-radius: .7rem; background: #f9f7f2; text-align: center; cursor: pointer; }
.upload-zone:hover, .upload-zone:focus-within { border-color: var(--accent); background: #fcf6ef; }
.upload-symbol { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; margin-bottom: .3rem; border-radius: 50%; background: #f1e5dc; color: var(--accent); font-size: 1.5rem; }
.upload-zone strong { font-size: .94rem; }
.upload-zone > span:not(.upload-symbol) { color: var(--muted); font-size: .81rem; }
.upload-zone small { color: #8d837b; margin-top: .4rem; }
.preview { display: grid; gap: 1rem; padding: 1rem; border: 1px solid #d7d3cc; border-radius: .6rem; margin-top: .8rem; }
.preview-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.preview-heading > div { min-width: 0; display: grid; gap: .1rem; }
.preview span { color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.preview button { flex: none; width: fit-content; border: 0; padding: .3rem 0; color: var(--accent); background: none; font-size: .78rem; font-weight: 700; }
.preview-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: .65rem; }
.preview-item { min-width: 0; margin: 0; }
.preview-item img { width: 100%; aspect-ratio: 1; object-fit: contain; border-radius: .4rem; background: #e9e7e1; }
.preview-item figcaption { margin-top: .35rem; overflow: hidden; color: var(--muted); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.consent-group { display: grid; gap: .75rem; margin: 2rem 0 1.5rem; }
.consent { display: flex; gap: .7rem; align-items: start; color: #444b53; font-size: .86rem; line-height: 1.5; }
.consent input { flex: none; width: 1.15rem; height: 1.15rem; margin: .13rem 0 0; accent-color: var(--accent); }
.consent a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; }
.form-message { padding: .8rem 1rem; border-radius: .5rem; background: #fbefeb; color: #8b3529; font-size: .85rem; margin: 0 0 1rem; }
.form-message[data-kind="success"] { background: #edf3ed; color: #28603e; }
.review-button { width: 100%; justify-content: space-between; }
.review-panel h3 { font-size: 2.6rem; margin: 0 0 1.4rem; }
.review-eyebrow { color: var(--accent); letter-spacing: .16em; font-weight: 700; font-size: .72rem; margin: 0 0 .5rem; }
.review-art { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(160px, .55fr); align-items: center; gap: 1.1rem; padding: 1rem; border-radius: .7rem; background: #f5f1ea; }
.review-images { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .45rem; max-height: 290px; overflow: auto; }
.review-images img { width: 100%; aspect-ratio: 1; object-fit: contain; background: #e6e2da; border-radius: .35rem; }
.review-art div { display: grid; gap: .3rem; overflow-wrap: anywhere; }
.review-art span { color: var(--muted); font-size: .85rem; }
.review-panel > p:not(.review-eyebrow) { color: var(--ink-soft); font-size: .9rem; }
.review-actions { display: flex; flex-wrap: wrap; gap: .7rem; }
.review-panel .form-message { margin: 1rem 0 0; }
.entry-aside { min-height: 100%; border-radius: 1rem; padding: clamp(1.5rem, 3vw, 2.5rem); background: #e9e3ea; overflow: hidden; }
.aside-art { height: 200px; margin: -2.5rem -2.5rem 2.5rem; position: relative; background: radial-gradient(circle at 74% 38%, #d4b5ae 0 12%, transparent 12.3%), linear-gradient(145deg, #bbc4d4 0 55%, #b8a5c2 55%); overflow: hidden; }
.aside-art span { position: absolute; font-size: 9rem; line-height: 1; top: .6rem; left: 20%; color: #f8edd5; transform: rotate(-20deg); }
.aside-art i { position: absolute; width: 80%; height: 130%; border: 1px solid #fefefa88; border-radius: 50%; top: 15%; right: -40%; }
.entry-aside h3 { font-size: clamp(2rem, 3vw, 3rem); margin: .6rem 0 1rem; }
.entry-aside > p:not(.section-index) { color: #50515b; font-size: .92rem; }
.entry-aside a { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 2px; font-weight: 700; }
.proof-flow { display: flex; align-items: center; gap: .55rem; padding: 1rem .65rem; margin: 1.5rem 0 2rem; background: #f8f5f7; border: 1px solid #cfc1d0; border-radius: .7rem; }
.proof-mini { flex: 1; min-width: 0; background: #fff; border: 1px solid #c7cbd0; border-radius: .45rem; box-shadow: 0 5px 14px #202b351a; overflow: hidden; }
.proof-mini-top { display: flex; justify-content: space-between; align-items: center; gap: .3rem; padding: .3rem .45rem; background: #25303c; color: #fff; font-size: .52rem; font-weight: 700; white-space: nowrap; }
.proof-mini-dots { color: #d4a07e; letter-spacing: .13em; }
.proof-mini-grid { position: relative; height: 98px; background-color: #fcfcfa; background-image: linear-gradient(#dfe5e2 1px, transparent 1px), linear-gradient(90deg, #dfe5e2 1px, transparent 1px); background-size: 17px 17px; }
.proof-mini-grid::before, .proof-mini-grid::after { content: ''; position: absolute; background: #84939a; }
.proof-mini-grid::before { width: 1px; height: 100%; left: 50%; }
.proof-mini-grid::after { height: 1px; width: 100%; top: 50%; }
.proof-mini-grid svg { position: relative; z-index: 1; width: 100%; height: 100%; }
.proof-mini-toolbar { display: flex; align-items: center; justify-content: space-between; gap: .3rem; padding: .25rem .4rem; color: #66717b; font-size: .55rem; }
.proof-png-control { display: inline-flex; align-items: center; gap: .12rem; padding: .18rem .28rem; border: 2px solid var(--accent); border-radius: .3rem; color: var(--ink); background: #fff8f3; font-size: .55rem; font-weight: 800; }
.proof-png-control svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2; }
.proof-flow-arrow { flex: none; display: grid; justify-items: center; color: var(--accent-deep); line-height: 1; }
.proof-flow-arrow span { font-size: .53rem; font-weight: 800; white-space: nowrap; }
.proof-flow-arrow b { font-size: 2rem; font-weight: 400; }
.proof-upload { flex: none; display: grid; place-items: center; align-content: center; width: 69px; height: 88px; border: 1.5px dashed var(--accent); border-radius: .5rem; background: #fffaf6; color: var(--accent-deep); }
.proof-upload span { font-size: 1.55rem; line-height: 1; }
.proof-upload strong { font-size: .68rem; }
.aside-facts { margin-top: 2rem; border-top: 1px solid #bfb8c6; }
.aside-facts div { display: flex; align-items: baseline; gap: 1.5rem; border-bottom: 1px solid #bfb8c6; }
.aside-facts span { color: #9d5464; font-size: .72rem; font-weight: 700; }
.aside-facts p { font-size: .85rem; }

.rules-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 4rem; border-top: 1px solid #d7d2c7; padding-top: 2rem; }
.criteria-panel { padding: clamp(1.4rem, 3vw, 2.4rem); margin-bottom: 2.5rem; border: 1px solid #d7d2c7; border-radius: 1rem; background: #fffdf9; box-shadow: 0 12px 28px #2430430a; }
.criteria-intro h3 { margin: .2rem 0 .6rem; font-size: clamp(1.9rem, 3.3vw, 2.7rem); }
.criteria-intro > p:last-child { max-width: 45rem; margin: 0 0 1.5rem; color: var(--ink-soft); font-size: .92rem; line-height: 1.55; }
.criteria-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.criteria-grid > div { min-width: 0; padding: 1.15rem; border: 1px solid #e0d9d0; border-radius: .7rem; background: #f8f5ef; }
.criteria-grid span { color: var(--accent); font-size: .66rem; font-weight: 800; letter-spacing: .12em; }
.criteria-grid h4 { margin: .6rem 0 .35rem; font-size: 1.15rem; }
.criteria-grid p { margin: 0; color: var(--ink-soft); font-size: .84rem; line-height: 1.5; }
.rule-number { color: var(--accent); font-size: .76rem; font-weight: 700; }
.rules-grid h3 { margin: .5rem 0; font-size: 1.2rem; }
.rules-grid p { color: var(--ink-soft); font-size: .89rem; margin: 0; }
.timing-intro { color: var(--ink-soft); margin: -.5rem 0 1.4rem; max-width: 47rem; }
.timing-table-wrap { overflow-x: auto; border: 1px solid #d8d1c7; border-radius: .8rem; background: #fffdf9; }
.timing-table { width: 100%; border-collapse: collapse; min-width: 660px; text-align: left; }
.timing-table th, .timing-table td { padding: 1rem 1.2rem; border-bottom: 1px solid #e4ded5; vertical-align: top; font-size: .86rem; }
.timing-table thead th { background: #e9e3ea; color: #544a58; font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.timing-table tbody tr:last-child th, .timing-table tbody tr:last-child td { border-bottom: 0; }
.timing-table tbody th { width: 32%; font-weight: 700; }
.timing-table tbody td { color: var(--ink-soft); }
.timing-note { color: var(--ink-soft); font-size: .86rem; max-width: 60rem; margin: 1rem 0 0; }
.archive-section { padding-bottom: clamp(5rem, 9vw, 8rem); }
.archive-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.archive-empty { grid-column: 1 / -1; padding: 2rem; border: 1px dashed #c9c2b7; border-radius: .8rem; color: var(--muted); margin: 0; }
.archive-item { overflow: hidden; border: 1px solid #ded9cf; border-radius: .8rem; background: #fffdf9; }
.archive-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: #232c36; }
.archive-item div { display: grid; gap: .25rem; padding: 1rem; }
.archive-item strong { font-size: .95rem; overflow-wrap: anywhere; }
.archive-item span { color: var(--muted); font-size: .78rem; }
.archive-item .archive-rank { color: var(--accent-deep); font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
@media (max-width: 850px) {
  .hero-grid { gap: 1rem; }
  .hero-art { min-height: 400px; }
  .entry-layout { grid-template-columns: 1fr; }
  .entry-aside { min-height: 0; }
}
@media (max-width: 650px) {
  .contest-shell { width: min(100% - 2rem, 75rem); }
  .hero-grid { display: block; min-height: 0; }
  .hero-copy { padding: 4rem 0 1.5rem; }
  .hero-copy h2 { font-size: clamp(3.1rem, 12vw, 5rem); }
  .hero-art { min-height: 300px; max-width: 430px; margin: auto; }
  .runner-feature { width: 56%; }
  .art-sheet { border-width: 8px; }
  .hero-scribble { left: 8%; }
  .section-heading { display: block; }
  .section-aside { display: block; margin-top: .6rem; }
  .rules-grid { grid-template-columns: 1fr; }
  .criteria-grid { grid-template-columns: 1fr; }
  .winner-visual { height: clamp(260px, 72vw, 440px); }
  .winner-copy { padding: 1.5rem; }
  .winner-seal { position: static; margin-top: 1rem; }
  .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aside-art { margin: -1.5rem -1.5rem 2rem; }
}
@media (max-width: 430px) {
  .archive-grid { grid-template-columns: 1fr; }
  .review-actions .btn { width: 100%; justify-content: center; }
  .review-art { grid-template-columns: 1fr; }
  .preview-heading { align-items: stretch; flex-direction: column; }
  .state-strip { align-items: start; flex-wrap: wrap; }
  .state-retry { margin-left: 3.5rem; }
  .proof-flow { gap: .3rem; padding-inline: .4rem; }
  .proof-flow-arrow span { font-size: .48rem; }
  .proof-upload { width: 60px; }
}
