:root { color-scheme: light; font-family: "Segoe UI", "Malgun Gothic", sans-serif; color: #17233b; background: #f1f4f9; font-size: 16px; }
* { box-sizing: border-box; }
body { margin: 0; }
header { background: #17233b; color: white; padding: 1.25rem max(1.25rem, calc((100vw - 1120px) / 2)); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
a { color: #254bae; text-underline-offset: .2em; }
header a { color: white; }
.brand { text-decoration: none; font-weight: 800; letter-spacing: .08em; }
nav { display: flex; gap: 1.2rem; font-size: .9rem; }
main { max-width: 1120px; margin: 2rem auto; padding: 0 1.25rem 3rem; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); margin: .5rem 0 1rem; line-height: 1.25; }
h2 { font-size: 1.3rem; margin: 0 0 1rem; }
p { line-height: 1.7; }
.eyebrow { color: #53627c; font-weight: 650; margin: 0; }
.topline, .score-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.badge { display: inline-block; background: #e6eafb; color: #273f8d; border-radius: .4rem; padding: .4rem .7rem; font-size: .9rem; font-weight: 700; }
.grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr); gap: 1.25rem; margin-top: 1.25rem; }
.panel { background: white; border: 1px solid #dce2ed; border-radius: .9rem; padding: 1.5rem; margin-bottom: 1.25rem; }
.grid > section > .panel:last-child { margin-bottom: 0; }
.score { font-size: 2.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.muted, small { color: #53627c; }
small { font-size: .875rem; }
progress { width: 100%; height: 1.2rem; accent-color: #dc4776; }
button, input { font: inherit; }
button { cursor: pointer; border: 1px solid #bac5d8; background: white; color: #17233b; border-radius: .5rem; padding: .85rem 1rem; min-height: 48px; font-weight: 650; }
button:hover:not(:disabled) { background: #edf1fb; border-color: #5776bf; }
button.primary { background: #284fb5; color: white; border-color: #284fb5; }
button.primary:hover:not(:disabled) { background: #1c3c8f; }
button:disabled { opacity: .5; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid #b45309; outline-offset: 3px; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.choice { display: block; width: 100%; margin: .75rem 0; padding: 1.1rem; text-align: left; line-height: 1.6; }
.choice.selected { border: 2px solid #284fb5; background: #eef3ff; }
.choice-number { color: #284fb5; margin-right: .65rem; font-weight: 800; }
.hint { padding: 1rem; border-radius: .5rem; background: #eef3ff; line-height: 1.7; margin: 1rem 0; }
.event { background: #fff2d7; color: #654000; }
.result { border-left: 4px solid #dc4776; padding-left: 1rem; margin: 1rem 0; }
.bar-item { margin: 1.1rem 0; }
.bar-label { display: flex; justify-content: space-between; gap: .7rem; margin-bottom: .45rem; line-height: 1.5; }
.bar-item progress { accent-color: #4568bc; height: .8rem; }
.bar-item.winner progress { accent-color: #dc4776; }
.positive { color: #166641; font-weight: 700; }
.negative { color: #ab2843; font-weight: 700; }
input[type=password], input[type=email] { border: 1px solid #8a99b3; border-radius: .4rem; padding: .85rem; width: 100%; margin: .75rem 0; }
label { line-height: 1.7; }
input[type=checkbox] { width: 1.1rem; height: 1.1rem; vertical-align: middle; margin-right: .5rem; }
.history { padding-left: 1.2rem; max-height: 280px; overflow-y: auto; }
.history li { margin-bottom: .7rem; line-height: 1.6; }
.danger { color: #ac2540; border-color: #df9ead; }
.login { max-width: 520px; margin: 3rem auto; }
.ending { text-align: center; padding: 3rem 1rem; }
.ending h1 { color: #b72d60; }
footer { max-width: 1120px; margin: 0 auto; padding: 1rem 1.25rem 2rem; display: flex; justify-content: space-between; gap: 1rem; font-size: .875rem; color: #53627c; }
#notice { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); background: #17233b; color: white; border-radius: .6rem; padding: 1rem 1.3rem; max-width: min(92vw, 600px); z-index: 10; box-shadow: 0 6px 24px #17233b33; }
#notice:empty { display: none; }
body.present main { max-width: 1400px; }
body.present h1 { font-size: clamp(2.5rem, 4vw, 4.5rem); }
body.present .bar-label { font-size: clamp(1.25rem, 2vw, 2rem); }
body.present .score { font-size: 4rem; }
body.present .bar-item { margin: 1.6rem 0; }
.home-links { display: flex; gap: 1rem; flex-wrap: wrap; }
.home-links a { padding: 1rem 1.5rem; border: 1px solid #bac5d8; border-radius: .5rem; text-decoration: none; font-weight: 700; }
@media (max-width: 760px) { .grid { grid-template-columns: 1fr; } header { flex-wrap: wrap; } nav { gap: 1rem; } main { margin-top: 1.25rem; } .panel { padding: 1.1rem; } footer { flex-direction: column; } .topline { align-items: flex-start; } }
