:root {
  color-scheme: dark;
  --bg: #101b18;
  --panel: #1a2823;
  --border: #32473d;
  --text: #f1f4ec;
  --muted: #a5b8ab;
  --accent: #bdeb83;
  --mono: "Consolas", "Courier New", monospace;
  font-family: "Noto Sans KR", "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--bg); scroll-padding-top: 24px; }
body { margin: 0; color: var(--text); line-height: 1.5; word-break: keep-all; overflow-wrap: break-word; background: radial-gradient(ellipse at 12% 0%, #29423266, transparent 55%); min-height: 100vh; }
button, input, select { font: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
button, select { border: 1px solid var(--border); }
button { color: inherit; background: none; border-radius: 13px; min-height: 46px; padding: 12px 16px; transition: background .18s, border-color .18s; }
button:hover { background-color: #ffffff09; border-color: #66816e; }
button:disabled { opacity: .5; cursor: wait; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
button:disabled:hover { border-color: var(--border); }
small { font-size: 12px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 28px; letter-spacing: -.045em; line-height: 1.35; font-weight: 700; }
h2 { font-size: 16px; letter-spacing: -.035em; }
svg.icon { width: 22px; height: 22px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.muted, .helper-text { color: var(--muted); font-size: 12px; }
.helper-text { line-height: 1.7; }
.app-shell { position: relative; z-index: 1; max-width: 960px; margin: auto; padding: max(18px, env(safe-area-inset-top)) 28px calc(130px + env(safe-area-inset-bottom)); }
.app-header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: "Trebuchet MS", sans-serif; font-weight: 700; font-size: 21px; white-space: nowrap; letter-spacing: -.5px; }
.brand b { font-weight: 400; color: var(--accent); }
.brand-mark { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 32px; height: 32px; padding: 7px; border: 1px solid #4f6c47; border-radius: 10px; background: #283e29; }
.brand-mark i { background: var(--accent); border-radius: 2px; }
.brand-mark i:last-child { opacity: .35; }
.connection-tag { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); text-align: right; }
.status-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--muted); flex-shrink: 0; }
.connection-tag.is-ok .status-dot, .connection-tag.is-fresh .status-dot { background: var(--accent); }
.connection-tag.is-error .status-dot { background: #edb481; }
.app-view { display: none; gap: 20px; }
.app-view.is-active { display: grid; animation: view-enter .24s ease-out; }
.panel { border: 1px solid var(--border); background: var(--panel); border-radius: 22px; padding: 24px; min-width: 0; }
.section-heading, .page-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.eyebrow { color: var(--accent); font: 10px var(--mono); letter-spacing: .17em; }
.small-pill { display: inline-block; padding: 4px 9px; border-radius: 7px; background: #ffffff07; border: 1px solid #48604466; color: var(--muted); font-size: 10px; white-space: nowrap; }
.section-description { color: var(--muted); font-size: 13px; line-height: 1.6; margin-top: 6px; }
.generator-panel { position: relative; overflow: hidden; background: radial-gradient(ellipse at 100% 0%, #46673538, transparent 60%), var(--panel); }
.generation-workspace { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; margin-top: 26px; }
.primary, .secondary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-size: 14px; font-weight: 700; }
.primary { background: var(--accent); color: #172717; border-color: var(--accent); }
.primary:hover { background: #d0f5a2; border-color: #d0f5a2; }
.secondary { background: #203129; }
.is-syncing .icon { animation: rotate .9s linear infinite; }
.generate-action { display: grid; grid-template-columns: 1fr auto; gap: 4px; align-content: center; text-align: left; padding: 20px; border-radius: 17px; }
.generate-action .icon { grid-column: 2; grid-row: 1 / 3; }
.generate-action strong { font-size: 19px; }
.generate-action > span { font-size: 11px; font-weight: 400; }
.hero-ai-visual { position: relative; min-width: 0; padding: 18px; border: 1px solid #426546; border-radius: 17px; overflow: hidden; background: radial-gradient(#8fbd5520 1px, transparent 1px) 0 0 / 7px 7px, #13211a; font-family: var(--mono); }
.hero-ai-header { display: flex; justify-content: space-between; gap: 5px; align-items: center; color: #83a58b; font-size: 9px; letter-spacing: .1em; }
.hero-ai-header strong { color: var(--accent); font-size: 8px; font-weight: 400; }
.hero-ai-numbers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 14px 0 12px; position: relative; z-index: 1; }
.hero-ai-numbers span { text-align: center; white-space: nowrap; overflow-wrap: normal; padding: 5px 0; border-radius: 6px; background: #2d4d2d75; color: var(--accent); font-size: 20px; line-height: 1; font-weight: 700; }
.hero-ai-grid { display: flex; gap: 3px; }
.hero-ai-grid span { height: 3px; background: #bdeb832a; flex: 1; border-radius: 2px; }
.hero-ai-grid span:nth-child(3n) { background: #bdeb8360; }
.hero-ai-beam { position: absolute; inset: -50px 0 auto; height: 60px; background: linear-gradient(transparent, #bdeb8328, transparent); opacity: 0; }
.hero-ai-visual.is-running .hero-ai-beam { opacity: 1; animation: scan 1.1s linear infinite; }
.hero-ai-visual.is-running .hero-ai-grid span { animation: blink .5s infinite alternate; }
.hero-ai-visual.is-running .hero-ai-grid span:nth-child(even) { animation-delay: .2s; }
.selection-summary { width: 100%; border: 0; border-top: 1px solid var(--border); border-radius: 0; margin-top: 22px; padding: 18px 0 0; display: flex; justify-content: space-between; align-items: center; text-align: left; }
.selection-summary > span { display: grid; gap: 3px; }
.selection-summary small, #hero-set-badge { font-size: 11px; color: var(--muted); }
.selection-summary strong { font-size: 14px; font-weight: 500; }
.selection-summary .icon { color: var(--muted); }
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quick-link { display: flex; gap: 11px; align-items: center; text-align: left; padding: 19px 17px; background: #192820; border-radius: 18px; }
.quick-link > .icon { color: var(--accent); }
.quick-link > span:not(.chevron) { display: grid; gap: 4px; }
.quick-link strong { font-size: 14px; font-weight: 500; }
.quick-link small { font-size: 10px; color: var(--muted); }
.chevron { margin-left: auto; color: var(--muted); font-size: 20px; }
.latest-draw-meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 4px; margin: 8px 0 18px; color: var(--muted); font-size: 11px; }
.latest-balls { display: flex; align-items: center; justify-content: space-between; gap: 7px; }
.latest-balls .history-mini-ball { flex: 0 1 42px; width: 42px; height: 42px; font-size: 14px; }
.history-mini-ball { display: inline-flex; align-items: center; justify-content: center; background: #2c4030; color: #d4e9be; border: 1px solid #4a6243; border-radius: 50%; width: 32px; height: 32px; font: 700 12px var(--mono); }
.page-heading { padding: 12px 2px 4px; }
.page-heading h1 { margin-top: 10px; }
.icon-button { width: 46px; height: 46px; padding: 11px; border-radius: 50%; }
.screen-stack { display: grid; gap: 18px; min-width: 0; }
.segmented { display: flex; padding: 5px; background: #0b1612; border: 1px solid #2b3e32; border-radius: 14px; gap: 4px; }
.segmented button { flex: 1; min-width: 0; border: 0; color: var(--muted); border-radius: 9px; font-size: 13px; min-height: 42px; padding: 10px 6px; }
.segmented button.is-active { color: var(--text); background: #2b3d30; box-shadow: 0 2px 4px #0002; }
.empty-state { text-align: center; padding: 60px 24px; }
.empty-balls { display: flex; justify-content: center; gap: 7px; margin-bottom: 25px; }
.empty-balls span { width: 30px; height: 30px; background: #a5c38215; border: 1px dashed #688555; border-radius: 50%; }
.empty-state h2 { font-size: 18px; }
.empty-state p { color: var(--muted); font-size: 12px; margin: 9px 0 25px; }
.results-list { display: grid; gap: 14px; }
.result-set { position: relative; display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 16px; padding: 20px; background: linear-gradient(100deg, #27382a, #1a2823); border: 1px solid #426044; border-radius: 19px; }
.result-set::before, .result-set::after { content: ""; position: absolute; top: 48px; width: 11px; height: 18px; background: var(--bg); border: 1px solid #426044; }
.result-set::before { left: -1px; border-left: 0; border-radius: 0 12px 12px 0; }
.result-set::after { right: -1px; border-right: 0; border-radius: 12px 0 0 12px; }
.result-set-head { display: flex; grid-column: 1 / -1; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px dashed #54704780; }
.result-set-title { font-size: 13px; letter-spacing: .015em; font-weight: 500; }
.result-set-title::before { content: ""; display: inline-block; width: 5px; height: 5px; background: var(--accent); border-radius: 50%; margin-right: 7px; vertical-align: middle; }
.result-set-score { font-size: 10px; color: var(--muted); }
.numbers { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); align-items: center; gap: 5px; grid-column: 1 / -1; }
.ball { display: inline-flex; justify-content: center; align-items: center; justify-self: center; width: 100%; max-width: 66px; aspect-ratio: 1; background: #c4e89a; border-radius: 50%; color: #21351b; font: 700 clamp(16px, 5vw, 25px) var(--mono); box-shadow: inset 0 -3px 0 #54743622; }
.ball.is-rolling { background: #8fa979; color: #284422; }
.ball.is-locked { animation: number-lock .28s ease-out; }
.set-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.set-tag { color: var(--muted); font-size: 10px; }
.set-tag + .set-tag { padding-left: 8px; border-left: 1px solid #53634d; }
.result-actions { display: grid; grid-template-columns: 1fr 1.35fr; gap: 10px; }
.session-note { font-size: 11px; line-height: 1.7; color: var(--muted); text-align: center; }
.purchase-target { display: grid; gap: 9px; }
.purchase-target label { font-size: 14px; }
.purchase-target-row { display: flex; align-items: center; gap: 8px; }
.purchase-target-row input { width: 130px; max-width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 12px; background: #11201a; color: var(--text); }
.purchase-target-row span { color: var(--muted); }
.save-purchase-btn { grid-column: 1 / -1; width: 100%; min-height: 40px; padding: 8px 12px; border-color: #6c925c; color: var(--accent); font-size: 12px; }
.save-purchase-btn:disabled { opacity: .65; cursor: default; }
.purchase-library { display: grid; gap: 12px; }
.purchase-result-summary { margin: 0; padding: 11px 13px; border: 1px solid #435c49; border-radius: 12px; background: #14251c; color: #c8d7ca; font-size: 12px; line-height: 1.6; }
.purchase-check-btn { width: 100%; }
.purchase-list { display: grid; gap: 10px; }
.purchase-round { border: 1px solid var(--border); border-radius: 14px; padding: 0 14px; background: #14221c; }
.purchase-round summary { display: flex; justify-content: space-between; gap: 8px; align-items: center; cursor: pointer; padding: 13px 0; font-weight: 700; }
.purchase-round summary small { color: var(--muted); font-weight: 400; }
.purchase-sets { display: grid; gap: 12px; padding: 0 0 14px; }
.purchase-set { display: grid; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.purchase-set.is-winning { margin: 0 -6px; padding: 12px 6px 0; border-top-color: #8bb66e; background: linear-gradient(180deg, #6d91421a, transparent); }
.purchase-set-result { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.purchase-result-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 4px 8px; border: 1px solid #56685c; border-radius: 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.purchase-result-badge.is-win { border-color: #9aca70; background: #bdeb831c; color: var(--accent); }
.purchase-result-badge.is-lose { color: #90a195; }
.purchase-match-detail { color: var(--muted); font-size: 10px; text-align: right; }
.purchase-set .numbers { gap: 3px; }
.purchase-set .ball { max-width: 46px; font-size: clamp(13px, 3.5vw, 19px); }
.purchase-set .ball.is-main-match { background: var(--accent); border: 2px solid #e4ffc3; box-shadow: 0 0 0 3px #bdeb8320; }
.purchase-set .ball.is-bonus-match { border: 2px solid #edb481; }
.purchase-set-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.purchase-set-footer small { color: var(--muted); }
.purchase-remove-btn { min-height: 32px; padding: 5px 9px; color: var(--muted); font-size: 11px; }
.purchase-result-notice { padding-top: 2px; }
.fold-card { padding: 0; overflow: hidden; }
.fold-card > summary { cursor: pointer; padding: 19px 22px; list-style: none; display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.fold-card > summary::-webkit-details-marker { display: none; }
.fold-card > summary::after { content: "+"; color: var(--muted); }
.fold-card[open] > summary::after { content: "−"; }
.fold-card-body { display: grid; gap: 16px; padding: 0 22px 22px; }
.insight-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.insight-grid article { display: grid; gap: 6px; padding: 10px 0; }
.insight-grid span { font-size: 10px; color: var(--muted); }
.insight-grid strong { font-size: 18px; font-family: var(--mono); }
.analysis-list { margin: 0; padding-left: 16px; font-size: 12px; color: var(--muted); line-height: 1.9; }
.control-panel { display: grid; gap: 20px; }
.field { display: grid; gap: 11px; }
.field > span:first-child { font-size: 14px; font-weight: 500; }
.field small { color: var(--muted); line-height: 1.6; }
.field + .field { border-top: 1px solid var(--border); padding-top: 18px; }
.range-head { display: flex; justify-content: space-between; align-items: center; }
.range-head strong { color: var(--accent); font: 700 26px var(--mono); }
.range-ends { display: flex; justify-content: space-between; margin-top: -5px; }
input[type="range"] { width: 100%; margin: 0; height: 28px; accent-color: var(--accent); cursor: pointer; }
select { width: 100%; padding: 13px; border-radius: 11px; background: #14231b; color: var(--text); font-size: 14px; min-height: 48px; }
.rank-range-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: end; }
.rank-range-row label { display: grid; gap: 6px; }
.rank-range-row > span { align-self: center; padding-top: 20px; color: var(--muted); }
.rank-percent-control { display: grid; gap: 8px; margin-top: 10px; }
.rank-percent-control .range-head > span { font-size: 12px; color: var(--muted); }
.rank-percent-control .range-head strong { font-size: 20px; }
.cycle-analysis-field { min-width: 0; }
.cycle-config-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cycle-config-heading > span { font-size: 14px; font-weight: 500; }
.compact-action { min-height: 36px; padding: 7px 11px; border-radius: 10px; color: var(--accent); font-size: 11px; white-space: nowrap; }
.cycle-profile-list { display: grid; gap: 12px; }
.cycle-profile { display: grid; gap: 12px; padding: 15px; border: 1px solid var(--border); border-radius: 15px; background: #13211a; }
.cycle-profile-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cycle-profile-head strong { font-size: 13px; }
.cycle-profile-head small { color: var(--muted); }
.cycle-profile-remove { min-height: 32px; padding: 5px 9px; border-radius: 9px; color: var(--muted); font-size: 11px; }
.cycle-profile-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px; }
.cycle-profile-grid label { display: grid; gap: 5px; min-width: 0; }
.cycle-profile-grid small { font-size: 10px; }
.cycle-profile-grid select { min-height: 42px; padding: 9px 8px; font-size: 12px; }
.cycle-strength-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.cycle-strength-row label { display: grid; gap: 5px; }
.cycle-strength-value { min-width: 43px; color: var(--accent); font: 700 15px var(--mono); text-align: right; }
.cycle-profile-summary { margin: 0; padding: 10px 12px; border-radius: 11px; background: #ffffff07; color: var(--muted); font-size: 11px; line-height: 1.6; }
.toggle-list { display: grid; }
.toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; border-top: 1px solid var(--border); }
.toggle:last-child { padding-bottom: 0; }
.toggle > span { display: grid; gap: 6px; }
.toggle strong { font-size: 14px; font-weight: 500; }
.toggle small { color: var(--muted); font-size: 11px; }
.toggle input { appearance: none; width: 42px; height: 25px; margin: 0; border: 1px solid #698074; border-radius: 15px; background: #364940; flex-shrink: 0; cursor: pointer; position: relative; transition: background .2s; }
.toggle input::after { content: ""; position: absolute; width: 17px; height: 17px; background: #b5c8bb; border-radius: 50%; top: 3px; left: 3px; transition: transform .2s; }
.toggle input:checked { background: var(--accent); border-color: var(--accent); }
.toggle input:checked::after { background: #243b21; transform: translateX(17px); }
.data-card-main { margin: 20px 0 6px; font-size: 16px; }
.data-actions { gap: 10px; }
.full-width { width: 100%; margin-top: 22px; }
.text-link { display: inline-flex; justify-content: center; align-items: center; gap: 8px; border: none; font-size: 13px; color: var(--muted); }
.text-link .icon { width: 16px; height: 16px; }
.page-footnote { text-align: center; padding: 3px 0; font-size: 11px; }
.settings-save-panel { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 18px; }
.settings-save-panel > div { display: grid; gap: 5px; min-width: 0; }
.settings-save-panel strong { font-size: 13px; }
.settings-save-status { margin: 0; color: var(--muted); font: 11px/1.5 var(--mono); }
.settings-save-status[data-state="saved"] { color: var(--accent); }
.settings-save-status[data-state="error"] { color: #ff6f91; }
.settings-save-btn { min-width: 116px; min-height: 46px; flex-shrink: 0; }
.ranking-list { display: grid; margin-top: 22px; }
.ranking-row { display: grid; grid-template-columns: 35px 35px minmax(0, 1fr) 58px; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid #32473d88; }
.ranking-place { color: var(--muted); font: 12px var(--mono); }
.ranking-row:nth-child(-n+3) .ranking-place { color: var(--accent); font-weight: 700; }
.ranking-number { width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; background: #2c4030; border: 1px solid #4a6243; border-radius: 50%; font: 700 12px var(--mono); }
.ranking-row:nth-child(-n+3) .ranking-number { color: #21351b; background: var(--accent); border-color: var(--accent); }
.ranking-bar { height: 5px; border-radius: 4px; background: #33473a; overflow: hidden; }
.ranking-bar-fill { height: 100%; border-radius: inherit; background: #7fa467; }
.ranking-row:nth-child(-n+3) .ranking-bar-fill { background: var(--accent); }
.ranking-count { font-size: 11px; text-align: right; color: var(--muted); }
.history-table { display: grid; margin-top: 12px; }
.history-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 17px 0; border-bottom: 1px solid var(--border); }
.history-row:last-child { border-bottom: 0; padding-bottom: 0; }
.history-row > strong { font-size: 13px; }
.history-row > span { font-size: 11px; color: var(--muted); }
.history-row > span:last-child { align-self: center; text-align: right; font-size: 10px; }
.history-balls { display: flex; flex-wrap: wrap; grid-column: 1 / -1; gap: 5px; }
.empty { color: var(--muted); font-size: 12px; }
.bottom-bar { position: fixed; z-index: 5; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 960px); padding: 7px 22px max(8px, env(safe-area-inset-bottom)); background: #111f19f5; border: 1px solid var(--border); border-bottom: 0; border-radius: 24px 24px 0 0; backdrop-filter: blur(20px); }
.bottom-nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.bottom-nav button { display: grid; justify-items: center; gap: 4px; padding: 9px 6px 5px; border: 0; color: #8da596; font-size: 11px; }
.bottom-nav button .icon { width: 21px; height: 21px; }
.bottom-nav button.is-active { color: var(--accent); background: #bdeb8308; }
.app-version-badge { padding-top: 5px; color: #879c8c; font: 9px var(--mono); text-align: center; }
.app-version-badge span { padding-left: 6px; }
.toast { position: fixed; z-index: 6; left: 50%; bottom: calc(112px + env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: 520px; width: calc(100% - 40px); padding: 12px 16px; border: 1px solid #7d916e; background: #e4edda; color: #21371f; box-shadow: 0 8px 30px #0003; border-radius: 12px; font-size: 12px; line-height: 1.7; }
#matrix-canvas { position: fixed; inset: 0; width: 100%; height: 100%; opacity: 0; pointer-events: none; transition: opacity .4s; }
body.is-generating #matrix-canvas { opacity: .18; }
@keyframes view-enter { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scan { from { top: -60px; } to { top: 100%; } }
@keyframes blink { to { opacity: .3; } }
@keyframes number-lock { from { transform: scale(.85); } to { transform: scale(1); } }
@keyframes rotate { to { transform: rotate(360deg); } }
@media (min-width: 720px) {
  #home-view { grid-template-columns: 1.2fr 1fr; align-items: start; }
  .generator-panel { grid-row: span 2; }
  .quick-links { grid-template-columns: 1fr; }
  .quick-link { min-height: 92px; }
  #settings-view, #stats-view, #result-view { max-width: 680px; width: 100%; margin: auto; }
  .generation-workspace { grid-template-columns: 1fr; }
  .generate-action { grid-row: 2; }
  .hero-ai-numbers span { font-size: 28px; padding: 12px 0; }
}
@media (max-width: 719px) {
  .app-shell { padding: max(12px, env(safe-area-inset-top)) 20px calc(120px + env(safe-area-inset-bottom)); }
  .app-header { margin-bottom: 15px; }
  .brand { font-size: 19px; gap: 8px; }
  .brand-mark { width: 29px; height: 29px; }
  .connection-tag { max-width: 112px; font-size: 10px; }
  .app-view { gap: 16px; }
  .panel { padding: 20px; }
  .generation-workspace { gap: 10px; margin-top: 22px; grid-template-columns: 1fr 1.25fr; }
  .generate-action { grid-template-columns: 1fr; padding: 16px 12px; }
  .generate-action strong { font-size: 16px; white-space: nowrap; }
  .generate-action > span { white-space: nowrap; }
  .generate-action .icon { display: none; }
  .hero-ai-visual { padding: 14px 10px; }
  .hero-ai-numbers { gap: 3px; }
  .hero-ai-numbers span { font-size: clamp(10px, 3vw, 14px); }
  .quick-links { gap: 10px; }
  .quick-link { padding: 16px 12px; gap: 8px; }
  .quick-link .icon { width: 19px; }
  .quick-link .chevron { display: none; }
  .latest-balls .history-mini-ball { width: 34px; height: 34px; flex-basis: 34px; font-size: 12px; }
  .latest-draw-meta { margin-bottom: 15px; }
  .latest-draw-meta .muted { font-size: 9px; }
  .page-heading h1 { font-size: 25px; }
  .fold-card { padding: 0; }
  .fold-card-body { padding: 0 20px 20px; }
  .insight-grid { grid-template-columns: 1fr 1fr; }
  .ball { font-size: 22px; max-width: 50px; }
  .result-set { padding: 14px 18px; row-gap: 10px; }
  .result-set-head { padding-bottom: 9px; }
  .result-set::before, .result-set::after { top: 38px; }
  .bottom-bar { padding-left: 16px; padding-right: 16px; }
  .history-mini-ball { width: 29px; height: 29px; }
  .history-balls { gap: 4px; }
  .cycle-profile-grid { grid-template-columns: 1fr 1fr; }
  .cycle-profile-grid label:first-child { grid-column: 1 / -1; }
}
@media (max-width: 359px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .panel { padding: 16px; }
  .fold-card { padding: 0; }
  .brand { font-size: 17px; }
  .brand-mark { display: none; }
  .hero-ai-numbers span { font-size: 12px; }
  .generate-action strong { font-size: 15px; }
  .generate-action { padding: 16px 9px; }
  .generation-workspace { gap: 8px; }
  .latest-balls { gap: 4px; }
  .latest-balls .history-mini-ball { width: 28px; height: 28px; flex-basis: 28px; font-size: 11px; }
  .latest-draw-meta { display: grid; }
  .history-row { grid-template-columns: 1fr; }
  .history-row > span:last-child { text-align: left; }
  .ranking-row { gap: 8px; grid-template-columns: 28px 30px minmax(0, 1fr) 50px; }
  .result-set { padding: 16px; column-gap: 6px; }
  .set-tags { gap: 5px; }
  .set-tag + .set-tag { padding-left: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  #matrix-canvas { display: none; }
}

/* Digital cockpit theme — angular hardware surfaces, HUD accents and data-grid light. */
:root {
  --bg: #05090d;
  --panel: #0b1218;
  --panel-raised: #101a21;
  --border: #273b46;
  --border-hot: #4c6f78;
  --text: #eefaff;
  --muted: #89a4ad;
  --accent: #b9ff2c;
  --accent-2: #00e7ff;
  --hot: #ff3d7f;
  --mono: "Consolas", "Courier New", monospace;
}

html { background: var(--bg); }
body {
  background:
    radial-gradient(circle at 12% -8%, #00e7ff1b 0, transparent 31%),
    radial-gradient(circle at 93% 19%, #b9ff2c0d 0, transparent 27%),
    linear-gradient(145deg, #05090d 0%, #071016 54%, #04070a 100%);
}
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}
body::before {
  background-image:
    linear-gradient(#00e7ff0b 1px, transparent 1px),
    linear-gradient(90deg, #00e7ff0b 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
  mask-image: linear-gradient(to bottom, #000 0%, transparent 72%);
}
body::after {
  background: repeating-linear-gradient(0deg, transparent 0 3px, #00000024 3px 4px);
  opacity: .22;
}

h1 {
  letter-spacing: -.055em;
  text-shadow: 0 0 24px #00e7ff14;
}
h2 { letter-spacing: -.025em; }
button {
  border-radius: 3px;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s, transform .18s;
}
button:active { transform: translateY(1px); }
button:hover { background-color: #00e7ff0a; border-color: var(--accent-2); }

.app-shell { padding-top: max(15px, env(safe-area-inset-top)); }
.app-header {
  position: relative;
  min-height: 64px;
  margin-bottom: 20px;
  padding: 0 1px 12px;
  border-bottom: 1px solid #203641;
}
.app-header::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 38%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), transparent);
  box-shadow: 0 0 10px #00e7ff88;
}
.brand {
  gap: 10px;
  font-family: var(--mono);
  font-size: 20px;
  letter-spacing: -.055em;
}
.brand-copy { display: grid; line-height: 1.05; }
.brand-copy small {
  margin-bottom: 5px;
  color: var(--accent-2);
  font: 7px var(--mono);
  letter-spacing: .19em;
  opacity: .82;
}
.brand-copy > span { white-space: nowrap; }
.brand b {
  color: var(--accent);
  text-shadow: 0 0 14px #b9ff2c50;
}
.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  padding: 8px;
  gap: 3px;
  border: 1px solid var(--accent-2);
  border-radius: 0;
  background: linear-gradient(135deg, #132831, #091015);
  box-shadow: inset 0 0 13px #00e7ff24, 0 0 12px #00e7ff1f;
  clip-path: polygon(0 0, 73% 0, 100% 27%, 100% 100%, 27% 100%, 0 73%);
  transform: skew(-5deg);
}
.brand-mark i {
  border-radius: 0;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  box-shadow: 0 0 7px #b9ff2c88;
}
.connection-tag {
  min-height: 31px;
  padding: 7px 10px;
  border: 1px solid #2a4650;
  background: #081116c9;
  color: #9cb4bc;
  font: 10px var(--mono);
  letter-spacing: -.02em;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 0;
  transform: rotate(45deg);
  box-shadow: 0 0 8px currentColor;
}
.connection-tag.is-ok .status-dot,
.connection-tag.is-fresh .status-dot { box-shadow: 0 0 9px var(--accent); }

.app-view { gap: 18px; }
.panel {
  position: relative;
  border-color: var(--border);
  border-radius: 0;
  background:
    linear-gradient(135deg, #00e7ff08 0, transparent 22%),
    linear-gradient(315deg, #b9ff2c07 0, transparent 20%),
    linear-gradient(145deg, #0e171e, #091016);
  box-shadow: inset 0 0 0 1px #ffffff03, inset 0 -22px 40px #0000001e;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
}
.panel::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 34%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent), transparent);
  box-shadow: 0 0 10px #00e7ff66;
  pointer-events: none;
}
.generator-panel {
  background:
    linear-gradient(#00e7ff09 1px, transparent 1px),
    linear-gradient(90deg, #00e7ff09 1px, transparent 1px),
    radial-gradient(circle at 95% 5%, #00e7ff16, transparent 36%),
    linear-gradient(145deg, #111d24, #091116 74%);
  background-size: 22px 22px, 22px 22px, auto, auto;
  border-color: #38535d;
  box-shadow: inset 0 0 70px #00e7ff08, 0 14px 50px #0006;
}
.section-heading { position: relative; z-index: 2; }
.eyebrow {
  color: var(--accent-2);
  font-size: 9px;
  letter-spacing: .23em;
  text-shadow: 0 0 10px #00e7ff66;
}
.eyebrow::before { content: "[ "; color: var(--accent); }
.eyebrow::after { content: " ]"; color: var(--accent); }
.small-pill {
  border-radius: 0;
  border-color: #3a525d;
  background: #061016b8;
  color: #9bb6bf;
  font-family: var(--mono);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.section-description { color: var(--muted); }

.primary {
  border-color: var(--accent);
  border-radius: 0;
  background: linear-gradient(115deg, #b9ff2c, #8ee900 72%, #d8ff82);
  color: #071005;
  box-shadow: 0 0 0 1px #cfff7070, 0 0 22px #b9ff2c20, inset 0 -8px 20px #4b870024;
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
}
.primary:hover {
  background: linear-gradient(115deg, #ceff68, #aaff18 72%, #e5ffa4);
  border-color: #dbff91;
  box-shadow: 0 0 28px #b9ff2c45;
}
.secondary {
  border-color: #324b56;
  background: linear-gradient(135deg, #14232b, #0a1217);
  color: #d6e8ed;
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}
.generate-action {
  position: relative;
  border-radius: 0;
  overflow: hidden;
  min-height: 112px;
}
.generate-action::after {
  content: "EXECUTE";
  position: absolute;
  right: 10px;
  bottom: 7px;
  color: #17300066;
  font: 7px var(--mono);
  letter-spacing: .16em;
}
.generate-action strong {
  font-weight: 900;
  letter-spacing: -.04em;
}
.generate-action > span { font-family: var(--mono); }

.hero-ai-visual {
  border-radius: 0;
  border-color: #37636d;
  background:
    linear-gradient(#00e7ff0d 1px, transparent 1px),
    linear-gradient(90deg, #00e7ff0d 1px, transparent 1px),
    radial-gradient(circle at 50% 130%, #b9ff2c17, transparent 58%),
    #050b0f;
  background-size: 12px 12px, 12px 12px, auto, auto;
  box-shadow: inset 0 0 25px #00e7ff12, 0 0 18px #0008;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}
.hero-ai-header { color: #72a4ae; }
.hero-ai-header::before {
  content: "●";
  margin-right: 2px;
  color: var(--accent-2);
  text-shadow: 0 0 8px var(--accent-2);
}
.hero-ai-header strong { color: var(--accent); text-shadow: 0 0 8px #b9ff2c88; }
.hero-ai-numbers span {
  border-radius: 0;
  border-left: 1px solid var(--accent-2);
  background: linear-gradient(180deg, #153139, #0a171c);
  color: var(--accent);
  text-shadow: 0 0 8px #b9ff2c99;
  box-shadow: inset 0 0 8px #00e7ff12;
  clip-path: polygon(0 0, calc(100% - 5px) 0, 100% 5px, 100% 100%, 5px 100%, 0 calc(100% - 5px));
}
.hero-ai-grid span { border-radius: 0; background: #00e7ff24; }
.hero-ai-grid span:nth-child(3n) { background: #b9ff2c7a; box-shadow: 0 0 5px #b9ff2c55; }
.hero-ai-beam { background: linear-gradient(transparent, #00e7ff45, #b9ff2c18, transparent); }

.selection-summary { border-top-color: #36505a; }
.selection-summary small,
#hero-set-badge { font-family: var(--mono); }
.selection-summary strong { color: #f1fbff; }
.selection-summary .icon { color: var(--accent-2); }

.quick-link {
  border-radius: 0;
  border-color: #293f49;
  background: linear-gradient(135deg, #101c23, #091116);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.quick-link > .icon { color: var(--accent-2); filter: drop-shadow(0 0 6px #00e7ff55); }
.quick-link strong { font-weight: 700; }
.chevron { color: var(--accent); }

.latest-panel h2::before,
.purchase-library h2::before,
#ranking-panel-details h2::before,
#history-panel-details h2::before {
  content: "//";
  margin-right: 7px;
  color: var(--accent-2);
  font-family: var(--mono);
}
.history-mini-ball,
.ball {
  border-radius: 0;
  clip-path: polygon(24% 0, 76% 0, 100% 24%, 100% 76%, 76% 100%, 24% 100%, 0 76%, 0 24%);
}
.history-mini-ball {
  border-color: #41616b;
  background: linear-gradient(145deg, #172830, #0c151a);
  color: #c9f8ff;
  box-shadow: inset 0 0 10px #00e7ff16;
}
.latest-balls .history-mini-ball:nth-child(odd) { color: var(--accent); border-color: #527238; }

.page-heading h1 { font-weight: 800; }
.icon-button {
  border-radius: 0;
  color: var(--accent-2);
  clip-path: polygon(22% 0, 78% 0, 100% 22%, 100% 78%, 78% 100%, 22% 100%, 0 78%, 0 22%);
}
.segmented {
  padding: 4px;
  border-color: #29444f;
  border-radius: 0;
  background: #050a0e;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.segmented button { border-radius: 0; font-family: var(--mono); }
.segmented button.is-active {
  background: linear-gradient(90deg, #00e7ff18, #b9ff2c13);
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent), inset 0 0 18px #00e7ff0d;
}

.result-set {
  border-radius: 0;
  border-color: #35515c;
  background:
    linear-gradient(90deg, #00e7ff08 1px, transparent 1px) 0 0 / 20px 20px,
    linear-gradient(145deg, #132129, #091116);
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.result-set::before,
.result-set::after { display: none; }
.result-set-head { border-bottom-color: #3a5b6680; }
.result-set-title::before {
  border-radius: 0;
  background: var(--accent-2);
  box-shadow: 0 0 7px var(--accent-2);
  transform: rotate(45deg);
}
.result-set-score,
.set-tag { font-family: var(--mono); }
.ball {
  border: 1px solid #cafc7e;
  background: linear-gradient(145deg, #d4ff85, #8ee700 72%);
  color: #071005;
  box-shadow: inset 0 -8px 14px #4a880033, 0 0 12px #b9ff2c1f;
  text-shadow: 0 1px 0 #ffffff55;
}
.ball.is-rolling { background: #284049; color: var(--accent-2); }
.save-purchase-btn { border-color: #4c737d; background: #00e7ff08; }

.purchase-target-row input,
select {
  border-radius: 0;
  border-color: #35505b;
  background: #071016;
  box-shadow: inset 3px 0 0 #00e7ff45;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.purchase-result-summary,
.purchase-round,
.cycle-profile,
.cycle-profile-summary {
  border-radius: 0;
  border-color: #304b56;
  background: #081116;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.purchase-result-badge {
  border-radius: 0;
  font-family: var(--mono);
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
.purchase-result-badge.is-win { border-color: var(--accent); background: #b9ff2c15; }
.purchase-set.is-winning { border-top-color: var(--accent); background: linear-gradient(180deg, #b9ff2c14, transparent); }
.purchase-set .ball.is-main-match { border-color: #f0ffc6; box-shadow: 0 0 15px #b9ff2c73; }
.purchase-set .ball.is-bonus-match { border-color: var(--hot); box-shadow: 0 0 12px #ff3d7f55; }

.fold-card > summary { font-family: var(--mono); }
.fold-card > summary::after { color: var(--accent-2); }
.insight-grid strong,
.range-head strong,
.cycle-strength-value { color: var(--accent); text-shadow: 0 0 8px #b9ff2c42; }
.field + .field,
.toggle { border-top-color: #2a414b; }
input[type="range"] { accent-color: var(--accent); filter: drop-shadow(0 0 4px #b9ff2c44); }
.compact-action { border-color: #385b66; border-radius: 0; color: var(--accent-2); }
.toggle input {
  border-radius: 0;
  border-color: #46616b;
  background: #17262d;
  clip-path: polygon(5px 0, 100% 0, 100% calc(100% - 5px), calc(100% - 5px) 100%, 0 100%, 0 5px);
}
.toggle input::after { border-radius: 0; background: #8aa1a9; }
.toggle input:checked { border-color: var(--accent); background: #85ce10; box-shadow: 0 0 10px #b9ff2c45; }
.toggle input:checked::after { background: #071005; }

.ranking-row { border-top-color: #263d4788; }
.ranking-place,
.ranking-count { font-family: var(--mono); }
.ranking-number {
  border-radius: 0;
  border-color: #41616b;
  background: #0d1b21;
  color: #c4e7ee;
  clip-path: polygon(22% 0, 78% 0, 100% 22%, 100% 78%, 78% 100%, 22% 100%, 0 78%, 0 22%);
}
.ranking-row:nth-child(-n+3) .ranking-number { background: var(--accent); border-color: var(--accent); color: #071005; box-shadow: 0 0 11px #b9ff2c42; }
.ranking-bar { border-radius: 0; background: #14272f; }
.ranking-bar-fill { border-radius: 0; background: linear-gradient(90deg, var(--accent-2), #4f9daa); }
.ranking-row:nth-child(-n+3) .ranking-bar-fill { background: linear-gradient(90deg, var(--accent-2), var(--accent)); box-shadow: 0 0 8px #00e7ff66; }
.history-row { border-bottom-color: #263d47; }

.bottom-bar {
  border: 0;
  border-top: 1px solid #3d626e;
  border-radius: 0;
  background:
    linear-gradient(90deg, #00e7ff0b, transparent 25%, transparent 75%, #b9ff2c09),
    #070d12f5;
  box-shadow: 0 -8px 35px #000b, inset 0 1px 0 #00e7ff20;
  backdrop-filter: blur(22px);
}
.bottom-bar::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14%;
  width: 23%;
  height: 2px;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
}
.bottom-nav button {
  border-radius: 0;
  color: #718d96;
  font-family: var(--mono);
}
.bottom-nav button.is-active {
  color: var(--accent);
  background: linear-gradient(180deg, #b9ff2c10, #00e7ff08);
  box-shadow: inset 0 -2px 0 var(--accent), inset 0 0 16px #b9ff2c08;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  text-shadow: 0 0 8px #b9ff2c66;
}
.bottom-nav button.is-active .icon { filter: drop-shadow(0 0 5px #b9ff2c88); }
.app-version-badge { color: #506a73; letter-spacing: .12em; }
.app-version-badge::before { content: "CORE // "; color: #36535e; }
.toast {
  border-radius: 0;
  border-color: var(--accent-2);
  background: #071116ed;
  color: #dffaff;
  box-shadow: 0 0 25px #00e7ff25;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}
#matrix-canvas { mix-blend-mode: screen; }
body.is-generating #matrix-canvas { opacity: .34; }

/* Slow RGB wave: color travels through rails and number modules instead of flashing. */
.app-header::after,
.panel::before,
.bottom-bar::before {
  background: linear-gradient(90deg,
    #00e7ff 0%,
    #7b61ff 18%,
    #ff3d9a 38%,
    #ffb21d 58%,
    #b9ff2c 78%,
    #00e7ff 100%);
  background-size: 420% 100%;
  animation: neon-rail-wave 10s linear infinite;
}
.quick-links + .panel::before { animation-delay: -2.4s; }
.purchase-library::before { animation-delay: -4.8s; }
#ranking-panel-details::before,
#settings-main-panel::before { animation-delay: -1.8s; }
#history-panel-details::before,
#settings-strategy-panel::before { animation-delay: -3.6s; }

body::before { animation: grid-drift 22s linear infinite; }
.brand-mark { animation: neon-frame-wave 9s ease-in-out infinite; }
.brand-mark i { animation: neon-pixel-wave 8s ease-in-out infinite; }
.brand-mark i:nth-child(2) { animation-delay: -1.2s; }
.brand-mark i:nth-child(3) { animation-delay: -2.4s; }
.brand-mark i:nth-child(4) { animation-delay: -3.6s; }

.primary {
  background-image: linear-gradient(115deg,
    #b9ff2c 0%,
    #00e7ff 24%,
    #9a75ff 49%,
    #ff5aa7 72%,
    #b9ff2c 100%);
  background-size: 360% 100%;
  animation: neon-surface-wave 12s linear infinite;
}
.primary:hover {
  background-image: linear-gradient(115deg,
    #d7ff7d 0%,
    #65f2ff 24%,
    #bd9cff 49%,
    #ff8ac2 72%,
    #d7ff7d 100%);
}

.hero-ai-numbers span {
  animation: neon-display-wave 8.4s ease-in-out infinite;
}
.hero-ai-numbers span:nth-child(2),
#results-list .ball:nth-child(2),
.latest-balls .history-mini-ball:nth-child(2) { animation-delay: -1.2s; }
.hero-ai-numbers span:nth-child(3),
#results-list .ball:nth-child(3),
.latest-balls .history-mini-ball:nth-child(3) { animation-delay: -2.4s; }
.hero-ai-numbers span:nth-child(4),
#results-list .ball:nth-child(4),
.latest-balls .history-mini-ball:nth-child(4) { animation-delay: -3.6s; }
.hero-ai-numbers span:nth-child(5),
#results-list .ball:nth-child(5),
.latest-balls .history-mini-ball:nth-child(5) { animation-delay: -4.8s; }
.hero-ai-numbers span:nth-child(6),
#results-list .ball:nth-child(6),
.latest-balls .history-mini-ball:nth-child(6) { animation-delay: -6s; }

.latest-balls .history-mini-ball {
  animation: neon-ring-wave 8.4s ease-in-out infinite;
}
#results-list .ball {
  animation: neon-number-wave 9.6s ease-in-out infinite;
}
.ball.is-rolling { animation: neon-display-wave .72s ease-in-out infinite; }
.ball.is-locked { animation: number-lock .28s ease-out, neon-number-wave 9.6s ease-in-out infinite; }

.quick-link > .icon { animation: neon-icon-wave 8s ease-in-out infinite; }
.quick-link:nth-child(2) > .icon { animation-delay: -4s; }
.bottom-nav button.is-active,
.bottom-nav button.is-active .icon { animation: neon-active-wave 8s ease-in-out infinite; }
.ranking-bar-fill {
  background-size: 320% 100%;
  animation: neon-rail-wave 9s linear infinite;
}

@keyframes neon-rail-wave {
  from { background-position: 0% 50%; }
  to { background-position: 420% 50%; }
}
@keyframes neon-surface-wave {
  from { background-position: 0% 50%; box-shadow: 0 0 18px #b9ff2c24; }
  35% { box-shadow: 0 0 24px #00e7ff35; }
  68% { box-shadow: 0 0 24px #ff3d9a2d; }
  to { background-position: 360% 50%; box-shadow: 0 0 18px #b9ff2c24; }
}
@keyframes grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 68px 34px, 34px 68px; }
}
@keyframes neon-frame-wave {
  0%, 100% { border-color: #00e7ff; box-shadow: inset 0 0 13px #00e7ff24, 0 0 12px #00e7ff2f; }
  33% { border-color: #a47cff; box-shadow: inset 0 0 13px #a47cff24, 0 0 14px #a47cff38; }
  66% { border-color: #b9ff2c; box-shadow: inset 0 0 13px #b9ff2c24, 0 0 14px #b9ff2c38; }
}
@keyframes neon-pixel-wave {
  0%, 100% { background: #00e7ff; box-shadow: 0 0 8px #00e7ffaa; }
  33% { background: #ff55a6; box-shadow: 0 0 8px #ff55a6aa; }
  66% { background: #b9ff2c; box-shadow: 0 0 8px #b9ff2caa; }
}
@keyframes neon-display-wave {
  0%, 100% { border-color: #00e7ff; color: #00e7ff; text-shadow: 0 0 9px #00e7ffaa; box-shadow: inset 0 0 9px #00e7ff1c; }
  33% { border-color: #a47cff; color: #c5aaff; text-shadow: 0 0 9px #a47cffaa; box-shadow: inset 0 0 9px #a47cff1c; }
  66% { border-color: #b9ff2c; color: #b9ff2c; text-shadow: 0 0 9px #b9ff2caa; box-shadow: inset 0 0 9px #b9ff2c1c; }
}
@keyframes neon-ring-wave {
  0%, 100% { border-color: #00e7ff; color: #7ff5ff; box-shadow: inset 0 0 10px #00e7ff1f, 0 0 8px #00e7ff20; }
  33% { border-color: #9b74ff; color: #c6b2ff; box-shadow: inset 0 0 10px #9b74ff1f, 0 0 8px #9b74ff20; }
  66% { border-color: #b9ff2c; color: #cfff75; box-shadow: inset 0 0 10px #b9ff2c1f, 0 0 8px #b9ff2c20; }
}
@keyframes neon-number-wave {
  0%, 100% { border-color: #b9ff2c; background: linear-gradient(145deg, #d5ff88, #8ee700 72%); box-shadow: inset 0 -8px 14px #4a880033, 0 0 13px #b9ff2c2f; }
  25% { border-color: #00e7ff; background: linear-gradient(145deg, #8bf7ff, #00bed2 72%); box-shadow: inset 0 -8px 14px #006e7a33, 0 0 13px #00e7ff38; }
  50% { border-color: #a57cff; background: linear-gradient(145deg, #cbb5ff, #8d62ef 72%); box-shadow: inset 0 -8px 14px #4a2e9133, 0 0 13px #a57cff38; }
  75% { border-color: #ff5aa7; background: linear-gradient(145deg, #ff9bcb, #f33c91 72%); box-shadow: inset 0 -8px 14px #8b174e33, 0 0 13px #ff5aa738; }
}
@keyframes neon-icon-wave {
  0%, 100% { color: #00e7ff; filter: drop-shadow(0 0 5px #00e7ff66); }
  33% { color: #a47cff; filter: drop-shadow(0 0 5px #a47cff66); }
  66% { color: #b9ff2c; filter: drop-shadow(0 0 5px #b9ff2c66); }
}
@keyframes neon-active-wave {
  0%, 100% { color: #b9ff2c; filter: drop-shadow(0 0 4px #b9ff2c55); }
  33% { color: #00e7ff; filter: drop-shadow(0 0 4px #00e7ff55); }
  66% { color: #ff66ad; filter: drop-shadow(0 0 4px #ff66ad55); }
}

.info-entry {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  color: var(--text);
  text-align: left;
}
.info-entry > .icon { color: var(--accent-2); filter: drop-shadow(0 0 6px #00e7ff55); }
.info-entry > span:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.info-entry strong { font-size: 14px; }
.info-entry small { color: var(--muted); line-height: 1.5; }
.detail-page-heading { grid-template-columns: auto minmax(0, 1fr); justify-content: start; }
.detail-page-heading .icon-button { width: 48px; height: 48px; padding: 12px; }
.operation-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  background:
    radial-gradient(circle at 5% 50%, #00e7ff18, transparent 32%),
    linear-gradient(145deg, #101e25, #091116);
}
.operation-hero-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid #44727d;
  color: var(--accent);
  background: #061116;
  box-shadow: inset 0 0 22px #00e7ff15, 0 0 18px #00e7ff12;
  clip-path: polygon(18% 0, 82% 0, 100% 18%, 100% 82%, 82% 100%, 18% 100%, 0 82%, 0 18%);
}
.operation-hero-icon .icon { width: 30px; height: 30px; }
.operation-hero > div:last-child { display: grid; gap: 7px; }
.operation-hero h2 { font-size: 18px; }
.operation-hero p { color: var(--muted); font-size: 13px; line-height: 1.75; }
.operation-section { display: grid; gap: 18px; }
.operation-check-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.operation-check-list li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid #29414b;
}
.operation-check-list li:first-child { padding-top: 0; border-top: 0; }
.operation-check-list li > span { color: var(--accent-2); font: 11px var(--mono); padding-top: 2px; }
.operation-check-list p { color: var(--muted); font-size: 12px; line-height: 1.65; }
.operation-check-list strong { display: block; margin-bottom: 3px; color: var(--text); font-size: 13px; }
.responsible-notice {
  padding: 13px 15px;
  border-left: 2px solid var(--accent);
  background: #b9ff2c0b;
  color: #d6e9c0;
  font-size: 12px;
  line-height: 1.65;
}
.data-disclosure-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.data-disclosure-grid article {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 132px;
  padding: 15px;
  border: 1px solid #2b4650;
  background: #071116;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 9px 100%, 0 calc(100% - 9px));
}
.data-disclosure-grid small { color: var(--accent-2); font: 9px var(--mono); letter-spacing: .06em; }
.data-disclosure-grid strong { font-size: 13px; }
.data-disclosure-grid p { color: var(--muted); font-size: 11px; line-height: 1.65; }
.delete-data-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid #2a414b;
}
.delete-data-box > div { display: grid; gap: 5px; }
.delete-data-box p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.danger-action {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-color: #7e3b55;
  color: #ff8bb9;
  background: #ff3d7f0a;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}
.danger-action:hover { border-color: #ff5d9e; background: #ff3d7f14; }
.operator-info-list { display: grid; margin: 0; }
.operator-info-list > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-top: 1px solid #29414b; }
.operator-info-list > div:first-child { border-top: 0; padding-top: 0; }
.operator-info-list dt { color: var(--muted); font-size: 12px; }
.operator-info-list dd { min-width: 0; margin: 0; color: var(--text); font: 12px var(--mono); overflow-wrap: anywhere; }
.release-config-note { text-align: center; }

.web-use-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  margin-bottom: 18px;
  padding: 15px 17px;
  border: 1px solid #3a6872;
  background: linear-gradient(135deg, #07171d, #0b1513);
  box-shadow: inset 0 0 28px #00e7ff0d;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 12px 100%, 0 calc(100% - 12px));
}
.web-use-notice[hidden] { display: none; }
.web-use-symbol {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--accent-2);
  color: var(--accent-2);
  background: #041015;
  font: 700 10px var(--mono);
  letter-spacing: .12em;
  box-shadow: inset 0 0 16px #00e7ff18, 0 0 12px #00e7ff18;
}
.web-use-notice > div:nth-child(2) { display: grid; gap: 4px; }
.web-use-notice strong { font-size: 13px; }
.web-use-notice p { color: var(--muted); font-size: 11px; line-height: 1.65; }
.web-use-notice button { min-width: 142px; }
.is-web-runtime .purchase-target,
.is-web-runtime .purchase-library,
.is-web-runtime .delete-data-box { display: none; }
.is-web-runtime .session-note {
  border-left-color: var(--accent-2);
  background: #00e7ff0a;
  color: #bfe7ee;
}
.has-app-open-sheet { overflow: hidden; }
.app-open-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  align-items: end;
  justify-items: center;
  padding: 24px;
  background: #000b;
  backdrop-filter: blur(8px);
}
.app-open-layer[hidden] { display: none; }
.app-open-sheet {
  width: min(100%, 540px);
  display: grid;
  gap: 16px;
  padding: 13px 24px 24px;
  border: 1px solid #47717a;
  border-bottom-color: var(--accent);
  background: linear-gradient(155deg, #102129, #071015 60%);
  box-shadow: 0 -18px 70px #000c, inset 0 0 50px #00e7ff0b;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 0 100%);
}
.app-open-sheet:focus { outline: none; }
.app-open-handle { width: 42px; height: 3px; margin: 0 auto 3px; background: #5f8289; }
.app-open-brand { display: flex; align-items: center; gap: 12px; }
.app-open-brand > div { display: grid; gap: 4px; }
.app-open-brand small { color: var(--accent-2); font: 8px var(--mono); letter-spacing: .13em; }
.app-open-brand strong { font-size: 20px; letter-spacing: -.04em; }
.app-open-sheet > p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.app-open-store-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #294851;
  background: #061116;
  font: 11px var(--mono);
}
.app-open-store-status span { color: var(--muted); }
.app-open-store-status strong { color: #ffd170; }
.app-open-status {
  min-height: 42px;
  padding: 11px 13px;
  border-left: 2px solid var(--accent-2);
  background: #00e7ff09;
}
.app-open-status[data-state="preparing"] { border-left-color: #ffd170; background: #ffd1700a; color: #e9d39f; }
.app-open-status[data-state="error"] { border-left-color: #ff6c9e; color: #ffabc7; }
.app-open-actions { display: grid; gap: 9px; }
.app-open-actions button { width: 100%; min-height: 48px; }
.app-open-actions button:disabled { opacity: .45; cursor: not-allowed; }
.app-open-footnote { text-align: center; font-size: 10px !important; }

@media (max-width: 719px) {
  .app-shell { padding-top: max(10px, env(safe-area-inset-top)); }
  .app-header { min-height: 58px; margin-bottom: 14px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-mark { width: 32px; height: 32px; padding: 7px; }
  .brand-copy small { font-size: 6px; margin-bottom: 4px; }
  .connection-tag { max-width: 118px; padding: 6px 8px; font-size: 9px; }
  .panel { padding: 21px; }
  .generation-workspace { gap: 11px; }
  .generate-action { min-height: 104px; padding: 16px 12px; }
  .hero-ai-visual { padding: 14px 10px; }
  .quick-link { padding: 17px 13px; }
  .bottom-nav { gap: 7px; }
  .settings-save-panel { align-items: stretch; flex-direction: column; }
  .settings-save-btn { width: 100%; }
  .data-disclosure-grid { grid-template-columns: 1fr; }
  .data-disclosure-grid article { min-height: 0; }
  .delete-data-box { align-items: stretch; flex-direction: column; }
  .danger-action { width: 100%; }
  .operator-info-list > div { grid-template-columns: 95px minmax(0, 1fr); }
  .web-use-notice { grid-template-columns: auto minmax(0, 1fr); }
  .web-use-notice button { grid-column: 1 / -1; width: 100%; }
  .app-open-layer { padding: 0; }
  .app-open-sheet {
    width: 100%;
    max-height: calc(100dvh - 18px);
    overflow-y: auto;
    padding: 12px 20px max(24px, env(safe-area-inset-bottom));
    border-left: 0;
    border-right: 0;
  }
}

@media (max-width: 359px) {
  .brand-copy small { display: none; }
  .brand { font-size: 16px; }
  .connection-tag { max-width: 98px; }
  .panel { padding: 17px; }
  .generation-workspace { gap: 8px; }
  .generate-action { min-height: 98px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Web-only Shinbang family theme. The installed apps keep the Matrix theme. */
html.is-web-runtime {
  color-scheme: light;
  background: #f8f6fb;
}
body.is-web-runtime {
  --bg: #f8f6fb;
  --panel: #fffdfd;
  --panel-raised: #ffffff;
  --border: #e6ddea;
  --border-hot: #d1c4df;
  --text: #272532;
  --muted: #716d7d;
  --accent: #5969a5;
  --accent-2: #ef6ca8;
  --hot: #e95484;
  color-scheme: light;
  background:
    radial-gradient(circle at 12% 0%, #ffdce8 0, transparent 27%),
    radial-gradient(circle at 92% 18%, #dfe9ff 0, transparent 25%),
    linear-gradient(180deg, #faf8fc 0%, #f7f4fa 56%, #f5f2f8 100%);
}
body.is-web-runtime::before {
  background:
    radial-gradient(circle at 7% 38%, #f7bed333 0 84px, transparent 85px),
    radial-gradient(circle at 96% 72%, #c8dcff35 0 110px, transparent 111px);
  -webkit-mask-image: none;
  mask-image: none;
  animation: none;
}
body.is-web-runtime::after { display: none; }
.is-web-runtime #matrix-canvas { display: none; }
.is-web-runtime h1,
.is-web-runtime h2 { color: var(--text); text-shadow: none; }
.is-web-runtime .app-shell { max-width: 900px; padding-top: max(18px, env(safe-area-inset-top)); }

.is-web-runtime button {
  border-radius: 18px;
  transition: color .18s, background .18s, border-color .18s, box-shadow .18s, transform .18s;
}
.is-web-runtime button:hover { border-color: #c9bdd7; background-color: #f5f0f8; }
.is-web-runtime button:focus-visible,
.is-web-runtime select:focus-visible,
.is-web-runtime input:focus-visible,
.is-web-runtime summary:focus-visible { outline-color: #7b88bd; }

.is-web-runtime .app-header {
  min-height: 66px;
  margin-bottom: 18px;
  padding: 5px 3px 10px;
  border-bottom: 0;
}
.is-web-runtime .app-header::after { display: none; }
.is-web-runtime .brand {
  gap: 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 21px;
  letter-spacing: -.045em;
}
.is-web-runtime .brand-copy { gap: 3px; line-height: 1.08; }
.is-web-runtime .brand-copy small {
  margin: 0;
  color: #e64f94;
  font-family: inherit;
  font-size: 8px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .13em;
}
.is-web-runtime .brand b { color: #5969a5; text-shadow: none; }
.is-web-runtime .brand-mark {
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid #eaddea;
  border-radius: 15px;
  background: #fff url("assets/app-icon-ai-lotto.png") center / cover no-repeat;
  box-shadow: 0 7px 18px #715a7a1d;
  clip-path: none;
  transform: none;
  animation: none;
}
.is-web-runtime .brand-mark i { display: none; animation: none; }
.is-web-runtime .connection-tag {
  min-height: 33px;
  padding: 7px 11px;
  border: 1px solid #ded6e6;
  border-radius: 999px;
  background: #ffffffc7;
  color: #716d7d;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  clip-path: none;
  box-shadow: 0 5px 14px #76677e0c;
}
.is-web-runtime .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8a9acb;
  box-shadow: none;
  transform: none;
}
.is-web-runtime .connection-tag.is-ok .status-dot,
.is-web-runtime .connection-tag.is-fresh .status-dot { background: #67b78d; box-shadow: none; }

.is-web-runtime .app-view { gap: 20px; }
.is-web-runtime .panel {
  border: 1px solid var(--border);
  border-radius: 26px;
  background: #fffdfd;
  box-shadow: 0 13px 34px #6f5f7812, inset 0 1px 0 #ffffff;
  clip-path: none;
}
.is-web-runtime .panel::before { display: none; }
.is-web-runtime .eyebrow {
  color: #e85b9b;
  font-family: inherit;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: .12em;
  text-shadow: none;
}
.is-web-runtime .eyebrow::before,
.is-web-runtime .eyebrow::after { display: none; }
.is-web-runtime .small-pill {
  padding: 5px 10px;
  border-color: #e2d9e9;
  border-radius: 999px;
  background: #f7f1f8;
  color: #746f80;
  font-family: inherit;
  clip-path: none;
}

.is-web-runtime .generator-panel {
  border-color: #eadde8;
  background:
    radial-gradient(circle at 96% 3%, #d7e5ff 0 90px, transparent 91px),
    radial-gradient(circle at 5% 98%, #ffdce9 0 110px, transparent 111px),
    linear-gradient(145deg, #fffefe, #fbf7fc 72%);
  box-shadow: 0 16px 38px #765f7a17;
}
.is-web-runtime .primary {
  border-color: #5969a5;
  border-radius: 20px;
  background: linear-gradient(135deg, #6878b6, #52629d);
  background-size: auto;
  color: #fff;
  box-shadow: 0 10px 22px #5969a52c, inset 0 1px 0 #ffffff35;
  clip-path: none;
  text-shadow: none;
  animation: none;
}
.is-web-runtime .primary:hover {
  border-color: #4f5e96;
  background: linear-gradient(135deg, #7483bd, #5969a5);
  box-shadow: 0 12px 24px #5969a538;
}
.is-web-runtime .secondary {
  border-color: #ded4e4;
  border-radius: 18px;
  background: #f7f2f8;
  color: #4f4a59;
  clip-path: none;
  box-shadow: none;
}
.is-web-runtime .generate-action {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 12px;
  justify-self: center;
  width: min(100%, 420px);
  min-height: 66px;
  padding: 13px 18px;
  border-radius: 18px;
  overflow: hidden;
}
.is-web-runtime .generate-action .icon {
  display: block;
  grid-column: 3;
  grid-row: 1;
  width: 20px;
  height: 20px;
}
.is-web-runtime .generate-action strong {
  grid-column: 1;
  grid-row: 1;
  font-size: 17px;
}
.is-web-runtime .generate-action > span {
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  background: #ffffff1f;
  font-family: inherit;
  font-size: 10px;
  font-weight: 700;
}
.is-web-runtime .generate-action::after {
  display: none;
}
.is-web-runtime .hero-ai-visual {
  border-color: #e0d7e9;
  border-radius: 22px;
  background:
    radial-gradient(circle at 85% 5%, #ffffff 0, transparent 32%),
    linear-gradient(145deg, #f6eaf4, #eaf0fb);
  box-shadow: inset 0 1px 0 #fff, 0 8px 20px #7b6c8610;
  clip-path: none;
  font-family: inherit;
}
.is-web-runtime .hero-ai-header { color: #777187; font-weight: 700; }
.is-web-runtime .hero-ai-header::before { color: #ef6ca8; text-shadow: none; }
.is-web-runtime .hero-ai-header strong { color: #5969a5; text-shadow: none; }
.is-web-runtime .hero-ai-numbers span {
  border: 1px solid #e2d8e8;
  border-radius: 12px;
  background: #ffffffd9;
  color: #5969a5;
  text-shadow: none;
  box-shadow: 0 5px 12px #6b5e740d;
  clip-path: none;
  animation: none;
}
.is-web-runtime .hero-ai-grid span { border-radius: 999px; background: #d6cae5; }
.is-web-runtime .hero-ai-grid span:nth-child(3n) { background: #efa7c9; box-shadow: none; }
.is-web-runtime .hero-ai-beam { background: linear-gradient(transparent, #ffffffb8, transparent); }
.is-web-runtime .selection-summary {
  margin-top: 20px;
  padding: 15px 16px;
  border: 1px solid #e7deeb;
  border-radius: 18px;
  background: #fbf7fc;
}
.is-web-runtime .selection-summary small,
.is-web-runtime #hero-set-badge { font-family: inherit; }
.is-web-runtime .selection-summary strong { color: var(--text); }
.is-web-runtime .selection-summary .icon { color: #5969a5; }

.is-web-runtime .quick-link {
  border-radius: 22px;
  border-color: #eadde6;
  background: #fceef4;
  clip-path: none;
  box-shadow: 0 8px 22px #6d5d7610;
}
.is-web-runtime .quick-link:nth-child(2) { border-color: #dce4f1; background: #eef4fb; }
.is-web-runtime .quick-link > .icon { color: #e55296; filter: none; animation: none; }
.is-web-runtime .quick-link:nth-child(2) > .icon { color: #4f79ad; }
.is-web-runtime .quick-link strong { color: var(--text); }
.is-web-runtime .chevron { color: #8b83a0; }
.is-web-runtime .latest-panel h2::before,
.is-web-runtime .purchase-library h2::before,
.is-web-runtime #ranking-panel-details h2::before,
.is-web-runtime #history-panel-details h2::before { display: none; }

.is-web-runtime .history-mini-ball,
.is-web-runtime .ball {
  border-radius: 50%;
  border-color: #e8c96e;
  background: linear-gradient(145deg, #ffe993, #f6c85e);
  color: #4b3a14;
  box-shadow: inset 0 -5px 10px #ac74151f, 0 5px 12px #6c586a16;
  clip-path: none;
  text-shadow: none;
  animation: none;
}
.is-web-runtime .numbers .ball:nth-child(6n + 2),
.is-web-runtime .latest-balls .history-mini-ball:nth-child(2) { border-color: #8bc5ea; background: linear-gradient(145deg, #bde8ff, #79bce8); color: #234661; }
.is-web-runtime .numbers .ball:nth-child(6n + 3),
.is-web-runtime .latest-balls .history-mini-ball:nth-child(3) { border-color: #ee9bac; background: linear-gradient(145deg, #ffc5d0, #ed8da2); color: #6b2940; }
.is-web-runtime .numbers .ball:nth-child(6n + 4),
.is-web-runtime .latest-balls .history-mini-ball:nth-child(4) { border-color: #aeb5c3; background: linear-gradient(145deg, #e4e7ed, #b6bdca); color: #3c4351; }
.is-web-runtime .numbers .ball:nth-child(6n + 5),
.is-web-runtime .latest-balls .history-mini-ball:nth-child(5) { border-color: #9dcfae; background: linear-gradient(145deg, #cef0d7, #8bc8a2); color: #27513a; }
.is-web-runtime .numbers .ball:nth-child(6n),
.is-web-runtime .latest-balls .history-mini-ball:nth-child(6) { border-color: #c3a9df; background: linear-gradient(145deg, #ead8fa, #bea1dc); color: #4f3868; }
.is-web-runtime .ball.is-locked { animation: number-lock .28s ease-out; }
.is-web-runtime .ball.is-rolling { background: #ebe5ef; color: #777087; }

.is-web-runtime .page-heading h1 { font-weight: 800; }
.is-web-runtime .icon-button {
  border-radius: 50%;
  border-color: #e0d6e6;
  background: #fff;
  color: #5969a5;
  clip-path: none;
}
.is-web-runtime .segmented {
  padding: 5px;
  border-color: #e2dae8;
  border-radius: 18px;
  background: #f2edf5;
  clip-path: none;
}
.is-web-runtime .segmented button { border-radius: 14px; font-family: inherit; }
.is-web-runtime .segmented button.is-active {
  background: #fff;
  color: #5969a5;
  box-shadow: 0 5px 15px #65556e12;
}
.is-web-runtime .result-set {
  border-color: #e5dae8;
  border-radius: 24px;
  background: linear-gradient(145deg, #fff, #fbf7fc);
  box-shadow: 0 10px 26px #6f5e7811;
  clip-path: none;
}
.is-web-runtime .result-set-head { border-bottom-color: #e3d9e7; }
.is-web-runtime .result-set-title::before {
  border-radius: 50%;
  background: #ef6ca8;
  box-shadow: none;
  transform: none;
}
.is-web-runtime .result-set-score,
.is-web-runtime .set-tag { font-family: inherit; }
.is-web-runtime .session-note {
  border: 1px solid #dddaed;
  border-radius: 16px;
  background: #f0f2fb;
  color: #59617a;
}

.is-web-runtime .purchase-target-row input,
.is-web-runtime select {
  border-radius: 16px;
  border-color: #ded5e3;
  background: #fff;
  color: var(--text);
  box-shadow: none;
  clip-path: none;
}
.is-web-runtime .purchase-result-summary,
.is-web-runtime .purchase-round,
.is-web-runtime .cycle-profile,
.is-web-runtime .cycle-profile-summary,
.is-web-runtime .data-disclosure-grid article {
  border-color: #e4dbe8;
  border-radius: 18px;
  background: #fbf8fc;
  clip-path: none;
}
.is-web-runtime .fold-card > summary { font-family: inherit; }
.is-web-runtime .fold-card > summary::after { color: #e85b9b; }
.is-web-runtime .insight-grid strong,
.is-web-runtime .range-head strong,
.is-web-runtime .cycle-strength-value { color: #5969a5; text-shadow: none; }
.is-web-runtime input[type="range"] { accent-color: #5969a5; filter: none; }
.is-web-runtime .compact-action { border-radius: 13px; border-color: #d9cfe0; color: #5969a5; }
.is-web-runtime .toggle input {
  border-radius: 999px;
  border-color: #c9c3d0;
  background: #ded9e3;
  clip-path: none;
}
.is-web-runtime .toggle input::after { border-radius: 50%; background: #fff; }
.is-web-runtime .toggle input:checked { border-color: #5969a5; background: #5969a5; box-shadow: none; }
.is-web-runtime .toggle input:checked::after { background: #fff; }
.is-web-runtime .ranking-number {
  border-radius: 50%;
  border-color: #d9cfe0;
  background: #f4eff7;
  color: #565062;
  clip-path: none;
}
.is-web-runtime .ranking-row:nth-child(-n + 3) .ranking-number { background: #6878b6; border-color: #6878b6; color: #fff; box-shadow: none; }
.is-web-runtime .ranking-bar { border-radius: 999px; background: #e8e2eb; }
.is-web-runtime .ranking-bar-fill,
.is-web-runtime .ranking-row:nth-child(-n + 3) .ranking-bar-fill {
  border-radius: 999px;
  background: linear-gradient(90deg, #ef86b6, #7887bb);
  box-shadow: none;
  animation: none;
}

.is-web-runtime .web-use-notice {
  border: 1px solid #efcada;
  border-radius: 25px;
  background: linear-gradient(135deg, #fde7ef, #faf1f7);
  box-shadow: 0 10px 28px #7b5e7312;
  clip-path: none;
}
.is-web-runtime .web-use-symbol {
  width: 52px;
  height: 52px;
  border-color: #f0a9c8;
  border-radius: 17px;
  background: #fff8fb;
  color: #e64f94;
  font-family: inherit;
  box-shadow: none;
}
.is-web-runtime .web-use-notice strong { color: var(--text); }
.is-web-runtime .web-use-notice p { color: #716a79; }

.is-web-runtime .bottom-bar {
  border: 1px solid #e5dce8;
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: #fffdfdf2;
  box-shadow: 0 -10px 32px #66576f16;
  backdrop-filter: blur(22px);
}
.is-web-runtime .bottom-bar::before { display: none; }
.is-web-runtime .bottom-nav button {
  border-radius: 16px;
  color: #8b8691;
  font-family: inherit;
}
.is-web-runtime .bottom-nav button.is-active {
  color: #5969a5;
  background: #eef0fa;
  box-shadow: none;
  clip-path: none;
  text-shadow: none;
  animation: none;
}
.is-web-runtime .bottom-nav button.is-active .icon { filter: none; animation: none; }
.is-web-runtime .app-version-badge { color: #aaa3ae; letter-spacing: .04em; }
.is-web-runtime .app-version-badge::before { display: none; }

.is-web-runtime .app-open-layer {
  background: #39313f73;
  backdrop-filter: blur(10px);
}
.is-web-runtime .app-open-sheet {
  border: 1px solid #eadfe9;
  border-radius: 30px 30px 22px 22px;
  background:
    radial-gradient(circle at 95% 0%, #e3ebff 0 105px, transparent 106px),
    linear-gradient(155deg, #fffefe, #faf6fb 72%);
  box-shadow: 0 -18px 70px #4034463d;
  clip-path: none;
}
.is-web-runtime .app-open-handle { height: 4px; border-radius: 999px; background: #d2c7d4; }
.is-web-runtime .app-open-brand small { color: #e64f94; font-family: inherit; font-weight: 800; }
.is-web-runtime .app-open-brand strong { color: var(--text); }
.is-web-runtime .app-open-sheet > p { color: #716b78; }
.is-web-runtime .app-open-store-status {
  border-color: #e4dbe8;
  border-radius: 16px;
  background: #fff;
  color: var(--text);
  font-family: inherit;
}
.is-web-runtime .app-open-store-status span { color: #77707f; }
.is-web-runtime .app-open-store-status strong { color: #cf7c33; }
.is-web-runtime .app-open-status {
  border: 1px solid #dae0f0;
  border-left-width: 1px;
  border-radius: 16px;
  background: #f0f3fb;
  color: #59617a;
}
.is-web-runtime .app-open-status[data-state="preparing"] { border-color: #edd9bd; background: #fff7e9; color: #8b643b; }
.is-web-runtime .app-open-status[data-state="error"] { border-color: #efc2d1; background: #fff0f4; color: #b94770; }
.is-web-runtime .app-open-actions { gap: 10px; }
.is-web-runtime .app-open-actions button { min-height: 52px; border-radius: 18px; }
.is-web-runtime .toast {
  border-color: #d7cce0;
  border-radius: 18px;
  background: #fffdfdf2;
  color: #3f3947;
  box-shadow: 0 12px 32px #55475f24;
  clip-path: none;
}

@media (max-width: 719px) {
  .is-web-runtime .app-shell {
    padding: max(10px, env(safe-area-inset-top)) 14px calc(116px + env(safe-area-inset-bottom));
  }
  .is-web-runtime .app-header { min-height: 62px; margin-bottom: 12px; }
  .is-web-runtime .brand { font-size: 18px; }
  .is-web-runtime .brand-mark { width: 42px; height: 42px; border-radius: 14px; }
  .is-web-runtime .connection-tag { max-width: 126px; font-size: 9px; }
  .is-web-runtime .panel { padding: 20px; border-radius: 24px; }
  .is-web-runtime .generation-workspace { grid-template-columns: 1fr; gap: 12px; margin-top: 22px; }
  .is-web-runtime .generate-action {
    grid-template-columns: auto 1fr;
    align-items: center;
    column-gap: 12px;
    min-height: 58px;
    padding: 11px 15px;
    border-radius: 17px;
  }
  .is-web-runtime .generate-action .icon { display: none; }
  .is-web-runtime .generate-action strong { font-size: 16px; }
  .is-web-runtime .generate-action > span {
    justify-self: end;
  }
  .is-web-runtime .hero-ai-visual { padding: 16px; }
  .is-web-runtime .quick-links { gap: 10px; }
  .is-web-runtime .quick-link { padding: 16px 13px; border-radius: 20px; }
  .is-web-runtime .web-use-notice { border-radius: 22px; }
  .is-web-runtime .bottom-bar { border-radius: 25px 25px 0 0; padding-inline: 14px; }
  .is-web-runtime .app-open-sheet {
    border: 0;
    border-top: 1px solid #e7dce7;
    border-radius: 30px 30px 0 0;
  }
}

@media (max-width: 359px) {
  .is-web-runtime .brand-copy small { display: block; }
  .is-web-runtime .brand { font-size: 16px; }
  .is-web-runtime .brand-mark { width: 38px; height: 38px; }
  .is-web-runtime .connection-tag { max-width: 104px; }
  .is-web-runtime .panel { padding: 17px; }
}
