:root {
  --teal: #0f9f8b;
  --teal-dark: #087d71;
  --ink: #172222;
  --muted: #6f7d7b;
  --panel: #171c1d;
  --panel-soft: #253133;
  --coral: #e26d6d;
  --exact: #4bd98b;
  --present: #f5f8ef;
  --absent: #4c5b5b;
  --cream: #f5fbf8;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; color: var(--ink); background: #0c625b; }
button { font: inherit; border: 0; cursor: pointer; }
button:focus-visible { outline: 3px solid rgba(255,255,255,.8); outline-offset: 3px; }
.app-shell { width: min(100%, 480px); min-height: 100vh; margin: 0 auto; background: var(--cream); overflow: hidden; position: relative; }
.screen { min-height: 100vh; padding: 22px 22px 28px; animation: enter .32s ease both; }
.hidden { display: none !important; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.topbar { height: 46px; display: flex; align-items: center; justify-content: space-between; }
.home-topbar { color: white; }
.home-top-actions { display: flex; align-items: center; gap: 8px; }
.brand-mark { font-weight: 900; letter-spacing: .04em; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.brand-dot { width: 12px; height: 12px; border-radius: 4px; background: var(--coral); box-shadow: 0 0 0 4px rgba(226,109,109,.17); }
.icon-button, .back-button { width: 40px; height: 40px; border-radius: 13px; color: inherit; background: rgba(255,255,255,.12); font-weight: 800; font-size: 22px; }
.avatar-button { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; color: var(--teal-dark); background: #d5fff3; font-weight: 900; font-size: 16px; box-shadow: 0 4px 12px rgba(0,42,39,.18); }
.icon-button.small { width: 34px; height: 34px; font-size: 18px; }
.back-button { background: transparent; color: var(--ink); font-size: 38px; line-height: 30px; }
.screen-title { font-weight: 800; font-size: 17px; }
.topbar-spacer { width: 40px; }
.home-screen { color: white; background: radial-gradient(circle at 50% 18%, #22b39c 0, var(--teal) 34%, #0b8478 72%, #08736b 100%); display: flex; flex-direction: column; }
.dashboard-greeting { padding: 34px 3px 20px; }
.dashboard-greeting h1 { font-size: 33px; margin: 0 0 8px; letter-spacing: -.06em; }
.dashboard-greeting h1 span { color: #d2fff2; }
.dashboard-greeting p:last-child { margin: 0; color: rgba(255,255,255,.75); font-size: 13px; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: 17px 5px; border-radius: 18px; background: rgba(0,74,68,.3); border: 1px solid rgba(213,255,243,.2); text-align: center; }
.dashboard-stats div + div { border-left: 1px solid rgba(213,255,243,.22); }
.dashboard-stats strong { display: block; font-size: 20px; }
.dashboard-stats span { display: block; color: rgba(255,255,255,.68); font-size: 10px; margin-top: 5px; }
.dashboard-section-head { display: flex; justify-content: space-between; align-items: center; margin: 25px 3px 11px; }
.dashboard-section-head h3 { margin: 0; font-size: 17px; }
.text-link { background: transparent; color: #d2fff2; font-size: 11px; font-weight: 800; }
.featured-game-card { padding: 10px; border-radius: 22px; background: #f5fbf8; color: var(--ink); display: grid; grid-template-columns: 112px 1fr; gap: 14px; box-shadow: 0 15px 30px rgba(0,37,34,.16); }
.featured-game-art { border-radius: 17px; min-height: 175px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; padding: 12px 8px; background: radial-gradient(circle at 50% 25%, #3acbb4 0, #087d71 66%, #075c56 100%); color: #d6fff4; }
.featured-game-art > span { font-size: 9px; opacity: .74; }
.mini-lock { width: 63px; height: 69px; border: 5px solid #d3fff3; border-radius: 16px; display: grid; place-items: center; margin-top: 34px; font-size: 37px; font-weight: 900; position: relative; }
.mini-lock::before { content: ""; position: absolute; width: 32px; height: 30px; border: 5px solid #d3fff3; border-bottom: 0; border-radius: 20px 20px 0 0; top: -31px; }
.featured-game-info { padding: 7px 4px 5px 0; display: flex; flex-direction: column; align-items: flex-start; }
.featured-game-info .eyebrow { color: var(--teal-dark); margin-bottom: 3px; font-size: 9px; }
.featured-game-info h2 { font-size: 23px; margin: 0 0 4px; letter-spacing: -.05em; }
.featured-game-info p:not(.eyebrow) { color: var(--muted); font-size: 11px; margin: 0 0 auto; }
.featured-game-info .primary-button { min-height: 42px; border-radius: 12px; padding: 0 13px; font-size: 13px; }
.recent-head { margin-top: 22px; }
.recent-record { min-height: 65px; border-radius: 16px; background: rgba(255,255,255,.95); color: var(--ink); display: flex; align-items: center; gap: 11px; padding: 10px 13px; }
.recent-record div { flex: 1; display: grid; gap: 3px; }
.recent-record strong { font-size: 17px; }
.recent-record div span { color: var(--muted); font-size: 10px; }
.record-status { color: var(--teal-dark); font-size: 10px; font-weight: 800; }
.daily-button { padding-top: 12px; color: white; min-height: 42px; }
.hero-orb { height: 220px; display: grid; place-items: center; position: relative; margin: 10px 0 -4px; }
.orb-ring { position: absolute; border: 1px solid rgba(211,255,245,.32); border-radius: 50%; }
.ring-one { width: 160px; height: 160px; box-shadow: 0 0 40px rgba(129,255,224,.28); }
.ring-two { width: 218px; height: 218px; border-style: dashed; opacity: .56; }
.lock-core { width: 96px; height: 106px; border: 7px solid #e4fff7; border-radius: 22px; color: var(--teal-dark); background: #d3fff3; display: grid; place-items: center; font-size: 58px; font-weight: 900; box-shadow: 0 18px 40px rgba(0,33,31,.25), inset 0 0 0 8px rgba(15,159,139,.18); position: relative; }
.lock-core::before { content: ""; position: absolute; width: 46px; height: 42px; border: 7px solid #e4fff7; border-bottom: 0; border-radius: 25px 25px 0 0; top: -42px; }
.home-copy { margin-top: 8px; }
.eyebrow { margin: 0 0 9px; font-size: 11px; font-weight: 900; letter-spacing: .2em; opacity: .74; }
h1, h2, p { margin-top: 0; }
h1 { font-size: clamp(38px, 11vw, 52px); line-height: 1.08; letter-spacing: -.06em; margin-bottom: 14px; }
h1 span { color: #d2fff2; }
.subcopy { max-width: 320px; line-height: 1.8; color: rgba(255,255,255,.82); margin-bottom: 0; font-size: 14px; }
.home-actions { margin-top: auto; padding-top: 36px; }
.primary-button { min-height: 52px; width: 100%; padding: 0 20px; border-radius: 16px; color: white; background: var(--coral); font-weight: 800; box-shadow: 0 9px 20px rgba(175,57,64,.22); transition: transform .15s, filter .15s; }
.primary-button:hover { filter: brightness(1.04); }
.primary-button:active { transform: translateY(2px); }
.primary-button:disabled { background: #596866; box-shadow: none; cursor: not-allowed; opacity: .55; }
.primary-button.large { min-height: 62px; border-radius: 20px; font-size: 18px; display: flex; justify-content: space-between; align-items: center; }
.ghost-button { width: 100%; color: inherit; background: transparent; min-height: 48px; font-weight: 700; opacity: .9; }
.mini-badge { margin-left: 6px; color: #ffe89e; font-size: 9px; letter-spacing: .1em; border: 1px solid rgba(255,232,158,.65); padding: 3px 6px; border-radius: 6px; }
.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 26px; margin-top: 20px; border-top: 1px solid rgba(255,255,255,.2); text-align: center; }
.stats-row strong { display: block; font-size: 19px; }
.stats-row span { display: block; font-size: 11px; opacity: .7; margin-top: 4px; }
.difficulty-intro { padding: 38px 4px 18px; }
.difficulty-intro h2, .result-screen h2 { font-size: 32px; letter-spacing: -.06em; margin-bottom: 9px; }
.difficulty-intro p:not(.eyebrow) { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 0; }
.difficulty-list { display: grid; gap: 12px; margin-top: 15px; }
.difficulty-card { background: white; border: 1px solid #e3ece9; min-height: 86px; border-radius: 20px; display: flex; align-items: center; gap: 14px; padding: 14px; text-align: left; color: var(--ink); transition: transform .2s, border-color .2s, box-shadow .2s; }
.difficulty-card:hover, .difficulty-card.active { border-color: rgba(15,159,139,.65); box-shadow: 0 10px 25px rgba(21,101,92,.1); transform: translateY(-2px); }
.difficulty-icon { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 16px; display: grid; place-items: center; background: #eaf7f3; font-weight: 900; color: var(--teal-dark); }
.colors-icon { display: flex; gap: 4px; align-items: center; justify-content: center; }
.colors-icon i { width: 9px; height: 24px; border-radius: 5px; display: block; }
.colors-icon i:nth-child(1) { background:#f29a43; } .colors-icon i:nth-child(2) { background:#f4cc31; } .colors-icon i:nth-child(3) { background:#8964e8; } .colors-icon i:nth-child(4) { background:#df5c67; }
.digits-icon { font-size: 15px; letter-spacing: -.14em; }
.letters-icon { font-size: 22px; letter-spacing: -.12em; }
.difficulty-content { flex: 1; display: grid; gap: 5px; }
.difficulty-content strong { font-size: 17px; }
.difficulty-content span { color: var(--muted); font-size: 12px; }
.difficulty-arrow { font-size: 22px; color: var(--teal); }
.rule-note { margin-top: 18px; color: var(--muted); font-size: 12px; text-align: center; }
.rule-note span { color: var(--teal); margin-right: 5px; }
.game-screen { background: #eef8f4; padding-left: 14px; padding-right: 14px; }
.game-topbar { padding: 0 4px; }
.game-mode { font-weight: 800; display: flex; align-items: center; gap: 7px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--exact); box-shadow: 0 0 0 4px rgba(75,217,139,.14); }
.game-meta { display: flex; justify-content: space-between; gap: 10px; margin: 13px 2px; }
.meta-pill { min-height: 39px; background: white; border: 1px solid #dfebe7; border-radius: 13px; display: flex; align-items: center; gap: 7px; padding: 0 11px; font-size: 11px; color: var(--muted); }
.meta-pill strong { color: var(--coral); font-size: 15px; }
.timer-pill { color: var(--teal-dark); margin-left: auto; }
.timer-pill strong { color: var(--teal-dark); font-size: 16px; font-variant-numeric: tabular-nums; }
.meta-icon { color: var(--teal); font-size: 16px; }
.game-panel { background: var(--panel); color: white; border-radius: 25px; padding: 17px 14px 14px; box-shadow: 0 15px 30px rgba(17,50,48,.16); }
.panel-heading { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; padding: 0 4px 13px; }
.panel-hint { color: #80908e; font-size: 11px; font-weight: 500; }
.current-guess { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.guess-slot { height: 59px; border-radius: 13px; background: #263334; border: 1px solid #526665; display: grid; place-items: center; color: #d0fff4; font-size: 22px; font-weight: 900; transition: border-color .15s, transform .15s; }
.guess-slot.filled { border-color: var(--teal); transform: translateY(-1px); }
.legend { display: flex; justify-content: space-between; color: #94a5a1; font-size: 10px; padding: 16px 3px 9px; }
.legend span { display: flex; gap: 5px; align-items: center; }
.feedback-dot { width: 11px; height: 11px; display: inline-block; border-radius: 50%; flex: 0 0 11px; }
.feedback-dot.exact { background: var(--exact); box-shadow: 0 0 8px rgba(75,217,139,.45); }
.feedback-dot.present { background: var(--present); box-shadow: 0 0 5px rgba(255,255,255,.4); }
.feedback-dot.absent { background: var(--absent); }
.history-list { display: grid; gap: 6px; max-height: 255px; overflow-y: auto; padding-right: 1px; }
.history-row { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; padding: 8px 9px; border-radius: 11px; background: rgba(255,255,255,.045); }
.history-code, .feedback-row { display: flex; align-items: center; gap: 5px; }
.history-symbol { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; background: #2d3b3c; font-size: 12px; font-weight: 800; }
.feedback-row { gap: 3px; }
.feedback-row .feedback-dot { width: 8px; height: 8px; flex-basis: 8px; }
.attempt-number { color: #798987; font-size: 10px; margin-left: 3px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.key { height: 47px; background: white; border: 1px solid #dce9e5; border-radius: 13px; color: var(--ink); font-size: 18px; font-weight: 800; box-shadow: 0 3px 0 #d8e4e0; }
.key:active { transform: translateY(2px); box-shadow: none; }
.key.action { color: var(--coral); font-size: 21px; }
.submit-button { margin-top: 14px; }
.keyboard-tip { margin: 10px 0 0; color: #78908b; text-align: center; font-size: 11px; }
.result-screen { text-align: center; background: radial-gradient(circle at 50% 24%, #d7fff2 0, var(--cream) 40%); display: flex; flex-direction: column; align-items: center; }
.result-screen .topbar { width: 100%; }
.result-icon { width: 84px; height: 84px; border-radius: 28px; display: grid; place-items: center; font-size: 49px; font-weight: 900; margin: 90px 0 27px; }
.result-icon.success { background: #caffdf; color: #129267; box-shadow: 0 12px 30px rgba(37,165,105,.18); }
.result-icon.failure { background: #ffe0df; color: var(--coral); }
.centered { color: var(--teal-dark); }
.result-screen h2 { margin-bottom: 10px; }
.result-subtitle { color: var(--muted); margin-bottom: 21px; }
.revealed-code { display: flex; gap: 9px; justify-content: center; margin-bottom: 28px; }
.revealed-chip { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--panel); color: white; font-weight: 900; font-size: 18px; }
.result-stats { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; padding: 17px 6px; margin-bottom: auto; border: 1px solid #dcece7; border-radius: 18px; background: rgba(255,255,255,.72); }
.result-stats div + div { border-left: 1px solid #dcece7; }
.result-stats strong { display: block; color: var(--teal-dark); font-size: 17px; }
.result-stats span { color: var(--muted); font-size: 11px; display: block; margin-top: 4px; }
.result-screen .primary-button { margin-top: 22px; }
.profile-screen { background: #eef8f4; }
.profile-hero { margin: 34px 4px 25px; display: flex; align-items: center; gap: 16px; }
.profile-avatar { width: 73px; height: 73px; border-radius: 24px; display: grid; place-items: center; color: white; background: var(--teal); font-size: 28px; font-weight: 900; box-shadow: 0 10px 22px rgba(15,159,139,.24); }
.profile-hero h2 { margin: 0 0 5px; font-size: 27px; letter-spacing: -.06em; }
.profile-hero p:last-child { color: var(--muted); margin: 0; font-size: 12px; }
.profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); background: white; border: 1px solid #deebe7; border-radius: 20px; padding: 18px 5px; text-align: center; }
.profile-stats div + div { border-left: 1px solid #e1ece9; }
.profile-stats strong { display: block; color: var(--teal-dark); font-size: 20px; }
.profile-stats span { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.profile-section-heading { display: flex; justify-content: space-between; align-items: center; margin: 30px 3px 11px; }
.profile-section-heading span { color: var(--muted); font-size: 11px; }
.record-card { background: white; border: 1px solid #deebe7; border-radius: 16px; min-height: 70px; display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 9px; }
.record-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #d9fff0; color: var(--teal-dark); font-size: 20px; }
.record-icon.coral { color: var(--coral); background: #ffebeb; }
.record-card div { flex: 1; display: grid; gap: 4px; }
.record-card strong { font-size: 18px; }
.record-card span:not(.record-icon):not(.record-arrow) { color: var(--muted); font-size: 11px; }
.record-arrow { color: #9aadab; font-size: 26px; }
.profile-logout { color: var(--coral); margin-top: 16px; }
.login-card { text-align: left; }
.login-mark { width: 52px; height: 52px; border-radius: 17px; display: grid; place-items: center; color: white; background: var(--teal); font-size: 31px; font-weight: 900; margin-bottom: 17px; }
.login-card h2 { font-size: 28px; letter-spacing: -.06em; margin-bottom: 8px; }
.login-copy { color: var(--muted); line-height: 1.7; font-size: 13px; margin-bottom: 22px; }
.field-label { display: block; color: var(--ink); font-size: 12px; font-weight: 800; margin-bottom: 7px; }
.text-input { width: 100%; height: 51px; border: 1px solid #d8e6e2; border-radius: 14px; padding: 0 14px; font: inherit; font-size: 15px; color: var(--ink); background: white; margin-bottom: 12px; outline: none; }
.text-input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(15,159,139,.1); }
.privacy-note { color: #96a5a2; font-size: 10px; text-align: center; margin: 13px 0 0; }
.list-screen { background: #eef8f4; }
.light-icon { color: var(--teal-dark); background: #dcf9f0; }
.page-intro { padding: 34px 4px 14px; }
.page-intro h2 { font-size: 31px; letter-spacing: -.06em; margin: 0 0 7px; }
.page-intro p:last-child { color: var(--muted); font-size: 13px; margin: 0; }
.segmented { background: #dfede9; border-radius: 12px; display: grid; grid-template-columns: 1fr 1fr; padding: 3px; margin: 5px 0 15px; }
.segmented button { min-height: 35px; border-radius: 9px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 800; }
.segmented button.selected { color: var(--teal-dark); background: white; box-shadow: 0 2px 7px rgba(23,67,61,.09); }
.leaderboard-list { display: grid; gap: 8px; }
.leader-row { min-height: 65px; padding: 9px 11px; background: white; border: 1px solid #deebe7; border-radius: 16px; display: flex; align-items: center; gap: 10px; }
.rank-medal { width: 22px; color: #e4a633; font-weight: 900; text-align: center; }
.rank-medal.silver { color: #93a5a4; } .rank-medal.bronze { color: #c88456; } .muted-medal { color: #b7c6c3; }
.leader-avatar { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 12px; color: white; background: var(--teal); font-size: 13px; font-weight: 900; }
.leader-avatar.orange { background: #e7964d; } .leader-avatar.purple { background: #8a6cdc; } .leader-avatar.teal { background: #45bcae; } .leader-avatar.pink { background: #d87889; }
.leader-name { flex: 1; display: grid; gap: 4px; } .leader-name strong { font-size: 13px; } .leader-name span { color: var(--muted); font-size: 10px; }
.leader-score { color: var(--teal-dark); font-variant-numeric: tabular-nums; font-size: 14px; }
.my-rank-card { margin-top: 17px; padding: 13px 15px; display: flex; align-items: center; gap: 9px; color: white; border-radius: 15px; background: var(--teal-dark); font-size: 11px; }
.my-rank-card strong { margin-left: auto; font-size: 13px; } .my-rank-card span:last-child { display: none; }
.game-library-list { display: grid; gap: 11px; margin-top: 8px; }
.library-card { min-height: 98px; padding: 10px; border: 1px solid #deebe7; border-radius: 19px; background: white; display: flex; align-items: center; gap: 12px; text-align: left; color: var(--ink); }
.library-card.available { border-color: rgba(15,159,139,.55); box-shadow: 0 8px 20px rgba(21,101,92,.08); }
.library-art { flex: 0 0 75px; height: 75px; border-radius: 15px; display: grid; place-items: center; color: white; font-size: 31px; font-weight: 900; }
.cipher-art { background: radial-gradient(circle at 50% 30%, #3acbb4, #087d71); } .color-art { background: linear-gradient(135deg, #ffae68, #d96883); } .line-art { background: linear-gradient(135deg, #8f72e3, #4a4ab4); }
.library-info { flex: 1; display: grid; gap: 5px; } .library-info strong { font-size: 16px; } .library-info span { color: var(--muted); font-size: 11px; } .library-info b { color: var(--teal-dark); font-size: 11px; } .library-info b i { font-style: normal; font-size: 16px; margin-left: 4px; } .library-info .locked-label { color: #a6b4b1; font-weight: 600; }
.lock-label { color: #a4b5b1; font-size: 18px; }
.achievement-count { color: var(--teal-dark); font-size: 12px; font-weight: 800; }
.achievement-progress { padding: 16px; border-radius: 16px; background: white; border: 1px solid #deebe7; } .progress-label { display: flex; justify-content: space-between; font-size: 12px; font-weight: 800; } .progress-label strong { color: var(--teal-dark); } .progress-track { height: 8px; margin-top: 11px; border-radius: 9px; background: #e5f0ed; overflow: hidden; } .progress-track i { display: block; width: 4%; height: 100%; border-radius: inherit; background: var(--teal); }
.achievement-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 15px; } .achievement-card { min-height: 142px; padding: 16px 12px; border-radius: 17px; background: white; border: 1px solid #deebe7; } .achievement-card > div { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: #edf4f2; color: #9bb0ab; font-size: 23px; margin-bottom: 12px; } .achievement-card strong { display: block; font-size: 13px; } .achievement-card span { color: var(--muted); font-size: 10px; display: block; margin-top: 5px; line-height: 1.4; }
.bottom-nav { position: fixed; z-index: 4; bottom: 0; left: 50%; width: min(100%, 480px); min-height: 71px; padding: 7px 9px calc(7px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: grid; grid-template-columns: repeat(4, 1fr); background: rgba(249,255,252,.96); border-top: 1px solid #d9e9e4; box-shadow: 0 -8px 24px rgba(28,83,75,.08); backdrop-filter: blur(12px); }
.nav-item { display: grid; justify-items: center; align-content: center; gap: 3px; color: #8a9d99; background: transparent; font-weight: 700; } .nav-item span { width: 30px; height: 27px; display: grid; place-items: center; border-radius: 10px; font-size: 19px; } .nav-item small { font-size: 10px; } .nav-item.active { color: var(--teal-dark); } .nav-item.active span { background: #d9fff1; } .nav-item.nav-game span { width: 45px; height: 45px; margin-top: -22px; color: white; background: var(--coral); border: 5px solid var(--cream); border-radius: 17px; font-size: 25px; box-shadow: 0 7px 14px rgba(175,57,64,.25); } .nav-item.nav-game small { margin-top: -2px; }
.modal { position: fixed; inset: 0; background: rgba(4,39,37,.58); display: grid; place-items: center; padding: 24px; z-index: 5; }
.modal-card { width: min(100%, 390px); border-radius: 25px; padding: 26px 23px 22px; background: var(--cream); position: relative; box-shadow: 0 25px 80px rgba(0,0,0,.25); }
.modal-close { position: absolute; right: 17px; top: 13px; background: transparent; font-size: 28px; color: var(--muted); }
.modal-card h2 { font-size: 26px; letter-spacing: -.05em; margin-bottom: 22px; }
.help-item { display: flex; align-items: center; gap: 13px; padding: 13px 0; border-top: 1px solid #deebe7; }
.help-item > div { display: grid; gap: 4px; }
.help-item span { color: var(--muted); font-size: 12px; }
.modal-card .primary-button { margin-top: 18px; }
.toast { position: fixed; left: 50%; bottom: 25px; transform: translate(-50%, 20px); padding: 10px 15px; border-radius: 12px; background: #172222; color: white; font-size: 12px; opacity: 0; pointer-events: none; transition: .22s; z-index: 10; white-space: nowrap; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 600px) { body { padding: 24px 0; } .app-shell { min-height: calc(100vh - 48px); border-radius: 32px; box-shadow: 0 30px 80px rgba(0,0,0,.2); } .screen { min-height: calc(100vh - 48px); } .bottom-nav { bottom: 24px; border-radius: 20px; width: min(calc(100% - 48px), 432px); } }

/* Sci-fi visual system: graphite surfaces, cyan circuitry, neon feedback. */
:root {
  --teal: #12d4c4;
  --teal-dark: #00a99e;
  --ink: #e7fbf6;
  --muted: #7faaa6;
  --panel: #08191d;
  --panel-soft: #102b31;
  --coral: #ff6266;
  --exact: #32efab;
  --present: #f6fbf0;
  --absent: #405c61;
  --cream: #061115;
}
body { background: #02090b; }
.app-shell { background: #061115; box-shadow: 0 30px 90px rgba(0,0,0,.55); }
.home-screen { background: radial-gradient(circle at 50% 4%, #123f43 0, #071e24 35%, #061216 76%, #03090c 100%); }
.home-topbar { border-bottom: 1px solid rgba(68,238,225,.14); }
.brand-mark { text-shadow: 0 0 16px rgba(18,212,196,.35); }
.brand-dot { background: var(--teal); box-shadow: 0 0 0 4px rgba(18,212,196,.14), 0 0 15px rgba(18,212,196,.7); }
.icon-button, .back-button { background: rgba(13,53,60,.76); border: 1px solid rgba(49,214,205,.3); color: var(--teal); }
.avatar-button { color: var(--teal); background: #0b353c; border: 1px solid rgba(49,214,205,.45); box-shadow: 0 0 15px rgba(18,212,196,.16); }
.dashboard-greeting h1 { text-shadow: 0 0 22px rgba(18,212,196,.2); }
.dashboard-greeting h1 span { color: #8effe7; }
.dashboard-stats { background: rgba(4,33,39,.7); border-color: rgba(24,216,204,.32); box-shadow: inset 0 0 25px rgba(15,149,153,.06); }
.dashboard-stats strong { color: #f0fffb; text-shadow: 0 0 12px rgba(18,212,196,.35); }
.text-link { color: #7dfff1; }
.featured-game-card { background: linear-gradient(135deg, rgba(11,39,46,.98), rgba(5,20,24,.98)); color: var(--ink); border: 1px solid rgba(42,214,205,.45); box-shadow: 0 16px 36px rgba(0,0,0,.4), inset 0 0 26px rgba(13,203,194,.05); }
.featured-game-art { background: radial-gradient(circle at 50% 20%, #176e73 0, #0a3038 60%, #06171b 100%); border: 1px solid rgba(61,237,224,.5); box-shadow: inset 0 0 25px rgba(22,215,205,.16); }
.mini-lock, .mini-lock::before { border-color: #9efff0; filter: drop-shadow(0 0 7px rgba(70,255,235,.7)); }
.featured-game-info .eyebrow { color: #63eee0; }
.recent-record { background: rgba(9,34,40,.95); color: var(--ink); border-color: rgba(38,201,195,.28); }
.record-icon { background: #0a3b3d; color: var(--teal); }
.record-icon.coral { background: #42272c; }
.record-status { color: #62f0de; }
.daily-button { color: #a9e9df; }
.difficulty-screen, .list-screen, .profile-screen, .game-screen { background: radial-gradient(circle at 50% 0%, #123b40 0, #08181d 35%, #061115 100%); color: var(--ink); }
.screen-title, .difficulty-intro h2, .page-intro h2, .profile-hero h2 { color: var(--ink); }
.difficulty-intro p:not(.eyebrow), .page-intro p:last-child, .profile-hero p:last-child { color: var(--muted); }
.difficulty-card, .profile-stats, .record-card, .leader-row, .library-card, .achievement-progress, .achievement-card { background: rgba(9,31,36,.92); border-color: rgba(43,203,197,.24); color: var(--ink); box-shadow: inset 0 0 20px rgba(16,177,174,.03); }
.difficulty-card:hover, .difficulty-card.active { border-color: rgba(61,239,222,.78); box-shadow: 0 0 23px rgba(18,212,196,.15), inset 0 0 18px rgba(18,212,196,.08); }
.difficulty-icon { background: #0a3438; }
.rule-note { color: var(--muted); }
.game-mode { color: #b5fff3; }
.meta-pill { background: rgba(8,34,39,.9); border-color: rgba(42,201,195,.28); color: var(--muted); }
.timer-pill strong, .meta-pill strong { color: #62f5df; text-shadow: 0 0 9px rgba(18,212,196,.36); }
.game-panel { background: linear-gradient(160deg, #0a252b, #050f12); border: 1px solid rgba(43,218,210,.55); box-shadow: 0 18px 32px rgba(0,0,0,.4), inset 0 0 28px rgba(10,193,188,.08); }
.current-guess .guess-slot { background: #07191e; border-color: #1f6570; box-shadow: inset 0 0 13px rgba(20,214,206,.08); }
.guess-slot.filled { border-color: #4effe8; box-shadow: 0 0 12px rgba(70,255,231,.25); }
.history-row { background: rgba(21,66,72,.3); border: 1px solid rgba(45,193,193,.13); }
.history-symbol { background: #102d34; border: 1px solid rgba(93,220,211,.15); }
.key { background: linear-gradient(180deg, #15353b, #0a2026); border-color: rgba(48,205,199,.35); color: #e4fffa; box-shadow: 0 3px 0 #061114, inset 0 0 11px rgba(21,209,200,.05); }
.key.action { color: #ff9a9c; }
.keyboard-tip { color: #6faaa5; }
.result-screen { background: radial-gradient(circle at 50% 17%, #12464a 0, #071a20 39%, #040c10 100%); color: var(--ink); }
.result-icon.success { background: #0e4c43; color: #61ffcd; border: 1px solid #43e7c2; box-shadow: 0 0 27px rgba(40,231,193,.22); }
.result-icon.failure { background: #482a30; color: #ff8589; border: 1px solid #f36f75; }
.result-subtitle { color: var(--muted); }
.revealed-chip { background: #0a2a31; border: 1px solid rgba(45,217,207,.62); box-shadow: 0 0 14px rgba(19,215,203,.14); }
.result-stats { background: rgba(8,33,39,.8); border-color: rgba(43,203,197,.3); }
.result-stats div + div { border-color: rgba(43,203,197,.22); }
.result-stats strong { color: #72f7e3; }
.profile-avatar { background: linear-gradient(135deg, #19c7ba, #0a5e6a); border: 1px solid #64ffeb; box-shadow: 0 0 24px rgba(18,212,196,.3); }
.profile-stats div + div { border-color: rgba(43,203,197,.22); }
.profile-stats strong, .record-card strong { color: #dffff7; }
.record-card span:not(.record-icon):not(.record-arrow) { color: var(--muted); }
.profile-section-heading span { color: var(--muted); }
.record-arrow { color: #4ddfd1; }
.profile-logout { color: #ff8185; }
.light-icon { color: var(--teal); background: #0b353c; }
.segmented { background: #09252b; border: 1px solid rgba(43,203,197,.2); }
.segmented button { color: #6f9b98; }
.segmented button.selected { color: #062226; background: var(--teal); box-shadow: 0 0 15px rgba(18,212,196,.35); }
.leader-row { border-color: rgba(43,203,197,.19); }
.leader-score { color: #6ff4e3; }
.my-rank-card { background: linear-gradient(90deg, #0d686b, #0c3c47); border: 1px solid rgba(81,245,230,.5); box-shadow: 0 0 20px rgba(16,196,188,.15); }
.library-art { border: 1px solid rgba(62,238,225,.42); }
.cipher-art { background: radial-gradient(circle at 50% 30%, #1e7478, #073239); }
.color-art { background: linear-gradient(135deg, #8a4b59, #285c72); }
.line-art { background: linear-gradient(135deg, #3b4c8d, #183e62); }
.library-info span, .library-info .locked-label { color: var(--muted); }
.library-info b { color: #65f4e3; }
.achievement-count { color: #64efdf; }
.progress-label strong { color: #64efdf; }
.progress-track { background: #0c2b31; }
.progress-track i { background: var(--teal); box-shadow: 0 0 8px rgba(18,212,196,.7); }
.achievement-card > div { background: #0d3036; color: #60ded3; border: 1px solid rgba(58,219,207,.35); }
.bottom-nav { background: rgba(4,17,21,.96); border-top-color: rgba(49,211,202,.35); box-shadow: 0 -8px 28px rgba(0,0,0,.42); }
.nav-item { color: #5f8582; }
.nav-item.active { color: #74ffe9; }
.nav-item.active span { background: #0b3e43; box-shadow: 0 0 12px rgba(18,212,196,.25); }
.nav-item.nav-game span { background: var(--coral); border-color: #061115; box-shadow: 0 0 18px rgba(255,98,102,.38); }
.modal { background: rgba(0,7,10,.78); }
.modal-card { background: linear-gradient(160deg, #0c2d33, #061418); border: 1px solid rgba(45,211,204,.55); color: var(--ink); box-shadow: 0 25px 80px rgba(0,0,0,.6), inset 0 0 25px rgba(17,200,194,.07); }
.modal-close { color: #80c2bd; }
.help-item { border-color: rgba(43,203,197,.2); }
.help-item span, .login-copy { color: var(--muted); }
.login-mark { background: #0c6c70; border: 1px solid #58f3e2; box-shadow: 0 0 17px rgba(18,212,196,.3); }
.text-input { background: #06181d; border-color: rgba(48,205,199,.4); color: var(--ink); }
.text-input::placeholder { color: #527774; }
.text-input:focus { border-color: var(--teal); box-shadow: 0 0 0 4px rgba(18,212,196,.13); }
.privacy-note { color: #63827f; }
.feedback-message { min-height: 28px; display: grid; place-items: center; padding: 5px 7px 8px; color: #7fe9dc; font-size: 11px; text-align: center; letter-spacing: .02em; }
.feedback-message.pulse { animation: feedbackPulse .45s ease; }
@keyframes feedbackPulse { 0% { opacity: .2; transform: scale(.95); } 55% { opacity: 1; transform: scale(1.04); } 100% { transform: scale(1); } }
.history-row.latest { animation: rowReveal .35s ease both; border-color: rgba(70,239,222,.48); }
@keyframes rowReveal { from { opacity: 0; transform: translateY(-7px); } to { opacity: 1; transform: none; } }
.countdown-overlay { position: absolute; z-index: 3; inset: 0; display: grid; place-content: center; justify-items: center; background: radial-gradient(circle, rgba(8,42,47,.9), rgba(2,10,13,.97)); color: #bafff3; }
.countdown-overlay strong { font-size: 94px; line-height: 1; text-shadow: 0 0 30px rgba(78,255,236,.8); animation: countdownPop .7s ease both; }
.countdown-overlay span { margin-top: 12px; color: #78b8b1; font-size: 12px; letter-spacing: .25em; }
@keyframes countdownPop { from { opacity: .2; transform: scale(1.35); } to { opacity: 1; transform: scale(1); } }
.game-screen { position: relative; }
.achievement-card.unlocked { border-color: rgba(45,237,208,.58); box-shadow: 0 0 18px rgba(18,212,196,.14); }
.achievement-card.unlocked > div { color: #85ffea; background: #0d4a49; border-color: rgba(95,255,231,.6); box-shadow: 0 0 14px rgba(18,212,196,.24); }
.achievement-card.locked { opacity: .72; }
.achievement-card.unlocked::after { content: "已解锁"; display: block; color: #6ef2df; font-size: 9px; margin-top: 8px; }
.home-screen, .list-screen, .profile-screen { padding-bottom: 104px; }

/* Generated sci-fi key art is used as a consistent visual atlas across the app. */
.scene-art { background-image: url("解码室-科幻素材图集.png"); background-repeat: no-repeat; background-size: 200% 200%; background-color: #061216; background-blend-mode: screen; }
.scene-cube { background-position: 0 0; }
.scene-door { background-position: 100% 0; }
.scene-pyramid { background-position: 0 100%; }
.scene-android { background-position: 100% 100%; }
.featured-game-art.scene-art { background-color: rgba(7,38,45,.74); background-blend-mode: screen; background-size: 200% 200%; box-shadow: inset 0 0 45px rgba(0,0,0,.5), 0 0 20px rgba(16,208,202,.18); }
.featured-game-art.scene-art::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, transparent 48%, rgba(2,11,14,.75)); pointer-events: none; }
.featured-game-art { position: relative; overflow: hidden; }
.featured-game-art > * { position: relative; z-index: 1; }
.featured-game-art .mini-lock { display: none; }
.library-art.scene-art { background-color: rgba(7,38,45,.84); background-blend-mode: screen; box-shadow: inset 0 0 25px rgba(0,0,0,.35); }
.library-art.scene-art span { text-shadow: 0 0 12px rgba(125,255,242,.9); }
.profile-avatar.scene-art { color: transparent; background-color: #0a3038; background-blend-mode: screen; background-size: 200% 200%; }
.leader-avatar.scene-art { color: transparent; background-color: #0a3038; background-blend-mode: screen; background-size: 200% 200%; border: 1px solid rgba(62,238,225,.55); }
.leader-avatar.scene-art.orange { filter: hue-rotate(22deg) saturate(.9); }
.leader-avatar.scene-art.purple { filter: hue-rotate(75deg) saturate(.9); }
.leader-avatar.scene-art.teal { filter: hue-rotate(150deg) saturate(.8); }
.leader-avatar.scene-art.pink { filter: hue-rotate(300deg) saturate(.9); }
