:root { --blue: #176ef3; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
button:focus-visible, input:focus-visible { outline: 3px solid #4d96ff; outline-offset: 3px; }
.kgames-wordmark span { font-size: 27px; font-weight: 850; letter-spacing: -.7px; }
.taobao-head-actions .header-login { padding: 0 10px; color: var(--text); font-weight: 700; }
.taobao-head-actions .account-button { gap: 5px; padding: 0 12px; }
.account-button span:last-child { max-width: 126px; overflow: hidden; text-overflow: ellipsis; }
.site-home { width: min(calc(100% - 32px),1148px); margin: 7px auto 19px; }
.site-home h1 { margin: 0; font-size: 19px; }
.home-empty { min-height: 300px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--muted); }
.home-empty > .target-icon { width: 32px; height: 32px; opacity: .55; }
.home-empty p { margin: 16px 0; font-size: 13px; }
.taobao-bottom-nav { max-width: 1180px; margin: 0 auto; }
.account-summary { padding: 22px 18px; background: var(--panel); border: 1px solid var(--control); border-radius: 16px; }
.account-summary h2 { margin: 0 0 18px; font-size: 16px; }
.account-summary p { display: flex; justify-content: space-between; gap: 12px; margin: 12px 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.account-summary p span { color: var(--text); }
.signed-out { margin-top: 16px; text-align: center; }
.signed-out > .target-icon { width: 40px; height: 40px; color: var(--blue); margin: 16px 0; }
.signed-out h1 { font-size: 21px; margin: 12px 0; }
.signed-out p { display: block; margin-bottom: 24px; }
.secondary-action { width: 100%; min-height: 44px; margin-top: 10px; border: 1px solid var(--control); border-radius: 11px; color: var(--text); background: transparent; }
.closed-actions { display: flex; gap: 10px; }
.empty-state p { line-height: 1.7; }
.empty-state .closed-actions button { background: var(--control); color: var(--muted); }
.kg-modal { background: var(--panel); box-shadow: 0 24px 70px rgba(0,0,0,.3); }
.kg-modal p { color: var(--muted); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 11px; background: var(--control); margin: 20px 0; gap: 4px; }
.auth-tabs button { height: 38px; border: 0; border-radius: 8px; color: var(--muted); background: transparent; font-weight: 700; }
.auth-tabs button.active { background: var(--panel); color: var(--blue); box-shadow: 0 2px 5px #0001; }
.account-form { display: grid; }
.account-form label { margin: 12px 0 8px; font-size: 13px; font-weight: 650; }
.account-form input { width: 100%; min-width: 0; height: 46px; padding: 0 12px; background: var(--bg); border: 1px solid var(--control); border-radius: 10px; color: var(--text); font-size: 16px; }
.account-form input::placeholder { font-size: 12px; color: var(--muted); }
.account-form small { color: var(--muted); font-size: 11px; line-height: 1.7; margin-top: 16px; }
.password-field { display: flex; position: relative; }
.password-field input { padding-right: 56px; }
.password-field button { position: absolute; right: 0; top: 0; bottom: 0; border: 0; width: 54px; background: transparent; color: var(--muted); font-size: 12px; }
.form-error { color: #e34c59; font-size: 12px; line-height: 1.6; margin-top: 12px; min-height: 4px; }
.connection-notice { margin: 0 auto 16px; width: min(calc(100% - 32px), 1148px); padding: 12px; border: 1px solid #e4b468; border-radius: 10px; color: #976626; font-size: 13px; }
.connection-notice button { float: right; border: 0; background: transparent; color: inherit; font-weight: 700; }
.taobao-toast { white-space: normal; width: max-content; text-align: center; }
.canada-entry { max-width: 520px; margin-top: 14px; }
.canada-entry button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px; border: 0; border-radius: 16px; color: var(--text); background: var(--panel); text-align: left; box-shadow: 0 8px 24px rgba(32,47,66,.08); }
.canada-mark { width: 54px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; color: #fff; background: radial-gradient(circle at 30% 30%, #c084fc, #5b35d5 72%); font-weight: 800; }
.canada-copy { min-width: 0; flex: 1; display: grid; gap: 4px; }
.canada-copy b { font-size: 16px; }
.canada-copy small { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.canada-go { color: var(--muted); font-size: 22px; line-height: 1; }
.canada-room { width: min(calc(100% - 28px), 520px); margin: 0 auto 12px; display: grid; gap: 12px; }
.canada-room-head { display: flex; align-items: center; gap: 8px; }
.canada-room-head h1 { min-width: 0; flex: 1; margin: 0; font-size: 20px; }
.canada-back, .canada-refresh { height: 36px; flex: 0 0 auto; padding: 0 10px; border: 0; border-radius: 10px; color: var(--text); background: var(--control); font-size: 13px; font-weight: 700; }
.canada-board { padding: 16px 14px; border-radius: 18px; background: radial-gradient(120% 90% at 100% 0%, rgba(124,77,255,.16), transparent 46%), var(--panel); box-shadow: 0 8px 24px rgba(32,47,66,.06); }
.canada-issue, .canada-count { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.canada-count { align-items: end; margin-top: 14px; }
.canada-count span { min-width: 0; }
.canada-count b { flex: 0 0 auto; color: var(--text); font-size: 20px; font-variant-numeric: tabular-nums; }
.canada-balls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 10px; }
.canada-ball, .canada-sum { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: #fff; font-size: 18px; font-weight: 800; }
.canada-ball:nth-child(1) { background: #6d4aff; }
.canada-ball:nth-child(2) { background: #2f93f4; }
.canada-ball:nth-child(3) { background: #8a4dff; }
.canada-sum { width: 54px; height: 54px; background: #ff5a7a; font-size: 22px; }
.canada-eq { color: var(--muted); font-weight: 800; }
.canada-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.canada-tags span { padding: 4px 8px; border-radius: 999px; background: var(--control); font-size: 12px; font-weight: 750; }
.tag-red { color: #e4485d; }
.tag-blue { color: #2b7de9; }
.canada-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.canada-tabs button { height: 38px; border: 0; border-radius: 10px; color: var(--muted); background: var(--control); font-weight: 750; }
.canada-tabs button.active { color: #fff; background: var(--blue); }
.canada-list, .canada-rules { display: grid; gap: 8px; }
.canada-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--panel); }
.canada-row b { font-size: 13px; }
.canada-row small { display: block; color: var(--muted); font-size: 11px; }
.canada-row > b:last-child { white-space: nowrap; }
.canada-mini { display: flex; gap: 4px; }
.canada-mini i { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #6d4aff; font-style: normal; font-size: 11px; font-weight: 800; }
.canada-rules article { padding: 12px; border-radius: 12px; background: var(--panel); }
.canada-rules h2 { margin: 0 0 6px; font-size: 14px; }
.canada-rules p, .canada-note, .canada-empty { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.canada-empty { padding: 18px 8px; text-align: center; }
.canada-banner { margin: 0; padding: 10px 12px; border-radius: 12px; color: #f0d7a2; background: rgba(228,180,104,.16); font-size: 12px; line-height: 1.6; }
html.light-mode .canada-banner { color: #8a5a12; }
.canada-keno { margin-top: 10px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.canada-keno summary { cursor: pointer; }
@media (max-width: 720px) { .site-home { max-width: 520px; width: calc(100% - 36px); } }
@media (max-width: 410px) { .kgames-wordmark span { font-size: 24px; } .taobao-head-actions .head-square { width: 33px; } .taobao-head-actions .account-button { padding: 0 8px; } .account-button span:last-child { max-width: 88px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
