/* โทนกลางคืน: กรมเข้ม + เหลืองนวล (ฟ้าม่วงเป็นสีรอง) */
:root {
  --bg: #12141F; --card: #1B1E2D; --ink: #F3F1EA; --muted: #9DA2B8; --line: #2B2F44; --soft: #23273A;
  --accent: #F5C76B; --accent-ink: #1A1608; --accent-soft: #3A3324; --accent2: #8EA2FF; --ok: #4CC79A; --warn: #F2A65A; --bad: #FF7B7B;
  --shadow: 0 1px 2px rgba(0,0,0,.35), 0 12px 32px -16px rgba(0,0,0,.7);
  --r: 18px; --font: 'Anuphan', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --c-appointment: #8EA2FF; --c-study: #B69CFF; --c-work: #5CD0C8; --c-bill: #FF7B7B; --c-slip: #4CC79A; --c-receipt: #B9D86A;
  --c-medicine: #FF8FBF; --c-card: #F5C76B; --c-note: #9DA2B8; --c-other: #7D8299;
  color-scheme: dark;
}
body { background: radial-gradient(1200px 600px at 80% -10%, rgba(142,162,255,.10), transparent 60%), radial-gradient(900px 500px at -10% 110%, rgba(245,199,107,.07), transparent 60%), var(--bg); background-attachment: fixed; }
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-tap-highlight-color: transparent; }
body { min-height: 100dvh; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 16px calc(96px + env(safe-area-inset-bottom)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* top bar */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.top-in { max-width: 980px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { width: 34px; height: 34px; border-radius: 10px; }
.brand small { font-weight: 500; color: var(--muted); font-size: 13px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 12px; color: var(--muted); font-weight: 500; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.nav a.on { background: var(--accent-soft); color: var(--ink); }
.nav svg { width: 18px; height: 18px; }
@media (max-width: 720px) {
  .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); } /* backdrop-filter ทำให้เมนู fixed ติดอยู่ในหัวแทนที่จะลงล่างจอ */
  .nav { position: fixed; left: 0; right: 0; bottom: 0; margin: 0; background: var(--card); border-top: 1px solid var(--line); justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); z-index: 30; }
  .nav a { flex-direction: column; gap: 2px; font-size: 12px; padding: 6px 10px; min-width: 64px; }
  .nav svg { width: 22px; height: 22px; }
}

/* common */
h1 { font-size: 26px; line-height: 1.25; margin: 22px 0 6px; }
h2 { font-size: 18px; margin: 28px 0 10px; display: flex; align-items: center; gap: 8px; }
.sub { color: var(--muted); margin: 0 0 14px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); font-weight: 600; cursor: pointer; text-decoration: none; transition: transform .12s ease, background .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn svg { width: 18px; height: 18px; }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.input, textarea.input, select.input { width: 100%; min-height: 46px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); padding: 10px 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
textarea.input { resize: vertical; min-height: 84px; }
.err { color: var(--bad); font-size: 14px; min-height: 20px; margin: 4px 0 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: var(--soft); white-space: nowrap; }
.chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--cc, var(--c-other)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: sp .8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; }
.empty img { width: 88px; margin: 0 auto 10px; opacity: .9; }

/* auth */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 420px; }
.auth-hero { text-align: center; margin-bottom: 18px; }
.auth-hero img { width: 92px; height: 92px; margin: 0 auto 10px; border-radius: 24px; box-shadow: var(--shadow); animation: bob 3.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.auth-hero h1 { margin: 6px 0 4px; font-size: 30px; }
.steps { display: grid; gap: 8px; margin: 14px 0 18px; }
.steps div { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; }
.steps b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 13px; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border-radius: 14px; padding: 4px; margin-bottom: 16px; }
.tabs button { border: 0; background: transparent; border-radius: 11px; min-height: 40px; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.consent { display: flex; gap: 10px; font-size: 13.5px; color: var(--muted); margin: 4px 0 12px; align-items: flex-start; }
.consent input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }

/* capture */
.capture { padding: 18px; margin-top: 16px; position: relative; overflow: hidden; }
.capture.drag { outline: 3px dashed var(--accent); outline-offset: -8px; }
.cap-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cap-head img { width: 48px; height: 48px; border-radius: 14px; }
.cap-head h1 { margin: 0; font-size: 22px; }
.cap-head p { margin: 0; color: var(--muted); font-size: 14px; }
.cap-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cap-btn { min-height: 76px; border-radius: 16px; border: 1px solid var(--line); background: var(--soft); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 600; cursor: pointer; font-size: 15px; }
.cap-btn.main { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.cap-btn svg { width: 24px; height: 24px; }
.cap-text { margin-top: 12px; display: flex; gap: 8px; align-items: flex-end; }
.cap-text textarea { min-height: 50px; height: 50px; }
.cap-hint { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.cap-hint kbd { font-family: inherit; background: var(--soft); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 0 5px; font-size: 12px; }
.examples { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.examples button { border: 1px dashed var(--line); background: transparent; border-radius: 999px; padding: 4px 12px; font-size: 13px; color: var(--muted); cursor: pointer; }

/* reminders strip */
.rems { display: grid; gap: 8px; }
.rem { display: flex; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; }
.rem-time { flex: none; width: 74px; text-align: center; border-radius: 12px; background: var(--soft); padding: 6px 4px; line-height: 1.2; }
.rem-time b { display: block; font-size: 15px; }
.rem-time small { font-size: 11.5px; color: var(--muted); }
.rem-time.soon { background: var(--accent-soft); }
.rem-body { min-width: 0; flex: 1; }
.rem-body div { font-weight: 600; font-size: 15px; }
.rem-body small { color: var(--muted); font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* list */
.toolbar { display: flex; gap: 8px; align-items: center; margin: 6px 0 10px; }
.search { position: relative; flex: 1; }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); }
.search input { padding-left: 40px; }
.cats { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 10px; scrollbar-width: none; }
.cats::-webkit-scrollbar { display: none; }
.cats button { flex: none; border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 13px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; display: flex; gap: 6px; align-items: center; }
.cats button i { width: 8px; height: 8px; border-radius: 50%; background: var(--cc); }
.cats button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .grid { grid-template-columns: 1fr 1fr; gap: 10px; } }
.it { text-decoration: none; overflow: hidden; display: flex; flex-direction: column; transition: transform .15s; }
.it:hover { transform: translateY(-2px); }
.it-img { aspect-ratio: 4/3; background: var(--soft) center/cover no-repeat; position: relative; display: grid; place-items: center; color: var(--muted); }
.it-img svg { width: 34px; height: 34px; }
.it-img .pend { position: absolute; inset: 0; background: color-mix(in srgb, var(--card) 70%, transparent); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.it-img .pend span { display: flex; gap: 8px; align-items: center; }
.it-text { aspect-ratio: 4/3; background: var(--soft); padding: 12px; font-size: 13.5px; color: var(--muted); overflow: hidden; position: relative; }
.it-b { padding: 10px 12px 12px; display: grid; gap: 5px; }
.it-t { font-weight: 600; font-size: 15px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.it-k { font-size: 13px; color: var(--muted); }
.it-k b { color: var(--ink); }
.pin { position: absolute; top: 8px; right: 8px; background: var(--card); border-radius: 999px; width: 26px; height: 26px; display: grid; place-items: center; box-shadow: var(--shadow); }
.pin svg { width: 14px; height: 14px; color: var(--accent); }

/* item detail */
.back { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; text-decoration: none; color: var(--muted); font-weight: 600; }
.back svg { width: 18px; height: 18px; }
.detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 18px; margin-top: 12px; align-items: start; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; } }
.media { overflow: hidden; }
.media img { width: 100%; max-height: 72vh; object-fit: contain; background: var(--soft); cursor: zoom-in; }
.media iframe { width: 100%; height: 70vh; border: 0; }
.media .txt { padding: 16px; white-space: pre-wrap; }
.panel { padding: 16px 18px; }
.title-in { font-size: 21px; font-weight: 700; border: 0; background: transparent; width: 100%; padding: 4px 0; outline: none; border-bottom: 2px solid transparent; }
.title-in:focus { border-bottom-color: var(--accent); }
.summary { margin: 8px 0 14px; color: var(--ink); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0 0 14px; font-size: 15px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; word-break: break-word; }
.prep { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; }
.prep label { display: flex; gap: 10px; align-items: center; cursor: pointer; }
.prep input { width: 20px; height: 20px; accent-color: var(--ok); }
.prep input:checked + span { text-decoration: line-through; color: var(--muted); }
.sec { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 14px; }
.sec h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; justify-content: space-between; }
.remlist { display: grid; gap: 6px; }
.remlist div { display: flex; gap: 10px; align-items: center; background: var(--soft); border-radius: 12px; padding: 8px 10px; font-size: 14.5px; }
.remlist div span { flex: 1; }
.remlist div b { white-space: nowrap; }
.remlist div.past { opacity: .55; }
.x { border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }
.x svg { width: 16px; height: 16px; }
.addrem { display: grid; grid-template-columns: 1fr 1fr auto; gap: 8px; margin-top: 8px; }
@media (max-width: 520px) { .addrem { grid-template-columns: 1fr; } }
details.ocr summary { cursor: pointer; font-weight: 600; font-size: 15px; }
details.ocr pre { white-space: pre-wrap; font-family: inherit; font-size: 14px; background: var(--soft); border-radius: 12px; padding: 12px; max-height: 340px; overflow: auto; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { background: var(--soft); border-radius: 8px; padding: 2px 9px; font-size: 13px; color: var(--muted); }
.warnbox { background: color-mix(in srgb, var(--bad) 10%, var(--card)); border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); color: var(--ink); border-radius: 14px; padding: 10px 14px; font-size: 14px; margin-bottom: 12px; }

/* ask */
.chat { display: grid; gap: 12px; margin-top: 8px; }
.bub { max-width: 86%; padding: 12px 15px; border-radius: 18px; font-size: 15.5px; white-space: pre-wrap; }
.bub.me { justify-self: end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 6px; }
.bub.ai { justify-self: start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 6px; box-shadow: var(--shadow); }
.bub .refs { display: grid; gap: 6px; margin-top: 10px; }
.bub .refs a { display: flex; gap: 8px; align-items: center; text-decoration: none; background: var(--soft); border-radius: 10px; padding: 6px 10px; font-size: 14px; font-weight: 600; }
.askbar { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); display: flex; gap: 8px; margin-top: 16px; background: var(--bg); padding: 8px 0; }
@media (min-width: 721px) { .askbar { bottom: 0; } }
.sugg { display: flex; flex-wrap: wrap; gap: 8px; }
.sugg button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 14px; font-size: 14px; cursor: pointer; }

/* money */
.money-top { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-top: 8px; }
.stat { padding: 16px; }
.stat small { color: var(--muted); font-size: 13.5px; }
.stat b { display: block; font-size: 28px; line-height: 1.2; font-variant-numeric: tabular-nums; }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.bar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar i { display: block; height: 10px; border-radius: 5px; background: var(--c-slip); min-width: 4px; }
.bar b { font-variant-numeric: tabular-nums; }
.tx { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--line); }
.tx:last-child { border-bottom: 0; }
.tx small { color: var(--muted); grid-column: 1; font-size: 13px; }
.tx b { grid-row: 1 / span 2; grid-column: 2; align-self: center; font-variant-numeric: tabular-nums; }

/* settings */
.set { padding: 16px 18px; margin-bottom: 12px; }
.set h3 { margin: 0 0 4px; font-size: 16px; }
.set p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; background: var(--soft); border-radius: 12px; padding: 12px; white-space: pre-wrap; word-break: break-all; margin: 8px 0; }
.steps-ios { margin: 6px 0 0; padding-left: 20px; font-size: 14px; color: var(--muted); }

#toast { position: fixed; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); background: var(--ink); color: var(--bg); padding: 10px 18px; border-radius: 14px; font-size: 14.5px; opacity: 0; pointer-events: none; transition: .25s; z-index: 50; max-width: calc(100% - 32px); text-align: center; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 60; display: grid; place-items: center; padding: 16px; cursor: zoom-out; }
.lightbox img { max-height: 100%; max-width: 100%; object-fit: contain; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ═══ รอบ 2: เมนูใหม่ + แถบส่ง + ตัวช่วย ═══ */
:root { --m1: #F0A3A3; --m2: #F4C49A; --m3: #E9DFA0; --m4: #B7DDA2; --m5: #8FD3B6; }
.top-r { display: flex; gap: 6px; margin-left: 8px; }
.ic-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); border: 1px solid var(--line); background: var(--card); }
.ic-btn.on { color: var(--ink); background: var(--accent-soft); border-color: transparent; }
.ic-btn svg { width: 20px; height: 20px; }
@media (max-width: 720px) { .top-r { margin-left: auto; } }

/* แถบส่ง */
.wrap.has-cmp { padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
.compose { position: fixed; z-index: 25; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(760px, calc(100% - 24px)); display: flex; gap: 6px; align-items: flex-end; background: var(--card); border: 1px solid var(--line); border-radius: 22px; padding: 6px; box-shadow: 0 12px 40px -12px rgba(31,36,48,.35); }
@media (max-width: 720px) { .compose { bottom: calc(70px + env(safe-area-inset-bottom)); } }
.cmp-ic, .cmp-send { flex: none; width: 42px; height: 42px; border-radius: 15px; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--soft); color: var(--ink); }
.cmp-ic svg, .cmp-send svg { width: 20px; height: 20px; }
.cmp-send { background: var(--accent); color: var(--accent-ink); }
.cmp-ic.on { background: var(--bad); color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .6; } }
.cmp-box { flex: 1; min-width: 0; position: relative; display: flex; align-items: center; }
.cmp-box textarea { width: 100%; border: 0; background: transparent; resize: none; outline: none; padding: 10px 6px; min-height: 42px; max-height: 140px; line-height: 1.4; }
.cmp-mode { position: absolute; top: -26px; left: 4px; background: var(--ink); color: var(--bg); font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.cmp-menu { position: absolute; bottom: calc(100% + 8px); left: 0; display: grid; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 6px; box-shadow: var(--shadow); }
.cmp-menu button { display: flex; align-items: center; gap: 10px; border: 0; background: transparent; padding: 10px 14px; border-radius: 11px; font-weight: 600; cursor: pointer; text-align: left; }
.cmp-menu button:hover { background: var(--soft); }
.cmp-menu svg { width: 20px; height: 20px; }
body.dropping::after { content: 'ปล่อยไฟล์ตรงนี้ได้เลย'; position: fixed; inset: 12px; border: 3px dashed var(--accent); border-radius: 24px; background: color-mix(in srgb, var(--bg) 80%, transparent); display: grid; place-items: center; font-size: 20px; font-weight: 700; z-index: 70; pointer-events: none; }

/* วันนี้ */
.hello { display: flex; gap: 14px; align-items: center; margin: 20px 0 6px; }
.hello img { width: 54px; height: 54px; border-radius: 16px; animation: bob 3.4s ease-in-out infinite; }
.hello h1 { margin: 0; font-size: 24px; }
.hello-date { margin: 0; color: var(--muted); font-size: 14px; }
.first { padding: 18px; margin-top: 12px; background: var(--accent-soft); border-color: transparent; }
.nudge { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-top: 12px; }
.nudge > span svg { width: 22px; height: 22px; color: var(--accent); }
.nudge div { flex: 1; } .nudge b { display: block; font-size: 15px; } .nudge small { color: var(--muted); }
.today-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 0 22px; }
@media (max-width: 820px) { .today-grid { grid-template-columns: 1fr; } }
.h-link { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--accent); text-decoration: none; }
.cnt { font-size: 13px; font-weight: 600; color: var(--muted); background: var(--soft); border-radius: 999px; padding: 1px 8px; }
.list { overflow: hidden; }
.list-empty { margin: 0; padding: 14px 16px; color: var(--muted); font-size: 14.5px; }
.row-it { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); text-decoration: none; }
.row-it:last-child { border-bottom: 0; }
.when { flex: none; min-width: 62px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; line-height: 1.25; }
.when b { color: var(--ink); font-size: 15px; }
.when.now { color: var(--accent); } .when.bad b { color: var(--bad); }
.what { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; }
.what small { display: block; font-weight: 400; color: var(--muted); font-size: 13px; }
.strike { text-decoration: line-through; color: var(--muted); }
.helpers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.helper { padding: 14px; text-decoration: none; display: grid; gap: 2px; transition: transform .15s; }
.helper:hover { transform: translateY(-2px); }
.h-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 6px; }
.h-ic svg { width: 21px; height: 21px; }
.helper b { font-size: 15px; } .helper small { color: var(--muted); font-size: 12.5px; }
.mood { display: flex; justify-content: space-between; padding: 10px; }
.mood button { flex: 1; border: 0; background: transparent; border-radius: 14px; padding: 8px 2px; display: grid; justify-items: center; gap: 4px; cursor: pointer; font-size: 11.5px; color: var(--muted); }
.mood svg { width: 36px; height: 36px; transition: transform .2s; }
.mood button.on { background: var(--soft); color: var(--ink); font-weight: 600; }
.mood button.on svg, .mood button:hover svg { transform: scale(1.12); }

