:root{color-scheme:light;--ink:#14284b;--muted:#5c6b80;--blue:#175fc2;--star:#f5c542;--line:#dce4ef;--surface:#fff;--wash:#f4f7fc;--input-surface:#f9fbfe;--input-line:#bdcadc;--code-surface:#f7faff;--code-line:#cedaeb;--card-line:#d2ddec}
:root[data-theme="dark"]{color-scheme:dark;--ink:#f4f4f4;--muted:#b7b7b7;--line:#343434;--surface:#171717;--wash:#0e0e0e;--input-surface:#1e1e1e;--input-line:#444;--code-surface:#1e1e1e;--code-line:#444}
*{box-sizing:border-box}
body{margin:0;background:var(--wash);color:var(--ink);font:16px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
button,input,textarea{font:inherit}
button,a,input,textarea{-webkit-tap-highlight-color:transparent}
button{cursor:pointer}
button:disabled{cursor:default;opacity:.45}
a{color:var(--blue);text-underline-offset:3px}
button:focus-visible,a:focus-visible,input:focus-visible,textarea:focus-visible{outline:3px solid #5ea5f6;outline-offset:4px}
[hidden]{display:none!important}
.site-header{position:relative;z-index:10;height:88px;background:var(--surface);border-bottom:1px solid var(--line);padding:0 max(24px,calc((100vw - 1040px)/2));display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand{display:flex;gap:12px;align-items:center;text-decoration:none;font-size:1.25rem;font-weight:760;color:var(--ink);white-space:nowrap}
.brand-star{display:grid;place-items:center;width:40px;height:40px;border-radius:13px;background:#e9f2ff;color:var(--star);font-size:2rem}
.brand-light{font-weight:450;color:var(--muted)}
.header-actions{position:relative;display:flex;align-items:center;gap:10px}
.icon-button{display:grid;place-items:center;width:40px;height:40px;padding:8px;border:1px solid var(--line);border-radius:10px;background:var(--surface);color:var(--blue);flex-shrink:0}
.icon-button svg{width:22px;height:22px}
.brand-star svg{width:29px;height:29px}
.footer-star svg{width:19px;height:19px;display:block}
.shortcut-menu{display:flex;align-items:center}
.shortcut-panel{position:absolute;top:calc(100% + 12px);right:0;width:min(360px,calc(100vw - 32px));max-height:calc(100vh - 96px);overflow-y:auto;padding:22px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:15px;box-shadow:0 12px 38px #0003;z-index:20}
.shortcut-panel h2{font-size:1.08rem;letter-spacing:-.01em;margin:0 0 6px}
.shortcut-intro{font-size:.88rem;line-height:1.5;color:var(--muted);margin:0 0 20px}
.shortcut-row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:12px;font-size:.9rem;font-weight:600}
.shortcut-keys{display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;gap:6px;font-weight:400;min-width:0}
.shortcut-keys>span{color:var(--muted);font-size:.75rem}
.shortcut-panel kbd{min-width:28px;padding:3px 7px;text-align:center;font-size:.85rem;background:var(--wash);border-bottom-width:2px;border-radius:5px;white-space:nowrap}
.shortcut-undo{margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}
main{max-width:1040px;margin:0 auto;padding:54px 24px 28px}
.page-heading{max-width:820px;margin-bottom:32px}
.eyebrow{font-size:.78rem;font-weight:750;letter-spacing:.12em;color:var(--blue);margin:0 0 10px}
h1{font-size:clamp(1.9rem,4vw,2.7rem);line-height:1.2;letter-spacing:-.035em;margin:0 0 16px;overflow-wrap:anywhere}
h2{font-size:1.45rem;line-height:1.3;letter-spacing:-.02em;margin:0 0 8px}
p{margin:0 0 16px}
#subtitle{font-size:1.06rem;color:var(--muted);margin:0}
.panel{background:var(--surface);border:1px solid var(--line);border-radius:18px;padding:28px}
.chooser{max-width:760px}
.chooser label{display:block;font-weight:650;margin-bottom:9px}
.search-row{display:flex;gap:12px}
.search-row input{width:100%;min-width:0;background:var(--input-surface);border:1px solid var(--input-line);border-radius:9px;color:var(--ink);padding:12px 14px}
.button{border:1px solid var(--blue);border-radius:9px;padding:12px 21px;background:var(--blue);color:white;font-weight:650;white-space:nowrap}
.button:hover:not(:disabled){background:#104c9d}
.secondary{background:#eef5ff;color:var(--blue);border-color:#cadcf7}
.secondary:hover:not(:disabled){background:#dcecff}
.field-help{font-size:.9rem;color:var(--muted);margin:11px 0 0}
.ready{border-top:1px solid var(--line);margin-top:23px;padding-top:22px}
.ready p{font-weight:600}
.button-row{display:flex;align-items:center;flex-wrap:wrap;gap:16px}
.text-button{border:0;background:transparent;padding:7px 0;color:var(--blue);font-weight:600}
.text-button:hover:not(:disabled){text-decoration:underline;text-underline-offset:4px}
#last-sort{font-size:.9rem;margin:20px 0 0}
.game-toolbar{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}
.game-toolbar>div:first-child{max-width:450px;flex:1}
.progress-labels{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin:0 0 9px}
.choice-count{font-size:.94rem;margin:0;font-weight:600}
.progress-percent{font-size:.94rem;font-weight:650;font-variant-numeric:tabular-nums;color:var(--ink)}
progress{display:block;width:100%;height:6px;border:0;border-radius:10px;overflow:hidden;background:#dce6f3}
progress::-webkit-progress-bar{background:#dce6f3;border-radius:10px}
progress::-webkit-progress-value{background:var(--blue);border-radius:10px;transition:width .15s}
progress::-moz-progress-bar{background:var(--blue);border-radius:10px}
.pairings{display:grid;grid-template-columns:1fr 1fr;gap:24px}
.entry-card{position:relative;display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--card-line);border-radius:20px;overflow:hidden;box-shadow:0 5px 24px #14284b04;transition:border-color .15s,transform .15s}
.entry-card:hover{border-color:#78a9ed;transform:translateY(-2px)}
.pick-entry{display:flex;flex-direction:column;align-items:flex-start;text-align:left;width:100%;flex:1;padding:28px;background:transparent;border:0;border-radius:20px;color:var(--ink);min-height:330px}
.card-top{display:flex;align-items:center;justify-content:space-between;gap:20px;width:100%;margin-bottom:24px}
.flag{min-height:44px;font-size:2.5rem;line-height:1;display:inline-flex;align-items:center}
.flag img{height:40px;max-width:64px;object-fit:contain}
.key-hint{flex-shrink:0;display:grid;place-items:center;border:1px solid var(--line);border-bottom-width:3px;border-radius:6px;color:var(--muted);height:30px;width:30px;font-size:.85rem}
.country-label{display:inline-flex;align-items:center;gap:12px;min-width:0}
.country-label .flag{flex-shrink:0}
.entry-country{font-size:1rem;font-weight:650;color:var(--muted);overflow-wrap:anywhere}
.entry-artist{font-size:clamp(1.4rem,3vw,1.85rem);font-weight:730;line-height:1.25;letter-spacing:-.025em;overflow-wrap:anywhere}
.entry-song{font-size:1.12rem;font-style:italic;color:var(--muted);margin-top:7px;margin-bottom:24px;overflow-wrap:anywhere}
.listen{font-size:.9rem;margin:0 28px 24px;align-self:flex-start}
kbd{font:inherit;font-size:.8rem;display:inline-block;background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:0 5px;color:var(--ink)}
.results-heading{display:flex;align-items:center;justify-content:space-between;margin:32px 0 22px;gap:20px}
.results-heading p:last-child{color:var(--muted);margin:0}
.total-badge{background:#e7f1ff;color:var(--blue);padding:8px 14px;border-radius:8px;font-size:.9rem;font-weight:650;white-space:nowrap}
.ranking{padding:0;list-style:none;margin:0 0 28px;display:flex;flex-direction:column;gap:8px}
.ranking li{display:flex;align-items:center;gap:18px;padding:16px 20px;border:1px solid var(--line);border-radius:12px;background:var(--surface)}
.rank-number{color:var(--muted);font-variant-numeric:tabular-nums;font-size:.95rem;width:25px;flex-shrink:0}
.ranking .flag{font-size:1.6rem;min-height:30px;min-width:36px}
.ranking .flag img{height:27px;max-width:38px}
.rank-details{flex:1;min-width:0}
.rank-artist{font-weight:650;overflow-wrap:anywhere}
.rank-song{color:var(--muted);font-size:.94rem;overflow-wrap:anywhere}
.rank-controls{display:flex;gap:12px;align-items:center}
.rank-controls button{background:transparent;border:0;padding:6px 3px;color:var(--blue);font-size:.85rem}
.export p{color:var(--muted)}
textarea{width:100%;resize:vertical;background:var(--code-surface);border:1px solid var(--code-line);border-radius:9px;padding:15px;color:var(--ink);font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:.9rem;line-height:1.6;margin:4px 0 17px}
.export .button-row{margin-bottom:0}
.notice{background:#eaf2ff;border:1px solid #b9d2f6;color:#14284b;border-radius:10px;padding:13px 17px;font-size:.94rem;margin-bottom:22px}
.error{background:#fff1f1;border-color:#f0b7b7;color:#8c2626}
#length-warning{margin:17px 0 0}
#copy-status{font-size:.9rem;color:var(--muted)}
footer{display:flex;gap:9px;align-items:center;margin-top:46px;padding-top:22px;border-top:1px solid var(--line);color:var(--muted);font-size:.85rem}
.footer-star{font-size:1.15rem;color:var(--star);flex-shrink:0}
.footer-copy{min-width:0}
.footer-copy p{margin:0}
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:640px){.site-header{height:72px;padding:0 20px}
main{padding:32px 18px 22px}
.page-heading{margin-bottom:25px}
.panel{padding:21px}
.search-row{flex-direction:column;gap:10px}
.search-row .button{align-self:flex-start}
.game-toolbar{align-items:flex-start;flex-direction:column;gap:10px}
.game-toolbar>div:first-child{width:100%;max-width:none}
.game-toolbar .button-row{gap:20px}
.pairings{gap:14px;grid-template-columns:1fr}
.pick-entry{padding:22px;min-height:215px}
.card-top{margin-bottom:12px}
.entry-artist{font-size:1.45rem}
.entry-song{margin-bottom:10px}
.listen{margin:0 22px 20px}
.results-heading{align-items:flex-start}
.ranking li{gap:11px;padding:14px 12px}
.rank-controls{flex-direction:column;gap:0}
.rank-controls button{padding:4px 2px}
.ranking .flag{min-width:29px}
.rank-number{width:22px}
footer{align-items:flex-start;margin-top:34px}
.button-row{gap:13px}
}
@media(prefers-reduced-motion:reduce){*{transition:none!important}
}

