:root {
  --green-950: #003b35;
  --green-900: #00483f;
  --green-800: #006255;
  --green-700: #087565;
  --line: #dce5e1;
  --surface: #f5f8f7;
  --white: #ffffff;
  --text: #12312d;
  --muted: #6e7e7a;
  --lime: #c5e51c;
  --lime-2: #d9f145;
  --line-green: #08bc4d;
  --red: #db3329;
  --amber: #f2a633;
  --shadow: 0 16px 40px rgba(0, 50, 43, .14);
  --shadow-soft: 0 8px 24px rgba(0, 38, 32, .09);
}

* { box-sizing: border-box; }
html { overflow-x: hidden; background: #e8efec; }
body { margin: 0; min-width: 0; overflow-x: hidden; background: radial-gradient(circle at 50% 15%, #f9fcfb 0, #e8efec 58%, #dce8e4 100%); color: var(--text); font-family: "IBM Plex Sans Thai", Tahoma, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button { transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease; }
button:active { transform: translateY(1px); }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(197,229,28,.58); outline-offset: 2px; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.prototype-chip { position: fixed; z-index: 200; top: 3px; right: 8px; display: none; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 8px; background: var(--lime); color: #234100; font-size: 8px; font-weight: 700; white-space: nowrap; }
.prototype-chip span { width: 6px; height: 6px; border-radius: 50%; background: var(--green-900); }

.desktop-frame { min-height: 100dvh; }
.desktop-panel, .desktop-info { display: none; }
.mobile-app { position: relative; width: 100%; min-height: 100dvh; margin: 0 auto; overflow-x: clip; background: var(--surface); }

.app-header { position: sticky; z-index: 50; top: 0; display: flex; min-height: 68px; align-items: center; justify-content: space-between; padding: max(12px, env(safe-area-inset-top)) 14px 8px; background: linear-gradient(135deg, #003d37, #005349); color: white; }
.header-title { min-width: 0; text-align: center; }
.header-title strong, .header-title small { display: block; }
.header-title strong { font-size: 18px; line-height: 1.45; }
.header-title small { margin-top: 2px; color: #bcd7d1; font-size: 11px; font-weight: 400; }
.header-action, .back-button { display: grid; width: 44px; height: 44px; flex: none; place-items: center; border: 0; border-radius: 13px; background: transparent; color: white; cursor: pointer; }
.header-action:hover, .back-button:hover { background: rgba(255,255,255,.1); }
.header-spacer { width: 44px; }

.app-content { min-height: calc(100dvh - 68px); padding: 15px 13px 94px; outline: none; }
.app-content.without-header { min-height: 100dvh; }
.app-content.without-nav { padding-bottom: 15px; }
.app-content.without-header.without-nav .home-hero { min-height: 100dvh; margin-bottom: -15px; padding-bottom: 25px; }
.app-content.without-header.without-nav .line-preview { min-height: 100dvh; margin-bottom: -15px; }
[hidden] { display: none !important; }
.view { animation: enter .2s ease both; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } }
.stack { display: grid; gap: 12px; }
.card { padding: 17px; border: 1px solid rgba(214, 226, 221, .92); border-radius: 16px; background: white; box-shadow: 0 4px 16px rgba(0, 45, 38, .055); }
.card-title { margin: 0; font-size: 17px; line-height: 1.35; }
.card-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px 2px 9px; }
.section-title h2 { margin: 0; font-size: 15px; }
.section-title button { min-height: 44px; padding: 6px; border: 0; background: none; color: var(--green-700); font-size: 11px; cursor: pointer; }
.muted { color: var(--muted); }
.microcopy { margin: 9px 0 0; color: var(--muted); font-size: 10px; line-height: 1.5; text-align: center; }
.demo-label { display: inline-flex; align-items: center; gap: 5px; width: fit-content; padding: 4px 8px; border-radius: 99px; background: #eaf7ef; color: #08763a; font-size: 9px; font-weight: 700; }

.home-hero { position: relative; min-height: calc(100dvh - 72px); margin: -15px -13px -94px; padding: 28px 13px 34px; overflow: hidden; background: radial-gradient(circle at 10% -5%, rgba(42, 144, 125, .6), transparent 34%), radial-gradient(circle at 100% 38%, rgba(0, 104, 89, .46), transparent 35%), linear-gradient(155deg, #003b35 0%, #005c50 100%); color: white; }
.home-hero::before { content: ""; position: absolute; top: -145px; left: 50%; width: 390px; height: 390px; transform: translateX(-50%); border: 1px solid rgba(255,255,255,.06); border-radius: 50%; pointer-events: none; }
.home-hero > * { position: relative; z-index: 1; }
.home-brand { padding: 8px 45px 18px; text-align: center; }
.brand-mark { display: block; width: 68px; height: 68px; margin: 0 auto 8px; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(187, 224, 0, .2)); }
.home-brand h1 { margin: 0; font-size: 25px; line-height: 1.45; letter-spacing: -.02em; }
.home-brand p { margin: 4px 0 0; color: #d1e6e1; font-size: 12px; }
.draw-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; padding: 5px 9px; border: 1px solid rgba(255,255,255,.12); border-radius: 99px; background: rgba(0,27,24,.2); color: #c9dfda; font-size: 10px; }
.draw-status span { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(197,229,28,.12); }
.home-check-card { color: var(--text); box-shadow: 0 18px 36px rgba(0,31,27,.2); }
.checker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.checker-icon { display: grid; width: 38px; height: 38px; flex: none; place-items: center; border-radius: 11px; background: #edf6f2; color: var(--green-700); }
.checker-icon svg { width: 21px; height: 21px; }
.home-check-card .digit-input-row { margin: 16px 0 14px; }
.digit-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 16px 0; }
.digit-box { display: grid; height: 50px; place-items: center; border: 1px solid #cbd8d3; border-radius: 10px; background: #fbfdfc; color: var(--green-900); font-size: 22px; font-weight: 700; box-shadow: inset 0 1px 2px rgba(0,48,41,.03); }
.digit-box.empty { color: transparent; }
.digit-box.empty::after { content: ""; width: 12px; height: 2px; border-radius: 2px; background: #dfe5e2; }
.primary-button { display: flex; min-height: 50px; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px 16px; border: 0; border-radius: 12px; background: linear-gradient(135deg, #dcf54a, #b9df0c); color: #234100; font-weight: 700; cursor: pointer; box-shadow: 0 8px 20px rgba(166, 199, 0, .2); }
.primary-button svg { width: 19px; height: 19px; stroke-width: 2.2; }
.primary-button:active { transform: translateY(1px); }
.green-button { background: var(--line-green); color: white; box-shadow: 0 5px 14px rgba(0, 172, 72, .15); }
.outline-button { display: flex; min-height: 46px; align-items: center; justify-content: center; gap: 7px; width: 100%; padding: 10px 14px; border: 1px solid rgba(0,98,85,.65); border-radius: 13px; background: white; color: var(--green-700); font-weight: 600; cursor: pointer; }
.scan-link { display: flex; align-items: center; justify-content: center; gap: 7px; width: 100%; min-height: 44px; margin-top: 5px; border: 0; background: transparent; color: var(--green-700); font-size: 11px; font-weight: 600; cursor: pointer; }
.scan-link svg { width: 17px; height: 17px; }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 11px; }
.feature-tile { display: flex; min-height: 68px; align-items: center; gap: 10px; padding: 11px; border: 1px solid rgba(255,255,255,.11); border-radius: 13px; background: rgba(255,255,255,.085); color: white; text-align: left; backdrop-filter: blur(7px); }
.feature-tile i { display: grid; width: 34px; height: 34px; flex: none; place-items: center; border-radius: 10px; background: rgba(216,241,69,.14); color: var(--lime-2); font-style: normal; }
.feature-tile svg { width: 20px; height: 20px; }
.feature-tile strong, .feature-tile small { display: block; }
.feature-tile strong { font-size: 12px; }
.feature-tile small { margin-top: 2px; color: #c7ddd8; font-size: 10px; line-height: 1.45; }
.ai-stats-banner { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; width: 100%; min-height: 82px; margin-top: 10px; padding: 12px; border: 1px solid rgba(217,241,69,.35); border-radius: 15px; background: radial-gradient(circle at 95% 0, rgba(217,241,69,.24), transparent 38%), linear-gradient(135deg, #092f44, #004d45); color: white; text-align: left; box-shadow: 0 12px 26px rgba(0,30,35,.18); cursor: pointer; overflow: hidden; }
.ai-banner-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid rgba(217,241,69,.32); border-radius: 14px; background: rgba(217,241,69,.14); color: var(--lime-2); }
.ai-banner-icon svg { width: 26px; height: 26px; }
.ai-banner-copy { min-width: 0; }
.ai-banner-copy small, .ai-banner-copy strong, .ai-banner-copy em { display: block; }
.ai-banner-copy small { color: var(--lime-2); font-size: 8px; font-weight: 700; letter-spacing: .08em; }
.ai-banner-copy strong { margin-top: 1px; font-size: 14px; line-height: 1.45; }
.ai-banner-copy em { margin-top: 1px; overflow: hidden; color: #bfd8d3; font-size: 9px; font-style: normal; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.ai-stats-banner > svg { width: 18px; color: #bcd5cf; }
.home-result-strip { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 11px; width: 100%; min-height: 66px; margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 13px; background: rgba(0,38,33,.24); color: white; text-align: left; cursor: pointer; backdrop-filter: blur(8px); }
.home-result-strip span small, .home-result-strip span strong { display: block; }
.home-result-strip span small { color: #bcd5cf; font-size: 10px; }
.home-result-strip span strong { margin-top: 2px; font-size: 12px; }
.home-result-strip .last-two { min-width: 50px; padding-left: 11px; border-left: 1px solid rgba(255,255,255,.12); text-align: center; }
.home-result-strip .last-two strong { color: var(--lime-2); font-size: 20px; line-height: 1.5; }
.home-result-strip > svg { width: 18px; height: 18px; color: #accbc4; }
.home-hero > .outline-button { border-color: rgba(255,255,255,.52); background: rgba(255,255,255,.96); box-shadow: var(--shadow-soft); }
.source-strip { display: flex; align-items: center; gap: 9px; margin-top: 11px; padding: 10px 12px; border-top: 1px solid rgba(255,255,255,.12); border-bottom: 1px solid rgba(255,255,255,.12); color: #d9ebe7; }
.source-strip > svg { width: 20px; height: 20px; flex: none; color: var(--lime-2); }
.source-strip strong, .source-strip small { display: block; }
.source-strip strong { font-size: 11px; }
.source-strip small { margin-top: 1px; color: #b6d0ca; font-size: 9px; }
.home-footer { padding: 11px 20px 0; color: #aacbc4; font-size: 10px; line-height: 1.5; text-align: center; }

.login-intro { padding: 12px 5px 4px; text-align: center; }
.line-logo { display: grid; width: 58px; height: 58px; margin: 0 auto 10px; place-items: center; border-radius: 50%; background: #06c755; color: white; font-size: 12px; font-weight: 700; box-shadow: 0 7px 20px rgba(6,199,85,.24); }
.permission-list { display: grid; margin: 13px 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.permission-row { display: flex; align-items: center; gap: 10px; padding: 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.permission-row:last-child { border-bottom: 0; }
.permission-row svg { width: 19px; height: 19px; color: var(--green-700); }
.permission-row span { margin-left: auto; }
.benefit-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; text-align: center; }
.benefit-three div { padding: 12px 4px; border-right: 1px solid var(--line); }
.benefit-three div:last-child { border-right: 0; }
.benefit-three svg { color: var(--green-800); }
.benefit-three strong, .benefit-three small { display: block; }
.benefit-three strong { margin-top: 4px; font-size: 11px; }
.benefit-three small { color: var(--muted); font-size: 9px; }

.member-hero { margin: -15px -13px 0; padding: 34px 14px 17px; background: linear-gradient(150deg, #003d37, #006154); color: white; }
.profile-row { display: flex; align-items: center; gap: 11px; }
.avatar { display: grid; width: 50px; height: 50px; flex: none; place-items: center; border: 2px solid rgba(255,255,255,.65); border-radius: 50%; background: #dcebe7; color: var(--green-900); font-weight: 700; }
.profile-row > div { flex: 1; }
.profile-row strong, .profile-row small { display: block; }
.profile-row small { color: #c0dad4; font-size: 10px; }
.line-dot { display: inline-block; width: 8px; height: 8px; margin-right: 4px; border-radius: 50%; background: #08d558; }
.summary-card { margin-top: 13px; color: var(--text); }
.summary-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 10px; text-align: center; }
.summary-stats div { border-right: 1px solid var(--line); }
.summary-stats div:last-child { border-right: 0; }
.summary-stats strong, .summary-stats small { display: block; }
.summary-stats strong { color: var(--green-900); font-size: 24px; }
.summary-stats small { color: var(--muted); font-size: 10px; }
.quick-check { margin-top: 12px; }

.form-group { margin-bottom: 17px; }
.form-label { display: block; margin-bottom: 7px; font-size: 13px; font-weight: 600; }
.form-help { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 400; }
.digit-input-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
.digit-input { width: 100%; height: 51px; padding: 0; border: 1px solid #cfdad6; border-radius: 8px; outline: none; background: white; color: var(--green-900); font-size: 23px; font-weight: 700; text-align: center; }
.digit-input:focus { border-color: var(--green-700); box-shadow: 0 0 0 3px rgba(0,117,101,.12); }
.select-box { display: flex; min-height: 48px; align-items: center; gap: 9px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.select-box svg:last-child { margin-left: auto; }
.check-row { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; }
.check-row input { width: 18px; height: 18px; accent-color: var(--green-900); }
.method-list { display: grid; gap: 8px; }
.method-list div { display: flex; align-items: center; gap: 8px; font-size: 11px; }
.method-list span { display: grid; width: 18px; height: 18px; place-items: center; border: 1px solid #aabbb5; border-radius: 50%; color: var(--green-700); }

.camera-screen { min-height: calc(100dvh - 171px); margin: -15px -13px 0; padding: 27px 14px 22px; background: radial-gradient(circle at 30% 20%, rgba(105,78,50,.45), transparent 28%), repeating-linear-gradient(92deg, #372619 0 42px, #2d2118 43px 47px, #46301e 48px 93px); color: white; text-align: center; }
.camera-screen p { margin: 0 0 18px; font-size: 13px; }
.scan-area { position: relative; display: grid; height: 300px; place-items: center; margin: 0 3px; }
.scan-corner { position: absolute; width: 49px; height: 49px; border-color: var(--lime); }
.scan-corner.tl { top: 0; left: 0; border-top: 4px solid; border-left: 4px solid; border-radius: 16px 0 0; }
.scan-corner.tr { top: 0; right: 0; border-top: 4px solid; border-right: 4px solid; border-radius: 0 16px 0 0; }
.scan-corner.bl { bottom: 0; left: 0; border-bottom: 4px solid; border-left: 4px solid; border-radius: 0 0 0 16px; }
.scan-corner.br { right: 0; bottom: 0; border-right: 4px solid; border-bottom: 4px solid; border-radius: 0 0 16px; }
.mock-ticket { width: 82%; padding: 14px; transform: rotate(1.5deg); border: 2px solid #d9b6a6; background: #f4d8d2; color: #8f3e30; box-shadow: 0 14px 26px rgba(0,0,0,.35); text-align: left; }
.mock-ticket header { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #b76d5d; font-size: 9px; }
.mock-ticket strong { display: block; margin: 8px 0; color: #2d2118; font-size: 27px; letter-spacing: .15em; text-align: center; }
.mock-ticket footer { font-size: 9px; text-align: center; }
.scan-again { min-height: 44px; width: fit-content; margin: 18px auto; padding: 9px 18px; border: 0; border-radius: 99px; background: rgba(0,0,0,.45); color: white; font-size: 10px; }
.camera-actions { display: flex; align-items: center; justify-content: space-around; }
.camera-actions button { display: grid; gap: 5px; min-width: 48px; min-height: 48px; place-items: center; border: 0; background: none; color: white; font-size: 10px; }
.shutter { width: 64px; height: 64px; border: 5px solid white !important; border-radius: 50%; box-shadow: inset 0 0 0 4px rgba(0,0,0,.22); background: white !important; }

.result-card { padding-top: 25px; text-align: center; }
.success-mark { display: grid; width: 84px; height: 84px; margin: 0 auto 12px; place-items: center; border-radius: 50%; background: #60b951; color: white; box-shadow: 0 8px 22px rgba(50,160,60,.18); }
.success-mark svg { width: 46px; height: 46px; stroke-width: 2.4; }
.result-card h1 { margin: 0; font-size: 25px; }
.result-card .result-number { margin: 14px 0 2px; color: #08703d; font-size: 47px; font-weight: 700; letter-spacing: .08em; }
.prize-box { margin: 14px 0; padding: 13px; border: 1px solid var(--line); border-radius: 10px; }
.prize-box small, .prize-box strong { display: block; }
.prize-box strong { color: #3c9236; font-size: 40px; }
.two-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.privacy-line { display: flex; align-items: center; justify-content: center; gap: 5px; margin-top: 14px; color: var(--muted); font-size: 10px; }
.privacy-line svg { width: 14px; height: 14px; }

.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; border-radius: 12px; background: #eef2f0; }
.tabs button { min-height: 44px; padding: 8px; border: 0; border-radius: 9px; background: transparent; font-size: 11px; cursor: pointer; }
.tabs button.active { background: var(--green-800); color: white; }
.ticket-list { display: grid; gap: 8px; margin-top: 10px; }
.ticket-item { position: relative; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: white; }
.ticket-item small, .ticket-item strong { display: block; }
.ticket-item small { font-size: 10px; }
.ticket-item strong { margin: 2px 0; color: var(--green-900); font-size: 22px; letter-spacing: .06em; }
.ticket-meta { display: flex; align-items: center; gap: 4px; color: var(--line-green); font-size: 10px; }
.ticket-meta svg { width: 13px; height: 13px; }
.ticket-prize { position: absolute; top: 50%; right: 13px; transform: translateY(-50%); text-align: right; }
.ticket-prize strong { color: #49a834; }
.status-pill { display: inline-block; padding: 4px 8px; border-radius: 99px; background: #eff3f1; color: #667571; font-size: 9px; }
.status-pill.checked { background: #dff5e5; color: #17823c; }
.status-pill.waiting { background: #fff0d6; color: #ad7200; }

.result-overview { text-align: center; }
.result-overview h2 { margin: 2px 0 10px; color: var(--green-900); font-size: 34px; letter-spacing: .07em; }
.mini-prizes { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.mini-prizes div { padding: 9px 4px; border-right: 1px solid var(--line); }
.mini-prizes div:last-child { border-right: 0; }
.mini-prizes strong, .mini-prizes small { display: block; }
.mini-prizes strong { color: var(--green-900); font-size: 17px; }
.article-list { display: grid; gap: 9px; }
.article-item { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 10px; width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: white; text-align: left; cursor: pointer; }
.article-thumb { display: grid; height: 54px; place-items: center; border-radius: 8px; background: #e3f1e9; color: var(--green-700); font-size: 25px; }
.article-item strong, .article-item small { display: block; }
.article-item strong { font-size: 12px; }
.article-item small { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; }

.account-profile { display: flex; align-items: center; gap: 12px; }
.account-profile > div { flex: 1; }
.account-profile strong, .account-profile small { display: block; }
.account-profile small { color: var(--line-green); font-size: 11px; }
.setting-section { margin-top: 14px; }
.setting-section h2 { margin: 0 0 5px; font-size: 13px; }
.setting-list { border-top: 1px solid var(--line); }
.setting-row { display: flex; min-height: 50px; align-items: center; gap: 10px; width: 100%; padding: 9px 2px; border: 0; border-bottom: 1px solid var(--line); background: transparent; font-size: 12px; text-align: left; }
.setting-list a.setting-row { color: inherit; text-decoration: none; }
.setting-row span:first-child { flex: 1; }
.setting-row.danger { color: var(--red); }
.switch { position: relative; width: 44px; height: 44px; flex: none; border: 0; background: transparent; cursor: pointer; }
.switch::before { content: ""; position: absolute; top: 10px; left: 2px; width: 40px; height: 24px; border-radius: 99px; background: #aebbb7; transition: .2s; }
.switch::after { content: ""; position: absolute; top: 13px; left: 5px; width: 18px; height: 18px; border-radius: 50%; background: white; box-shadow: 0 1px 3px rgba(0,0,0,.18); transition: .2s; }
.switch.on::before { background: #12b844; }
.switch.on::after { transform: translateX(16px); }

.line-preview { min-height: calc(100dvh - 156px); margin: -15px -13px 0; padding: 18px 12px 28px; background: linear-gradient(#b9cfe7, #dce8f5); }
.line-appbar { display: flex; align-items: center; gap: 8px; margin: -18px -12px 18px; padding: 13px 12px; background: #253a50; color: white; }
.line-back { display: grid; width: 44px; height: 44px; margin: -8px 0 -8px -8px; place-items: center; border: 0; background: transparent; color: white; cursor: pointer; }
.line-back svg { width: 18px; height: 18px; }
.line-appbar .oa-avatar { display: block; width: 32px; height: 32px; flex: none; object-fit: cover; border-radius: 50%; background: #062f2a; }
.line-appbar strong { flex: 1; font-size: 13px; }
.line-bubble { width: 85%; padding: 14px; border-radius: 4px 13px 13px 13px; background: white; box-shadow: 0 3px 10px rgba(30,62,90,.12); }
.line-bubble h2 { margin: 0 0 2px; font-size: 14px; }
.line-bubble p { margin: 0 0 11px; font-size: 11px; }
.line-bubble .bubble-number { margin: 3px 0 10px; color: #0c1816; font-size: 27px; font-weight: 700; letter-spacing: .08em; }
.line-bubble .bubble-prize { color: #43a82e; font-size: 27px; font-weight: 700; }
.line-bubble .green-button { margin-top: 12px; }
.line-chatbar { display: flex; align-items: center; gap: 8px; margin: 22px -3px 0; padding: 9px; border-radius: 9px; background: white; color: #7c8b96; font-size: 10px; }
.line-chatbar span { flex: 1; padding: 7px 10px; border-radius: 99px; background: #f1f3f5; }
.section-link { min-height: 44px; padding: 8px 10px !important; cursor: pointer; }

.detail-card h1 { margin: 0; font-size: 23px; line-height: 1.35; }
.ai-stats-view { display: grid; gap: 11px; padding-bottom: 10px; }
.ai-hero-card { margin: -15px -13px 0; padding: 30px 18px 23px; background: radial-gradient(circle at 90% 5%, rgba(217,241,69,.22), transparent 34%), linear-gradient(145deg, #06344a, #005248); color: white; }
.ai-demo-badge { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border: 1px solid rgba(217,241,69,.3); border-radius: 99px; background: rgba(0,30,38,.24); color: var(--lime-2); font-size: 8px; font-weight: 700; letter-spacing: .05em; }
.ai-demo-badge svg { width: 14px; height: 14px; }
.ai-hero-card h1 { margin: 12px 0 6px; font-size: 26px; line-height: 1.25; }
.ai-hero-card p { max-width: 340px; margin: 0; color: #c8deda; font-size: 11px; line-height: 1.65; }
.ai-updated { display: flex; align-items: center; gap: 6px; margin-top: 14px; color: #afcbc5; font-size: 9px; }
.ai-updated span { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px rgba(197,229,28,.12); }
.ai-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-section-heading small, .ai-section-heading h2 { display: block; margin: 0; }
.ai-section-heading small { color: var(--green-700); font-size: 9px; font-weight: 700; }
.ai-section-heading h2 { margin-top: 1px; font-size: 14px; }
.ai-section-heading > span { color: var(--muted); font-size: 9px; }
.ai-section-heading > svg { width: 23px; color: var(--green-700); }
.ai-period-tabs { display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; margin-top: 12px; }
.ai-period-tabs button { min-height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #f4f8f6; color: var(--muted); font-size: 11px; font-weight: 600; cursor: pointer; }
.ai-period-tabs button.active { border-color: var(--green-700); background: var(--green-900); color: white; box-shadow: 0 6px 14px rgba(0,72,63,.16); }
.ai-hot-numbers { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 13px; }
.ai-hot-numbers div { padding: 9px 5px; border: 1px solid var(--line); border-radius: 12px; background: #f8fbfa; text-align: center; }
.ai-hot-numbers small, .ai-hot-numbers strong, .ai-hot-numbers span { display: block; }
.ai-hot-numbers small { color: var(--muted); font-size: 8px; }
.ai-hot-numbers strong { color: var(--green-900); font-size: 29px; line-height: 1.25; }
.ai-hot-numbers span { color: var(--green-700); font-size: 8px; }
.ai-hot-numbers .rank-1 { border-color: #cfe638; background: #f7fbdc; }
.frequency-chart { display: grid; grid-template-columns: repeat(10,1fr); gap: 5px; height: 132px; margin-top: 13px; }
.frequency-column { display: grid; grid-template-rows: 1fr auto; gap: 4px; min-width: 0; text-align: center; }
.frequency-column > span { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 0; border-radius: 5px; background: #eef4f1; overflow: hidden; }
.frequency-column i { display: block; width: 100%; min-height: 8px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, var(--lime), #41a276); }
.frequency-column strong { font-size: 9px; }
.ai-pairs { display: grid; gap: 6px; margin: 12px 0; }
.ai-pairs div { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 8px 11px; border-radius: 10px; background: #eef5f2; }
.ai-pairs strong { color: var(--green-900); font-size: 20px; }
.ai-pairs span { color: var(--muted); font-size: 9px; }
.ai-refresh { min-height: 46px; }
.ai-disclaimer { display: flex; align-items: flex-start; gap: 9px; padding: 12px; border: 1px solid #eadca9; border-radius: 12px; background: #fff9e7; color: #6c5923; }
.ai-disclaimer > svg { width: 19px; flex: none; }
.ai-disclaimer strong, .ai-disclaimer small { display: block; }
.ai-disclaimer strong { font-size: 10px; }
.ai-disclaimer small { margin-top: 2px; font-size: 9px; line-height: 1.5; }
.detail-card .article-meta { margin: 5px 0 16px; color: var(--muted); font-size: 10px; }
.detail-card p { color: #435c57; font-size: 12px; line-height: 1.8; }
.source-box { padding: 12px; border-radius: 9px; background: #edf3f0; color: var(--muted); font-size: 11px; }
.all-results { display: grid; gap: 8px; }
.result-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: white; }
.result-row small, .result-row strong { display: block; }
.result-row small { color: var(--muted); font-size: 10px; }
.result-row strong { color: var(--green-900); letter-spacing: .06em; }
.danger-panel { text-align: center; }
.danger-panel .danger-icon { display: grid; width: 64px; height: 64px; margin: 0 auto 12px; place-items: center; border-radius: 50%; background: #fde8e6; color: var(--red); font-size: 28px; font-weight: 700; }
.danger-button { display: flex; min-height: 46px; align-items: center; justify-content: center; width: 100%; margin-top: 9px; border: 0; border-radius: 10px; background: var(--red); color: white; font-weight: 700; }
.quiet-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; margin: 15px 0; }
.time-select { width: 100%; padding: 12px 8px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--green-900); text-align: center; }

.bottom-nav { position: fixed; z-index: 70; right: 0; bottom: 0; left: 0; display: grid; grid-template-columns: repeat(5, 1fr); min-height: 72px; padding: 7px 4px max(7px, env(safe-area-inset-bottom)); border-top: 1px solid rgba(255,255,255,.12); background: linear-gradient(180deg, #004b42, #003b35); color: #bdd6d0; }
.nav-button { display: grid; min-width: 0; place-items: center; gap: 2px; padding: 3px 0; border: 0; background: transparent; color: inherit; font-size: 10px; cursor: pointer; }
.nav-button svg { width: 20px; height: 20px; }
.nav-button.active { color: var(--lime-2); font-weight: 700; }

.toast { position: fixed; z-index: 300; right: 14px; bottom: 84px; left: 14px; max-width: 410px; margin: auto; padding: 11px 14px; transform: translateY(20px); border-radius: 10px; background: #132c28; color: white; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: .2s; text-align: center; font-size: 11px; }
.toast.show { transform: translateY(0); opacity: 1; }

.install-prompt { position: fixed; z-index: 500; inset: 0; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(0, 28, 25, .68); backdrop-filter: blur(5px); }
.install-prompt[hidden] { display: none; }
.install-sheet { position: relative; width: min(100%, 430px); padding: 24px 20px calc(18px + env(safe-area-inset-bottom)); border-radius: 24px; background: #fff; color: var(--text); box-shadow: 0 24px 70px rgba(0, 24, 21, .35); text-align: center; animation: install-rise .28s ease-out; }
.install-sheet > img { display: block; width: 82px; height: 82px; margin: -58px auto 7px; object-fit: contain; filter: drop-shadow(0 10px 20px rgba(0, 72, 63, .2)); }
.install-close { position: absolute; top: 10px; right: 10px; display: grid; width: 44px; height: 44px; place-items: center; border: 0; background: transparent; color: #5e736e; font-size: 28px; line-height: 1; cursor: pointer; }
.install-copy span { color: var(--green-700); font-size: 10px; font-weight: 700; letter-spacing: .06em; }
.install-copy h2 { margin: 2px 30px 4px; color: var(--green-950); font-size: 21px; line-height: 1.35; }
.install-copy p { margin: 0 auto 15px; max-width: 310px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.install-help { margin: -3px 0 13px; padding: 10px 12px; border-radius: 10px; background: #edf6f2; color: var(--green-800); font-size: 11px; line-height: 1.6; }
.install-action, .install-later { width: 100%; min-height: 48px; border: 0; border-radius: 12px; font-family: inherit; font-weight: 700; cursor: pointer; }
.install-action { background: linear-gradient(135deg, var(--lime-2), #aee300); color: var(--green-950); box-shadow: 0 9px 22px rgba(174, 227, 0, .22); }
.install-later { min-height: 44px; margin-top: 3px; background: transparent; color: var(--green-700); }
@keyframes install-rise { from { transform: translateY(22px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.live-chip { background: #c9f24d; }
.home-footer a, .microcopy a { color: inherit; }
.source-stale, .source-down { border-color: #f6c96b; background: #fff8e6; color: #714d00; }
.source-stale span, .source-down span { background: #e59b00; box-shadow: 0 0 0 3px rgba(229,155,0,.16); }
.result-card .draw-status, .results-view .draw-status, .stack > .draw-status { justify-content: center; margin: 0; }
.consent-row { align-items: flex-start; margin: 18px 0 12px; text-align: left; }
.consent-row a { color: var(--green-700); }
.scan-area { overflow: hidden; border-radius: 18px; background: #0a1715; }
.scan-area video { width: 100%; height: 100%; object-fit: cover; }
.camera-message { position: absolute; inset: 0; display: grid; place-items: center; padding: 30px; background: #10201d; color: #dbe9e5; font-size: 12px; }
.camera-message[hidden] { display: none; }
.ocr-progress { margin: 10px 3px; padding: 10px; border-radius: 10px; background: rgba(0,0,0,.45); color: white; font-size: 12px; }
.ocr-review { margin-top: 12px; color: var(--text); text-align: left; }
.ocr-review .digit-input-row { margin: 14px 0; }
.result-wins { display: grid; gap: 10px; }
.result-wins div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.result-wins div strong { font-size: 15px; }

@media (min-width: 760px) {
  .prototype-chip { top: 0; right: auto; left: 50%; display: flex; transform: translateX(-50%); padding: 4px 12px 5px; border-radius: 0 0 10px 10px; font-size: 10px; }
  .desktop-frame { display: grid; grid-template-columns: minmax(235px, 1fr) 430px minmax(260px, 1fr); gap: 30px; align-items: center; padding: 34px; }
  .desktop-panel, .desktop-info { display: flex; height: min(780px, calc(100dvh - 68px)); flex-direction: column; }
  .desktop-panel { max-width: 360px; justify-self: end; padding: 30px; border-radius: 28px; background: linear-gradient(145deg, #002f2b, #005248); color: white; box-shadow: var(--shadow); }
  .desktop-brand { display: flex; align-items: center; gap: 10px; }
  .desktop-brand > img { display: block; width: 52px; height: 52px; flex: none; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(187, 224, 0, .18)); }
  .desktop-brand strong, .desktop-brand small { display: block; }
  .desktop-brand strong { font-size: 14px; }
  .desktop-brand small { color: #9ac0b8; font-size: 8px; letter-spacing: .1em; }
  .desktop-copy { margin: auto 0; }
  .desktop-copy p { color: var(--lime); font-size: 12px; font-weight: 700; }
  .desktop-copy h1 { margin: 8px 0 14px; font-size: clamp(29px, 3.1vw, 48px); line-height: 1.12; }
  .desktop-copy span { color: #adcbc4; font-size: 11px; }
  .desktop-preview { padding: 15px; border: 1px solid rgba(255,255,255,.13); border-radius: 14px; background: rgba(255,255,255,.06); }
  .desktop-preview strong, .desktop-preview small { display: block; }
  .desktop-preview small { color: #a7c8c1; font-size: 9px; }
  .mobile-app { width: 430px; height: min(780px, calc(100dvh - 68px)); min-height: 620px; overflow: hidden; border: 7px solid #082b27; border-radius: 38px; background: var(--surface); box-shadow: 0 28px 70px rgba(0,53,45,.24); }
  .app-header { position: relative; min-height: 68px; padding-top: 12px; }
  .app-content { height: calc(100% - 140px); min-height: 0; overflow-y: auto; padding-bottom: 18px; scrollbar-width: none; }
  .app-content.without-header { height: calc(100% - 72px); min-height: 0; }
  .app-content.without-nav:not(.without-header) { height: calc(100% - 68px); }
  .app-content.without-header.without-nav { height: 100%; }
  .app-content::-webkit-scrollbar { display: none; }
  .camera-screen { min-height: 100%; }
  .line-preview { min-height: 100%; }
  .home-hero { min-height: 100%; margin-bottom: -18px; padding-bottom: 34px; }
  .app-content.without-header.without-nav .home-hero { min-height: 100%; margin-bottom: -18px; padding-bottom: 28px; }
  .app-content.without-header.without-nav .line-preview { min-height: 100%; margin-bottom: -18px; }
  .bottom-nav { position: absolute; min-height: 72px; }
  .desktop-info { max-width: 330px; justify-self: start; justify-content: center; }
  .overline { margin: 0; color: var(--green-700); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
  .desktop-info h2 { margin: 6px 0; font-size: 28px; }
  .desktop-info > p:not(.overline) { margin: 0 0 18px; color: var(--muted); font-size: 12px; line-height: 1.6; }
  .flow-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .flow-list button { display: flex; align-items: center; gap: 7px; min-height: 46px; padding: 8px; border: 1px solid #cfddd8; border-radius: 11px; background: rgba(255,255,255,.6); font-size: 9px; text-align: left; cursor: pointer; }
  .flow-list button.active { border-color: var(--green-800); background: var(--green-900); color: white; }
  .flow-list span { display: grid; width: 24px; height: 24px; flex: none; place-items: center; border-radius: 7px; background: #e3ebe7; color: var(--green-800); font-size: 8px; font-weight: 700; }
  .flow-list button.active span { background: var(--lime); color: var(--green-900); }
  .toast { bottom: 34px; }
  .install-prompt { align-items: center; }
}

@media (min-width: 480px) and (max-width: 759px) {
  .desktop-frame { padding: 0 max(16px, calc((100vw - 520px) / 2)); }
  .mobile-app { width: 100%; max-width: 520px; box-shadow: 0 0 0 1px rgba(0,72,63,.08), 0 18px 48px rgba(0,53,45,.12); }
  .home-hero { display: flex; flex-direction: column; justify-content: center; }
  .bottom-nav { right: auto; left: 50%; width: min(calc(100% - 32px), 520px); transform: translateX(-50%); }
}

@media (min-width: 760px) and (max-width: 1020px) {
  .desktop-frame { grid-template-columns: minmax(210px, .8fr) 430px; }
  .desktop-info { display: none; }
}

@media (max-width: 380px) {
  .app-content { padding-right: 10px; padding-left: 10px; }
  .home-hero, .member-hero, .camera-screen, .line-preview { margin-right: -10px; margin-left: -10px; }
  .feature-tile { padding: 11px 8px; }
  .digit-input, .digit-box { height: 45px; }
}

@media (max-width: 340px) {
  .feature-grid { grid-template-columns: 1fr; }
  .feature-tile { min-height: 62px; padding: 10px 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