/* ต้องทำ */
.todo { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.todo:last-child { border-bottom: 0; }
.tick { flex: none; width: 28px; height: 28px; border-radius: 9px; border: 2px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; color: transparent; transition: .15s; }
.tick svg { width: 16px; height: 16px; }
.tick:hover { border-color: var(--ok); }
.done .tick, .tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.todo-t { flex: 1; min-width: 0; font-size: 15px; }
.todo-t small { display: block; color: var(--muted); font-size: 12.5px; }
.todo-t small.late { color: var(--bad); font-weight: 600; }
.done .todo-t { text-decoration: line-through; color: var(--muted); }
.addtodo { padding: 12px; display: grid; gap: 8px; margin: 10px 0 4px; }
.donebox { margin-top: 18px; } .donebox summary { cursor: pointer; font-weight: 600; color: var(--muted); margin-bottom: 8px; }

/* ปฏิทิน */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.cal { padding: 10px; }
.cal-w, .cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-w span { text-align: center; font-size: 12.5px; color: var(--muted); padding: 4px 0; }
.cal-g button { aspect-ratio: 1; border: 0; background: transparent; border-radius: 12px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-size: 15px; }
.cal-g button:hover { background: var(--soft); }
.cal-g button.today b { color: var(--accent); }
.cal-g button.sel { background: var(--ink); color: var(--bg); }
.cal-g button.sel.today b { color: var(--bg); }
.cal-g i { display: flex; gap: 2px; } .cal-g u { width: 6px; height: 6px; border-radius: 50%; background: var(--cc); }

/* หน้าย่อย + dialog */
.sheet { position: fixed; inset: 0; z-index: 80; background: rgba(20,22,28,.45); display: grid; place-items: end center; padding: 0; }
.sheet-in { width: min(480px, 100%); border-radius: 22px 22px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); max-height: 90dvh; overflow: auto; animation: up .22s ease; }
@media (min-width: 600px) { .sheet { place-items: center; } .sheet-in { border-radius: 22px; } }
@keyframes up { from { transform: translateY(30px); opacity: 0; } }
.sheet h3 { margin: 0 0 14px; font-size: 18px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 14px; }
.seg2 label, .chips label { cursor: pointer; position: relative; }
.seg2 input, .chips input { position: absolute; opacity: 0; pointer-events: none; }
.seg2 span { display: block; text-align: center; padding: 10px; border-radius: 12px; border: 1px solid var(--line); font-weight: 600; }
.seg2 input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips span { display: inline-block; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14.5px; font-weight: 500; }
.chips input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chips input:focus-visible + span, .seg2 input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; }
.quick button { border: 1px dashed var(--line); background: var(--card); border-radius: 999px; padding: 7px 13px; font-size: 14px; cursor: pointer; }
.quick button:hover { border-style: solid; border-color: var(--accent); }
.meds { display: grid; gap: 10px; margin-top: 14px; }
.med { padding: 14px 16px; }
.med-times { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.med-times button { display: inline-flex; gap: 6px; align-items: center; border: 1px solid var(--line); background: var(--soft); border-radius: 12px; padding: 7px 12px; font-weight: 600; cursor: pointer; }
.med-times button svg { width: 15px; height: 15px; }
.med-times button.on { background: var(--ok); border-color: var(--ok); color: #fff; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.linkbtn { border: 0; background: none; color: var(--accent); font-weight: 600; cursor: pointer; padding: 0; font-size: 13px; }
.budbar { height: 8px; border-radius: 4px; background: var(--soft); margin-top: 10px; overflow: hidden; }
.budbar i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.budbar i.over { background: var(--bad); }
.tx .x { display: inline-grid; width: 24px; height: 24px; vertical-align: middle; }

/* ตั้งค่าครั้งแรก */
.wz-dots { display: flex; gap: 6px; justify-content: center; margin-bottom: 14px; }
.wz-dots i { width: 28px; height: 5px; border-radius: 3px; background: var(--line); }
.wz-dots i.on { background: var(--accent); }
.wz-time { display: flex; gap: 12px; align-items: center; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.wz-time > input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--accent); }
.wz-time span { flex: 1; } .wz-time b { display: block; } .wz-time small { color: var(--muted); }
.wz-time .input { width: 120px; }

[hidden] { display: none !important; } /* กัน display: grid/flex ทับ attribute hidden */


/* ═══ สไตล์ iPhone ทั้งแอป ═══ */
:root { --font: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Anuphan', 'Sukhumvit Set', system-ui, sans-serif; --r: 14px; --sep: rgba(255,255,255,.08); --fill: rgba(118,118,128,.24); --blue: #8EA2FF; }
html, body { -webkit-font-smoothing: antialiased; letter-spacing: -.005em; }
h1 { font-size: 32px; font-weight: 700; letter-spacing: -.02em; margin: 14px 0 6px; }
h2 { font-size: 13px; font-weight: 500; text-transform: none; color: var(--muted); margin: 26px 4px 7px; letter-spacing: 0; }
h2 .h-link { font-size: 13px; }
.card { border-radius: var(--r); border: 0; background: var(--card); box-shadow: none; }
.list .row-it, .todo { border-bottom: 0; position: relative; }
.list .row-it + .row-it::before, .todo + .todo::before, .tx + .tx::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--sep); }
.tx { border-bottom: 0; position: relative; }
/* แถบบน: บางและเบลอแบบ iOS */
.top { background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-bottom: .5px solid var(--sep); }
.top-in { padding: 8px 16px; }
.brand { font-size: 17px; } .brand img { width: 30px; height: 30px; border-radius: 8px; }
.ic-btn { border: 0; background: transparent; color: var(--accent); width: 38px; height: 38px; }
.ic-btn.on { background: var(--fill); color: var(--accent); }
.nav a { border-radius: 10px; font-size: 15px; }
.nav a.on { background: var(--fill); color: var(--ink); }
@media (max-width: 720px) {
  .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: color-mix(in srgb, var(--bg) 94%, transparent); }
  /* แถบแท็บล่าง iOS */
  .nav { background: color-mix(in srgb, #12141F 80%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); border-top: .5px solid var(--sep); padding: 4px 0 calc(2px + env(safe-area-inset-bottom)); }
  .nav a { padding: 4px 0; min-width: 0; flex: 1; font-size: 10.5px; font-weight: 500; gap: 1px; color: #8A8FA8; border-radius: 0; }
  .nav a.on { background: transparent; color: var(--accent); }
  .nav svg { width: 25px; height: 25px; }
}
/* ปุ่ม */
.btn { border-radius: 12px; border: 0; background: var(--fill); font-weight: 600; min-height: 44px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { color: var(--bad); background: var(--fill); }
.btn.sm { min-height: 34px; border-radius: 10px; }
.input, textarea.input, select.input { border: 0; background: var(--card); border-radius: 12px; }
.input:focus { box-shadow: 0 0 0 2px var(--accent); }
/* ช่องส่ง: แบบ iMessage */
.compose { border-radius: 26px; border: .5px solid var(--sep); background: color-mix(in srgb, var(--card) 88%, transparent); backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px); }
.cmp-ic { border-radius: 50%; background: var(--fill); width: 38px; height: 38px; }
.cmp-send { border-radius: 50%; width: 38px; height: 38px; }
/* แผ่นเด้งจากล่าง + ขีดจับ */
.sheet { backdrop-filter: blur(2px); }
.sheet-in { background: #1E2133; border-radius: 14px 14px 0 0; padding-top: 26px; position: relative; }
.sheet-in::before { content: ''; position: absolute; top: 8px; left: 50%; transform: translateX(-50%); width: 36px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.25); }
@media (min-width: 600px) { .sheet-in { border-radius: 14px; } .sheet-in::before { display: none; } }
.seg2, .tabs, .ios-seg { background: var(--fill); border-radius: 9px; padding: 2px; gap: 0; }
.seg2 span { border: 0; border-radius: 7px; padding: 7px; }
.seg2 input:checked + span { background: #5A5E75; color: #fff; }
.tabs button { border-radius: 7px; min-height: 32px; }
.tabs button.on { background: #5A5E75; color: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.helper { border-radius: 16px; }
.tick { border-radius: 50%; border-width: 1.5px; border-color: #5A5E75; }
.cats button { border: 0; background: var(--fill); }
.cats button.on { background: var(--accent); color: var(--accent-ink); }

/* ── ส่วนประกอบแบบ iOS ── */
.ios-btn { width: 100%; min-height: 52px; border-radius: 14px; border: 0; font-size: 17px; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 10px; cursor: pointer; font-family: inherit; }
.ios-btn svg { width: 20px; height: 20px; }
.ios-btn.filled { background: var(--accent); color: var(--accent-ink); }
.ios-btn.tinted { background: var(--accent-soft); color: var(--accent); min-height: 44px; font-size: 15px; margin-top: 12px; }
.ios-btn.plain { background: transparent; color: var(--accent); min-height: 44px; font-size: 16px; }
.ios-btn:active { opacity: .7; }
.ios-group { background: var(--card); border-radius: 14px; overflow: hidden; }
.ios-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; position: relative; cursor: default; }
label.ios-row { cursor: pointer; }
.ios-row + .ios-row::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; height: .5px; background: var(--sep); }
.ios-row > div { flex: 1; min-width: 0; } .ios-row b { display: block; font-size: 16px; font-weight: 500; } .ios-row small { display: block; color: var(--muted); font-size: 13px; line-height: 1.35; }
.ios-row.tall { align-items: flex-start; }
.ios-row.tall .ios-switch { margin-top: 4px; }
.ri { flex: none; width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; color: #fff; }
.ri svg { width: 18px; height: 18px; }
.ic-y { background: #E8A93A; } .ic-b { background: #4F6BF0; } .ic-p { background: #8B5CF6; } .ic-g { background: #2FA374; }
.ios-check { color: var(--accent); } .ios-check svg { width: 20px; height: 20px; }
.ios-switch { -webkit-appearance: none; appearance: none; flex: none; width: 51px; height: 31px; border-radius: 16px; background: var(--fill); position: relative; cursor: pointer; transition: background .2s; margin: 0; }
.ios-switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 27px; height: 27px; border-radius: 50%; background: #fff; box-shadow: 0 3px 8px rgba(0,0,0,.25); transition: transform .22s cubic-bezier(.3,1.4,.5,1); }
.ios-switch:checked { background: #34C759; }
.ios-switch:checked::after { transform: translateX(20px); }
.ios-switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.ios-time { margin-top: 8px; background: rgba(0,0,0,.3); border: 0; border-radius: 9px; color: var(--ink); font: 600 16px/1 var(--font); padding: 8px 12px; color-scheme: dark; }
.ios-time:disabled { opacity: .35; }
.ios-input { width: 100%; min-height: 48px; border: 0; border-radius: 12px; background: var(--card); padding: 0 14px; font-size: 16px; outline: none; }
.ios-input:focus { box-shadow: 0 0 0 2px var(--accent); }
.ios-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ios-chips button { display: inline-flex; align-items: center; gap: 6px; border: 0; background: var(--card); color: var(--ink); border-radius: 999px; padding: 9px 14px; font-size: 15px; font-family: inherit; cursor: pointer; transition: background .15s, transform .1s; }
.ios-chips button svg { width: 17px; height: 17px; color: var(--muted); }
.ios-chips button.on { background: var(--accent); color: var(--accent-ink); }
.ios-chips button.on svg { color: var(--accent-ink); }
.ios-chips button:active { transform: scale(.96); }
.ios-seg { display: grid; grid-template-columns: 1fr 1fr; margin: 16px 0 14px; }
.ios-seg button { border: 0; background: transparent; color: var(--ink); border-radius: 7px; min-height: 34px; font: 600 14px var(--font); cursor: pointer; }
.ios-seg button.on { background: #5A5E75; box-shadow: 0 3px 8px rgba(0,0,0,.25); }


@keyframes appear { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ═══ ตั้งค่าครั้งแรก ═══ */
.wz { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.wz-nav { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 12px 6px; }
.wz-link { display: inline-flex; align-items: center; gap: 2px; border: 0; background: transparent; color: var(--accent); font: 500 16px var(--font); cursor: pointer; padding: 8px; }
.wz-link svg { width: 20px; height: 20px; }
.wz-step { font-size: 13px; color: var(--muted); font-weight: 600; }
.wz-body { flex: 1; padding: 6px 18px 20px; animation: appear .35s ease; }
.wz-say { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px 14px; margin-bottom: 18px; }
.wz-say img { width: 48px; height: 48px; border-radius: 13px; flex: none; }
.wz-say b { display: block; font-size: 15.5px; } .wz-say small { color: var(--muted); font-size: 13.5px; }
.wz-h { font-size: 28px; font-weight: 800; letter-spacing: -.02em; line-height: 1.2; margin: 0 0 6px; }
.wz-p { color: var(--muted); margin: 0 0 6px; }
.wz-q { display: block; font-size: 13px; font-weight: 500; color: var(--muted); margin: 20px 4px 8px; }
.wz-q small { font-weight: 400; }
.wz-foot { position: sticky; bottom: 0; padding: 12px 18px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 26%); display: grid; gap: 4px; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }

/* ═══ หน้าแนะนำ "หนึ่งวันกับจด" ═══ */
.dy { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; padding-bottom: env(safe-area-inset-bottom); }
.dy-sky { position: relative; border-radius: 0 0 34px 34px; padding: calc(10px + env(safe-area-inset-top)) 18px 20px; min-height: 380px; overflow: hidden; transition: background .6s; color: #fff; }
.dy-dawn .dy-sky { background: linear-gradient(180deg, #2B2F5C 0%, #8A5C8E 48%, #F2A774 100%); }
.dy-morning .dy-sky { background: linear-gradient(180deg, #2F6FD6 0%, #6FA8EE 60%, #BFE0FA 100%); }
.dy-noon .dy-sky { background: linear-gradient(180deg, #2E8BEB 0%, #66C1F5 55%, #D9F2FF 100%); }
.dy-dusk .dy-sky { background: linear-gradient(180deg, #3B2C77 0%, #B5528A 50%, #F49A5B 100%); }
.dy-night .dy-sky { background: radial-gradient(2px 2px at 20% 30%, #fff8, transparent), radial-gradient(1.5px 1.5px at 70% 18%, #fff9, transparent), radial-gradient(1.5px 1.5px at 85% 45%, #fff7, transparent), radial-gradient(2px 2px at 40% 12%, #fff6, transparent), linear-gradient(180deg, #0E1230 0%, #1C2250 70%, #2A2F66 100%); }
.dy-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; }
.dy-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 17px; text-shadow: 0 1px 6px rgba(0,0,0,.25); }
.dy-brand img { width: 28px; height: 28px; border-radius: 8px; }
.dy-login { border: 0; background: rgba(255,255,255,.18); color: #fff; font: 600 14px var(--font); border-radius: 999px; padding: 7px 14px; cursor: pointer; backdrop-filter: blur(8px); }
.dy-arc { position: absolute; left: 0; right: 0; top: 56px; width: 100%; height: 72px; color: rgba(255,255,255,.55); }
.dy-dot { position: absolute; margin-top: 52px; width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.55); transform: translate(-50%, -50%); cursor: pointer; z-index: 2; }
.dy-dot.on { background: transparent; }
.dy-sun { position: absolute; margin-top: 52px; width: 34px; height: 34px; border-radius: 50%; transform: translate(-50%, -50%); background: radial-gradient(circle at 40% 40%, #FFF6C8, #FFC94A 60%, #FF9F3A); box-shadow: 0 0 0 6px rgba(255,214,102,.25), 0 0 40px 10px rgba(255,200,80,.45); transition: left .6s cubic-bezier(.3,1,.4,1), top .6s cubic-bezier(.3,1,.4,1); z-index: 2; }
.dy-sun.moon { background: radial-gradient(circle at 65% 35%, transparent 9px, #F3F1EA 10px); box-shadow: 0 0 30px 6px rgba(220,225,255,.35); }
.dy-clock { position: relative; z-index: 2; margin-top: 92px; display: flex; align-items: baseline; gap: 10px; text-shadow: 0 2px 10px rgba(0,0,0,.25); }
.dy-clock b { font-size: 44px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.dy-clock span { font-size: 16px; font-weight: 600; opacity: .9; }
.dy-scene { position: relative; z-index: 2; margin-top: 12px; animation: appear .5s ease; }
.dy-body { flex: 1; padding: 22px 20px 8px; animation: appear .45s ease; }
.dy-h { font-size: 27px; line-height: 1.25; font-weight: 800; letter-spacing: -.015em; margin: 0 0 8px; }
.dy-p { color: var(--muted); font-size: 16px; margin: 0 0 16px; }
.dy-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.dy-pills span { display: inline-flex; align-items: center; gap: 6px; background: var(--card); border-radius: 10px; padding: 7px 11px; font-size: 14px; }
.dy-pills svg { width: 16px; height: 16px; color: var(--accent); }
.dy-honest { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.dy-honest li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 14.5px; }
.dy-honest svg { flex: none; width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.dy-foot { position: sticky; bottom: 0; display: flex; gap: 10px; padding: 12px 20px 6px; background: linear-gradient(transparent, var(--bg) 30%); }
.dy-foot .ios-btn.filled { flex: 1; }
.dy-prev { width: 52px; flex: none; background: var(--fill); color: var(--ink); }
.dy-skip { display: block; margin: 0 auto 10px; border: 0; background: transparent; color: var(--muted); font: 500 14px var(--font); cursor: pointer; padding: 6px; }
.dy-legal { text-align: center; color: var(--muted); font-size: 12px; margin: 4px 20px 12px; }

/* ฉากในแต่ละช่วง */
.sc-notif { display: flex; gap: 10px; align-items: flex-start; background: rgba(255,255,255,.88); color: #1A1E33; border-radius: 18px; padding: 12px 14px; box-shadow: 0 14px 34px -14px rgba(0,0,0,.45); }
.sc-notif.soft { background: rgba(255,255,255,.14); color: #fff; backdrop-filter: blur(10px); }
.sc-notif img { width: 36px; height: 36px; border-radius: 9px; flex: none; }
.sc-notif small { display: block; font-size: 11.5px; opacity: .65; } .sc-notif b { display: block; font-size: 15px; } .sc-notif span { display: block; font-size: 13px; opacity: .8; }
.sc-board { position: relative; height: 150px; }
.sc-board .bd { position: absolute; left: 0; top: 0; width: 64%; background: #2F5D45; color: #EAF5EC; border: 6px solid #8B6A44; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.5; transform: rotate(-3deg); font-family: 'Comic Sans MS', var(--font); }
.sc-board .bd u { text-decoration-color: #F5C76B; text-decoration-thickness: 2px; }
.sc-flash { position: absolute; inset: -20px; background: #fff; opacity: 0; animation: flash .7s .3s; pointer-events: none; border-radius: 20px; }
@keyframes flash { 30% { opacity: .75; } }
.sc-card { position: absolute; right: 0; bottom: 0; width: 72%; display: flex; gap: 10px; align-items: center; background: #fff; color: #1A1E33; border-radius: 16px; padding: 11px 12px; box-shadow: 0 16px 34px -12px rgba(0,0,0,.45); opacity: 0; animation: appear .5s .9s forwards; }
.sc-card b { display: block; font-size: 14.5px; } .sc-card small { color: #667; font-size: 12.5px; }
.sc-ledger { display: grid; grid-template-columns: 1fr auto 1.2fr; gap: 10px; align-items: center; }
.lg-slip { background: #fff; color: #1A1E33; border-radius: 14px; padding: 12px 10px; text-align: center; display: grid; justify-items: center; gap: 2px; transform: rotate(-4deg); box-shadow: 0 12px 26px -10px rgba(0,0,0,.4); }
.lg-slip .ok { width: 28px; height: 28px; border-radius: 50%; background: #2FA374; color: #fff; display: grid; place-items: center; } .lg-slip .ok svg { width: 15px; height: 15px; }
.lg-slip b { font-size: 19px; } .lg-slip small { font-size: 11px; color: #666; }
.lg-arrow { width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,.9); color: #2E8BEB; display: grid; place-items: center; } .lg-arrow svg { width: 15px; height: 15px; }
.lg-book { background: #FFFDF6; color: #1A1E33; border-radius: 14px; padding: 10px 12px; font-size: 13px; box-shadow: 0 12px 26px -10px rgba(0,0,0,.35); background-image: repeating-linear-gradient(transparent 0 23px, #E7E0CC 23px 24px); }
.lg-book small { display: block; font-weight: 700; color: #2E8BEB; margin-bottom: 2px; }
.lg-book div { display: flex; justify-content: space-between; line-height: 24px; }
.lg-book .new { animation: hl 1.2s .8s both; border-radius: 4px; padding: 0 4px; margin: 0 -4px; }
@keyframes hl { from { background: transparent; } 40% { background: #FFE9A8; } to { background: #FFF3CC; } }
.lg-book .sum { border-top: 1.5px solid #1A1E33; font-weight: 700; }
.sc-ask { display: grid; gap: 10px; }
.sc-ask .q { justify-self: end; background: #3A56E8; color: #fff; padding: 10px 14px; border-radius: 18px 18px 5px 18px; font-size: 14.5px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.4); }
.sc-ask .a { display: flex; gap: 8px; align-items: flex-end; opacity: 0; animation: appear .5s .7s forwards; }
.sc-ask .a img { width: 30px; height: 30px; border-radius: 8px; }
.sc-ask .a div { background: rgba(255,255,255,.92); color: #1A1E33; border-radius: 18px 18px 18px 5px; padding: 10px 14px; }
.sc-ask .a b { display: block; font-size: 14.5px; } .sc-ask .a small { color: #556; font-size: 12.5px; }
.sc-night { padding-top: 6px; }
@media (max-width: 380px) { .dy-sky { min-height: 340px; } .dy-clock b { font-size: 38px; } .dy-h { font-size: 24px; } }

/* ═══ เข้าสู่ระบบ / สมัคร ═══ */
.au { max-width: 520px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.au-sky { position: relative; border-radius: 0 0 34px 34px; padding: calc(10px + env(safe-area-inset-top)) 16px 26px; overflow: hidden;
  background: radial-gradient(2px 2px at 18% 34%, #fff8, transparent), radial-gradient(1.5px 1.5px at 72% 22%, #fff9, transparent), radial-gradient(1.5px 1.5px at 88% 58%, #fff7, transparent), radial-gradient(2px 2px at 44% 14%, #fff6, transparent), radial-gradient(220px 140px at 70% 110%, rgba(245,199,107,.25), transparent), linear-gradient(180deg, #0E1230, #2A2F66); }
.au-top { display: flex; }
.au-back { display: inline-flex; align-items: center; gap: 2px; border: 0; background: rgba(255,255,255,.14); color: #fff; font: 600 14px var(--font); border-radius: 999px; padding: 6px 12px 6px 8px; cursor: pointer; backdrop-filter: blur(8px); }
.au-back svg { width: 18px; height: 18px; }
.au-hello { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.au-hello img { width: 92px; height: 92px; border-radius: 24px; box-shadow: 0 16px 44px -14px rgba(245,199,107,.55); animation: bob 3.6s ease-in-out infinite; }
.au-bubble { position: relative; background: #fff; color: #1A1E33; border-radius: 18px; padding: 10px 14px; box-shadow: 0 12px 30px -12px rgba(0,0,0,.55); animation: appear .5s .2s both; }
.au-bubble::after { content: ''; position: absolute; right: -6px; top: 50%; width: 14px; height: 14px; background: inherit; transform: translateY(-50%) rotate(45deg); border-radius: 2px; }
.au-bubble b { display: block; font-size: 16px; } .au-bubble small { color: #556; font-size: 13px; }
.au-body { flex: 1; padding: 24px 20px calc(20px + env(safe-area-inset-bottom)); animation: appear .4s ease; }
.au-h { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.au-p { color: var(--muted); margin: 0 0 20px; }
.au-google { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; min-height: 56px; border-radius: 16px; background: #fff; color: #1F1F1F; font-size: 17px; font-weight: 700; text-decoration: none; box-shadow: 0 10px 28px -12px rgba(255,255,255,.35); transition: transform .12s; }
.au-google:active { transform: scale(.98); }
.au-drive { display: block; margin-top: 12px; cursor: pointer; }
.au-drive .ios-row { display: flex; }
.au-dt { flex: 1; min-width: 0; } .au-dt b { display: block; font-size: 15px; font-weight: 500; } .au-dt small { display: block; color: var(--muted); font-size: 12.5px; }
.au-alt { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 16px; border: 0; background: transparent; color: var(--accent); font: 600 15.5px var(--font); cursor: pointer; padding: 10px; }
.au-alt svg { width: 18px; height: 18px; }
.au-email { margin-top: 6px; animation: appear .3s ease; }
.au-email .tabs { margin-bottom: 12px; }
.au-fields { margin-bottom: 10px; }
.au-f { display: flex; align-items: center; gap: 10px; padding: 0 14px; min-height: 50px; position: relative; }
.au-f + .au-f::before { content: ''; position: absolute; top: 0; left: 14px; right: 0; height: .5px; background: var(--sep); }
.au-f span { flex: none; width: 74px; font-size: 15px; }
.au-f input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 16px; padding: 14px 0; }
.au-submit { width: 100%; min-height: 50px; font-size: 16px; }
.au-legal { text-align: center; font-size: 12px; color: var(--muted); margin: 18px 0 0; }

/* ═══ แอดมิน ═══ */
.ad-seg { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--fill); border-radius: 9px; padding: 2px; margin: 10px 0 6px; }
.ad-seg button { border: 0; background: transparent; color: var(--ink); border-radius: 7px; min-height: 32px; font: 600 14px var(--font); cursor: pointer; }
.ad-seg button.on { background: #5A5E75; box-shadow: 0 3px 8px rgba(0,0,0,.25); }
.ad-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 560px) { .ad-tiles { grid-template-columns: 1fr 1fr; } }
.ad-tile { background: var(--card); border-radius: 14px; padding: 12px 14px; display: grid; }
.ad-tile b { font-size: 26px; line-height: 1.15; font-variant-numeric: tabular-nums; }
.ad-tile span { font-size: 13.5px; font-weight: 600; } .ad-tile small { color: var(--muted); font-size: 12px; }
.ad-chart { display: flex; align-items: flex-end; gap: 4px; height: 150px; padding: 14px 12px 8px; }
.ad-bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.ad-bar i { display: block; width: 100%; max-width: 22px; background: var(--accent); border-radius: 4px 4px 2px 2px; }
.ad-bar span { font-size: 10.5px; color: var(--muted); }
.ad-v { color: var(--muted); font-size: 15px; text-align: right; }
.ad-user { align-items: flex-start; }
.ad-user small { display: block; }
.ad-badge { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 1px 6px; vertical-align: middle; }
.ad-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.ad-tags span { font-size: 11.5px; background: var(--fill); border-radius: 6px; padding: 2px 7px; color: var(--ink); }
.ad-fb { display: grid; gap: 10px; margin-top: 14px; }
.ad-fbi { padding: 12px 14px; border-left: 3px solid var(--accent); }
.ad-fbi.read { border-left-color: transparent; opacity: .7; }
.ad-fbi small { color: var(--muted); font-size: 12.5px; }
.ad-fbi p { margin: 6px 0 0; white-space: pre-wrap; }
.ad-num { width: 90px; border: 0; background: var(--fill); border-radius: 9px; padding: 8px 10px; text-align: right; font: 600 16px var(--font); color: var(--ink); }
.ad-link { display: block; text-decoration: none; }

/* ═══ หน้าใช้งาน รอบ 5 ═══ */
.pg-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; }
.pg-head h1 { margin-bottom: 2px; } .pg-head .sub { margin: 0 0 4px; }
.pg-btn { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--fill); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; }
.pg-btn svg { width: 19px; height: 19px; } .pg-btn.flip svg { transform: scaleX(-1); }
.m-empty { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 34px 16px; }
.m-empty img { width: 84px; height: 84px; border-radius: 22px; margin-bottom: 10px; animation: bob 3.6s ease-in-out infinite; }
.m-empty b { font-size: 17px; } .m-empty small { color: var(--muted); max-width: 300px; }

/* วันนี้ */
.td-head { margin-top: 16px; } .td-head p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; } .td-head h1 { margin-top: 2px; }
.td-hero { margin-top: 12px; border-radius: 22px; padding: 16px; background: linear-gradient(135deg, #2A3170 0%, #1E2240 60%, #2B2440 100%); position: relative; overflow: hidden; }
.td-hero::after { content: ''; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(circle, rgba(245,199,107,.25), transparent 70%); pointer-events: none; }
.td-say { display: flex; gap: 12px; align-items: center; position: relative; z-index: 1; }
.td-say img { width: 58px; height: 58px; border-radius: 16px; flex: none; animation: bob 3.6s ease-in-out infinite; }
.td-say div { background: rgba(255,255,255,.08); border-radius: 16px 16px 16px 4px; padding: 10px 13px; }
.td-say b { display: block; font-size: 16px; } .td-say small { color: #C3C7DC; font-size: 13.5px; }
.td-mood { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: .5px solid rgba(255,255,255,.12); position: relative; z-index: 1; }
.td-mood > span { font-size: 13.5px; color: #C3C7DC; white-space: nowrap; }
.td-mood > div { display: flex; gap: 4px; }
.td-mood button { border: 0; background: transparent; padding: 3px; border-radius: 12px; cursor: pointer; opacity: .55; transition: opacity .15s, transform .15s, background .15s; }
.td-mood button.on { opacity: 1; background: rgba(255,255,255,.12); transform: scale(1.08); }
.td-mood button:hover { opacity: 1; }
.td-mood svg { width: 32px; height: 32px; display: block; }
.td-demo { margin-top: 12px; position: relative; z-index: 1; }
.td-nudge { display: flex; gap: 12px; align-items: center; background: var(--card); border-radius: 16px; padding: 12px 14px; margin-top: 12px; }
.td-nudge div { flex: 1; } .td-nudge b { display: block; font-size: 15px; } .td-nudge small { color: var(--muted); }
.td-helpers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.td-helpers a { display: grid; justify-items: center; gap: 6px; text-decoration: none; font-size: 12.5px; font-weight: 600; text-align: center; padding: 12px 4px; background: var(--card); border-radius: 16px; }
.td-helpers .ri { width: 44px; height: 44px; border-radius: 14px; position: relative; }
.td-helpers .ri svg { width: 22px; height: 22px; }
.td-helpers em { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; border-radius: 10px; background: var(--bad); color: #fff; font-style: normal; font-size: 11px; font-weight: 700; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--card); }
.td-quick { display: flex; align-items: center; gap: 10px; padding: 4px 14px; position: relative; }
.list .td-quick::before { content: ''; position: absolute; top: 0; left: 16px; right: 0; height: .5px; background: var(--sep); }
.td-quick > span { color: var(--accent); display: grid; } .td-quick > span svg { width: 20px; height: 20px; }
.td-quick input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 15.5px; padding: 11px 0; }
.td-quick input[type=date] { flex: none; width: auto; color: var(--muted); font-size: 13.5px; color-scheme: dark; }
.td-quick.big { margin: 14px 0 4px; }
h2.grp { display: flex; align-items: center; gap: 7px; }
.grp i { width: 9px; height: 9px; border-radius: 50%; }
.dot-bad { background: var(--bad); } .dot-y { background: #E8A93A; } .dot-b { background: #4F6BF0; } .dot-p { background: #8B5CF6; } .dot-g { background: #2FA374; }

/* ปฏิทิน */
.cal-seg { grid-template-columns: repeat(3, 1fr); margin-top: 12px; }
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 10px; }
.cal-nav b { font-size: 17px; }
.cal-g button.we b, .cal-w span.we { color: #FF8F8F; }
.cal-g button.sel { background: var(--accent); color: var(--accent-ink); }
.cal-g button.sel b { color: var(--accent-ink) !important; }
.cal-g button.today:not(.sel) { box-shadow: inset 0 0 0 1.5px var(--accent); }
h2.cal-day { font-size: 18px; font-weight: 700; color: var(--ink); margin: 20px 2px 10px; }
.cal-free { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 1.5px dashed var(--line); border-radius: 16px; padding: 22px; color: var(--muted); }
.cal-free svg { width: 28px; height: 28px; }
.cal-bar { width: 4px; align-self: stretch; border-radius: 2px; background: var(--cc); flex: none; }
.wk-day { display: flex; gap: 12px; padding: 10px 0; border-bottom: .5px solid var(--sep); }
.wk-d { flex: none; width: 52px; border: 0; background: var(--card); border-radius: 12px; color: var(--ink); display: grid; justify-items: center; padding: 6px 0; cursor: pointer; }
.wk-d b { font-size: 19px; line-height: 1.1; } .wk-d span { font-size: 11.5px; color: var(--muted); }
.wk-day.today .wk-d { background: var(--accent); color: var(--accent-ink); } .wk-day.today .wk-d span { color: var(--accent-ink); }
.wk-ev { flex: 1; min-width: 0; display: grid; gap: 6px; align-content: center; }
.wk-ev a { display: block; text-decoration: none; background: color-mix(in srgb, var(--cc) 18%, var(--card)); border-left: 3px solid var(--cc); border-radius: 8px; padding: 6px 10px; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-none { color: var(--muted); font-size: 13.5px; }

/* คลัง: แฟ้ม */
.sp-seg { grid-template-columns: 1fr 1fr; margin: 10px 0 14px; max-width: 260px; }
.folders { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 12px; padding-top: 8px; }
.folder { position: relative; border: 0; text-align: left; cursor: pointer; color: var(--ink); font-family: inherit; padding: 16px 14px 14px; min-height: 120px; border-radius: 4px 16px 16px 16px; display: flex; flex-direction: column; justify-content: flex-end; gap: 1px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--cc) 34%, var(--card)), color-mix(in srgb, var(--cc) 12%, var(--card))); transition: transform .15s; }
.folder:hover { transform: translateY(-2px); } .folder:active { transform: scale(.97); }
.f-tab { position: absolute; left: 0; top: -9px; width: 46%; height: 12px; border-radius: 8px 10px 0 0; background: color-mix(in srgb, var(--cc) 34%, var(--card)); }
.f-ic { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 12px; background: var(--cc); color: #12141F; display: grid; place-items: center; }
.f-ic svg { width: 21px; height: 21px; }
.f-ic.sm { position: static; width: 30px; height: 30px; border-radius: 9px; } .f-ic.sm svg { width: 17px; height: 17px; }
.folder b { font-size: 16px; } .folder small { color: color-mix(in srgb, var(--cc) 70%, #fff); font-size: 13px; font-weight: 600; }
.sp-crumb { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; } .sp-crumb b { font-size: 18px; }

/* ═══ แชทกับจด ═══ */
.ch { max-width: 720px; margin: 0 auto; height: 100dvh; display: flex; flex-direction: column; }
.ch-top { display: flex; align-items: center; gap: 10px; padding: calc(8px + env(safe-area-inset-top)) 12px 8px; border-bottom: .5px solid var(--sep); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.ch-top > img { width: 38px; height: 38px; border-radius: 11px; }
.ch-who { flex: 1; min-width: 0; } .ch-who b { display: block; font-size: 16px; } .ch-who small { color: #4CC79A; font-size: 12.5px; }
.ch-new { border: 0; background: transparent; color: var(--accent); font: 600 15px var(--font); cursor: pointer; padding: 8px 4px; }
.ch-list { flex: 1; overflow-y: auto; padding: 12px 14px 8px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.ch-day { display: flex; justify-content: center; margin: 6px 0 2px; }
.ch-day span { font-size: 12px; color: var(--muted); background: var(--fill); border-radius: 999px; padding: 3px 11px; }
.ch-row { display: flex; gap: 8px; align-items: flex-end; animation: appear .3s ease; }
.ch-row.me { justify-content: flex-end; }
.ch-row > img { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.ch-b { max-width: 80%; padding: 10px 14px; font-size: 15.5px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.me .ch-b { background: var(--accent); color: var(--accent-ink); border-radius: 18px 18px 5px 18px; }
.jod .ch-b { background: var(--card); border-radius: 18px 18px 18px 5px; }
.jod.err .ch-b { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bad) 50%, transparent); }
.ch-b em { display: block; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--blue); margin-bottom: 2px; }
.ch-refs { display: grid; gap: 6px; margin-top: 8px; white-space: normal; }
.ch-refs a { display: flex; align-items: center; gap: 8px; text-decoration: none; background: var(--fill); border-radius: 10px; padding: 7px 10px; font-size: 14px; font-weight: 600; }
.ch-refs a span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.ch-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: dot 1.2s infinite; }
.ch-typing i:nth-child(2) { animation-delay: .15s; } .ch-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-4px); opacity: 1; } 0%, 60%, 100% { opacity: .4; } }
.ch-dock { padding: 6px 12px calc(10px + env(safe-area-inset-bottom)); border-top: .5px solid var(--sep); background: var(--bg); }
.ch-sugg { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 8px; scrollbar-width: none; }
.ch-sugg::-webkit-scrollbar { display: none; }
.ch-sugg button { flex: none; border: 0; background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 13px; font: 500 13.5px var(--font); cursor: pointer; }
.ch-in { display: flex; align-items: flex-end; gap: 6px; background: var(--card); border-radius: 24px; padding: 5px 5px 5px 14px; }
.ch-in textarea { flex: 1; border: 0; background: transparent; outline: none; resize: none; font-size: 15.5px; padding: 9px 0; max-height: 120px; line-height: 1.4; }
.ch-ic, .ch-send { flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: transparent; color: var(--muted); }
.ch-ic svg, .ch-send svg { width: 20px; height: 20px; }
.ch-ic.rec { background: var(--bad); color: #fff; animation: pulse 1.2s infinite; }
.ch-send { background: var(--accent); color: var(--accent-ink); }

.ch-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; margin-top: 8px; white-space: normal; }
.ch-pics a { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 1; background: var(--fill); }
.ch-pics img { width: 100%; height: 100%; object-fit: cover; }
.ch-pics span { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px; font-size: 11.5px; font-weight: 600; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.75)); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ═══ เมนูซ้าย (คอม) + แถบล่าง "คุยกับจด" + ปุ่มเก็บของใหม่ ═══ */
.side { display: none; }
.dockbar { position: fixed; z-index: 25; left: 50%; transform: translateX(-50%); bottom: 16px; width: min(760px, calc(100% - 24px)); display: flex; gap: 8px; align-items: flex-end; }
.dockbar .compose { position: static; transform: none; width: auto; flex: 1; min-width: 0; padding: 5px 5px 5px 6px; align-items: center; }
.cmp-av { flex: none; width: 34px; height: 34px; border-radius: 10px; overflow: hidden; } .cmp-av img { width: 100%; height: 100%; }
.new-fab { flex: none; width: 54px; height: 54px; border-radius: 50%; border: 0; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; cursor: pointer; box-shadow: 0 12px 30px -10px rgba(245,199,107,.6); transition: transform .12s; }
.new-fab svg { width: 26px; height: 26px; } .new-fab:active { transform: scale(.94); }
@media (max-width: 720px) { .dockbar { bottom: calc(68px + env(safe-area-inset-bottom)); } }

@media (min-width: 1024px) {
  .top { display: none; }
  .side { display: flex; flex-direction: column; gap: 6px; position: fixed; inset: 0 auto 0 0; width: 240px; padding: 18px 14px; background: color-mix(in srgb, var(--card) 55%, var(--bg)); border-right: .5px solid var(--sep); z-index: 30; }
  .side-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 19px; padding: 4px 8px 14px; }
  .side-brand img { width: 32px; height: 32px; border-radius: 9px; }
  .side-new { display: flex; align-items: center; gap: 10px; border: 0; border-radius: 14px; padding: 13px 16px; background: var(--accent); color: var(--accent-ink); font: 700 15.5px var(--font); cursor: pointer; margin-bottom: 10px; box-shadow: 0 10px 26px -12px rgba(245,199,107,.6); }
  .side-new svg { width: 20px; height: 20px; }
  .side-nav { display: grid; gap: 2px; }
  .side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 11px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
  .side-nav a svg { width: 20px; height: 20px; }
  .side-nav a:hover { background: var(--fill); color: var(--ink); }
  .side-nav a.on { background: var(--accent-soft); color: var(--accent); }
  .side-me { margin-top: auto; display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 10px; border-radius: 12px; color: var(--ink); font-weight: 600; font-size: 14.5px; }
  .side-me:hover, .side-me.on { background: var(--fill); }
  .side-av { width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #12141F; display: grid; place-items: center; font-weight: 800; }
  .wrap { margin-left: 240px; max-width: 1060px; padding-left: 36px; padding-right: 36px; }
  @media (min-width: 1400px) { .wrap { margin-left: calc(240px + (100vw - 240px - 1060px) / 2); } }
  .dockbar { left: calc(240px + (100vw - 240px) / 2); width: min(820px, calc(100vw - 240px - 64px)); }
  .new-fab { display: none; }
  .wrap.has-cmp { padding-bottom: 140px; }
}

/* แผ่น "เก็บอะไรดี" */
.nw h3 { font-size: 20px; }
.nw-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.nw-big { display: grid; justify-items: start; gap: 2px; border: 0; border-radius: 16px; padding: 16px; background: var(--accent); color: var(--accent-ink); cursor: pointer; text-align: left; font-family: inherit; }
.nw-big + .nw-big { background: var(--blue); }
.nw-big.wide { grid-column: 1 / -1; }
.nw-big svg { width: 26px; height: 26px; margin-bottom: 6px; } .nw-big b { font-size: 16px; } .nw-big small { font-size: 12.5px; opacity: .8; }
.nw-paste { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 10px; border: 1.5px dashed var(--line); background: transparent; color: var(--ink); border-radius: 14px; padding: 11px 14px; cursor: pointer; text-align: left; font-family: inherit; }
.nw-paste > svg { width: 22px; height: 22px; color: var(--blue); flex: none; }
.nw-paste span { flex: 1; } .nw-paste b { display: block; font-size: 15px; } .nw-paste small { color: var(--muted); font-size: 12.5px; }
.nw-paste em { font-style: normal; font-weight: 700; font-size: 13px; background: var(--fill); border-radius: 8px; padding: 5px 10px; }
.nw-list { background: var(--card); border-radius: 14px; overflow: hidden; margin-top: 12px; }
.nw-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: var(--ink); padding: 11px 14px; cursor: pointer; text-align: left; font-family: inherit; position: relative; }
.nw-row + .nw-row::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; height: .5px; background: var(--sep); }
.nw-row > span:nth-child(2) { flex: 1; } .nw-row b { display: block; font-size: 15px; font-weight: 600; } .nw-row small { color: var(--muted); font-size: 12.5px; }
.nw-go { width: 16px; height: 16px; transform: scaleX(-1); color: var(--muted); }
.nw .sheet-in { max-width: 520px; }

.it-link { display: grid; place-items: center; align-content: center; gap: 6px; color: var(--blue); }
.it-link span { font-size: 13px; font-weight: 700; color: var(--muted); }
.it-site { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; background: rgba(18,20,31,.82); color: #fff; font-size: 11.5px; font-weight: 700; border-radius: 8px; padding: 3px 8px; backdrop-filter: blur(6px); }
.it-site svg { width: 12px; height: 12px; }

/* ═══ หลังบ้าน ═══ */
.adm { display: flex; min-height: 100dvh; }
.adn { width: 248px; flex: none; position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: color-mix(in srgb, var(--card) 60%, var(--bg)); border-right: .5px solid var(--sep); padding: 16px 12px; display: flex; flex-direction: column; }
.adn-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 17px; padding: 4px 8px 16px; }
.adn-brand img { width: 32px; height: 32px; border-radius: 9px; } .adn-brand small { display: block; font-size: 12px; font-weight: 600; color: var(--accent); }
.adn-g { margin: 14px 10px 4px; font-size: 11.5px; font-weight: 700; color: var(--muted); letter-spacing: .04em; }
.adn nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px; }
.adn nav a svg { width: 19px; height: 19px; flex: none; } .adn nav a span { flex: 1; }
.adn nav a:hover { background: var(--fill); color: var(--ink); }
.adn nav a.on { background: var(--accent-soft); color: var(--accent); }
.adn nav a em { font-style: normal; font-size: 11px; font-weight: 800; background: var(--bad); color: #fff; border-radius: 9px; min-width: 18px; padding: 1px 6px; text-align: center; }
.adn-back { margin-top: auto; display: flex; gap: 8px; align-items: center; color: var(--muted); text-decoration: none; padding: 10px 12px; font-weight: 600; font-size: 14px; } .adn-back svg { width: 18px; height: 18px; }
.adm-main { flex: 1; min-width: 0; padding: 18px 28px 120px; max-width: 1280px; }
.adm-top { display: none; }
@media (max-width: 900px) {
  .adm { display: block; }
  .adn { position: sticky; top: 0; z-index: 20; width: auto; height: auto; flex-direction: row; overflow-x: auto; padding: 8px; gap: 4px; background: var(--bg); border-right: 0; border-bottom: .5px solid var(--sep); }
  .adn-brand, .adn-g, .adn-back { display: none; }
  .adn nav { display: flex; gap: 4px; } .adn nav a { white-space: nowrap; padding: 8px 11px; font-size: 13.5px; }
  .adm-main { padding: 12px 14px 120px; }
}
.ad-hero { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: linear-gradient(120deg, #222A55, #1B1E2D 70%); border-radius: 20px; padding: 22px 24px; position: relative; overflow: hidden; margin-bottom: 16px; }
.ad-hero::before { content: ''; position: absolute; left: -40px; bottom: -60px; width: 160px; height: 160px; border-radius: 50%; background: rgba(142,162,255,.12); }
.ad-hero h1 { margin: 0 0 4px; font-size: 26px; } .ad-hero p { margin: 0; color: var(--muted); font-size: 14.5px; }
.ad-hero > img { width: 76px; height: 76px; border-radius: 20px; opacity: .95; position: relative; }
@media (max-width: 600px) { .ad-hero > img { display: none; } .ad-hero h1 { font-size: 22px; } }
.ad-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ad-pills span { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 700; }
.ad-pills svg { width: 15px; height: 15px; }
.pl-g { background: rgba(76,199,154,.16); color: #4CC79A; } .pl-b { background: rgba(142,162,255,.16); color: #8EA2FF; } .pl-p { background: rgba(182,156,255,.16); color: #B69CFF; }
.kpis { display: grid; gap: 12px; margin-bottom: 14px; }
.kpis.k4 { grid-template-columns: repeat(4, 1fr); } .kpis.k3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .kpis.k4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .kpis.k3 { grid-template-columns: 1fr 1fr; } }
.kpi { background: var(--card); border-radius: 16px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 10px; }
.kpi small { color: var(--muted); font-size: 13px; font-weight: 600; } .kpi b { display: block; font-size: 24px; line-height: 1.25; margin: 2px 0; font-variant-numeric: tabular-nums; } .kpi span { color: var(--muted); font-size: 12.5px; }
.kpi .ri { width: 38px; height: 38px; border-radius: 11px; flex: none; } .ic-r { background: #E5534B; }
.kpis.mini .kpi { padding: 10px 12px; } .kpis.mini .kpi b { font-size: 18px; }
.ad-card { background: var(--card); border-radius: 18px; padding: 16px; margin-bottom: 14px; }
.ad-card h3 { margin: 0 0 10px; font-size: 16px; }
.ad-two { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; } @media (max-width: 900px) { .ad-two { grid-template-columns: 1fr; } }
.ad-todo { display: flex; flex-wrap: wrap; gap: 10px; } .ad-todo a { display: flex; gap: 8px; align-items: center; background: var(--accent-soft); color: var(--accent); text-decoration: none; font-weight: 700; padding: 10px 14px; border-radius: 12px; } .ad-todo svg { width: 18px; height: 18px; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .cg { stroke: var(--sep); stroke-dasharray: 3 4; } .chart .cy, .chart .cx { fill: var(--muted); font-size: 11px; } .chart .cy { text-anchor: end; } .chart .cx { text-anchor: middle; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 50%; }
.legend.col { flex-direction: column; gap: 6px; align-items: flex-start; } .legend b { color: var(--ink); margin-left: 4px; }
.donut { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: center; } .donut svg { width: 180px; height: 180px; }
.dn-n { fill: var(--ink); font-size: 26px; font-weight: 800; text-anchor: middle; } .dn-l { fill: var(--muted); font-size: 12px; text-anchor: middle; }
.ad-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.ad-filter .search { flex: 1; min-width: 220px; } .ad-filter select.input { width: auto; min-width: 160px; }
.ad-range, .ad-tabs { display: inline-flex; background: var(--fill); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.ad-range button, .ad-tabs button { border: 0; background: transparent; color: var(--muted); font: 600 13.5px var(--font); padding: 7px 12px; border-radius: 8px; cursor: pointer; }
.ad-range button.on, .ad-tabs button.on { background: var(--card); color: var(--ink); box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.ad-tabs { margin-bottom: 12px; }
.tbl-wrap { overflow-x: auto; margin: 0 -4px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.tbl th { text-align: left; color: var(--muted); font-weight: 700; font-size: 12.5px; padding: 10px 10px; background: rgba(255,255,255,.03); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-top: .5px solid var(--sep); vertical-align: middle; }
.tbl td small { display: block; color: var(--muted); font-size: 12px; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl .acts { white-space: nowrap; text-align: right; } .tbl .acts .btn { margin-left: 4px; }
.tbl tr.dim td { opacity: .6; }
.st { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 7px; padding: 3px 9px; white-space: nowrap; }
.st-g { background: rgba(76,199,154,.16); color: #4CC79A; } .st-y { background: rgba(245,199,107,.16); color: #F5C76B; } .st-b { background: rgba(142,162,255,.16); color: #8EA2FF; } .st-p { background: rgba(182,156,255,.16); color: #B69CFF; }
.st-bad { background: rgba(255,123,123,.16); color: #FF7B7B; } .st-mute { background: var(--fill); color: var(--muted); }
.chk { display: inline-flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); cursor: pointer; } .chk input { width: 17px; height: 17px; accent-color: var(--ok); }
.dot-new { color: var(--blue); font-size: 13px; }
.ad-fab { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: 22px; display: inline-flex; align-items: center; gap: 8px; border: 0; background: var(--card); color: var(--ink); box-shadow: 0 12px 40px -10px rgba(0,0,0,.7), 0 0 0 .5px var(--sep); border-radius: 999px; padding: 13px 26px; font: 700 15px var(--font); cursor: pointer; }
.ad-fab svg { width: 18px; height: 18px; color: var(--accent); }
@media (min-width: 901px) { .ad-fab { left: calc(248px + (100vw - 248px) / 2); } }
.ad-stabs { display: flex; gap: 4px; border-bottom: .5px solid var(--sep); margin: -4px 0 16px; overflow-x: auto; }
.ad-stabs button { display: inline-flex; gap: 7px; align-items: center; border: 0; background: transparent; color: var(--muted); font: 600 14.5px var(--font); padding: 10px 12px; border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.ad-stabs button.on { color: var(--accent); border-bottom-color: var(--accent); } .ad-stabs svg { width: 17px; height: 17px; }
.hint { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
.info-box { display: flex; gap: 10px; align-items: flex-start; background: rgba(142,162,255,.1); border: 1px solid rgba(142,162,255,.3); border-radius: 12px; padding: 12px 14px; font-size: 14px; } .info-box svg { width: 18px; height: 18px; flex: none; color: var(--blue); margin-top: 2px; }
.pr-head { display: none; }
.pr-list { display: grid; gap: 8px; margin-bottom: 10px; }
.pr-row { display: grid; grid-template-columns: 1.2fr .9fr .6fr .6fr 1.4fr auto auto; gap: 8px; align-items: center; background: var(--fill); border-radius: 12px; padding: 8px; }
.pr-row .input { min-height: 40px; background: var(--card); }
@media (max-width: 760px) { .pr-row { grid-template-columns: 1fr 1fr; } }
.sp-box { display: grid; grid-template-columns: 320px 1fr; padding: 0; overflow: hidden; min-height: 560px; }
@media (max-width: 820px) { .sp-box { grid-template-columns: 1fr; } }
.sp-threads { border-right: .5px solid var(--sep); padding: 12px; max-height: 640px; overflow-y: auto; }
.sp-th { display: flex; gap: 10px; width: 100%; align-items: center; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 10px; border-radius: 12px; cursor: pointer; font-family: inherit; }
.sp-th.on, .sp-th:hover { background: var(--fill); }
.sp-th .side-av { width: 38px; height: 38px; border-radius: 50%; background: var(--blue); color: #12141F; display: grid; place-items: center; font-weight: 800; flex: none; }
.sp-tx { flex: 1; min-width: 0; } .sp-tx b { display: block; font-size: 14.5px; } .sp-tx small { display: block; color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-meta { display: grid; justify-items: end; gap: 3px; } .sp-meta small { color: var(--muted); font-size: 11.5px; } .sp-meta em { font-style: normal; background: var(--bad); color: #fff; font-size: 11px; font-weight: 800; border-radius: 9px; padding: 1px 6px; }
.sp-chat { display: flex; flex-direction: column; min-height: 560px; }
.sp-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: .5px solid var(--sep); flex-wrap: wrap; } .sp-head b { font-size: 16px; } .sp-head small { color: var(--muted); flex: 1; }
.sp-msgs { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; max-height: 520px; }
.sp-chat .ch-in { margin: 10px 14px 14px; background: var(--fill); }
.ch-t { display: block; font-size: 11px; opacity: .65; margin-top: 3px; }
.ad-badge { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 6px; padding: 1px 6px; }
.ad-tags { display: flex; flex-wrap: wrap; gap: 5px; } .ad-tags span { font-size: 11.5px; background: var(--fill); border-radius: 6px; padding: 2px 7px; }
.ad-v { color: var(--muted); font-size: 14.5px; text-align: right; }
.sheet-in.wide { width: min(640px, 100%); }
.sheet-in h4 { margin: 16px 0 6px; font-size: 14px; color: var(--muted); }
.mini-list { display: grid; gap: 4px; font-size: 13.5px; } .mini-list div { display: flex; justify-content: space-between; gap: 8px; align-items: center; background: var(--fill); border-radius: 8px; padding: 6px 10px; } .mini-list small { color: var(--muted); }

/* ═══ เหรียญ / ประกาศ / ติดต่อทีมงาน ═══ */
.cn-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; background: linear-gradient(135deg, #3A3324, #1B1E2D 75%); border-radius: 20px; padding: 18px 20px; margin: 10px 0 14px; }
.cn-hero small { color: var(--muted); font-size: 13px; } .cn-hero b { display: block; font-size: 40px; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; } .cn-hero span { color: var(--muted); font-size: 13px; }
.cn-plan { font-style: normal; font-size: 12.5px; font-weight: 700; background: var(--accent); color: var(--accent-ink); border-radius: 8px; padding: 4px 10px; white-space: nowrap; }
.cn-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.cn-prod { display: grid; gap: 2px; text-align: left; border: 0; background: var(--card); color: var(--ink); border-radius: 16px; padding: 14px 16px; cursor: pointer; font-family: inherit; position: relative; transition: transform .12s; }
.cn-prod:hover { transform: translateY(-2px); } .cn-prod[disabled] { opacity: .5; cursor: not-allowed; }
.cn-prod.month { box-shadow: inset 0 0 0 1.5px rgba(245,199,107,.5); }
.cn-prod b { font-size: 16px; } .cn-coins { color: var(--accent); font-weight: 800; font-size: 18px; } .cn-prod small { color: var(--muted); font-size: 12.5px; }
.cn-prod em { font-style: normal; margin-top: 8px; font-weight: 800; font-size: 17px; }
.cn-qr { background: #fff; border-radius: 16px; padding: 10px; width: min(260px, 80%); margin: 4px auto 10px; } .cn-qr svg { width: 100%; height: auto; display: block; }
.cn-amt { text-align: center; margin: 0 0 4px; } .cn-amt b { font-size: 24px; color: var(--accent); }
.ios-row.link { text-decoration: none; color: var(--ink); cursor: pointer; }
.ai-tip { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; background: var(--fill); border-radius: 12px; padding: 9px 12px; margin-bottom: 12px; font-size: 13.5px; color: var(--muted); }
.ai-tip.need { background: rgba(245,199,107,.12); color: var(--accent); }
.ann { display: flex; align-items: center; gap: 12px; border-radius: 14px; padding: 11px 14px; margin-top: 12px; }
.ann > svg { width: 20px; height: 20px; flex: none; } .ann div { flex: 1; } .ann b { display: block; font-size: 14.5px; } .ann small { opacity: .8; font-size: 13px; }
.ann-info { background: rgba(142,162,255,.14); color: #C9D2FF; } .ann-good { background: rgba(76,199,154,.14); color: #A6EBCF; } .ann-warn { background: rgba(245,199,107,.14); color: #F8DDA0; }
.ann-pop { text-align: center; } .ann-pop img { width: 72px; height: 72px; border-radius: 20px; margin: 0 auto 8px; } .ann-pop p { color: var(--muted); }
.ch-team { width: 38px; height: 38px; border-radius: 11px; background: var(--blue); color: #12141F; display: grid; place-items: center; flex: none; } .ch-team svg { width: 20px; height: 20px; }
.ch-team.sm { width: 30px; height: 30px; border-radius: 9px; } .ch-team.sm svg { width: 16px; height: 16px; }

.ad-card .input, .ad-card select.input, .ad-card textarea.input { background: var(--fill); }
.ad-card .field > span { font-size: 13.5px; }

/* แฟ้มที่สร้างเอง */
.folder-w { position: relative; display: grid; }
.f-edit { position: absolute; left: 10px; top: 10px; width: 30px; height: 30px; border-radius: 9px; border: 0; background: rgba(18,20,31,.55); color: #fff; display: grid; place-items: center; cursor: pointer; opacity: .8; }
.f-edit:hover { opacity: 1; } .f-edit svg { width: 16px; height: 16px; }
.folder.add { --cc: #9DA2B8; background: transparent; border: 1.5px dashed var(--line); align-items: flex-start; justify-content: center; gap: 4px; }
.folder.add .f-tab { background: transparent; border: 1.5px dashed var(--line); border-bottom: 0; top: -10px; }
.folder.add > svg { width: 26px; height: 26px; color: var(--accent); }
.folder.add small { color: var(--muted); }
.folder.demo { display: flex; width: 170px; min-height: 110px; margin: 6px auto 14px; cursor: default; }
.cd-colors, .cd-icons { display: flex; flex-wrap: wrap; gap: 8px; }
.cd-colors label, .cd-icons label { position: relative; cursor: pointer; }
.cd-colors input, .cd-icons input { position: absolute; opacity: 0; pointer-events: none; }
.cd-colors i { display: block; width: 32px; height: 32px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(0,0,0,.15); }
.cd-colors input:checked + i { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--ink); }
.cd-icons i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--fill); color: var(--muted); }
.cd-icons i svg { width: 20px; height: 20px; }
.cd-icons input:checked + i { background: var(--accent); color: var(--accent-ink); }
.cd-colors input:focus-visible + i, .cd-icons input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ═══ ตั้งค่า (ใหม่) ═══ */
.st-h1 { margin-top: 18px; }
.st-profile { display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 22px; margin-top: 8px; background: radial-gradient(260px 160px at 100% 0%, rgba(245,199,107,.18), transparent 70%), linear-gradient(135deg, #262D5C, #1B1E2D 70%); position: relative; }
.st-av { flex: none; width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #12141F; background: linear-gradient(135deg, #F5C76B, #FFA26B); box-shadow: 0 0 0 4px rgba(245,199,107,.18); }
.st-who { flex: 1; min-width: 0; }
.st-name { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--ink); font: 800 21px var(--font); padding: 0; cursor: pointer; max-width: 100%; }
.st-name svg { width: 15px; height: 15px; color: var(--muted); flex: none; }
.st-who > small { display: block; color: var(--muted); font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.st-chips span { font-size: 12px; font-weight: 700; background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px 10px; }
.st-chips span.gold { background: var(--accent); color: var(--accent-ink); }
.st-edit { flex: none; align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; background: rgba(245,199,107,.12); border-radius: 999px; padding: 6px 12px; }
@media (max-width: 480px) { .st-edit { position: absolute; top: 12px; right: 12px; } .st-who { padding-right: 70px; } }
.st-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.st-quick a { display: grid; gap: 2px; text-decoration: none; background: var(--card); border-radius: 16px; padding: 14px; transition: transform .12s; }
.st-quick a:active { transform: scale(.97); }
.st-quick .ri { width: 36px; height: 36px; border-radius: 11px; margin-bottom: 8px; }
.st-quick b { font-size: 16px; line-height: 1.25; } .st-quick small { color: var(--muted); font-size: 12px; }
h2.st-gh { background: none; font-size: 13px; color: var(--muted); font-weight: 600; margin: 26px 6px 8px; }
.st-group { background: var(--card); border-radius: 16px; overflow: hidden; }
.st-row { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; background: transparent; color: var(--ink); text-align: left; padding: 12px 14px; font-family: inherit; cursor: pointer; text-decoration: none; position: relative; min-height: 58px; }
div.st-row { cursor: default; }
.st-row:hover { background: rgba(255,255,255,.03); }
.st-row + .st-row::before { content: ''; position: absolute; top: 0; left: 58px; right: 0; height: .5px; background: var(--sep); }
.st-row.tall { align-items: flex-start; }
.st-row.tall .ios-switch { margin-top: 4px; }
.st-row .ri { width: 32px; height: 32px; border-radius: 9px; flex: none; }
.st-row .ri svg { width: 18px; height: 18px; }
.st-tx { flex: 1; min-width: 0; } .st-tx b { display: block; font-size: 15.5px; font-weight: 600; } .st-tx small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.st-tx .ios-time { margin-top: 8px; }
.st-go { width: 16px; height: 16px; color: var(--muted); transform: scaleX(-1); flex: none; opacity: .7; }
div.st-row .st-go { display: none; }
.st-pill { font-style: normal; flex: none; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--fill); border-radius: 999px; padding: 3px 10px; }
.st-pill.ok { color: #4CC79A; background: rgba(76,199,154,.14); } .st-pill.warn { color: #F5C76B; background: rgba(245,199,107,.14); }
.st-note { color: var(--muted); font-size: 12.5px; margin: 8px 6px 0; }
.st-out { display: block; width: 100%; margin-top: 26px; border: 0; background: var(--card); color: var(--bad); font: 700 16px var(--font); border-radius: 16px; padding: 15px; cursor: pointer; }
.st-ver { text-align: center; color: var(--muted); font-size: 12px; margin: 14px 0 0; }
.st-wrap { max-width: 720px; margin: 0 auto; }

/* ═══ ชุดฟีเจอร์ 2026-11-14 ═══ */
.ic-o { background: #E07B39; } .ic-t { background: #1E9E95; } .ic-k { background: #D9579A; }
.td-helpers { grid-template-columns: repeat(4, 1fr); }
/* เครื่องมือ */
.tl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tl-grid a { display: grid; gap: 2px; align-content: start; text-decoration: none; background: var(--card); border-radius: 18px; padding: 14px; min-height: 120px; transition: transform .12s; }
.tl-grid a:active { transform: scale(.97); }
.tl-grid .ri { width: 40px; height: 40px; border-radius: 12px; margin-bottom: 10px; } .tl-grid .ri svg { width: 21px; height: 21px; }
.tl-grid b { font-size: 15.5px; line-height: 1.3; } .tl-grid small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
/* วันนี้: นับถอยหลังสอบ / ก่อนออกจากบ้าน */
.ex-strip { display: flex; gap: 8px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.ex-strip::-webkit-scrollbar { display: none; }
.ex { flex: none; display: grid; text-decoration: none; background: linear-gradient(135deg, rgba(182,156,255,.2), rgba(182,156,255,.06)); border: 1px solid rgba(182,156,255,.25); border-radius: 16px; padding: 10px 14px; min-width: 150px; }
.ex b { font-size: 18px; color: #CBB8FF; } .ex span { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 200px; }
.ex.hot { background: linear-gradient(135deg, rgba(255,123,123,.22), rgba(255,123,123,.06)); border-color: rgba(255,123,123,.35); } .ex.hot b { color: #FF9B9B; }
.leave { margin-top: 14px; background: var(--card); border-radius: 18px; padding: 14px 16px; border: 1px solid rgba(245,199,107,.18); }
.lv-h { display: flex; align-items: center; gap: 8px; } .lv-h > svg { width: 20px; height: 20px; color: var(--accent); } .lv-h b { font-size: 16px; }
.lv-h span { margin-left: auto; } .lv-h em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--muted); background: var(--fill); border-radius: 999px; padding: 3px 10px; display: inline-flex; align-items: center; gap: 4px; }
.lv-h em.rain { color: #8EC5FF; background: rgba(142,197,255,.15); } .lv-h em svg { width: 14px; height: 14px; }
.lv-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.lv-list label { cursor: pointer; position: relative; } .lv-list input { position: absolute; opacity: 0; }
.lv-list span { display: inline-block; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; transition: .15s; }
.lv-list input:checked + span { background: rgba(76,199,154,.16); border-color: transparent; color: var(--ok); text-decoration: line-through; }
.lv-list input:focus-visible + span { outline: 2px solid var(--accent); }
.lv-empty { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.leave .btn { margin-top: 10px; }
/* PIN / LINE / เสียง */
.pin-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; } .pin-head svg { width: 26px; height: 26px; color: var(--bad); } .pin-head h3 { margin: 0; }
.pin-head.line svg { color: #4CC764; }
.pin-in { font-size: 26px; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.ln-code { font-size: 44px; font-weight: 800; letter-spacing: .18em; text-align: center; background: var(--soft); border-radius: 16px; padding: 14px 8px; margin: 6px 0 4px; color: var(--accent); font-variant-numeric: tabular-nums; }
.ln-code-in { font-size: 26px; letter-spacing: .3em; text-align: center; text-transform: uppercase; }
.vc { text-align: center; }
.vc-mic { width: 84px; height: 84px; border-radius: 50%; border: 0; background: var(--soft); color: var(--ink); display: grid; place-items: center; margin: 6px auto 8px; cursor: pointer; }
.vc-mic svg { width: 36px; height: 36px; } .vc-mic.on { background: var(--bad); color: #fff; animation: vcPulse 1.4s ease-in-out infinite; }
@keyframes vcPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255,123,123,.5); } 50% { box-shadow: 0 0 0 14px rgba(255,123,123,0); } }
@media (prefers-reduced-motion: reduce) { .vc-mic.on { animation: none; } }
.vc-st { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
/* ภาษี */
.tx-top { justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.tx-hero { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 12px; padding: 18px; margin-top: 12px; background: radial-gradient(240px 140px at 100% 0%, rgba(245,199,107,.18), transparent 70%), var(--card); }
.tx-hero small { color: var(--muted); } .tx-hero b { font-size: 30px; grid-row: 2; } .tx-hero span { color: var(--muted); font-size: 13px; grid-row: 3; } .tx-hero .btn { grid-row: 1 / 4; grid-column: 2; }
@media (max-width: 480px) { .tx-hero { grid-template-columns: 1fr; } .tx-hero .btn { grid-row: auto; grid-column: auto; margin-top: 10px; } }
.tx-list { padding: 4px 0; }
.tx-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tx-row:last-child { border-bottom: 0; } .tx-row b { font-size: 15px; } .tx-row small { display: block; color: var(--muted); font-size: 12.5px; }
.tx-row em { font-style: normal; font-size: 13px; font-weight: 700; color: var(--ok); align-self: center; }
.tx-bar { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: var(--soft); overflow: hidden; }
.tx-bar i { display: block; height: 100%; border-radius: 3px; background: var(--accent); } .tx-bar i.over { background: var(--bad); }
.tx-pre { white-space: pre-wrap; font-family: inherit; background: var(--soft); border-radius: 12px; padding: 12px; font-size: 14px; }
/* หารเงิน */
.sp-card { margin-top: 14px; padding: 14px 16px; }
.sp-h { display: flex; align-items: flex-start; gap: 10px; } .sp-h > div { flex: 1; min-width: 0; } .sp-h b { font-size: 16.5px; } .sp-h small { display: block; color: var(--muted); font-size: 13px; }
.sp-prog { height: 6px; background: var(--soft); border-radius: 3px; margin: 10px 0 6px; overflow: hidden; } .sp-prog i { display: block; height: 100%; background: var(--ok); border-radius: 3px; transition: width .3s; }
.sp-p { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sp-p small.warn { color: var(--accent); } .sp-p small.ok { color: var(--ok); }
.sp-av { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #12141F; background: linear-gradient(135deg, #F5C76B, #FFA26B); }
.sp-act { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.sp-row { display: grid; grid-template-columns: 1fr 110px 36px; gap: 8px; margin-bottom: 8px; align-items: center; }
.tick.on { background: var(--ok); border-color: var(--ok); color: #fff; }
/* ตารางเรียน */
.ios-row select.input.cl-rem { width: auto; flex: none; min-width: 120px; min-height: 38px; padding: 4px 34px 4px 12px; border-radius: 11px; background-color: var(--soft); }
.cl-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 16px; }
.cl-day { background: var(--card); border-radius: 16px; padding: 12px; }
.cl-day.today { box-shadow: inset 0 0 0 1.5px var(--accent); }
.cl-day h3 { margin: 0 0 8px; font-size: 15px; display: flex; align-items: center; gap: 6px; } .cl-day h3 em { font-style: normal; font-size: 11.5px; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1px 8px; }
.cl-c { display: grid; width: 100%; text-align: left; border: 0; background: var(--soft); color: var(--ink); border-radius: 12px; padding: 9px 11px; margin-bottom: 6px; cursor: pointer; font-family: inherit; }
.cl-c b { font-size: 12.5px; color: var(--accent); font-variant-numeric: tabular-nums; } .cl-c span { font-weight: 600; font-size: 14.5px; } .cl-c small { color: var(--muted); font-size: 12px; }
.cl-free { color: var(--muted); font-size: 13px; margin: 0; }
.tt-rev .row-it { cursor: pointer; } .tt-rev input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; }
/* ห้องรวม */
.rm-head { display: flex; align-items: flex-start; gap: 12px; } .rm-head > div { flex: 1; min-width: 0; } .rm-head h1 { margin-bottom: 2px; }
.linkbtn { border: 0; background: transparent; color: var(--muted); padding: 0; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.rp-new { padding: 14px; margin: 14px 0 6px; }
.rp { display: flex; gap: 12px; align-items: flex-start; background: var(--card); border-radius: 16px; padding: 12px 14px; margin-top: 8px; }
.rp.done { opacity: .62; } .rp.done .rp-b > b { text-decoration: line-through; }
.rp-b { flex: 1; min-width: 0; } .rp-b > b { display: block; font-size: 15.5px; } .rp-b p { margin: 4px 0; font-size: 14px; white-space: pre-wrap; }
.rp-b small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.rp-b img { display: block; max-width: 100%; max-height: 260px; border-radius: 12px; margin-top: 8px; cursor: zoom-in; }
.rp-m { display: flex; flex-direction: column; gap: 4px; }
/* การ์ดสรุป */
.rc-seg { margin: 6px 0 12px; }
.rc-wrap { display: grid; place-items: center; }
.rc-wrap canvas { width: min(100%, 360px); height: auto; aspect-ratio: 9 / 16; border-radius: 22px; box-shadow: 0 20px 50px -20px rgba(0,0,0,.8); }
.rc-opt { margin-top: 14px; background: var(--card); border-radius: 14px; }
/* ตู้เอกสาร / ล็อก */
.vt-bar { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, rgba(229,83,75,.16), rgba(229,83,75,.04)); border: 1px solid rgba(229,83,75,.25); border-radius: 16px; padding: 12px 14px; }
.vt-bar .ri { width: 36px; height: 36px; border-radius: 11px; } .vt-bar > div { flex: 1; min-width: 0; } .vt-bar b { display: block; } .vt-bar small { color: var(--muted); font-size: 12.5px; }
.locked-v .ri { width: 60px; height: 60px; border-radius: 18px; margin: 0 auto 8px; } .locked-v .ri svg { width: 30px; height: 30px; } .locked-v h2 { justify-content: center; color: var(--ink); font-size: 20px; }
.it-tools .btn svg { width: 17px; height: 17px; }

/* ส่งเข้าเครื่องมือ */
.rt-list { background: var(--soft); border-radius: 14px; overflow: hidden; }
.rt { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; text-decoration: none; cursor: pointer; position: relative; }
.rt + .rt::before { content: ''; position: absolute; top: 0; left: 52px; right: 0; height: .5px; background: var(--sep); }
.rt:hover { background: rgba(255,255,255,.03); } .rt[disabled] { opacity: .5; }
.rt .ri { width: 30px; height: 30px; border-radius: 9px; flex: none; } .rt .ri svg { width: 17px; height: 17px; }
.rt.done .ri { background: rgba(76,199,154,.16); color: var(--ok); }
.rt-t { flex: 1; min-width: 0; font-size: 14.5px; } .rt.done .rt-t { color: var(--muted); }
.rt em { font-style: normal; flex: none; font-size: 13px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 4px 12px; }

/* ═══ การ์ดสรุป: หน้าแต่งการ์ด ═══ */
.rc-layout { display: grid; gap: 22px; margin-top: 8px; }
@media (min-width: 900px) { .rc-layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; } .rc-stage { position: sticky; top: 20px; } }
.rc-stage { display: grid; justify-items: center; padding: 28px 16px 18px; border-radius: 26px; background: radial-gradient(420px 260px at 50% 0%, rgba(245,199,107,.12), transparent 70%), radial-gradient(500px 300px at 50% 100%, rgba(142,162,255,.10), transparent 70%), var(--card); }
.rc-frame canvas { display: block; height: auto; border-radius: 22px; box-shadow: 0 30px 60px -24px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.06); transition: width .25s ease; }
.rc-frame.story canvas { width: min(100%, 340px); aspect-ratio: 9 / 16; }
.rc-frame.post canvas { width: min(100%, 440px); aspect-ratio: 1; }
.rc-cap { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.rc-panel { display: grid; gap: 18px; }
.rc-panel h3 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); display: flex; gap: 6px; align-items: baseline; } .rc-panel h3 small { font-weight: 400; color: var(--accent); }
.rc-period, .rc-fmt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-period button, .rc-fmt button, .rc-themes button { border: 1.5px solid transparent; background: var(--card); color: var(--ink); border-radius: 16px; padding: 12px 14px; text-align: left; cursor: pointer; font-family: inherit; display: grid; gap: 1px; transition: border-color .15s, transform .12s; }
.rc-period button:active, .rc-fmt button:active, .rc-themes button:active { transform: scale(.97); }
.rc-period button.on, .rc-fmt button.on, .rc-themes button.on { border-color: var(--accent); background: linear-gradient(180deg, rgba(245,199,107,.10), rgba(245,199,107,.02)), var(--card); }
.rc-period b, .rc-fmt b, .rc-themes b { font-size: 15px; } .rc-period small, .rc-fmt small, .rc-themes small { color: var(--muted); font-size: 12.5px; }
.rc-themes { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-themes i { display: block; height: 64px; border-radius: 11px; margin-bottom: 8px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); }
.rc-fmt button { grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; } .rc-fmt b, .rc-fmt small { grid-column: 2; }
.rc-fmt i { grid-row: 1 / 3; display: block; border: 2px solid currentColor; border-radius: 5px; opacity: .8; } .rc-fmt i.story { width: 18px; height: 30px; } .rc-fmt i.post { width: 26px; height: 26px; }
.rc-fmt button.on i { color: var(--accent); opacity: 1; }
.rc-show { display: flex; flex-wrap: wrap; gap: 8px; }
.rc-show label { position: relative; cursor: pointer; } .rc-show input { position: absolute; opacity: 0; }
.rc-show span { display: grid; padding: 9px 14px; border-radius: 14px; background: var(--card); border: 1.5px solid transparent; transition: .15s; }
.rc-show b { font-size: 14px; font-weight: 600; } .rc-show small { font-size: 12px; color: var(--muted); }
.rc-show input:checked + span { border-color: var(--accent); background: linear-gradient(180deg, rgba(245,199,107,.10), rgba(245,199,107,.02)), var(--card); }
.rc-show input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.rc-show label.off { cursor: default; opacity: .45; }
.rc-actions { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; }
@media (max-width: 899px) { .rc-actions { position: sticky; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 5; padding: 10px; margin: 0 -10px; border-radius: 20px; background: rgba(18,20,31,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); } }
.rc-frame { width: 100%; display: flex; justify-content: center; }

.ak-list { background: var(--soft); border-radius: 14px; overflow: hidden; }
.ak-row { display: flex; align-items: center; gap: 12px; padding: 11px 14px; } .ak-row + .ak-row { border-top: 1px solid var(--line); }
.ak-row > div { flex: 1; min-width: 0; } .ak-row b { font-family: ui-monospace, Consolas, monospace; font-size: 14.5px; } .ak-row small { display: block; color: var(--muted); font-size: 12.5px; }
.ak-add { display: flex; gap: 8px; margin-top: 10px; } .ak-add .input { flex: 1; }

/* ═══ ติดตั้งก่อนใช้ / เปิดในเบราว์เซอร์ ═══ */
.ig { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px 18px calc(28px + env(safe-area-inset-bottom)); background: radial-gradient(420px 300px at 80% 0%, rgba(245,199,107,.16), transparent 70%), radial-gradient(500px 360px at 0% 100%, rgba(142,162,255,.14), transparent 70%), var(--bg); }
.ig-card { width: min(100%, 420px); text-align: center; }
.ig-ic { width: 92px; height: 92px; margin: 0 auto 18px; border-radius: 26px; display: grid; place-items: center; background: linear-gradient(160deg, #262D5C, #1B1E2D); box-shadow: 0 18px 40px -16px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.06); animation: igFloat 3.2s ease-in-out infinite; }
.ig-ic img { width: 62px; height: 62px; }
@keyframes igFloat { 50% { transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .ig-ic, .ig-arrow { animation: none !important; } }
.ig h1 { font-size: 26px; line-height: 1.3; margin: 0 0 6px; }
.ig-sub { color: var(--muted); margin: 0 0 20px; font-size: 15px; }
.ig-feat { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 8px; text-align: left; }
.ig-feat li { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 10px 12px; font-size: 15px; font-weight: 500; }
.ig-feat .ri { width: 32px; height: 32px; border-radius: 9px; }
.ig-btn { width: 100%; min-height: 54px; font-size: 17px; border-radius: 16px; }
.ig-btn2 { width: 100%; margin-top: 10px; }
.ig-note { color: var(--muted); font-size: 12.5px; margin: 10px 0 0; }
.ig-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; text-align: left; }
.ig-steps li { display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: 14px; padding: 12px 14px; font-size: 15px; line-height: 1.45; }
.ig-steps li > span { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: 14px; }
.ig-shr { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: rgba(142,162,255,.18); color: #8EC5FF; vertical-align: middle; font-style: normal; } .ig-shr svg { width: 16px; height: 16px; }
.ig-arrow { margin: 16px auto 0; width: 34px; height: 34px; color: var(--accent); transform: rotate(-90deg); animation: igDown 1.4s ease-in-out infinite; } .ig-arrow svg { width: 34px; height: 34px; }
@keyframes igDown { 50% { transform: rotate(-90deg) translateX(-8px); } }
.ig-done { display: grid; justify-items: center; gap: 6px; background: var(--card); border-radius: 18px; padding: 22px; } .ig-done svg { width: 44px; height: 44px; color: var(--ok); } .ig-done b { font-size: 18px; } .ig-done span { color: var(--muted); font-size: 14.5px; }
.ig-skip { margin-top: 14px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; text-decoration: underline; cursor: pointer; padding: 8px; }
.ig-out { position: fixed; top: calc(12px + env(safe-area-inset-top)); right: 12px; border: 0; background: transparent; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; padding: 8px; }
.ig-steps li { display: block; position: relative; padding: 13px 14px 13px 54px; min-height: 52px; }
.ig-steps li > span { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); }

.ch-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .ch-links .btn { min-height: 32px; font-size: 13.5px; background: var(--soft); }

/* ═══ เหรียญ: คุณค่า · โปร · ทดลอง · ชวนเพื่อน ═══ */
.cn-value { background: var(--card); border-radius: 18px; padding: 14px 16px; margin-top: 14px; }
.cn-value h3 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.cn-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cn-stats > div { display: grid; justify-items: start; gap: 2px; } .cn-stats .ri { width: 30px; height: 30px; border-radius: 9px; margin-bottom: 4px; } .cn-stats b { font-size: 20px; } .cn-stats small { color: var(--muted); font-size: 11.5px; line-height: 1.3; }
@media (max-width: 420px) { .cn-stats { grid-template-columns: repeat(2, 1fr); row-gap: 12px; } }
.cn-promo { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, rgba(245,199,107,.22), rgba(255,162,107,.12)); border: 1px solid rgba(245,199,107,.35); }
.cn-promo > svg { width: 26px; height: 26px; color: var(--accent); flex: none; } .cn-promo b { display: block; } .cn-promo small { color: var(--muted); font-size: 12.5px; }
.cn-trial, .cn-ref { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; border-radius: 16px; background: var(--card); }
.cn-trial { background: linear-gradient(135deg, rgba(142,162,255,.18), rgba(182,156,255,.08)), var(--card); }
.cn-trial > div, .cn-ref > div { flex: 1; min-width: 0; } .cn-trial b, .cn-ref b { display: block; } .cn-trial small, .cn-ref small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.cn-ref { margin-top: 22px; }
.cn-prod { position: relative; }
.cn-badge { position: absolute; top: -8px; right: 10px; font-style: normal; font-size: 11px; font-weight: 700; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 2px 8px; }
.cn-x2 { font-style: normal; color: var(--ok); margin-left: 4px; }
.cn-prod.starter { border: 1.5px solid rgba(245,199,107,.5); }
.cn-perks { list-style: none; padding: 0; margin: 0 0 10px; display: grid; gap: 6px; } .cn-perks li { display: flex; align-items: center; gap: 8px; font-size: 14px; } .cn-perks svg { width: 16px; height: 16px; color: var(--ok); }
.cn-check, .cn-ok { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; border-radius: 14px; background: var(--soft); margin: 6px 0; font-size: 14.5px; }
.cn-ok { background: rgba(76,199,154,.15); color: var(--ok); } .cn-ok svg { width: 22px; height: 22px; }
.lowc { display: flex; align-items: center; gap: 12px; margin: 10px 0 4px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, rgba(245,199,107,.16), rgba(245,199,107,.05)); border: 1px solid rgba(245,199,107,.3); }
.lowc .ri { width: 34px; height: 34px; border-radius: 10px; } .lowc > div { flex: 1; min-width: 0; } .lowc b { display: block; } .lowc small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.ai-tip span small { display: block; font-size: 12px; color: var(--muted); font-weight: 400; margin-top: 2px; }
.rc-themes button { position: relative; } .rc-themes button.lock i { filter: saturate(.6) brightness(.8); }
.rc-lock { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 3px; font-style: normal; font-size: 11px; font-weight: 700; background: rgba(0,0,0,.55); color: #fff; border-radius: 99px; padding: 2px 8px; } .rc-lock svg { width: 12px; height: 12px; }
.pr-ext { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .pr-ext .input { width: auto; min-height: 36px; } .pr-ext label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.cn-x2 { display: inline-block; font-size: 12.5px; font-weight: 700; background: rgba(76,199,154,.15); border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; }

/* เอกสารกำหนดการหลายวัน */
.sched { display: grid; gap: 6px; }
.sc-row { display: grid; grid-template-columns: 78px 1fr auto; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--soft); text-decoration: none; color: var(--ink); }
.sc-row.soon { box-shadow: inset 3px 0 0 var(--accent); }
.sc-d { display: grid; font-size: 12px; color: var(--muted); line-height: 1.3; } .sc-d b { font-size: 14.5px; color: var(--ink); }
.sc-t { font-size: 14.5px; font-weight: 600; min-width: 0; } .sc-t em { font-style: normal; font-size: 11px; font-weight: 700; color: #FF9B9B; background: rgba(255,123,123,.14); border-radius: 99px; padding: 1px 7px; margin-left: 6px; }
.sc-row small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.sched-parent { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--soft); color: var(--ink); text-decoration: none; font-size: 14px; margin: 8px 0; } .sched-parent svg { width: 18px; height: 18px; color: var(--accent); }

/* ═══ หัว + แถบข้าง + โปรไฟล์ + แจ้งเตือน + หน้าวันนี้ (2026-11-14) ═══ */
.av { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(140deg, #FFE08A, #F5C76B 45%, #FF9E6B); color: #1A1608; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(245,199,107,.45), 0 6px 16px -6px rgba(245,199,107,.7); flex: none; position: relative; }
.av b { font-size: 16px; font-weight: 800; line-height: 1; }
.av.sm { width: 34px; height: 34px; } .av.sm b { font-size: 15px; }
.av.plan::after { content: ''; position: absolute; right: -3px; bottom: -3px; width: 14px; height: 14px; border-radius: 50%; background: #8EA2FF; border: 2.5px solid var(--bg); }
.top-r { align-items: center; gap: 8px; }
.top-me { display: grid; place-items: center; padding: 3px; border-radius: 50%; text-decoration: none; transition: transform .15s; }
.top-me:active { transform: scale(.94); } .top-me.on .av { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.ic-btn.bell { position: relative; }
.nbadge { position: absolute; top: 2px; right: 1px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #FF5A5F; color: #fff; font: 700 11px/18px var(--font); font-style: normal; text-align: center; border: 2px solid var(--bg); box-sizing: content-box; }
@media (min-width: 1024px) {
  .side { width: 248px; padding: 18px 14px 14px; gap: 4px; background: linear-gradient(180deg, rgba(38,45,92,.55), rgba(18,20,31,0) 42%), color-mix(in srgb, var(--card) 50%, var(--bg)); border-right: 1px solid var(--line); overflow-y: auto; }
  .side-brand { padding: 2px 8px 16px; gap: 11px; }
  .side-brand img { width: 38px; height: 38px; border-radius: 11px; box-shadow: 0 8px 18px -8px rgba(0,0,0,.8); }
  .side-brand span { display: grid; line-height: 1.15; } .side-brand b { font-size: 19px; } .side-brand small { font-size: 12px; font-weight: 500; color: var(--muted); }
  .side-new { margin-bottom: 8px; justify-content: center; }
  .side-lab { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; color: var(--muted); opacity: .75; padding: 14px 12px 6px; }
  .side-nav { gap: 2px; }
  .side-nav a { position: relative; padding: 8px 10px; gap: 11px; border-radius: 12px; }
  .sn-ic { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.05); color: var(--muted); font-style: normal; transition: background .15s, color .15s; }
  .sn-ic svg { width: 18px; height: 18px; }
  .sn-mascot { background: rgba(245,199,107,.12); } .sn-mascot img { width: 26px; height: 26px; }
  .side-nav a:hover .sn-ic { background: rgba(255,255,255,.09); color: var(--ink); }
  .side-nav a.on { background: linear-gradient(90deg, rgba(245,199,107,.16), rgba(245,199,107,.04)); color: var(--ink); }
  .side-nav a.on::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px; border-radius: 0 4px 4px 0; background: var(--accent); }
  .side-nav a.on .sn-ic { background: var(--accent); color: var(--accent-ink); }
  .side-nav .nbadge { position: static; margin-left: auto; border: 0; }
  .side-foot { margin-top: auto; display: grid; gap: 8px; padding-top: 14px; }
  .side-coins { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; text-decoration: none; color: var(--ink); background: rgba(245,199,107,.08); border: 1px solid rgba(245,199,107,.18); font-size: 14px; }
  .side-coins > svg { width: 18px; height: 18px; color: var(--accent); flex: none; } .side-coins span { flex: 1; } .side-coins b { font-size: 15px; }
  .side-coins em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 99px; padding: 2px 10px; }
  .side-me { margin-top: 0; padding: 10px; gap: 11px; border-radius: 16px; background: var(--card); border: 1px solid var(--line); }
  .side-me:hover, .side-me.on { background: var(--card); border-color: rgba(245,199,107,.45); }
  .side-me .av { width: 40px; height: 40px; }
  .sm-t { flex: 1; min-width: 0; display: grid; line-height: 1.25; } .sm-t b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sm-t small { font-size: 12px; color: var(--muted); font-weight: 500; }
  .sm-go { width: 15px; height: 15px; transform: scaleX(-1); color: var(--muted); flex: none; }
}
/* แจ้งเตือน */
.ib-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 8px; } .ib-head h1 { margin-bottom: 2px; } .ib-head .sub { margin: 0; }
.ib-push { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 12px 14px; border-radius: 16px; background: linear-gradient(120deg, rgba(142,162,255,.16), rgba(142,162,255,.04)); border: 1px solid rgba(142,162,255,.28); text-decoration: none; color: var(--ink); }
.ib-push > svg { width: 22px; height: 22px; color: #8EA2FF; flex: none; } .ib-push span { flex: 1; } .ib-push b { display: block; font-size: 14.5px; } .ib-push small { color: var(--muted); font-size: 12.5px; }
.ib-push em { font-style: normal; font-size: 13px; font-weight: 700; background: #8EA2FF; color: #12141F; border-radius: 99px; padding: 4px 12px; }
.ib-seg { margin: 18px 0 2px; max-width: 320px; }
.ib-list { background: var(--card); border-radius: 18px; overflow: hidden; }
.ib-list.next { background: linear-gradient(180deg, rgba(245,199,107,.07), transparent), var(--card); }
.ib-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); position: relative; }
.ib-row + .ib-row { border-top: 1px solid var(--line); }
.ib-row .ri { width: 34px; height: 34px; border-radius: 11px; flex: none; } .ib-row .ri svg { width: 18px; height: 18px; }
.ib-t { flex: 1; min-width: 0; } .ib-t b { display: block; font-size: 14.5px; font-weight: 500; line-height: 1.4; } .ib-t small { display: block; color: var(--muted); font-size: 12.5px; }
.ib-row time { flex: none; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.ib-row.new .ib-t b { font-weight: 700; } .ib-row.new::after { content: ''; position: absolute; left: 5px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--accent); }
/* หน้าวันนี้ */
.td2-hero { position: relative; margin-top: 10px; padding: 18px; border-radius: 26px; overflow: hidden; background: radial-gradient(320px 200px at 92% 0%, rgba(245,199,107,.22), transparent 70%), linear-gradient(160deg, #262D5C, #1B1E2D 72%); border: 1px solid rgba(255,255,255,.06); }
.td2-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.td2-top p { margin: 0; color: var(--muted); font-size: 14px; } .td2-top h1 { margin: 2px 0 0; font-size: clamp(26px, 6vw, 34px); line-height: 1.15; text-wrap: balance; }
.td2-m { width: 82px; height: auto; flex: none; margin: -6px -4px 0 0; filter: drop-shadow(0 10px 16px rgba(0,0,0,.45)); animation: tdBob 4s ease-in-out infinite; }
@keyframes tdBob { 50% { transform: translateY(-5px) rotate(-2deg); } }
@media (prefers-reduced-motion: reduce) { .td2-m { animation: none; } }
.td2-say { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: rgba(255,255,255,.06); } .td2-say b { display: block; font-size: 16px; } .td2-say small { color: #C9CCDA; font-size: 13.5px; }
.td2-stats { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.td2-stats span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 99px; background: rgba(0,0,0,.22); font-size: 13px; color: #C9CCDA; }
.td2-stats i { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: rgba(245,199,107,.18); color: var(--accent); } .td2-stats i svg { width: 14px; height: 14px; } .td2-stats b { color: var(--ink); font-size: 15px; }
.td2-hero .td-mood { margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.td2-grid { display: grid; gap: 14px; margin-top: 14px; }
@media (min-width: 900px) { .td2-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; } }
.td2-main, .td2-side { display: grid; gap: 14px; min-width: 0; }
.td2-card { padding: 14px 14px 10px; border-radius: 20px; }
.td2-card > h2 { margin: 0 0 10px; font-size: 16px; color: var(--ink); font-weight: 700; }
.td2-card .list { margin: 0 -14px; } .td2-card .list .row-it { padding-left: 14px; padding-right: 14px; }
.td2-side .td-helpers { margin-top: 0; }
.td2-side .leave { margin-top: 0; }
.td2-side .rems { display: grid; gap: 8px; }
.tl-all { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tl-all a { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: 99px; background: var(--soft); color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.tl-all .ri { width: 24px; height: 24px; border-radius: 50%; } .tl-all .ri svg { width: 13px; height: 13px; }
.tl { list-style: none; margin: 0; padding: 0; position: relative; }
.tl::before { content: ''; position: absolute; left: 62px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px; background: var(--line); }
.tl-it { display: grid; grid-template-columns: 48px 30px minmax(0, 1fr) auto; gap: 0 10px; align-items: center; padding: 7px 0; position: relative; }
.tl-it time { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; line-height: 1.2; } .tl-it time small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.tl-dot { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; box-shadow: 0 0 0 4px var(--card); z-index: 1; } .tl-dot svg { width: 15px; height: 15px; }
.tl-c { min-width: 0; text-decoration: none; color: var(--ink); padding: 6px 10px; border-radius: 12px; } a.tl-c:hover { background: var(--soft); }
.tl-c b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.35; } .tl-c small { display: block; color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.tl-it.past { opacity: .5; } .tl-it.done .tl-c b { text-decoration: line-through; }
.tl-now { position: relative; height: 22px; display: flex; align-items: center; margin: 2px 0; }
.tl-now::before { content: ''; position: absolute; left: 56px; width: 14px; height: 14px; border-radius: 50%; background: #FF7B7B; box-shadow: 0 0 0 4px rgba(255,123,123,.25); }
.tl-now::after { content: ''; position: absolute; left: 70px; right: 0; height: 2px; background: linear-gradient(90deg, #FF7B7B, rgba(255,123,123,0)); }
.tl-now span { position: absolute; left: 0; width: 50px; text-align: right; font-size: 11px; font-weight: 700; color: #FF9B9B; white-space: nowrap; }
.tl-now.end span { width: auto; left: 80px; text-align: left; top: -6px; }
.tl-empty { color: var(--muted); font-size: 14px; margin: 0 0 6px; }

/* วิธีจ่าย */
.pay-opts { display: grid; gap: 8px; margin-top: 4px; }
.pay-opts button { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; border: 1px solid var(--line); background: var(--soft); color: var(--ink); border-radius: 16px; padding: 12px 14px; font: inherit; cursor: pointer; }
.pay-opts button:hover { border-color: rgba(245,199,107,.5); }
.pay-opts .ri { width: 36px; height: 36px; border-radius: 11px; flex: none; } .pay-opts span:nth-child(2) { flex: 1; } .pay-opts b { display: block; font-size: 15px; } .pay-opts small { color: var(--muted); font-size: 12.5px; }
.cn-qr.pp { background: #fff; border-radius: 16px; padding: 10px; width: min(260px, 100%); margin: 6px auto; } .cn-qr.pp img { display: block; width: 100%; height: auto; }
.cn-sub { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card); }
.cn-sub > svg { width: 22px; height: 22px; color: #8EA2FF; flex: none; } .cn-sub > div { flex: 1; min-width: 0; } .cn-sub b { display: block; font-size: 14.5px; } .cn-sub small { color: var(--muted); font-size: 12.5px; }

/* การ์ดทบทวน + ถามเอกสาร */
.study-btn { background: linear-gradient(120deg, rgba(182,156,255,.22), rgba(142,162,255,.12)); border-color: rgba(182,156,255,.4); }
.sy-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin-top: 8px; }
.sy-card { display: grid; gap: 4px; padding: 16px; border-radius: 20px; text-decoration: none; color: var(--ink); background: linear-gradient(150deg, rgba(182,156,255,.18), rgba(142,162,255,.05) 60%), var(--card); border: 1px solid rgba(182,156,255,.22); }
.sy-card b { font-size: 17px; line-height: 1.3; } .sy-card small { color: var(--muted); font-size: 12.5px; } .sy-card em { font-style: normal; font-size: 12px; color: #CBB8FF; font-weight: 700; }
.sy-topic { display: inline-block; justify-self: start; font-size: 11.5px; font-weight: 700; color: #CBB8FF; background: rgba(182,156,255,.16); border-radius: 99px; padding: 2px 10px; }
.sy-bar { display: block; height: 6px; border-radius: 3px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 6px; } .sy-bar i { display: block; height: 100%; background: linear-gradient(90deg, #B69CFF, #8EA2FF); border-radius: 3px; transition: width .3s; }
.sy-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; } .sy-head h1 { margin: 6px 0 0; }
.sy-seg { margin: 14px 0; max-width: 360px; }
.sy-meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-bottom: 10px; } .sy-meta .chk { margin-left: auto; }
.sy-flip { position: relative; display: block; width: 100%; max-width: 640px; margin: 0 auto; min-height: 260px; border: 0; padding: 0; background: none; cursor: pointer; perspective: 1200px; font: inherit; color: var(--ink); }
.sy-face { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; text-align: center; padding: 28px; border-radius: 24px; backface-visibility: hidden; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.sy-face.front { background: linear-gradient(150deg, #2E2A66, #1B1E2D); border: 1px solid rgba(182,156,255,.3); }
.sy-face.back { background: linear-gradient(150deg, #FFF2CF, #F5C76B); color: #1A1608; transform: rotateY(180deg); }
.sy-flip.on .front { transform: rotateY(-180deg); } .sy-flip.on .back { transform: rotateY(0); }
.sy-face small { font-size: 12px; font-weight: 700; letter-spacing: .06em; opacity: .7; } .sy-face b { font-size: clamp(18px, 4.5vw, 24px); line-height: 1.45; } .sy-face em { font-style: normal; font-size: 12.5px; opacity: .6; }
@media (prefers-reduced-motion: reduce) { .sy-face { transition: none; } }
.sy-act { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 640px; margin: 14px auto 0; }
.sy-nav { display: flex; justify-content: space-between; max-width: 640px; margin: 8px auto 0; }
.sy-q { max-width: 680px; margin: 12px auto 0; display: grid; gap: 12px; } .sy-q > b { font-size: 18px; line-height: 1.5; }
.sy-ch { display: grid; gap: 8px; }
.sy-ch button { display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 15px; cursor: pointer; }
.sy-ch button:hover:not([disabled]) { border-color: rgba(182,156,255,.6); }
.sy-ch i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; background: var(--soft); }
.sy-ch .right { border-color: var(--ok); background: rgba(76,199,154,.12); } .sy-ch .right i { background: var(--ok); color: #fff; }
.sy-ch .wrong { border-color: var(--bad); background: rgba(255,123,123,.1); } .sy-ch .wrong i { background: var(--bad); color: #fff; }
.sy-ch .dim { opacity: .5; }
.sy-why { padding: 12px 14px; border-radius: 14px; } .sy-why.ok { background: rgba(76,199,154,.12); } .sy-why.bad { background: rgba(255,123,123,.1); } .sy-why b { display: block; } .sy-why small { color: #C9CCDA; font-size: 13.5px; }
.sy-done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 30px 16px; max-width: 420px; margin: 0 auto; } .sy-done > svg { width: 48px; height: 48px; color: var(--ok); } .sy-done .btn { width: 100%; }
.sy-score b { font-size: 56px; line-height: 1; background: linear-gradient(120deg, #F5C76B, #B69CFF); -webkit-background-clip: text; background-clip: text; color: transparent; } .sy-score small { display: block; color: var(--muted); }
.qa-list { display: grid; gap: 8px; margin-bottom: 8px; }
.qa { padding: 10px 12px; border-radius: 12px; background: var(--soft); } .qa b { display: block; font-size: 14px; color: var(--accent); } .qa p { margin: 4px 0 0; font-size: 14.5px; white-space: pre-wrap; } .qa small { display: block; margin-top: 4px; color: var(--muted); font-size: 12.5px; font-style: italic; }
.qa-in { display: flex; gap: 8px; } .qa-in .input { flex: 1; min-height: 40px; }
.sy-seg button, .sy-head .btn { white-space: nowrap; }
.sy-head .btn { flex: none; }

/* ตารางเรียน (ใหม่) */
.tt-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; } .tt-head h1 { margin: 6px 0 2px; } .tt-head .sub { margin: 0; }
.tt-act { display: flex; gap: 8px; } .tt-act .btn { white-space: nowrap; }
.tt-now { --c: var(--accent); position: relative; display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 18px 20px; border-radius: 22px; overflow: hidden;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c) 26%, var(--card)), var(--card) 75%); border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); }
.tt-now-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.tt-now small { font-size: 12.5px; font-weight: 700; letter-spacing: .02em; color: var(--c); }
.tt-now b { font-size: clamp(22px, 5vw, 28px); line-height: 1.2; }
.tt-now span { color: var(--muted); font-size: 14px; }
.tt-now img { width: 76px; height: 76px; flex: none; }
.tt-prog { display: block; height: 6px; margin-top: 8px; border-radius: 3px; background: rgba(255,255,255,.1); overflow: hidden; max-width: 360px; } .tt-prog i { display: block; height: 100%; background: var(--c); border-radius: 3px; }
.tt-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 18px 0 12px; }
.tt-seg { margin: 0; width: 230px; max-width: 100%; }
.tt-rem { display: inline-flex; align-items: center; gap: 6px; padding: 0 4px 0 12px; height: 36px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.tt-rem svg { width: 16px; height: 16px; } .tt-rem select { background: transparent; border: 0; color: var(--ink); font: inherit; font-size: 13.5px; padding: 0 6px; height: 34px; cursor: pointer; } .tt-rem select option { background: var(--card); }
.tt-days { display: grid; grid-template-columns: repeat(auto-fit, minmax(44px, 1fr)); gap: 6px; margin-bottom: 14px; }
.tt-days button { display: grid; justify-items: center; gap: 0; padding: 8px 0; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.tt-days button b { font-size: 15px; } .tt-days button small { font-size: 11.5px; color: var(--muted); }
.tt-days button.td { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.tt-days button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); } .tt-days button.on small { color: var(--accent-ink); opacity: .7; }
.tt-line { display: grid; gap: 8px; }
.tt-row { --c: var(--accent); display: grid; grid-template-columns: 58px 1fr; gap: 10px; align-items: stretch; border: 0; padding: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.tt-tm { display: grid; align-content: start; padding-top: 12px; text-align: right; font-variant-numeric: tabular-nums; } .tt-tm b { font-size: 15px; } .tt-tm small { font-size: 12px; color: var(--muted); }
.tt-card { display: grid; gap: 2px; padding: 12px 14px 12px 16px; border-radius: 16px; background: linear-gradient(100deg, color-mix(in srgb, var(--c) 16%, var(--card)), var(--card) 70%); border-left: 4px solid var(--c); }
.tt-card b { font-size: 16px; } .tt-card small { color: var(--muted); font-size: 13px; } .tt-card em { font-style: normal; font-size: 12px; color: var(--c); font-weight: 700; }
.tt-row:hover .tt-card { filter: brightness(1.08); }
.tt-row.cur .tt-card { box-shadow: 0 0 0 1.5px var(--c), 0 10px 28px color-mix(in srgb, var(--c) 22%, transparent); }
.tt-row.past { opacity: .5; }
.tt-gap { margin-left: 68px; padding: 2px 0 2px 14px; border-left: 2px dashed var(--line); } .tt-gap span { font-size: 12.5px; color: var(--muted); }
.tt-free-day { display: grid; justify-items: center; gap: 4px; padding: 30px 16px; text-align: center; background: var(--card); border-radius: 20px; } .tt-free-day img { width: 84px; } .tt-free-day small { color: var(--muted); }
.tt-wk-scroll { overflow-x: auto; margin: 0 -2px; padding: 0 2px 6px; }
.tt-wk { min-width: calc(52px + var(--n) * 112px); background: var(--card); border-radius: 20px; padding: 10px 10px 6px; }
.tt-wk-h { display: grid; grid-template-columns: 52px repeat(var(--n), minmax(0, 1fr)); gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tt-wk-h b { font-size: 13.5px; text-align: center; color: var(--muted); font-weight: 600; } .tt-wk-h b.td { color: var(--accent); }
.tt-wk-b { position: relative; display: grid; grid-template-columns: 52px repeat(var(--n), minmax(0, 1fr)); gap: 6px; }
.tt-wk-rail { position: relative; } .tt-wk-rail span { position: absolute; right: 6px; transform: translateY(-50%); font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tt-wk-col { position: relative; border-radius: 12px; background: repeating-linear-gradient(to bottom, transparent 0 68px, var(--line) 68px 69px); }
.tt-wk-col.td { background-color: color-mix(in srgb, var(--accent) 6%, transparent); }
.tt-blk { --c: var(--accent); position: absolute; left: 0; right: 0; display: grid; align-content: start; gap: 1px; padding: 6px 8px; overflow: hidden; border: 0; border-radius: 10px; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  background: color-mix(in srgb, var(--c) 22%, var(--card)); border-left: 3px solid var(--c); }
.tt-blk b { font-size: 12.5px; line-height: 1.3; } .tt-blk small { font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tt-blk:hover { background: color-mix(in srgb, var(--c) 32%, var(--card)); }
.tt-nowline { position: absolute; left: -4px; right: 0; height: 2px; background: var(--bad); z-index: 2; border-radius: 1px; } .tt-nowline::before { content: ""; position: absolute; left: -2px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.tt-ex { margin-top: 22px; } .tt-ex h3 { font-size: 16px; margin: 0 0 10px; }
.tt-ex-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.tt-ex-row a { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--card); color: var(--ink); text-decoration: none; border: 1px solid var(--line); }
.tt-ex-row a.soon { border-color: color-mix(in srgb, var(--bad) 55%, transparent); }
.tt-ex-n { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-content: center; text-align: center; background: var(--soft); line-height: 1; }
.tt-ex-n b { font-size: 20px; color: var(--accent); } .tt-ex-n small { font-size: 11px; color: var(--muted); }
.tt-ex-row a.soon .tt-ex-n b { color: var(--bad); }
.tt-ex-row a > span:last-child { display: grid; min-width: 0; } .tt-ex-row a > span:last-child b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .tt-ex-row a > span:last-child small { color: var(--muted); font-size: 12.5px; }
.tt-empty { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; margin: 16px 0 10px; padding: 18px 20px; border-radius: 20px; border: 1.5px dashed var(--line); }
.tt-empty div { display: grid; gap: 2px; max-width: 46ch; } .tt-empty small { color: var(--muted); }
.tt-pick { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tt-pick label { position: relative; } .tt-pick input { position: absolute; opacity: 0; }
.tt-pick span { display: block; text-align: center; padding: 8px 0; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); font-size: 13.5px; cursor: pointer; }
.tt-pick input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.tt-pick input:focus-visible + span { outline: 2px solid var(--accent2); outline-offset: 1px; }
@media (max-width: 520px) { .tt-act { width: 100%; } .tt-act .btn { flex: 1; } .tt-now img { width: 60px; height: 60px; } .tt-bar { flex-direction: column; align-items: stretch; } .tt-seg { width: 100%; } .tt-rem { justify-content: center; } }
.tt-seg { display: flex; } .tt-seg button { flex: 1; white-space: nowrap; }

/* วันหยุดในปฏิทิน */
.cal-g button { position: relative; min-width: 0; }
.cal-g button.hol b { color: #FF8F8F; }
.cal-g button.hol:not(.sel) { background: rgba(255,123,123,.1); }
.cal-g button.obs:not(.sel) b { text-decoration: underline 2px rgba(142,162,255,.7); text-underline-offset: 4px; }
.cal-g em { display: none; font-style: normal; font-size: 10.5px; line-height: 1.2; max-width: 100%; padding: 0 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #FF9E9E; }
.cal-g button.obs em { color: var(--accent2); }
.cal-g button.sel em { color: var(--accent-ink); }
@media (min-width: 640px) { .cal-g em { display: block; } .cal-g button { aspect-ratio: auto; min-height: 74px; } }
.hol-ban { display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border-radius: 14px; background: rgba(255,123,123,.12); border: 1px solid rgba(255,123,123,.3); }
.hol-ban svg { width: 22px; height: 22px; flex: none; color: #FF8F8F; } .hol-ban div { display: grid; min-width: 0; } .hol-ban small { font-size: 12px; font-weight: 700; color: #FF8F8F; } .hol-ban b { font-size: 14.5px; line-height: 1.45; }
.hol-ban.obs { background: rgba(142,162,255,.1); border-color: rgba(142,162,255,.28); } .hol-ban.obs svg, .hol-ban.obs small { color: var(--accent2); }
.hol-h { font-size: 16px; margin: 22px 0 10px; }
.hol-br { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.hol-br button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; border: 1px solid rgba(255,123,123,.3); background: linear-gradient(120deg, rgba(255,123,123,.14), var(--card) 70%); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.hol-br button > span:last-child { display: grid; min-width: 0; } .hol-br button > span:last-child small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hol-n { flex: none; width: 50px; height: 50px; border-radius: 14px; display: grid; place-content: center; text-align: center; line-height: 1; background: rgba(255,123,123,.18); } .hol-n b { font-size: 21px; color: #FF8F8F; } .hol-n small { font-size: 11px; color: var(--muted); }
.hol-list .row-it { width: 100%; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.hol-tag { flex: none; font-style: normal; font-size: 11.5px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: rgba(255,123,123,.16); color: #FF8F8F; } .hol-tag.obs { background: rgba(142,162,255,.14); color: var(--accent2); }
.hol-src { color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.wk-day.hol .wk-d b { color: #FF8F8F; }
.wk-hol { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; margin: 0 4px 4px 0; border-radius: 99px; background: rgba(255,123,123,.16); color: #FF8F8F; } .wk-hol.obs { background: rgba(142,162,255,.14); color: var(--accent2); }

/* ═══ หน้าแนะนำ v2: ฟ้าทั้งจอ + ทรานซิชัน ═══ */
.dy2 { position: relative; min-height: 100dvh; display: flex; flex-direction: column; color: #fff; overflow-x: hidden; }
.dy2-sky { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.dy2-bg { position: absolute; inset: 0; opacity: 0; transition: opacity 1.1s ease; }
.dy2-bg.on { opacity: 1; }
.bg-pre { background: linear-gradient(180deg, #0B0D26 0%, #262A5E 55%, #5A4B85 100%); }
.bg-dawn { background: linear-gradient(180deg, #2B2F5C 0%, #8A5C8E 50%, #F2A774 100%); }
.bg-morning { background: linear-gradient(180deg, #2F6FD6 0%, #6FA8EE 60%, #BFE0FA 100%); }
.bg-noon { background: linear-gradient(180deg, #2E8BEB 0%, #66C1F5 55%, #D9F2FF 100%); }
.bg-dusk { background: linear-gradient(180deg, #3B2C77 0%, #B5528A 50%, #F49A5B 100%); }
.bg-night { background: linear-gradient(180deg, #070918 0%, #12153A 55%, #232857 100%); }
.dy2-stars { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
  background: radial-gradient(1.6px 1.6px at 12% 18%, #fff, transparent), radial-gradient(1.2px 1.2px at 28% 8%, #fffc, transparent), radial-gradient(2px 2px at 46% 22%, #fff, transparent), radial-gradient(1.2px 1.2px at 63% 12%, #fffb, transparent), radial-gradient(1.6px 1.6px at 78% 26%, #fff, transparent), radial-gradient(1.2px 1.2px at 90% 9%, #fffc, transparent), radial-gradient(1.4px 1.4px at 8% 40%, #fffa, transparent), radial-gradient(1.2px 1.2px at 36% 36%, #fff9, transparent), radial-gradient(1.6px 1.6px at 70% 42%, #fffb, transparent), radial-gradient(1.2px 1.2px at 94% 38%, #fff9, transparent);
  animation: dyTwinkle 4s ease-in-out infinite alternate; }
.dy2[data-k="pre"] .dy2-stars, .dy2[data-k="night"] .dy2-stars { opacity: 1; }
@keyframes dyTwinkle { to { filter: brightness(.6); } }
.dy2-cloud { position: absolute; border-radius: 50%; background: #fff; filter: blur(28px); opacity: .28; transition: opacity 1.2s ease; animation: dyDrift 46s linear infinite alternate; }
.dy2-cloud.c1 { width: 340px; height: 90px; left: -60px; top: 34%; }
.dy2-cloud.c2 { width: 260px; height: 70px; right: -80px; top: 18%; animation-duration: 60s; animation-direction: alternate-reverse; }
.dy2-cloud.c3 { width: 420px; height: 110px; left: 30%; top: 58%; opacity: .18; animation-duration: 75s; }
.dy2[data-k="pre"] .dy2-cloud, .dy2[data-k="night"] .dy2-cloud { opacity: .06; }
@keyframes dyDrift { to { transform: translateX(120px); } }
.dy2-top { position: relative; z-index: 4; display: flex; align-items: center; justify-content: space-between; padding: calc(12px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); max-width: 1240px; width: 100%; margin: 0 auto; }
.dy2-brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.dy2-brand img { width: 32px; height: 32px; border-radius: 9px; }
.dy2-login { color: #fff; text-decoration: none; font-weight: 600; font-size: 14px; border-radius: 999px; padding: 8px 16px; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(10px); }
.dy2-arcbox { position: absolute; z-index: 1; left: 0; right: 0; top: calc(56px + env(safe-area-inset-top)); height: 150px; color: rgba(255,255,255,.55); max-width: 1240px; margin: 0 auto; }
.dy2-arc { position: absolute; inset: 0; width: 100%; height: 100%; }
.dy2-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; border: 0; padding: 0; background: rgba(255,255,255,.45); transform: translate(-50%, -50%); cursor: pointer; transition: background .4s, transform .4s; z-index: 2; }
.dy2-dot::after { content: ""; position: absolute; inset: -12px; }
.dy2-dot.done { background: rgba(255,255,255,.85); }
.dy2-dot.on { transform: translate(-50%, -50%) scale(0); }
.dy2-sun { position: absolute; z-index: 3; width: 40px; height: 40px; transform: translate(-50%, -50%); pointer-events: none; }
.dy2-trail { color: rgba(255,236,170,.9); filter: drop-shadow(0 0 4px rgba(255,214,102,.8)); }
.dy2[data-k="night"] .dy2-trail { color: rgba(225,230,255,.85); filter: drop-shadow(0 0 4px rgba(200,210,255,.7)); }
.dy2-sun i { position: absolute; inset: 0; border-radius: 50%; transition: opacity .9s ease, transform .9s ease; }
.dy2-sun .sun { background: radial-gradient(circle at 40% 40%, #FFF6C8, #FFC94A 60%, #FF9F3A); box-shadow: 0 0 0 7px rgba(255,214,102,.22), 0 0 50px 12px rgba(255,196,80,.55); }
.dy2-sun .moon { opacity: 0; transform: rotate(-40deg) scale(.6); background: radial-gradient(circle at 68% 32%, transparent 11px, #F3F1EA 12px); box-shadow: 0 0 34px 6px rgba(220,225,255,.32); }
.dy2-sun.is-moon .sun { opacity: 0; transform: scale(.5); } .dy2-sun.is-moon .moon { opacity: 1; transform: none; }
.dy2-stage { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 1240px; margin: 0 auto; }
.dy2-scenebox { padding: 118px max(18px, env(safe-area-inset-right)) 18px max(18px, env(safe-area-inset-left)); }
.dy2-clock { display: flex; align-items: baseline; gap: 12px; text-shadow: 0 2px 14px rgba(0,0,0,.25); margin-bottom: 14px; }
.dy2-time { display: inline-grid; overflow: hidden; font-family: 'Mitr', var(--font); font-weight: 600; font-size: 52px; line-height: 1.12; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.dy2-time b { grid-area: 1 / 1; font-weight: 600; }
.dy2-time b.in.up { animation: dyNumInUp .6s cubic-bezier(.2,.9,.25,1) both; } .dy2-time b.in.down { animation: dyNumInDown .6s cubic-bezier(.2,.9,.25,1) both; }
.dy2-time b.out.up { animation: dyNumOutUp .5s ease both; } .dy2-time b.out.down { animation: dyNumOutDown .5s ease both; }
@keyframes dyNumInUp { from { transform: translateY(70%); opacity: 0; filter: blur(4px); } }
@keyframes dyNumInDown { from { transform: translateY(-70%); opacity: 0; filter: blur(4px); } }
@keyframes dyNumOutUp { to { transform: translateY(-70%); opacity: 0; filter: blur(4px); } }
@keyframes dyNumOutDown { to { transform: translateY(70%); opacity: 0; filter: blur(4px); } }
.dy2-part { font-size: 17px; font-weight: 600; opacity: .92; } .dy2-part.fx { animation: dyFade .6s .15s both; }
.dy2-scenes { display: grid; min-height: 200px; }
.dy2-scene { grid-area: 1 / 1; align-self: start; transition: transform .35s ease, opacity .35s ease; will-change: transform, opacity; }
.dy2-scene.enter.from-r { animation: dySceneInR .7s cubic-bezier(.2,.9,.25,1.08) both; }
.dy2-scene.enter.from-l { animation: dySceneInL .7s cubic-bezier(.2,.9,.25,1.08) both; }
.dy2-scene.leave { pointer-events: none; }
.dy2-scene.leave.to-l { animation: dySceneOutL .45s cubic-bezier(.5,0,.75,0) both; }
.dy2-scene.leave.to-r { animation: dySceneOutR .45s cubic-bezier(.5,0,.75,0) both; }
@keyframes dySceneInR { from { opacity: 0; transform: translateX(80px) scale(.94) rotate(1.5deg); filter: blur(8px); } }
@keyframes dySceneInL { from { opacity: 0; transform: translateX(-80px) scale(.94) rotate(-1.5deg); filter: blur(8px); } }
@keyframes dySceneOutL { to { opacity: 0; transform: translateX(-90px) scale(.95) rotate(-2deg); filter: blur(6px); } }
@keyframes dySceneOutR { to { opacity: 0; transform: translateX(90px) scale(.95) rotate(2deg); filter: blur(6px); } }
.dy2-panel { margin-top: auto; background: rgba(13,15,30,.8); backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%); border-top: 1px solid rgba(255,255,255,.1); border-radius: 30px 30px 0 0; padding: 22px max(20px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); color: var(--ink); box-shadow: 0 -20px 50px rgba(0,0,0,.25); }
.dy2-step { margin: 0 0 6px; font-size: 13px; color: var(--muted); letter-spacing: .08em; font-variant-numeric: tabular-nums; } .dy2-step b { color: var(--accent); }
.dy2-h { margin: 0 0 10px; font-family: 'Mitr', var(--font); font-weight: 600; font-size: 30px; line-height: 1.28; letter-spacing: -.005em; overflow: hidden; text-wrap: balance; }
.dy2-h span { display: inline-block; } .dy2-h em { font-style: normal; color: var(--accent); }
.dy2-p { margin: 0 0 16px; color: #C9CCDA; font-size: 16px; line-height: 1.6; max-width: 46ch; }
.dy2-x .dy-pills span { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.08); }
.dy2-text.play .dy2-step { animation: dyFade .5s both; }
.dy2-text.play .dy2-h span { animation: dyRise .75s cubic-bezier(.2,.9,.25,1) .05s both; }
.dy2-text.play .dy2-p { animation: dyUp .6s cubic-bezier(.2,.9,.25,1) .16s both; }
.dy2-text.play .dy-pills span, .dy2-text.play .dy-honest li { animation: dyUp .5s cubic-bezier(.2,.9,.25,1) both; }
.dy2-text.play .dy-pills span:nth-child(1), .dy2-text.play .dy-honest li:nth-child(1) { animation-delay: .26s; }
.dy2-text.play .dy-pills span:nth-child(2), .dy2-text.play .dy-honest li:nth-child(2) { animation-delay: .32s; }
.dy2-text.play .dy-pills span:nth-child(3), .dy2-text.play .dy-honest li:nth-child(3) { animation-delay: .38s; }
.dy2-text.play .dy-pills span:nth-child(4) { animation-delay: .44s; }
@keyframes dyFade { from { opacity: 0; } }
@keyframes dyRise { from { opacity: 0; transform: translateY(105%); filter: blur(6px); } }
@keyframes dyUp { from { opacity: 0; transform: translateY(14px); filter: blur(3px); } }
.dy2-foot { display: flex; gap: 10px; margin-top: 18px; }
.dy2-prev { flex: none; width: 54px; height: 54px; border-radius: 16px; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: var(--ink); display: grid; place-items: center; cursor: pointer; transition: opacity .3s, width .35s, margin .35s; }
.dy2-prev svg { width: 22px; height: 22px; }
.dy2.is-first .dy2-prev { width: 0; opacity: 0; border-width: 0; margin-right: -10px; pointer-events: none; }
.dy2-next { flex: 1; height: 54px; border: 0; border-radius: 16px; background: var(--accent); color: var(--accent-ink); font: 700 17px var(--font); cursor: pointer; position: relative; overflow: hidden; box-shadow: 0 12px 30px -10px rgba(245,199,107,.6); transition: transform .2s; }
.dy2-next:active { transform: scale(.98); }
.dy2-next span { display: inline-block; } .dy2-next.pulse span { animation: dyUp .45s cubic-bezier(.2,.9,.25,1) .1s both; }
.dy2-next::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-100%); }
.dy2-next.go::after { animation: dyShine 2.4s 1s ease-in-out infinite; }
@keyframes dyShine { 60%, 100% { transform: translateX(100%); } }
.dy2-prev:focus-visible, .dy2-next:focus-visible, .dy2-dot:focus-visible, .dy2-login:focus-visible, .dy2-skip:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.dy2-sub { min-height: 40px; display: grid; place-items: center; }
.dy2-skip { border: 0; background: none; color: var(--muted); font: 500 14px var(--font); cursor: pointer; padding: 10px; }
.dy2.is-last .dy2-skip { display: none; }
.dy2-legal { margin: 6px 0 0; color: var(--muted); font-size: 12px; text-align: center; } .dy2-legal:empty { display: none; }
/* ฉากต้อนรับ: ใบนัด → จด → การ์ด */
.sc-hello { position: relative; height: 210px; }
.hp-paper { position: absolute; left: 0; top: 6px; width: 54%; background: #FFFDF6; color: #1A1E33; border-radius: 12px; padding: 12px 12px 14px; font-size: 12.5px; line-height: 1.55; transform: rotate(-5deg); box-shadow: 0 16px 34px -12px rgba(0,0,0,.5); display: grid; animation: hpDrop .7s .15s cubic-bezier(.2,.9,.25,1.1) both; }
.hp-paper b { font-size: 13.5px; border-bottom: 1.5px solid #1A1E33; margin-bottom: 4px; padding-bottom: 2px; }
.hp-mas { position: absolute; left: 47%; top: 70px; width: 64px; z-index: 2; animation: hpPop .5s .7s cubic-bezier(.2,.9,.25,1.3) both; }
.hp-card { position: absolute; right: 0; bottom: 0; width: 62%; background: #fff; color: #1A1E33; border-radius: 16px; padding: 12px 14px; display: grid; gap: 4px; box-shadow: 0 18px 40px -14px rgba(0,0,0,.55); animation: hpCard .7s 1.05s cubic-bezier(.2,.9,.25,1.1) both; }
.hp-card b { font-size: 15.5px; } .hp-card span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #445; } .hp-card svg { width: 15px; height: 15px; color: #3A56E8; flex: none; }
@keyframes hpDrop { from { opacity: 0; transform: translateY(-40px) rotate(-14deg); } }
@keyframes hpPop { from { opacity: 0; transform: scale(0) rotate(-20deg); } }
@keyframes hpCard { from { opacity: 0; transform: translate(30px, 20px) scale(.9); } }
@media (min-width: 900px) {
  .dy2-arcbox { top: 70px; height: 230px; left: 40px; right: 40px; }
  .dy2-stage { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1fr); align-items: center; gap: 56px; padding: 150px 48px 56px; }
  .dy2-panel { grid-column: 1; grid-row: 1; margin: 0; border-radius: 30px; border: 1px solid rgba(255,255,255,.1); padding: 34px 34px 18px; background: rgba(13,15,30,.66); }
  .dy2-scenebox { grid-column: 2; grid-row: 1; padding: 0; }
  .dy2-time { font-size: 76px; }
  .dy2-part { font-size: 20px; }
  .dy2-scenes { zoom: 1.25; min-height: 230px; }
  .dy2-h { font-size: 46px; }
  .dy2-p { font-size: 18px; }
}
@media (max-width: 380px) { .dy2-time { font-size: 44px; } .dy2-h { font-size: 26px; } .dy2-scenebox { padding-top: 104px; } }
@media (prefers-reduced-motion: reduce) {
  .dy2 *, .dy2 *::before, .dy2 *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .2s !important; }
  .dy2-cloud { animation: none !important; }
}

/* ═══ เข้าสู่ระบบ / สมัคร v2 ═══ */
.au2 { position: relative; min-height: 100dvh; display: flex; flex-direction: column; color: #fff; overflow-x: hidden; }
.au2-sky { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: linear-gradient(180deg, #0B0D26 0%, #20245A 50%, #4A3F7E 100%); }
.au2-stars { position: absolute; inset: 0; background: radial-gradient(1.6px 1.6px at 12% 14%, #fff, transparent), radial-gradient(1.2px 1.2px at 30% 6%, #fffc, transparent), radial-gradient(2px 2px at 48% 20%, #fff, transparent), radial-gradient(1.2px 1.2px at 66% 10%, #fffb, transparent), radial-gradient(1.6px 1.6px at 82% 24%, #fff, transparent), radial-gradient(1.2px 1.2px at 92% 8%, #fffc, transparent), radial-gradient(1.4px 1.4px at 6% 44%, #fffa, transparent), radial-gradient(1.2px 1.2px at 40% 38%, #fff9, transparent), radial-gradient(1.6px 1.6px at 74% 46%, #fffb, transparent); animation: dyTwinkle 4s ease-in-out infinite alternate; }
.au2-glow { position: absolute; left: -10%; right: -10%; bottom: -30%; height: 70%; background: radial-gradient(50% 60% at 50% 100%, rgba(242,167,116,.55), transparent 70%); }
.au2 .dy2-cloud { opacity: .1; }
.au2-top { position: relative; z-index: 3; display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 1180px; margin: 0 auto; padding: calc(12px + env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 0 max(18px, env(safe-area-inset-left)); }
.au2-back { display: inline-flex; align-items: center; gap: 4px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.1); color: #fff; font: 600 14px var(--font); border-radius: 999px; padding: 7px 14px 7px 9px; cursor: pointer; backdrop-filter: blur(10px); }
.au2-back svg { width: 18px; height: 18px; }
.au2-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; opacity: .9; } .au2-brand img { width: 28px; height: 28px; border-radius: 8px; }
.au2-main { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; width: 100%; max-width: 1180px; margin: 0 auto; }
.au2-hero { position: relative; padding: 18px max(20px, env(safe-area-inset-right)) 20px max(20px, env(safe-area-inset-left)); }
.au2-hello { display: flex; align-items: center; gap: 12px; }
.au2-mas { width: 78px; height: 78px; flex: none; filter: drop-shadow(0 12px 20px rgba(0,0,0,.35)); animation: auMas .7s cubic-bezier(.2,.9,.25,1.3) both, auBob 4s 1s ease-in-out infinite; }
.au2-bubble { position: relative; background: #fff; color: #1A1E33; border-radius: 18px 18px 18px 6px; padding: 9px 14px; box-shadow: 0 12px 28px -12px rgba(0,0,0,.5); animation: auUp .55s .25s cubic-bezier(.2,.9,.25,1) both; }
.au2-bubble b { display: block; font-size: 15.5px; } .au2-bubble small { color: #556; font-size: 12.5px; }
.au2-h { margin: 16px 0 0; font-family: 'Mitr', var(--font); font-weight: 600; font-size: 30px; line-height: 1.25; text-wrap: balance; animation: auUp .7s .3s cubic-bezier(.2,.9,.25,1) both; }
.au2-h em { font-style: normal; color: var(--accent); }
.au2-perks { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.au2-perks li { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 6px 11px 6px 7px; font-size: 13px; animation: auUp .5s cubic-bezier(.2,.9,.25,1) both; backdrop-filter: blur(8px); }
.au2-perks li:nth-child(1) { animation-delay: .42s; } .au2-perks li:nth-child(2) { animation-delay: .5s; } .au2-perks li:nth-child(3) { animation-delay: .58s; }
.au2-perks span { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); flex: none; } .au2-perks span svg { width: 14px; height: 14px; }
.au2-perks small { display: none; } .au2-perks b { font-weight: 600; }
.au2-float { display: none; }
.au2-card { margin-top: auto; background: rgba(13,15,30,.82); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%); border-top: 1px solid rgba(255,255,255,.1); border-radius: 30px 30px 0 0; padding: 18px max(20px, env(safe-area-inset-right)) calc(16px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); color: var(--ink); box-shadow: 0 -24px 60px rgba(0,0,0,.3); animation: auCard .7s .15s cubic-bezier(.2,.9,.25,1) both; }
.au2-card.out .au2-body { opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; }
.au2.quick * { animation-delay: 0s !important; } .au2.quick .au2-mas, .au2.quick .au2-card, .au2.quick .au2-bubble, .au2.quick .au2-float { animation: none; }
.au2.quick .au2-body { animation: auUp .4s cubic-bezier(.2,.9,.25,1) both; }
.au2-seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: rgba(255,255,255,.07); border-radius: 14px; padding: 4px; margin-bottom: 18px; }
.au2-pill { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: var(--accent); box-shadow: 0 6px 18px -6px rgba(245,199,107,.7); transition: transform .4s cubic-bezier(.3,1.3,.5,1); }
.au2-pill.r { transform: translateX(100%); }
.au2-seg button { position: relative; z-index: 1; border: 0; background: none; color: var(--muted); font: 700 15px var(--font); padding: 10px 0; cursor: pointer; transition: color .3s; }
.au2-seg button.on { color: var(--accent-ink); }
.au2-t { margin: 0; font-family: 'Mitr', var(--font); font-weight: 600; font-size: 24px; }
.au2-p { margin: 4px 0 16px; color: var(--muted); font-size: 14.5px; }
.au2-google { display: flex; align-items: center; justify-content: center; gap: 12px; height: 56px; border-radius: 16px; background: #fff; color: #1A1E33; text-decoration: none; font-weight: 700; font-size: 16.5px; box-shadow: 0 14px 30px -14px rgba(255,255,255,.4); transition: transform .2s, box-shadow .2s; }
.au2-google:hover { transform: translateY(-1px); box-shadow: 0 18px 36px -14px rgba(255,255,255,.5); } .au2-google:active { transform: scale(.98); }
.au2-drive { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 11px 12px; border-radius: 14px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.07); cursor: pointer; }
.au2-di { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: #3A56E8; color: #fff; flex: none; } .au2-di svg { width: 17px; height: 17px; }
.au2-dt { flex: 1; min-width: 0; } .au2-dt b { display: block; font-size: 14px; } .au2-dt small { display: block; color: var(--muted); font-size: 12px; }
.au2-or { display: flex; align-items: center; gap: 12px; width: 100%; margin: 16px 0 4px; border: 0; background: none; color: var(--accent); font: 600 14.5px var(--font); cursor: pointer; padding: 6px 0; }
.au2-or i { flex: 1; height: 1px; background: rgba(255,255,255,.12); } .au2-or span { display: inline-flex; align-items: center; gap: 6px; } .au2-or svg { width: 16px; height: 16px; }
.au2-email { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .45s cubic-bezier(.2,.9,.25,1), opacity .35s; }
.au2-email.open { grid-template-rows: 1fr; opacity: 1; }
.au2-email-in { overflow: hidden; min-height: 0; } .au2-email-in form { padding: 8px 2px 4px; display: grid; gap: 10px; }
.au2-f { display: grid; gap: 5px; } .au2-f span { font-size: 13px; color: var(--muted); font-weight: 600; }
.au2-f input { height: 50px; border-radius: 14px; border: 1.5px solid rgba(255,255,255,.1); background: rgba(255,255,255,.05); color: var(--ink); font: 500 16px var(--font); padding: 0 14px; transition: border-color .2s, background .2s; }
.au2-f input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,.08); }
.au2-submit { height: 52px; border: 0; border-radius: 16px; background: var(--accent); color: var(--accent-ink); font: 700 16px var(--font); cursor: pointer; margin-top: 4px; } .au2-submit:disabled { opacity: .6; }
.au2-legal { margin: 14px 0 0; text-align: center; color: var(--muted); font-size: 12px; line-height: 1.6; } .au2-legal a { color: var(--muted); }
.au2-back:focus-visible, .au2-seg button:focus-visible, .au2-google:focus-visible, .au2-or:focus-visible, .au2-submit:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes auMas { from { opacity: 0; transform: scale(.4) rotate(-14deg); } }
@keyframes auBob { 50% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes auUp { from { opacity: 0; transform: translateY(16px); filter: blur(4px); } }
@keyframes auCard { from { opacity: 0; transform: translateY(60px); } }
@keyframes auFloat { 50% { transform: translateY(-10px); } }
@media (min-width: 900px) {
  .au2-main { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 440px); align-items: center; gap: 64px; padding: 30px 48px 48px; }
  .au2-hero { padding: 0; }
  .au2-mas { width: 120px; height: 120px; }
  .au2-bubble b { font-size: 18px; } .au2-bubble small { font-size: 14px; }
  .au2-h { font-size: 56px; margin-top: 28px; }
  .au2-perks { display: grid; gap: 12px; margin-top: 28px; max-width: 420px; }
  .au2-perks li { padding: 12px 16px 12px 12px; border-radius: 16px; font-size: 15px; }
  .au2-perks span { width: 36px; height: 36px; border-radius: 10px; } .au2-perks span svg { width: 19px; height: 19px; }
  .au2-perks small { display: block; color: rgba(255,255,255,.65); font-size: 13px; }
  .au2-float { display: flex; position: absolute; align-items: center; gap: 10px; background: rgba(255,255,255,.92); color: #1A1E33; border-radius: 16px; padding: 10px 14px; box-shadow: 0 20px 40px -16px rgba(0,0,0,.55); font-size: 13px; }
  .au2-float img { width: 34px; height: 34px; border-radius: 9px; } .au2-float small { display: block; color: #667; font-size: 11.5px; } .au2-float b { font-size: 14px; }
  .au2-float.f1 { right: -10px; top: 40px; animation: auUp .6s .7s both, auFloat 5s 1.4s ease-in-out infinite; }
  .au2-float.f2 { right: 40px; bottom: -6px; animation: auUp .6s .85s both, auFloat 6s 1.6s ease-in-out infinite; }
  .au2-float.f2 span { width: 30px; height: 30px; border-radius: 50%; background: #2FA374; color: #fff; display: grid; place-items: center; } .au2-float.f2 span svg { width: 16px; height: 16px; }
  .au2-card { margin: 0; border-radius: 28px; border: 1px solid rgba(255,255,255,.1); padding: 22px 26px 18px; background: rgba(13,15,30,.7); box-shadow: 0 40px 80px -30px rgba(0,0,0,.6); }
}
@media (prefers-reduced-motion: reduce) { .au2 *, .au2 *::before, .au2 *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: .15s !important; } }
.au2-or:hover { background: none; } .au2-or:hover span { text-decoration: underline; text-underline-offset: 4px; }
@media (min-width: 900px) { .au2-float.f2 { right: -30px; bottom: -64px; } }
