:root { color-scheme: dark; font-family: "Segoe UI", "Malgun Gothic", sans-serif; color: #edf1ec; background: #111714; --muted: #9fae9f; --accent: #d2f56a; --border: #344036; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1264px; margin: auto; padding: 0 48px; }
button, input, a { -webkit-tap-highlight-color: transparent; }
button, input { font: inherit; }
button, a { touch-action: manipulation; }
button { border: 1px solid var(--border); background: #202b22; color: #edf1ec; padding: 13px 20px; border-radius: 8px; cursor: pointer; font-weight: 650; white-space: nowrap; transition: background .12s, border-color .12s; }
button:hover:not(:disabled) { background: #344334; border-color: #79976a; }
button:disabled { opacity: .35; cursor: default; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
header { height: 104px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); }
.brand { font-size: 28px; font-weight: 900; letter-spacing: -1.5px; display: flex; gap: 5px; align-items: center; }
.brand > span:first-child { color: var(--accent); }
.version { margin-left: 15px; border: 1px solid var(--border); padding: 5px 8px; font-size: 10px; font-weight: 500; letter-spacing: 1px; color: var(--muted); }
.connection { font-size: 12px; color: var(--muted); }
.connection::before { content: ''; width: 7px; height: 7px; background: #f4bf75; display: inline-block; border-radius: 100%; margin-right: 8px; }
.connection.online::before { background: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 16px; }
#open-settings { padding: 8px 12px; font-size: 12px; }
#settings-dialog { width: min(420px, calc(100% - 36px)); padding: 24px; color: #edf1ec; background: #1a241b; border: 1px solid #43523b; border-radius: 18px; }
#settings-dialog::backdrop { background: #070d09b8; }
.settings-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.settings-heading h2 { margin: 0; font-size: 22px; }
.settings-heading button { padding: 8px 12px; font-size: 12px; }
.settings-toggle { display: flex; align-items: center; justify-content: space-between; gap: 20px; cursor: pointer; color: #edf1ec; font-size: 15px; }
.settings-toggle small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.settings-toggle input { width: 22px; height: 22px; flex-shrink: 0; accent-color: var(--accent); cursor: pointer; }
.developer-tools { margin: 22px 0 0; border-top: 1px solid var(--border); padding-top: 20px; color: var(--accent); font-size: 13px; }
#settings-notice { margin: 12px 0 0; color: #f5ce9d; font-size: 12px; }
#settings-notice:empty { display: none; }
.entry { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 70px; min-height: 680px; padding: 60px 0; }
.eyebrow { font-size: 11px; font-weight: 700; letter-spacing: 2px; color: var(--muted); }
.intro h1 { font-size: clamp(42px, 4.6vw, 64px); line-height: 1.22; letter-spacing: -3px; margin: 28px 0 24px; }
.intro h1 span { color: var(--accent); }
.description { color: #b7c4b6; font-size: 15px; line-height: 1.9; }
.intro-hands { display: flex; gap: 14px; margin-top: 30px; }
.intro-hands span { display: grid; place-items: center; font-size: 34px; width: 70px; height: 70px; background: #202c20; border: 1px solid var(--border); border-radius: 50%; }
.intro-hands span:nth-child(2) { transform: translateY(-8px); background: #334327; }
.entry-card { border: 1px solid #43523b; background: #1a241b; border-radius: 18px; padding: 35px; }
.entry-card h2 { font-size: 27px; letter-spacing: -1px; margin: 14px 0; }
.entry-card p:not(.eyebrow) { font-size: 13px; line-height: 1.9; color: #aab9a6; }
.primary { background: var(--accent); color: #1b2710; border-color: var(--accent); }
.primary:hover:not(:disabled) { background: #e3ff99; color: #15220a; border-color: #e3ff99; }
#create, #solo, #local { width: 100%; text-align: left; display: flex; justify-content: space-between; margin-top: 20px; padding: 17px 20px; }
.local-key-guide { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.local-key-guide p { margin: 10px 0; padding: 12px; background: #111a13; border-radius: 8px; }
.local-key-guide strong { color: var(--accent); }
#local-controls { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.local-player-controls { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 12px; border: 1px solid var(--border); border-radius: 12px; }
.local-player-controls > strong { font-size: 13px; color: var(--muted); }
#local-actions { justify-content: center; margin-top: 20px; }
.local-match #code-label { letter-spacing: 0; font-family: inherit; }
.local-match .opponent[data-outcome="win"] { border-color: #c5e978; background: #293a23; box-shadow: inset 0 0 0 1px #c5e978; }
.local-match .opponent[data-outcome="lose"] { border-color: #cf9585; background: #30241f; box-shadow: inset 0 0 0 1px #cf9585; }
.local-match .opponent[data-outcome="tie"] { border-color: #85938a; border-style: dashed; }
@media (max-width: 950px) { #local-controls { gap: 12px; } #local-controls .hand-buttons { flex-wrap: wrap; justify-content: center; } }
@media (max-width: 650px) { .mode-picker button { padding: 10px 6px; font-size: 12px; } .local-player-controls { padding: 14px 6px; } #local-controls .hand-buttons button { padding: 8px; gap: 5px; } .local-key-guide { gap: 8px; } }
.bot-picker { border: 0; padding: 0; margin: 20px 0 10px; display: grid; gap: 8px; min-width: 0; }
.bot-picker legend { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.bot-picker label { display: flex; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: 8px; padding: 12px; cursor: pointer; background: #151f17; }
.bot-picker label:has(input:checked) { border-color: var(--accent); background: #2b3823; }
.bot-picker input { accent-color: var(--accent); width: 16px; height: 16px; flex-shrink: 0; }
.bot-picker strong { display: block; color: #edf1ec; font-size: 13px; }
.bot-picker small { display: block; color: var(--muted); margin-top: 4px; font-size: 11px; line-height: 1.5; }
.entry-card .bot-description { font-size: 12px !important; min-height: 46px; }
.evolved-picker { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; display: grid; gap: 9px; }
.evolved-picker select { width: 100%; padding: 11px; border-radius: 8px; border: 1px solid #6a8549; background: #111a13; color: var(--accent); font: inherit; }
.evolved-picker small { color: var(--muted); font-size: 10px; line-height: 1.7; }
.evolved-picker select:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.bot-match-note { color: #b7c4b6; font-size: 12px; line-height: 1.8; margin: -8px 0 20px; }
.mode-picker { display: flex; gap: 5px; padding: 4px; margin-bottom: 25px; background: #111a13; border-radius: 10px; }
.mode-picker button { flex: 1; padding: 10px; background: transparent; border-color: transparent; color: var(--muted); }
.mode-picker button[aria-pressed="true"] { color: var(--accent); background: #2b3823; border-color: #43523b; }
.divider { display: flex; align-items: center; gap: 15px; margin: 26px 0; color: #83957e; font-size: 11px; }
.divider::before, .divider::after { content: ''; height: 1px; flex: 1; background: var(--border); }
label { font-size: 12px; color: #b2c0ad; }
.join-row { display: flex; gap: 10px; margin-top: 10px; }
#join { flex-shrink: 0; }
input[type="text"] { width: 100%; min-width: 0; background: #111a13; color: #edf1ec; border: 1px solid var(--border); border-radius: 8px; padding: 14px; font-family: ui-monospace, monospace; letter-spacing: 5px; }
input::placeholder { color: #5b7057; }
.room-bar { display: flex; justify-content: space-between; gap: 15px; align-items: center; margin: 25px 0; font-size: 12px; }
.room-bar > div { display: flex; gap: 18px; align-items: center; }
#code-label { font-size: 19px; letter-spacing: 3px; color: var(--accent); font-family: ui-monospace, monospace; }
.text-button { border: none; background: none; padding: 6px 0; color: #b6c4b0; font-size: 12px; }
.match-heading { text-align: center; margin: 36px 0 30px; }
.match-heading h1 { font-size: 31px; letter-spacing: -1px; margin: 12px 0; }
.match-heading > p:last-child { color: var(--muted); font-size: 13px; min-height: 20px; }
.battlefield { display: grid; grid-template-columns: 1fr 150px 1fr; gap: 22px; }
.player-card { border: 1px solid var(--border); border-radius: 16px; padding: 22px 26px 18px; background: #1a231c; text-align: center; }
.player-card.mine { border-color: #6a8549; background: #202d1e; }
.mine[data-outcome="win"] { border-color: #c5e978; background: radial-gradient(ellipse at 50% 30%, #344727 0%, #202d1e 75%); box-shadow: inset 0 0 0 1px #c5e978, 0 0 28px #d2f56a0c; }
.mine[data-outcome="lose"] { border-color: #cf9585; background: radial-gradient(ellipse at 50% 30%, #3b2b26 0%, #251f1b 75%); box-shadow: inset 0 0 0 1px #cf9585, 0 0 28px #df9a890a; }
.mine[data-outcome="tie"] { border-color: #85938a; border-style: dashed; background: #202722; box-shadow: none; }
.mine[data-outcome="lose"] .badge { color: #efb8a8; background: #48332c; }
.mine[data-outcome="tie"] .badge { color: #b5c1b9; background: #303a33; }
.card-heading { display: flex; justify-content: space-between; align-items: center; font-size: 15px; font-weight: 700; }
.card-heading small { color: var(--muted); font-size: 10px; font-weight: 400; margin-left: 5px; }
.badge { font-size: 10px; padding: 5px 8px; border-radius: 5px; background: #31402c; color: #b8d99d; }
.hand { height: 137px; display: grid; place-items: center; font-size: 82px; font-family: "Segoe UI Emoji", sans-serif; color: #677663; }
.hand-row { position: relative; display: grid; align-items: center; }
.hand-row > .cps-meter { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 64px; }
.cps-meter { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cps-track { position: relative; height: 76px; width: 18px; background: #111a13; border: 1px solid #627653; border-radius: 5px; }
.cps-fill { position: absolute; bottom: 0; left: 0; width: 100%; height: 0; background: var(--accent); border-radius: 3px; transition: height .07s linear; }
.cps-threshold { position: absolute; top: -1px; left: -8px; width: 32px; border-top: 2px solid #d2f56a; text-align: right; padding-right: 1px; padding-top: 3px; font-size: 9px; color: #edf1ec; }
.cps-meter strong { font-size: 11px; white-space: nowrap; }
.cps-status { min-height: 14px; font-size: 10px; white-space: nowrap; visibility: hidden; }
.cps-warning { display: none; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #fff1cc; background: #612c22; border: 1px solid #ffb399; border-radius: 5px; padding: 3px; font-size: 17px; line-height: 1; }
.cps-meter[data-stunned="true"] { color: #ffb399; }
.cps-meter[data-stunned="true"] .cps-track { border-color: #ffb399; box-shadow: 0 0 0 2px #ffb39933; }
.cps-meter[data-stunned="true"] .cps-fill { background: repeating-linear-gradient(135deg, #d2775e 0 5px, #9f4e3b 5px 10px); }
.cps-meter[data-stunned="true"] .cps-warning { display: block; }
.cps-meter[data-stunned="true"] .cps-status { visibility: visible; }
.hand-row:has(.cps-meter[data-stunned="true"]) .hand { opacity: .55; }
.player-card h2 { font-size: 16px; margin: 8px 0; font-weight: 650; }
.official { min-height: 17px; font-size: 11px; color: #9bad94; margin: 10px 0 22px; }
.score { border-top: 1px solid var(--border); padding-top: 18px; display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.score strong { font-size: 34px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -1.5px; }
.mine .score strong { color: var(--accent); }
.score span { font-size: 10px; color: var(--muted); }
.ping { color: #8ca182; margin-top: 12px; font-size: 10px; }
.match-center { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
#timer { font-size: 44px; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -2px; }
#advantage { --outcome-color: #9fae9f; color: var(--outcome-color); display: flex; flex-direction: column; align-items: center; gap: 5px; text-align: center; }
#advantage[data-outcome="win"] { --outcome-color: #d2f56a; }
#advantage[data-outcome="lose"] { --outcome-color: #dfa08f; }
#advantage[data-outcome="tie"] { --outcome-color: #b1beb5; }
#advantage-symbol { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid currentColor; border-radius: 50%; font-size: 27px; line-height: 1; font-weight: 600; }
#advantage[data-outcome="idle"] #advantage-symbol { font-size: 12px; border-color: var(--border); }
#advantage-label { font-size: 10px; }
#countdown { font-size: 48px; color: var(--accent); }
.score-balance { --lead-color: #a6b2a9; margin: 20px 0 30px; }
.score-balance[data-leader="mine"] { --lead-color: var(--accent); }
.score-balance[data-leader="opponent"] { --lead-color: #dfa08f; }
.balance-heading { display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: 10px; margin-bottom: 12px; color: var(--muted); font-size: 10px; }
.balance-heading > span:last-child { justify-self: end; }
#score-difference { color: var(--lead-color); font-size: 12px; font-variant-numeric: tabular-nums; }
.score-track { background: #2c342b; height: 8px; position: relative; border-radius: 5px; }
#difference-fill { position: absolute; height: 100%; left: 50%; width: 0; background: var(--lead-color); border-radius: 5px; }
.track-zero { position: absolute; left: 50%; top: -5px; width: 1px; height: 18px; background: #b4c0b4; }
#difference-marker { position: absolute; top: 50%; left: 50%; width: 8px; height: 18px; border-radius: 3px; transform: translate(-50%, -50%); background: var(--lead-color); box-shadow: 0 0 0 3px #111714; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hand-buttons { display: flex; gap: 10px; }
.hand-buttons button { display: flex; align-items: center; gap: 10px; padding: 12px 15px; font-size: 12px; }
.hand-buttons button.selected { border-color: var(--accent); background: #35462b; }
.hand-buttons button > span { font-size: 24px; }
kbd { font-family: inherit; font-size: 15px; color: #b9c9af; }
.actions { display: flex; gap: 10px; }
.rules-note { margin-top: 24px; color: #a1b198; font-size: 11px; text-align: center; line-height: 1.8; }
#notice { text-align: center; font-size: 13px; color: #f5ce9d; min-height: 20px; margin: 22px 0; line-height: 1.8; }
footer { display: flex; justify-content: space-between; border-top: 1px solid var(--border); color: #82947b; font-size: 11px; padding: 25px 0 30px; }
@media (max-width: 950px) { main { padding: 0 25px; } .entry { gap: 35px; } .entry-card { padding: 25px; } .battlefield { grid-template-columns: 1fr 110px 1fr; gap: 12px; } .player-card { padding: 18px 15px; } .controls { flex-wrap: wrap; justify-content: center; } }
@media (max-width: 650px) { main { padding: 0 18px; } header { height: 78px; } .version { display: none; } .entry { grid-template-columns: 1fr; gap: 28px; padding: 35px 0; } .intro h1 { font-size: 42px; } .intro-hands { display: none; } .room-bar { align-items: flex-start; } .room-bar > div { flex-wrap: wrap; gap: 8px; max-width: 50%; } .room-bar > div:last-child { justify-content: flex-end; text-align: right; } .match-heading h1 { font-size: 23px; } .match-heading > p:last-child { line-height: 1.8; } .battlefield { grid-template-columns: 1fr 66px 1fr; gap: 7px; } .player-card { padding: 13px 8px; } .card-heading { flex-direction: column; gap: 8px; } .hand { font-size: 54px; height: 100px; } .player-card h2 { font-size: 12px; min-height: 30px; } .official { font-size: 10px; min-height: 38px; line-height: 1.6; margin-bottom: 10px; } .score { flex-direction: column; align-items: center; gap: 4px; } .score strong { font-size: 26px; } .match-center { gap: 12px; } .match-center .eyebrow { font-size: 8px; letter-spacing: 1px; } #timer { font-size: 27px; } #advantage { font-size: 10px; padding: 6px; } .hand-buttons { gap: 6px; } .hand-buttons button { padding: 10px 12px; gap: 7px; } .actions { flex-wrap: wrap; justify-content: center; } footer { gap: 15px; font-size: 10px; } }
@media (max-width: 650px) { #advantage { padding: 0; } #advantage-symbol { width: 35px; height: 35px; font-size: 23px; } #score-difference { font-size: 11px; } }
@media (max-width: 650px) { .hand-row { min-height: 108px; } .hand-row > .cps-meter { width: 36px; } .hand-row .hand { font-size: clamp(30px, 8vw, 44px); } .cps-track { height: 60px; width: 14px; } .cps-meter { gap: 4px; } .cps-meter strong, .cps-status { font-size: 9px; } .cps-threshold { width: 28px; } }
