/* ห้องอุ่นๆ ของน้องก้อน: โทนครีม พีช ใบไม้ ไม่ใช้ม่วงเข้มแบบแอปสุขภาพทั่วไป */
:root {
  --bg: #F9F5ED; --card: #FFFFFF; --ink: #24193B; --muted: #6B6080; --line: #DDD5EC;
  --accent: #6B3FC0; --accent-ink: #FFFFFF; --soft: #ECE7F6; --green: #3F9A68; --green-soft: #E0F2E7;
  --blue-soft: #E4E8FB; --blue-ink: #3A48BD; --warn-soft: #FFF0C9; --warn-ink: #7A5A00; --danger-soft: #FCE3E8; --danger-ink: #A33A55;
  --font-display: "Prompt", "Noto Sans Thai", system-ui, sans-serif; --font-body: "Prompt", "Noto Sans Thai", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #170F27; --card: #251A3A; --ink: #F4EEFB; --muted: #B6A9CF; --line: #3A2D55;
    --accent: #B79CFF; --accent-ink: #1A0F2E; --soft: #34274F; --green: #7CC795; --green-soft: #264236;
    --blue-soft: #28325F; --blue-ink: #B5C0FF; --warn-soft: #4D4220; --warn-ink: #F3D77F; --danger-soft: #55303F; --danger-ink: #F7B1C0;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #170F27; --card: #251A3A; --ink: #F4EEFB; --muted: #B6A9CF; --line: #3A2D55;
    --accent: #B79CFF; --accent-ink: #1A0F2E; --soft: #34274F; --green: #7CC795; --green-soft: #264236;
    --blue-soft: #28325F; --blue-ink: #B5C0FF; --warn-soft: #4D4220; --warn-ink: #F3D77F; --danger-soft: #55303F; --danger-ink: #F7B1C0;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.55; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: 21px; } h2 { font-size: 18px; } h3 { font-size: 15px; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.app { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 14px 16px 104px; position: relative; }
.view[hidden], #sub[hidden], #sheet[hidden], #modal[hidden] { display: none; }
.muted { color: var(--muted); } .sm { font-size: 13px; } .xs { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ic { flex-shrink: 0; vertical-align: -4px; }
.top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 999px; font-size: 13px; background: var(--card); border: 1px solid var(--line); white-space: nowrap; }
.chip.warn { background: var(--warn-soft); color: var(--warn-ink); border-color: transparent; }
.chip.green { background: var(--green-soft); color: var(--green); border-color: transparent; }
.chip.blue { background: var(--blue-soft); color: var(--blue-ink); border-color: transparent; }
.chip.soft { background: var(--soft); border-color: transparent; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.stage { border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.stage svg { display: block; width: 100%; height: auto; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
button.card { width: 100%; text-align: left; }
.status { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.status .big { font-family: var(--font-display); font-size: 16px; font-weight: 600; }
.bar { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 4px; background: var(--accent); transition: width .6s ease; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); min-height: 44px; font-weight: 500; }
.btn:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.sel { background: var(--soft); border-color: var(--accent); }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 6px 12px; font-size: 13px; border-radius: 12px; }
.btn.danger { color: var(--danger-ink); }
.round { width: 46px; height: 46px; border-radius: 50%; padding: 0; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--card); flex-shrink: 0; }
.round.primary { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.inputbar { display: flex; gap: 8px; align-items: center; margin-top: 12px; }
input[type=text], input[type=number], input[type=time], textarea, select { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; min-height: 44px; }
textarea { min-height: 88px; resize: vertical; }
label.f { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 5px; }
.logchips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.logchips .chip { background: var(--card); }
.nav { position: fixed; left: 0; right: 0; bottom: 0; background: var(--card); border-top: 1px solid var(--line); display: flex; justify-content: center; z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
.nav-in { width: 100%; max-width: 480px; display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; padding: 6px 4px; }
.nav button { background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; min-height: 48px; }
.nav button.on { color: var(--accent); }
.nav .fab { width: 54px; height: 54px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); margin: -22px auto 0; border: 4px solid var(--bg); justify-content: center; }
.nav[hidden] { display: none; }
#sub { position: fixed; inset: 0; background: var(--bg); z-index: 40; overflow-y: auto; }
#sub .inner { max-width: 480px; margin: 0 auto; padding: 12px 16px 60px; }
.subhead { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; position: sticky; top: 0; background: var(--bg); padding: 4px 0 8px; z-index: 2; }
.subhead h2 { flex: 1; }
.iconbtn { background: none; border: 0; width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
#sheet { position: fixed; inset: 0; z-index: 60; background: rgba(30,20,30,.45); display: flex; align-items: flex-end; justify-content: center; }
#sheet .panel { width: 100%; max-width: 480px; background: var(--card); border-radius: 24px 24px 0 0; padding: 18px 16px 26px; animation: up .25s ease; }
#modal { position: fixed; inset: 0; z-index: 70; background: rgba(30,20,30,.5); display: flex; align-items: center; justify-content: center; padding: 20px; }
#modal .panel { width: 100%; max-width: 380px; background: var(--card); border-radius: 20px; padding: 18px; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.tile { display: flex; align-items: center; gap: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px; text-align: left; min-height: 56px; width: 100%; }
.tile .dot { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tile b { display: block; font-size: 14px; font-weight: 600; } .tile span.s { display: block; font-size: 12px; color: var(--muted); }
.tile[disabled] { opacity: .55; cursor: default; }
.sec { font-size: 13px; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
.d-warn { background: var(--warn-soft); color: var(--warn-ink); } .d-green { background: var(--green-soft); color: var(--green); } .d-blue { background: var(--blue-soft); color: var(--blue-ink); } .d-rose { background: var(--danger-soft); color: var(--danger-ink); }
.item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); } .item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.stepper input { width: 58px; text-align: center; padding: 6px; min-height: 36px; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); padding: 0; position: relative; }
.sw.on { outline: 3px solid var(--accent); outline-offset: 2px; }
.sw .lk { position: absolute; right: -4px; bottom: -4px; background: var(--card); border-radius: 50%; padding: 1px; color: var(--muted); display: flex; }
.hint { display: flex; gap: 8px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 13px; color: var(--muted); margin-top: 12px; }
.seg { display: flex; gap: 6px; background: var(--soft); border-radius: 14px; padding: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 10px; padding: 9px; min-height: 40px; }
.seg button.on { background: var(--card); font-weight: 600; }
.big-num { font-family: var(--font-display); font-size: 40px; font-weight: 600; line-height: 1.1; }
.glass { width: 38px; height: 46px; border-radius: 6px 6px 12px 12px; border: 2px solid var(--blue-ink); background: transparent; padding: 0; position: relative; overflow: hidden; }
.glass.on { background: var(--blue-soft); }
.glass.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70%; background: #8CC8E8; opacity: .7; }
.toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 90; max-width: 90%; animation: up .25s ease; }
.coinpop { position: fixed; z-index: 95; pointer-events: none; font-weight: 700; color: #B7791F; background: #FFE9A8; padding: 4px 10px; border-radius: 999px; animation: coinpop 1.2s ease-out forwards; }
@keyframes coinpop { 0% { opacity: 0; transform: translateY(0) scale(.8); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70px) scale(1.1); } }
.confetti { position: fixed; top: -10px; width: 9px; height: 14px; z-index: 96; pointer-events: none; animation: fall 1.8s ease-in forwards; }
@keyframes fall { to { transform: translateY(105vh) rotate(540deg); opacity: .9; } }
.ring { width: 190px; height: 190px; display: block; margin: 8px auto; }
.chart { width: 100%; height: auto; display: block; }
.chart text { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .draw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.letter { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px; font-family: var(--font-display); line-height: 1.8; }
.fig { animation: bob 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
.sleepy .fig { animation-duration: 4.5s; }
.blink { animation: blink 4.2s infinite; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
.bowl, .heart, .sweat, .rumble, .spark { opacity: 0; }
.eat .bowl { animation: feed 2s ease-in-out infinite; }
@keyframes feed { 0% { opacity: 0; transform: translate(90px, 50px); } 20% { opacity: 1; } 55% { opacity: 1; transform: translate(0, 0); } 75% { opacity: 0; transform: translate(0, -6px) scale(.6); } 100% { opacity: 0; } }
.chew { animation: chew .5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes chew { 0%, 100% { transform: scaleY(.5); } 50% { transform: scaleY(1.1); } }
.eat .heart { animation: rise 2s ease-out infinite; } .eat .heart.h2 { animation-delay: .9s; }
@keyframes rise { 0% { opacity: 0; transform: translateY(0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-40px); } }
.work .fig { animation: jump .7s ease-in-out infinite; }
@keyframes jump { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-18px); } }
.work .sweat { animation: drop 1s ease-in infinite; }
@keyframes drop { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(20px); } }
.work .spark { animation: twinkle 1s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes twinkle { 0%, 100% { opacity: 0; transform: scale(.5); } 50% { opacity: 1; transform: scale(1.1); } }
.hungry .fig { animation: shake .35s ease-in-out infinite alternate; }
@keyframes shake { from { transform: rotate(-1.4deg); } to { transform: rotate(1.4deg); } }
.hungry .rumble { opacity: 1; animation: pulse .8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.15); } }
.pop { animation: popin .35s ease; } @keyframes popin { from { transform: scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
.pulse-ring { animation: ringpulse 2.4s ease-in-out infinite; transform-origin: center; } @keyframes ringpulse { 0%, 100% { opacity: .9; } 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .chart .draw { stroke-dashoffset: 0; }
}

/* ธีมสี: ใช้กับโหมดสว่าง ส่วนโหมดมืดเปลี่ยนเฉพาะสีเน้น */
:root[data-theme="light"][data-pal="mint"] { --bg:#F1FAF4; --soft:#DDF1E4; --line:#D2E6D8; --accent:#4FA574; --ink:#243A2E; --muted:#678072; }
:root[data-theme="light"][data-pal="sky"] { --bg:#F0F7FD; --soft:#DCEBF8; --line:#D0E1F0; --accent:#4D93D1; --ink:#22364A; --muted:#667F96; }
:root[data-theme="light"][data-pal="sakura"] { --bg:#FFF3F6; --soft:#FFE0E8; --line:#F6D3DC; --accent:#E8628A; --ink:#42262F; --muted:#8F6B76; }
:root[data-theme="light"][data-pal="lavender"] { --bg:#F6F3FD; --soft:#E8E1F8; --line:#DDD5F0; --accent:#8D78D8; --ink:#2E2744; --muted:#7B7396; }
:root[data-theme="dark"][data-pal="mint"] { --accent:#7CC795; } :root[data-theme="dark"][data-pal="sky"] { --accent:#7DB8E8; }
:root[data-theme="dark"][data-pal="sakura"] { --accent:#F28BAA; } :root[data-theme="dark"][data-pal="lavender"] { --accent:#B3A2EE; }
body, .card, .nav { transition: background-color .5s, color .3s, border-color .5s; }
/* อนิเมชันเพิ่มเติม */
.view:not([hidden]) { animation: viewin .4s ease both; }
@keyframes viewin { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.view:not([hidden]) > .card, .view:not([hidden]) .tile, .view:not([hidden]) .logchips { animation: viewin .45s ease both; }
.view:not([hidden]) > :nth-child(2) { animation-delay: .05s; } .view:not([hidden]) > :nth-child(3) { animation-delay: .1s; } .view:not([hidden]) > :nth-child(4) { animation-delay: .15s; } .view:not([hidden]) > :nth-child(5) { animation-delay: .2s; }
button:active:not([disabled]) { transform: scale(.96); transition: transform .08s; }
.stage { position: relative; overflow: hidden; cursor: pointer; }
.ptl { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.ptl i { position: absolute; top: -10px; width: 8px; height: 8px; border-radius: 50%; opacity: 0; animation: drift 9s linear infinite; }
.ptl.petal i { border-radius: 70% 0 70% 0; background: #F7B7C8; width: 9px; height: 7px; }
.ptl.dust i { background: #FFF3C4; }
.ptl.fly i { background: #FFE98A; box-shadow: 0 0 8px 2px #FFE98A; top: auto; bottom: 20px; animation: float 6s ease-in-out infinite; }
@keyframes drift { 0% { transform: translate(0,0) rotate(0); opacity: 0; } 10% { opacity: .85; } 100% { transform: translate(-60px,300px) rotate(260deg); opacity: 0; } }
@keyframes float { 0%,100% { transform: translate(0,0); opacity: 0; } 25% { opacity: .9; } 50% { transform: translate(20px,-60px); opacity: .5; } 75% { opacity: .9; } }
.poke .fig { animation: jump .55s ease 2; }
.heartpop { position: absolute; font-size: 22px; pointer-events: none; animation: rise 1.3s ease-out forwards; color: var(--accent); }
.palrow { display: flex; gap: 10px; flex-wrap: wrap; }
.palbtn { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; }
.palbtn.on { border-color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .ptl, .view:not([hidden]), .view:not([hidden]) > * { animation: none !important; } }

/* ออกกำลังด้วยกัน */
.exg { transform-box: fill-box; transform-origin: 50% 100%; }
.exg.idle { animation: bob 3s ease-in-out infinite; }
.exg.exsq { animation: exsq 3s ease-in-out infinite; }
.exg.exjk { animation: exjk 1.5s ease-in-out infinite; }
.exg.expu { transform: rotate(-80deg); animation: expu 3s ease-in-out infinite; }
.exg.exbr { transform: rotate(-84deg); animation: exbr 3s ease-in-out infinite; }
.exg.exlg { animation: exlg 3s ease-in-out infinite; }
.exg.exdf { animation: exdf 2s ease-in-out infinite; }
.exg.exdone { animation: jump .7s ease-in-out infinite; }
@keyframes exsq { 0%,100% { transform: translateY(0) scale(1,1); } 50% { transform: translateY(10px) scale(1.06,.8); } }
@keyframes exjk { 0%,100% { transform: translateY(0) scale(1,1); } 30% { transform: translateY(-26px) scale(.95,1.06); } 60% { transform: translateY(0) scale(1.1,.94); } }
@keyframes expu { 0%,100% { transform: rotate(-80deg) translateY(0); } 50% { transform: rotate(-73deg) translateY(10px); } }
@keyframes exbr { 0%,100% { transform: rotate(-84deg) scale(1,1); } 50% { transform: rotate(-84deg) scale(1.01,1.03); } }
@keyframes exlg { 0%,100% { transform: translate(-14px,0) scale(1,1); } 50% { transform: translate(14px,8px) scale(1,.86); } }
@keyframes exdf { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.tcount { font-family: var(--font-display); font-size: 54px; font-weight: 600; text-align: center; line-height: 1.1; }
.iffbar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.iffdot { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; background: var(--soft); color: var(--muted); }
.iffdot.ok { background: var(--green); color: #fff; } .iffdot.bad { background: var(--danger-soft); color: var(--danger-ink); } .iffdot.now { outline: 2px solid var(--accent); }

/* landing */
.land { padding-bottom: 32px; }
.land-hero { text-align: center; padding-top: 8px; }
.land-h1 { font-size: 34px; margin-top: 10px; line-height: 1.2; }
.land-th { font-size: 20px; color: var(--accent); margin-left: 4px; }
.land-sub { color: var(--muted); margin: 8px auto 14px; max-width: 34ch; }
.land-stage { margin-bottom: 14px; }
.land-cta { min-height: 50px; font-size: 16px; }
.land-sec { margin: 26px 0 10px; }
.land-feat { display: flex; gap: 12px; align-items: flex-start; }
.land-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--accent); display: grid; place-items: center; flex-shrink: 0; }
.land-step { gap: 12px; }
.land-n { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 600; flex-shrink: 0; }

/* home: ring, week strip */
.status .ring, .ring { width: 76px; height: 76px; flex-shrink: 0; }
.weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-top: 10px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px 6px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wd i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent-ink); font-style: normal; }
.wd i.on { background: var(--green); color: #fff; }
.wd.today i { outline: 2px solid var(--accent); outline-offset: 2px; }
.wd.today span { color: var(--accent); font-weight: 600; }

/* medals */
.medal { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; box-shadow: inset 0 0 0 3px rgba(255,255,255,.55), 0 2px 6px rgba(0,0,0,.18); flex-shrink: 0; }
.medal.off { background: var(--soft); color: var(--muted); box-shadow: none; opacity: .75; }
.medalrow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.medalcell { display: flex; flex-direction: column; align-items: center; gap: 4px; }

/* ===== ตัวละครมีชีวิตขึ้น ===== */
.torso { animation: breathe 3.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.015, 1.035); } }
.head { animation: headsway 6.5s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 88%; }
@keyframes headsway { 0%, 100% { transform: rotate(0); } 30% { transform: rotate(-2.4deg); } 70% { transform: rotate(2.4deg); } }
.armL, .armR { transform-box: fill-box; transform-origin: 50% 8%; }
.wave .armR { animation: wavearm .5s ease-in-out 6 alternate; }
@keyframes wavearm { from { transform: rotate(-95deg); } to { transform: rotate(-135deg); } }
.cheer .armL { animation: cheerl .35s ease-in-out infinite alternate; } .cheer .armR { animation: cheerr .35s ease-in-out infinite alternate; }
@keyframes cheerl { from { transform: rotate(100deg); } to { transform: rotate(140deg); } }
@keyframes cheerr { from { transform: rotate(-100deg); } to { transform: rotate(-140deg); } }
.cheer .fig, .hop .fig { animation: jump .5s ease-in-out infinite; }
.star { animation: starblink 2.8s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes starblink { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.5); } }
.cloud { animation: cloudmove 9s ease-in-out infinite; }
@keyframes cloudmove { 0%, 100% { transform: translateX(-7px); } 50% { transform: translateX(11px); } }
.sunball { animation: sunpulse 4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes sunpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.glow { animation: lampglow 3.4s ease-in-out infinite; }
@keyframes lampglow { 0%, 100% { opacity: .28; } 50% { opacity: .5; } }
.zz { animation: zzrise 3.2s ease-in-out infinite; opacity: 0; transform-box: fill-box; transform-origin: 50% 50%; }
@keyframes zzrise { 0% { opacity: 0; transform: translate(0, 4px) scale(.7); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(12px, -30px) scale(1.15); } }
.bubble { animation: bubblein .5s cubic-bezier(.2, 1.5, .4, 1) both; transform-box: fill-box; transform-origin: 15% 100%; }
@keyframes bubblein { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }

/* ===== สลับกลางวัน กลางคืน ===== */
.todbtn { position: absolute; top: 10px; right: 10px; z-index: 4; width: 62px; height: 32px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: linear-gradient(135deg, #8FD0F2, #BFE6F7); box-shadow: inset 0 0 0 2px rgba(255,255,255,.55), 0 2px 8px rgba(0,0,0,.14); transition: background .5s; overflow: hidden; }
:root[data-theme="dark"] .todbtn { background: linear-gradient(135deg, #2B2550, #4A3F7E); }
.todbtn::before { content: ""; position: absolute; left: 12px; top: 18px; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 10px -8px 0 #fff, 22px 2px 0 #fff; opacity: 0; transition: opacity .5s; }
:root[data-theme="dark"] .todbtn::before { opacity: .9; }
.todknob { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: #FFD66B; color: #B7791F; box-shadow: 0 1px 4px rgba(0,0,0,.25); transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), background .4s, color .4s; }
:root[data-theme="dark"] .todknob { transform: translateX(30px) rotate(360deg); background: #F4EFD6; color: #6A5F8C; }
.todknob .sun, .todknob .moon { position: absolute; transition: opacity .3s, transform .45s; }
.todknob .moon { opacity: 0; transform: scale(.4); } :root[data-theme="dark"] .todknob .sun { opacity: 0; transform: scale(.4); } :root[data-theme="dark"] .todknob .moon { opacity: 1; transform: scale(1); }
.stage.todfade svg.scene { opacity: 0; filter: brightness(1.6) blur(2px); transition: opacity .26s, filter .26s; }
.stage.todin svg.scene { animation: todin .55s ease both; }
@keyframes todin { from { opacity: 0; filter: brightness(1.5); transform: scale(1.02); } to { opacity: 1; filter: none; transform: none; } }

/* ===== หน้าเปิดแอป ===== */
.splash { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: linear-gradient(160deg, var(--bg) 0%, var(--soft) 100%); overflow: hidden; transition: opacity .5s ease, transform .5s ease; cursor: pointer; }
.splash.out { opacity: 0; transform: scale(1.06); pointer-events: none; }
.splash-bg i { position: absolute; border-radius: 50%; background: var(--accent); opacity: .12; animation: splashfloat 7s ease-in-out infinite; }
.splash-bg i:nth-child(1) { width: 220px; height: 220px; left: -60px; top: 12%; } .splash-bg i:nth-child(2) { width: 140px; height: 140px; right: -30px; top: 24%; animation-delay: -2s; }
.splash-bg i:nth-child(3) { width: 90px; height: 90px; left: 18%; bottom: 14%; animation-delay: -4s; } .splash-bg i:nth-child(4) { width: 260px; height: 260px; right: -90px; bottom: -40px; animation-delay: -1s; } .splash-bg i:nth-child(5) { width: 50px; height: 50px; left: 62%; top: 10%; animation-delay: -3s; }
@keyframes splashfloat { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-22px) scale(1.06); } }
.splash-in { position: relative; text-align: center; }
.splash-logo { width: 132px; height: 132px; display: block; margin: 0 auto 18px; filter: drop-shadow(0 12px 22px rgba(232, 132, 95, .35)); animation: logopop .9s cubic-bezier(.2, 1.6, .4, 1) both, logofloat 3s ease-in-out .9s infinite; }
@keyframes logopop { 0% { opacity: 0; transform: scale(.3) rotate(-14deg); } 60% { opacity: 1; transform: scale(1.12) rotate(4deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes logofloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.splash-logo .steam { animation: steamwob 2.2s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes steamwob { 0%, 100% { transform: translateY(0) scaleY(1); opacity: .9; } 50% { transform: translateY(-5px) scaleY(1.08); opacity: .5; } }
.splash-logo .eye { animation: blink 3.2s infinite 1.2s; transform-box: fill-box; transform-origin: 50% 50%; }
.splash-word { font-family: var(--font-display); font-weight: 600; font-size: 44px; letter-spacing: 1px; color: var(--ink); display: flex; justify-content: center; }
.splash-word span { display: inline-block; opacity: 0; animation: letterin .6s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.splash-word span:nth-child(1) { animation-delay: .55s; color: var(--accent); } .splash-word span:nth-child(2) { animation-delay: .62s; } .splash-word span:nth-child(3) { animation-delay: .69s; } .splash-word span:nth-child(4) { animation-delay: .76s; } .splash-word span:nth-child(5) { animation-delay: .83s; } .splash-word span:nth-child(6) { animation-delay: .9s; }
@keyframes letterin { from { opacity: 0; transform: translateY(18px) scale(.7); } to { opacity: 1; transform: none; } }
.splash-th { color: var(--accent); font-family: var(--font-display); font-size: 20px; margin-top: 2px; opacity: 0; animation: fadeup .6s ease 1.05s forwards; }
.splash-tag { color: var(--muted); font-size: 14px; margin-top: 10px; opacity: 0; animation: fadeup .6s ease 1.25s forwards; }
.splash-dots { display: flex; gap: 6px; justify-content: center; margin-top: 22px; opacity: 0; animation: fadeup .5s ease 1.3s forwards; }
.splash-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: dotbounce 1s ease-in-out infinite; } .splash-dots i:nth-child(2) { animation-delay: .15s; } .splash-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dotbounce { 0%, 100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-7px); opacity: 1; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.land-logo { width: 84px; height: 84px; display: block; margin: 0 auto 8px; filter: drop-shadow(0 8px 16px rgba(232, 132, 95, .3)); animation: logofloat 3.4s ease-in-out infinite; }

/* ===== ลูกเล่นการใช้งาน ===== */
.nav { position: fixed; } .nav button { position: relative; }
.nav button.on svg { animation: navpop .4s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes navpop { 0% { transform: scale(.7) translateY(3px); } 100% { transform: none; } }
.nav button.on:not(.fab)::after { content: ""; position: absolute; bottom: 3px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--accent); animation: dotin .3s ease both; }
@keyframes dotin { from { transform: scale(0); } to { transform: scale(1); } }
.nav .fab { position: relative; }
.nav .fab::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: fabring 3.8s ease-out 2s infinite; pointer-events: none; }
@keyframes fabring { 0% { opacity: .55; transform: scale(.9); } 55%, 100% { opacity: 0; transform: scale(1.5); } }
.nav .fab:active { transform: scale(.9) rotate(90deg); transition: transform .12s; }
#sub:not([hidden]) { animation: subin .3s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes subin { from { opacity: 0; transform: translateX(28px); } to { opacity: 1; transform: none; } }
.toast { animation: toastin .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes toastin { from { opacity: 0; transform: translate(-50%, 18px) scale(.9); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
.view:not([hidden]) > :nth-child(1) { animation-delay: 0s; } .view:not([hidden]) > :nth-child(2) { animation-delay: .05s; } .view:not([hidden]) > :nth-child(3) { animation-delay: .1s; }
.view:not([hidden]) > :nth-child(4) { animation-delay: .15s; } .view:not([hidden]) > :nth-child(5) { animation-delay: .2s; } .view:not([hidden]) > :nth-child(n+6) { animation-delay: .25s; }
.ring circle:nth-of-type(2) { transition: stroke-dasharray .9s cubic-bezier(.3, .8, .3, 1); }
#coinchip.bump { animation: chipbump .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes chipbump { 0% { transform: scale(1); } 35% { transform: scale(1.3); } 100% { transform: scale(1); } }
.chip, .tile, .btn { transition: transform .12s, background-color .2s, box-shadow .2s; }
.tile:active { transform: scale(.97); }
.stagewrap { position: relative; }

/* mood */
.moodcard { margin-top: 10px; padding: 10px 12px; }
.mrow { display: flex; justify-content: space-between; gap: 4px; margin-top: 8px; }
.mrow.big { margin: 12px 0 6px; }
.mbtn { background: none; border: 0; padding: 4px; border-radius: 16px; display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .15s, background-color .2s; }
.mbtn.on { background: var(--soft); transform: scale(1.12); }
.mbtn:not(.on):active { transform: scale(.9); }
.mface { display: block; }
.mhist { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px 2px; }
.mh { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.mnone { width: 30px; height: 30px; border-radius: 50%; border: 2px dashed var(--line); display: block; }
.sad .heart, .joy .heart { animation: rise 2s ease-out infinite; } .sad .heart.h2, .joy .heart.h2 { animation-delay: .9s; }

/* room items */
.fall { animation: winfall 5s linear infinite; } @keyframes winfall { 0% { transform: translateY(-14px); opacity: 0; } 12% { opacity: 1; } 100% { transform: translateY(64px); opacity: 0; } }
.swim { animation: swim 6s ease-in-out infinite; } @keyframes swim { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(14px); } }
.bub { animation: bubup 3s ease-in infinite; } @keyframes bubup { 0% { transform: translateY(0); opacity: .8; } 100% { transform: translateY(-30px); opacity: 0; } }
.note { animation: notefloat 3s ease-in-out infinite; } @keyframes notefloat { 0% { transform: translate(0, 6px); opacity: 0; } 30% { opacity: 1; } 100% { transform: translate(6px, -18px); opacity: 0; } }
.pet { animation: petbob 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; } @keyframes petbob { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.025, .96); } }
.wag { animation: wag .5s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 0% 100%; } @keyframes wag { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }
.ear { animation: earw 3.4s ease-in-out infinite; transform-box: fill-box; transform-origin: 50% 100%; } @keyframes earw { 0%, 88%, 100% { transform: rotate(0); } 94% { transform: rotate(-14deg); } }
.tvflick { animation: tvf 2.4s steps(1) infinite; } @keyframes tvf { 0% { fill: #F9B8CE; } 25% { fill: #F5E08A; } 50% { fill: #8CC8E8; } 75% { fill: #B7A8F0; } 100% { fill: #F9B8CE; } }

/* แต่งตัวและตกแต่งห้อง */
.dprevwrap { position: relative; width: 248px; margin: 2px auto 6px; }
.dprev { height: 234px; width: 100%; border-radius: 22px; } .dprev svg { width: 100%; height: 100%; }
.dnext { position: absolute; right: 6px; bottom: 6px; min-height: 42px; padding: 8px 12px 8px 16px; gap: 6px; box-shadow: 0 4px 14px rgba(0, 0, 0, .28); }
.dnarrow { display: inline-flex; transform: scaleX(-1); }
.dnext.fab { position: fixed; right: 14px; bottom: 16px; z-index: 30; opacity: 0; pointer-events: none; transform: translateY(14px); transition: opacity .2s, transform .2s; }
body.dmin .dnext.fab { opacity: 1; pointer-events: auto; transform: none; }
.dstick { position: sticky; top: 0; z-index: 8; background: var(--bg); margin: 0 -16px; padding: 6px 16px 4px; display: flex; align-items: center; }
.dmini { flex: 0 0 auto; width: 0; height: 54px; overflow: hidden; opacity: 0; border-radius: 14px; transition: width .25s, opacity .25s, margin .25s; background: var(--soft); }
.dstick.min .dmini { width: 60px; opacity: 1; margin-right: 8px; } .dmini svg { width: 60px; height: 54px; display: block; }
.dtabs { flex: 1; min-width: 0; display: flex; gap: 6px; overflow-x: auto; padding: 4px 0; scrollbar-width: none; -webkit-overflow-scrolling: touch; } .dtabs::-webkit-scrollbar { display: none; }
.dtab { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 14px; white-space: nowrap; }
.dtab.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 600; }
.dfilter { display: flex; gap: 6px; padding: 2px 0; } .dfilter .chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.dgrid { display: grid; gap: 10px; padding: 10px 0 4px; } .dgrid.th { grid-template-columns: repeat(3, 1fr); } .dgrid.cl { grid-template-columns: repeat(4, 1fr); }
.dcell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 6px 8px; background: var(--card); border: 2px solid var(--line); border-radius: 16px; text-align: center; transition: border-color .15s, background-color .15s, transform .12s; }
.dcell.on { border-color: var(--accent); background: var(--soft); } .dcell.sel:not(.on) { border-color: var(--muted); }
.dcell.locked .dthumb { opacity: .6; filter: grayscale(.3); }
.dthumb { width: 100%; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--soft); display: block; }
.dthumb svg { width: 100%; height: 100%; display: block; }
.dname { font-size: 12px; line-height: 1.25; min-height: 30px; }
.dbadge { position: absolute; top: 8px; right: 8px; background: var(--card); border-radius: 999px; padding: 2px 7px; font-size: 11px; display: inline-flex; gap: 3px; align-items: center; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); }
.dbadge.ok { background: var(--accent); color: var(--accent-ink); padding: 3px; }
.dbar { position: sticky; bottom: 0; z-index: 8; display: flex; gap: 10px; align-items: center; justify-content: space-between; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 10px 12px; margin-top: 12px; box-shadow: 0 -4px 16px rgba(0, 0, 0, .1); }
.dinfo { flex: 1; min-width: 0; } .dbtns { display: flex; gap: 8px; flex-shrink: 0; }

.dcolor.locked .dthumb { opacity: .85; filter: none; } .dcolor .dthumb { box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }

/* ====== โทนฝัน: ครีม ม่วงเข้ม ลาเวนเดอร์ไล่ชมพู โคบอลต์ (อ้างอิงมู้ดจาก wishlabs.ai) ใช้กับหน้าแรกและหน้าแต่งตัว ====== */
:root { --dr-paper: #F9F5ED; --dr-plum: #24193B; --dr-indigo: #231968; --dr-violet: #8155C9; --dr-lav: #A699E9; --dr-pink: #F0679B; --dr-blush: #F9D5C3; --dr-cobalt: #4C5DDA; --dr-chip: #ECE7F6; --dr-line: #DDD5EC; --dr-mute: #6B6080; --font-dr: "Prompt", "Noto Sans Thai", system-ui, sans-serif;
  --dr-ring: linear-gradient(135deg, #8155C9 0%, #F0679B 54%, #4C5DDA 100%); }
#onb.dream, #sub.dress { background: var(--dr-paper); color: var(--dr-plum); font-family: var(--font-dr); }
body:has(#onb.dream:not([hidden])), body:has(#sub.dress:not([hidden])) { background: var(--dr-paper); }
#onb.dream .muted, #sub.dress .muted { color: var(--dr-mute); }
#onb.dream h1, #sub.dress .subhead h2 { font-family: var(--font-dr); font-weight: 700; color: var(--dr-plum); letter-spacing: -.2px; }
#onb.dream h1 { font-size: 26px; line-height: 1.3; }
#sub.dress .subhead { background: var(--dr-paper); } #sub.dress .iconbtn { color: var(--dr-plum); }
#sub.dress .subhead .chip { background: var(--dr-chip); color: var(--dr-plum); border: 0; font-weight: 600; }
#sub.dress label.f, #onb.dream label.f { color: var(--dr-plum); font-weight: 600; }
#sub.dress input[type=text], #onb.dream input[type=text] { background: #fff; color: var(--dr-plum); border: 1.5px solid var(--dr-line); border-radius: 16px; box-shadow: none; }

/* ภาพตัวละคร: กรอบไล่สีม่วง ชมพู ฟ้า */
#sub.dress .dprevwrap, #onb.dream .dprevwrap { position: relative; width: 300px; margin: 6px auto 14px; }
.dwin { padding: 5px; background: var(--dr-ring); border-radius: 34px; box-shadow: 0 22px 40px -22px rgba(36, 25, 59, .55); position: relative; }
#sub.dress .dprev, #onb.dream .dprev { height: 232px; width: 100%; border: 0; border-radius: 29px; background: #fff; box-shadow: none; }
#sub.dress .dnext, #onb.dream .dnext { position: absolute; right: 14px; bottom: 14px; z-index: 4; }

/* ปุ่ม แท็บ: แคปซูล */
#sub.dress .btn, #onb.dream .btn { border: 1.5px solid var(--dr-line); border-radius: 999px; background: #fff; color: var(--dr-plum); font-weight: 600; box-shadow: none; transition: transform .1s; }
#sub.dress .btn:active, #onb.dream .btn:active { transform: scale(.96); }
#sub.dress .btn.primary, #onb.dream .btn.primary { background: var(--dr-plum); color: #fff; border-color: transparent; }
#sub.dress .btn.sm.sel { background: var(--dr-plum); color: #fff; border-color: transparent; }
#sub.dress .btn.buy { background: var(--dr-pink); color: #fff; border-color: transparent; } #sub.dress .btn.buy.poor { background: var(--dr-chip); color: var(--dr-mute); }
#sub.dress .dnext, #onb.dream .dnext { min-height: 36px; padding: 6px 13px 6px 15px; gap: 5px; font-size: 14px; box-shadow: 0 8px 16px -8px rgba(36, 25, 59, .75); }
#sub.dress .seg, #onb.dream .seg { display: flex; gap: 4px; background: var(--dr-chip); border: 0; border-radius: 999px; padding: 4px; margin: 4px 0 8px; }
#sub.dress .seg button { flex: 1; border: 0; background: transparent; color: var(--dr-plum); border-radius: 999px; font-weight: 600; min-height: 40px; box-shadow: none; }
#sub.dress .seg button.on { background: var(--dr-plum); color: #fff; }
#sub.dress .dstick, #onb.dream .dstick { background: var(--dr-paper); border-bottom: 0; box-shadow: 0 1px 0 var(--dr-line); padding: 8px 16px; }
#sub.dress .dtab, #onb.dream .dtab { border: 0; border-radius: 999px; background: var(--dr-chip); color: var(--dr-plum); font-weight: 500; box-shadow: none; padding: 8px 16px; margin: 0 6px 0 0; }
#sub.dress .dtab.on, #onb.dream .dtab.on { background: var(--dr-plum); color: #fff; font-weight: 600; }
#sub.dress .dmini, #onb.dream .dmini { border: 0; border-radius: 14px; background: var(--dr-chip); }
#sub.dress .dfilter .chip, #onb.dream .dfilter .chip { background: transparent; color: var(--dr-mute); border: 1.5px solid var(--dr-line); border-radius: 999px; font-weight: 500; box-shadow: none; }
#sub.dress .dfilter .chip.on { background: var(--dr-chip); color: var(--dr-plum); border-color: var(--dr-plum); font-weight: 600; }

/* ของแต่ละชิ้น = การ์ดขาวมุมโค้ง */
#sub.dress .dgrid, #onb.dream .dgrid { gap: 12px; padding: 14px 0 6px; }
#sub.dress .dcell, #onb.dream .dcell { background: #fff; color: var(--dr-plum); border: 2px solid transparent; border-radius: 22px; box-shadow: 0 8px 20px -14px rgba(36, 25, 59, .5); padding: 6px 6px 8px; }
#sub.dress .dcell.on, #onb.dream .dcell.on { border-color: var(--dr-plum); background: #fff; }
#sub.dress .dcell.sel:not(.on), #onb.dream .dcell.sel:not(.on) { border-color: var(--dr-pink); outline: 0; }
#sub.dress .dthumb, #onb.dream .dthumb { border: 0; border-radius: 16px; background: #F1ECFA; }
#sub.dress .dname, #onb.dream .dname { color: var(--dr-plum); font-weight: 500; font-size: 12.5px; }
#sub.dress .dcell.locked .dthumb { opacity: .75; filter: grayscale(.15); }
#sub.dress .dbadge, #onb.dream .dbadge { position: absolute; top: 10px; right: 10px; left: auto; background: var(--dr-pink); color: #fff; border: 0; border-radius: 999px; font: 600 11.5px var(--font-dr); padding: 3px 9px; transform: none; box-shadow: none; gap: 3px; width: auto; height: auto; }
#sub.dress .dbadge.lk, #onb.dream .dbadge.lk { background: var(--dr-plum); color: #fff; padding: 4px 7px; }
#sub.dress .dbadge.ok, #onb.dream .dbadge.ok { top: 10px; left: 10px; right: auto; background: var(--dr-plum); color: #fff; font: 600 11px var(--font-dr); padding: 3px 9px 3px 7px; display: inline-flex; align-items: center; border-radius: 999px; }

/* แถบซื้อ */
#sub.dress .dbar { background: var(--dr-plum); color: #fff; border: 0; border-radius: 26px; box-shadow: 0 22px 36px -18px rgba(36, 25, 59, .8); margin: 14px 2px 10px; bottom: 10px; padding: 12px 14px; position: sticky; }
#sub.dress .dbar::before { display: none; }
#sub.dress .dinfo { color: #fff; }
#sub.dress .dbar .btn { border-color: transparent; } #sub.dress .dbar .btn:not(.buy) { background: #fff; color: var(--dr-plum); }
#sub.dress .dbody .muted { color: var(--dr-mute); }

/* หน้าแรก */
.land { padding: 0 0 40px; color: var(--dr-plum); font-family: var(--font-dr); }
.lhero { position: relative; margin: -14px -16px 0; padding: 22px 22px 150px; text-align: center; color: #fff; border-radius: 0 0 40px 40px; overflow: hidden; background: linear-gradient(180deg, #A699E9 0%, #8E6BDB 30%, #8155C9 52%, #4F2681 78%, #231968 100%); }
.lclouds i { position: absolute; border-radius: 50%; filter: blur(22px); background: radial-gradient(closest-side, rgba(247, 150, 190, .95), rgba(247, 150, 190, 0)); }
.lclouds i:nth-child(1) { width: 270px; height: 120px; left: -70px; top: 190px; } .lclouds i:nth-child(2) { width: 300px; height: 130px; right: -90px; top: 110px; opacity: .75; } .lclouds i:nth-child(3) { width: 360px; height: 150px; left: 30px; top: 340px; }
.lbrand { position: relative; z-index: 2; display: flex; align-items: center; gap: 10px; font: 700 22px var(--font-dr); letter-spacing: .2px; } .lbrand img { border-radius: 11px; }
.lhead { position: relative; z-index: 2; margin: 52px 0 0; font: 700 32px/1.3 var(--font-dr); letter-spacing: -.3px; color: #fff; text-wrap: balance; }
.lsub { position: relative; z-index: 2; margin: 14px auto 0; max-width: 32ch; font-size: 16px; line-height: 1.65; color: rgba(255, 255, 255, .92); }
.lcta { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; padding: 14px 24px; background: var(--dr-plum); color: #fff; border: 0; border-radius: 999px; font: 600 17px var(--font-dr); box-shadow: 0 16px 30px -12px rgba(15, 8, 40, .75); transition: transform .1s; }
.lcta:active { transform: scale(.96); }
.lfine { position: relative; z-index: 2; margin-top: 12px; font-size: 13px; color: rgba(255, 255, 255, .85); }
.lhills { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 150px; z-index: 1; }
.lroom { position: relative; z-index: 3; margin: -98px 0 0; padding: 0 4px; }
.lring { padding: 5px; background: var(--dr-ring); border-radius: 36px; box-shadow: 0 28px 44px -22px rgba(36, 25, 59, .6); }
.lroom-in { border-radius: 31px; overflow: hidden; background: #fff; line-height: 0; } .lroom-in svg { width: 100%; height: auto; display: block; }
.lroom.wave .armR { animation: wavearm .5s ease-in-out 6 alternate; }
.llogin { margin: 22px 4px 0; padding: 12px; border: 1.5px dashed var(--dr-line); border-radius: 18px; text-align: center; } .llogin p { font-size: 13px; color: var(--dr-mute); margin-bottom: 8px; }
.lpaper { padding: 46px 4px 0; text-align: center; }
.lpaper h2, .lblue h2, .lend h2 { font: 700 26px/1.35 var(--font-dr); letter-spacing: -.2px; text-wrap: balance; }
.lp { margin: 10px auto 0; max-width: 34ch; color: var(--dr-mute); font-size: 15px; line-height: 1.65; }
.lplum { margin-top: 24px; padding: 20px 18px 16px; background: var(--dr-plum); color: #fff; border-radius: 30px; text-align: left; box-shadow: 0 24px 40px -26px rgba(36, 25, 59, .85); }
.lin { padding: 13px 15px; border-radius: 16px; background: rgba(255, 255, 255, .1); color: #E7DEFF; font-size: 15px; }
.lplum .lrow { display: flex; justify-content: space-between; padding: 12px 4px 2px; font-size: 15px; } .lplum .lrow b { color: var(--dr-lav); font-weight: 600; }
.ltot { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .18); display: flex; justify-content: space-between; font-weight: 700; font-size: 17px; color: var(--dr-pink); }
.lnote { margin-top: 10px; font-size: 12.5px; color: #B8ACD6; }
.lfeat { list-style: none; margin: 30px 0 0; padding: 0; text-align: left; display: grid; gap: 18px; }
.lfeat li { display: flex; gap: 14px; align-items: flex-start; }
.lchip { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; background: var(--dr-chip); display: grid; place-items: center; color: var(--dr-violet); }
.lfeat b { display: block; font-weight: 600; font-size: 15.5px; } .lfeat span:not(.lchip) { display: block; color: var(--dr-mute); font-size: 14px; line-height: 1.55; }
.lblue { margin-top: 42px; padding: 30px 16px 24px; background: var(--dr-cobalt); color: #fff; border-radius: 34px; text-align: center; }
.lblue h2 { color: #fff; } .lcast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 14px; } .lcast svg { width: 100%; height: auto; }
.lblue p { margin-top: 12px; font-size: 14.5px; line-height: 1.65; color: #DDE2FF; }
.lend { padding: 46px 4px 0; text-align: center; } .lend .lcta { margin-top: 22px; }
.ldisc { margin: 28px auto 0; max-width: 40ch; font-size: 12px; line-height: 1.65; color: var(--dr-mute); }

/* โทนฝันทั้งแอป: ปุ่มทรงแคปซูล การ์ดมนใหญ่ ปุ่มหลักสีม่วงเข้ม */
body { font-family: var(--font-body); }
.card, .letter, .hint { border-radius: 22px; }
.stage { border-radius: 26px; }
.btn { border-radius: 999px; border-width: 1.5px; font-weight: 500; transition: transform .12s; }
.btn:active, .tile:active { transform: scale(.97); }
.btn.primary { background: #24193B; color: #fff; }
:root[data-theme="dark"] .btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.sm { border-radius: 999px; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn.primary { background: var(--accent); color: var(--accent-ink); } }
.tile { border-radius: 20px; }
.chip { border-width: 1.5px; }
.seg { border-radius: 999px; } .seg button { border-radius: 999px; }
.nav { border-top: 0; box-shadow: 0 -1px 0 var(--line); }
.nav .fab { background: linear-gradient(135deg, #8155C9, #F0679B 60%, #4C5DDA); color: #fff; }
input[type=text], input[type=number], input[type=time], textarea, select { border-radius: 16px; border-width: 1.5px; }
#sheet .panel { border-radius: 30px 30px 0 0; } #modal .panel { border-radius: 28px; }
h1, h2, h3 { font-family: var(--font-display); }

/* หน้าแรก: จังหวะเข้าของข้อความ เมฆลอย และเดโมพิมพ์ */
@keyframes lrise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes ldrift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(26px); } }
@keyframes lnudge { 0%, 100% { transform: none; } 50% { transform: translateX(4px); } }
@keyframes lpop { 0% { opacity: 0; transform: translateY(8px) scale(.94); } 70% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
@keyframes lcaret { 50% { opacity: 0; } }
.lbrand, .lhead, .lsub, .lcta, .lfine { animation: lrise .7s cubic-bezier(.2, .8, .25, 1) both; }
.lbrand { animation-delay: .05s; } .lhead { animation-delay: .18s; } .lsub { animation-delay: .34s; } .lcta { animation-delay: .5s; } .lfine { animation-delay: .62s; }
.lclouds i { animation: ldrift 14s ease-in-out infinite; } .lclouds i:nth-child(2) { animation-duration: 18s; animation-direction: reverse; } .lclouds i:nth-child(3) { animation-duration: 22s; }
.lcta svg { animation: lnudge 1.6s ease-in-out infinite; }
.lcta { text-wrap: balance; }
.lsub, .lp, .lblue p, .lnote { text-wrap: balance; }
.lplum .lin.typing::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 2px; vertical-align: -2px; background: currentColor; animation: lcaret .8s steps(1) infinite; }
.lplum:not(.go) .lrow, .lplum:not(.go) .ltot, .lplum:not(.go) .lnote { opacity: 0; }
.lplum.go .lrow, .lplum.go .ltot, .lplum.go .lnote { animation: lpop .5s cubic-bezier(.2, .9, .3, 1.2) both; }
.lplum.go .lrow:nth-of-type(1) { animation-delay: .05s; } .lplum.go .lrow:nth-of-type(2) { animation-delay: .35s; } .lplum.go .ltot { animation-delay: .7s; } .lplum.go .lnote { animation-delay: .95s; }
.lfeat li { opacity: 0; transform: translateY(14px); transition: opacity .5s, transform .5s; } .lfeat.in li { opacity: 1; transform: none; }
.lfeat.in li:nth-child(2) { transition-delay: .08s; } .lfeat.in li:nth-child(3) { transition-delay: .16s; } .lfeat.in li:nth-child(4) { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
  .lbrand, .lhead, .lsub, .lcta, .lfine, .lclouds i, .lcta svg { animation: none; }
  .lplum .lrow, .lplum .ltot, .lplum .lnote { opacity: 1 !important; animation: none !important; } .lfeat li { opacity: 1; transform: none; transition: none; }
}
.hint[hidden] { display: none; }

/* หน้าแรก: โหมดเช้า (เหลือง) / กลางคืน (ม่วง) */
.lbrand { width: 100%; } .ltod { margin-left: auto; position: relative; width: 62px; height: 32px; border-radius: 999px; border: 0; padding: 0; background: rgba(255, 255, 255, .2); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5); display: flex; align-items: center; justify-content: space-between; padding: 0 8px; color: #fff; }
.ltod i { display: grid; place-items: center; position: relative; z-index: 2; font-style: normal; transition: color .25s; }
.ltod b { position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .3s cubic-bezier(.3, 1.3, .5, 1); box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.land[data-tod="day"] .ltod b { transform: none; } .land[data-tod="night"] .ltod b { transform: translateX(30px); }
.land[data-tod="day"] .ltod .ts, .land[data-tod="night"] .ltod .tm { color: #24193B; }
.lhills path { transition: fill .5s; } .lhills .h1 { fill: #6840AF; opacity: .92; } .lhills .h2 { fill: #4F2681; } .lhills .h3 { fill: #231968; }
.lhero { transition: background .5s; }
.land[data-tod="day"] .lhero { background: linear-gradient(180deg, #FFF1B8 0%, #FFD76A 32%, #FFB93D 58%, #F58F2B 82%, #D9701F 100%); color: #3A2410; }
.land[data-tod="day"] .lhead { color: #3A2410; } .land[data-tod="day"] .lsub, .land[data-tod="day"] .lfine { color: rgba(58, 36, 16, .85); }
.land[data-tod="day"] .lbrand { color: #3A2410; } .land[data-tod="day"] .ltod { background: rgba(58, 36, 16, .12); box-shadow: inset 0 0 0 1.5px rgba(58, 36, 16, .3); color: #3A2410; }
.land[data-tod="day"] .lclouds i { background: radial-gradient(closest-side, rgba(255, 255, 255, .95), rgba(255, 255, 255, 0)); }
.land[data-tod="day"] .lhills .h1 { fill: #F19A3A; } .land[data-tod="day"] .lhills .h2 { fill: #E5762B; } .land[data-tod="day"] .lhills .h3 { fill: #C4561F; }
.land[data-tod="day"] .lring { background: linear-gradient(135deg, #FFC857, #F0679B 60%, #F58F2B); }
.land[data-tod="day"] .lblue { background: #F2A71B; color: #3A2410; } .land[data-tod="day"] .lblue h2 { color: #3A2410; } .land[data-tod="day"] .lblue p { color: #5A3A12; }
.land[data-tod="day"] .lchip { background: #FFEFC2; color: #B66A0B; }
#onb.dream .land[data-tod="night"] .lhead { color: #fff; }

/* ลองพิมพ์เอง + วงแหวนรวมมื้อ */
.lsum { display: flex; align-items: center; gap: 16px; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .18); }
.lsum svg { width: 84px; height: 84px; flex: 0 0 84px; transform: rotate(-90deg); } .lsum circle { fill: none; stroke-width: 9; }
.lsum .lbg { stroke: rgba(255, 255, 255, .14); } .lsum .lfg { stroke: var(--dr-pink); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; transition: stroke-dashoffset 1s cubic-bezier(.2, .8, .25, 1); }
.lsum span { font-size: 13px; color: #B8ACD6; } .lsum p { margin: 2px 0 0; font-size: 15px; color: #fff; } .lsum .lnum { font: 700 30px/1.1 var(--font-dr); color: var(--dr-pink); }
.lsum small { display: block; margin-top: 2px; font-size: 12px; line-height: 1.45; color: #B8ACD6; }
.lplum .lrow .unk { color: #B8ACD6; font-weight: 400; font-size: 13px; }
.lplum:not(.go) .lsum, .lplum:not(.go) .lnote { opacity: 0; }
.lplum .lsum, .lplum .lnote { transition: opacity .5s; }
.ltry { margin-top: 16px; padding-top: 14px; border-top: 1px dashed rgba(255, 255, 255, .22); }
.ltry label { display: block; font-size: 13px; color: #D5CBEE; margin-bottom: 8px; }
.ltryrow { display: flex; gap: 8px; }
#onb.dream .ltry input { flex: 1; min-width: 0; background: rgba(255, 255, 255, .1); color: #fff; border: 1.5px solid rgba(255, 255, 255, .28); border-radius: 999px; padding: 11px 16px; font: 16px var(--font-dr); }
#onb.dream .ltry input::placeholder { color: #A89CC6; } #onb.dream .ltry input:focus { outline: 0; border-color: var(--dr-pink); }
.ltrybtn { flex: 0 0 auto; padding: 0 20px; border: 0; border-radius: 999px; background: var(--dr-pink); color: #fff; font: 600 15px var(--font-dr); min-height: 44px; }
.ltrybtn:active, .ltrychips button:active { transform: scale(.95); }
.ltrychips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.ltrychips button { padding: 6px 12px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .25); background: transparent; color: #E7DEFF; font: 13px var(--font-dr); }

/* ติดตั้งเป็นแอป */
#instbar { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); max-width: 456px; margin: 0 auto; z-index: 55; display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-radius: 24px; background: #24193B; color: #fff; box-shadow: 0 18px 36px -12px rgba(20, 10, 50, .6); transform: translateY(140%); opacity: 0; transition: transform .45s cubic-bezier(.2, .9, .3, 1.1), opacity .3s; }
#instbar.on { transform: none; opacity: 1; }
body:has(.nav:not([hidden])) #instbar { bottom: calc(86px + env(safe-area-inset-bottom)); }
#instbar img { border-radius: 12px; flex: 0 0 44px; } #instbar .it { flex: 1; min-width: 0; line-height: 1.35; } #instbar b { display: block; font-size: 14.5px; font-weight: 600; } #instbar .it span { display: block; font-size: 12px; color: #C9BEE6; }
#instbar .ibtn { flex: 0 0 auto; border: 0; border-radius: 999px; background: linear-gradient(135deg, #F0679B, #8155C9); color: #fff; font: 600 14px var(--font-body); padding: 0 16px; min-height: 40px; }
#instbar .ix { flex: 0 0 auto; border: 0; background: transparent; color: #C9BEE6; width: 32px; height: 40px; display: grid; place-items: center; }
.linst { position: relative; z-index: 2; display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .14); color: #fff; font: 500 14px var(--font-dr); animation: lrise .7s .75s both; }
.land[data-tod="day"] .linst { color: #3A2410; border-color: rgba(58, 36, 16, .4); background: rgba(255, 255, 255, .35); }
.insteps { margin: 12px 0 0 20px; line-height: 1.7; padding: 0; } .insteps li { margin-bottom: 6px; }
@media (prefers-reduced-motion: reduce) { #instbar { transition: none; } .linst { animation: none; } }

.linkbtn { border: 0; background: none; color: var(--accent); font: inherit; font-size: 12px; font-weight: 500; padding: 4px 6px; margin-left: 4px; text-decoration: underline; }
body:has(#sub:not([hidden])) #instbar, body:has(#modal:not([hidden])) #instbar { display: none; }

/* กิจกรรมเทศกาล + เป้าหมายสัปดาห์ */
.evcard, .goalcard { display: flex; align-items: center; gap: 12px; margin-top: 12px; } .goalcard.col { flex-direction: column; align-items: stretch; gap: 10px; }
.evcard { background: linear-gradient(135deg, #FFF1B8, #FFD1E0); border-color: transparent; color: #3A2410; } .evcard .xs { color: #6B4A2A; }
.evic { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .7); color: var(--accent); }
.gl { display: flex; align-items: center; gap: 10px; } .glic { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); }
.gbar { height: 8px; border-radius: 999px; background: var(--soft); margin-top: 6px; overflow: hidden; } .gbar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #8155C9, #F0679B); transition: width .6s; } .gbar i.ok { background: var(--green); }
.dcell .dev { position: absolute; left: 10px; bottom: 36px; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: #FFD66B; color: #7A4A00; font-style: normal; box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
.evcard .btn, .goalcard > .btn { white-space: nowrap; flex: 0 0 auto; }
/* จอแคบ (iPhone SE): ปุ่มอารมณ์ย่อให้พอดี */
.mrow .mbtn { flex: 1 1 0; min-width: 0; } .mrow .mbtn svg { max-width: 100%; height: auto; } .mrow .mbtn .xs { white-space: nowrap; font-size: 11px; }

.tin { border: 0; background: var(--soft); color: var(--ink); border-radius: 999px; padding: 2px 8px; font: inherit; font-size: 12px; min-height: 26px; width: auto !important; margin-right: 6px; }
input.tin[type=time] { width: auto !important; min-height: 30px !important; height: 30px; padding: 0 10px !important; font-size: 13px !important; border-radius: 999px !important; border: 0 !important; background: var(--soft) !important; display: inline-block; margin: 0 6px 2px 0; }
#modal .panel { max-height: 92vh; overflow-y: auto; }
/* ตั้งค่าแบบใหม่ */
.setprof { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 26px; color: #fff; background: linear-gradient(135deg, #8155C9 0%, #F0679B 70%, #F58F2B 120%); box-shadow: 0 18px 30px -20px rgba(80, 40, 140, .7); }
.setprof b { display: block; font-size: 20px; font-weight: 700; } .setprof .grow { min-width: 0; } .setprof span { display: block; font-size: 13px; opacity: .92; }
.setprof .btn { background: rgba(255, 255, 255, .22); color: #fff; border-color: rgba(255, 255, 255, .55); flex: 0 0 auto; white-space: nowrap; }
.setav { flex: 0 0 76px; width: 76px; height: 76px; border-radius: 50%; background: #fff8ee; overflow: hidden; border: 3px solid rgba(255, 255, 255, .8); } .setav svg { width: 100%; height: 100%; display: block; }
.setchips { display: flex !important; gap: 6px; margin-top: 6px; } .setchips i { font-style: normal; display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-size: 12px; }
.sgt { margin: 20px 4px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.scard { background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 14px; } .scard.rows { padding: 4px 6px; }
.spal { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; } .spal .pal { background: none; border: 0; padding: 4px 0; display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.spal .pal i { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 3px var(--card), 0 0 0 2px transparent; transition: box-shadow .2s, transform .15s; } .spal .pal.on i { box-shadow: inset 0 0 0 3px var(--card), 0 0 0 3px var(--ink); } .spal .pal.on { color: var(--ink); font-weight: 600; } .spal .pal:active i { transform: scale(.92); }
.smode { display: flex; gap: 4px; margin-top: 12px; background: var(--soft); border-radius: 999px; padding: 4px; } .smode button { flex: 1; border: 0; background: transparent; border-radius: 999px; min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 14px; color: var(--ink); } .smode button.on { background: var(--card); font-weight: 600; box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.srow { display: flex; align-items: center; gap: 12px; width: 100%; background: none; border: 0; padding: 10px 8px; text-align: left; color: var(--ink); border-radius: 18px; } .srow + .srow { border-top: 1px solid var(--line); border-radius: 0; } .srow:active { background: var(--soft); }
.srow b { display: block; font-size: 15px; font-weight: 500; } .srow small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 1px; } .srow .grow { min-width: 0; flex: 1; }
.sic { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--accent); } .sic.amber { background: #FFEFC2; color: #B66A0B; } .sic.pink { background: #FFE0EA; color: #D6336C; } .sic.green { background: var(--green-soft); color: var(--green); } .sic.warn { background: var(--warn-soft); color: var(--warn-ink); } .sic.danger { background: var(--danger-soft); color: var(--danger-ink); }
.schev { color: var(--muted); display: inline-flex; transform: scaleX(-1); }

/* ตัวเลือกธีมแบบการ์ดตัวอย่าง */
.spal { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -14px; padding: 4px 14px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; } .spal::-webkit-scrollbar { display: none; }
.pcard { position: relative; flex: 0 0 132px; scroll-snap-align: start; text-align: left; border: 2px solid var(--line); background: var(--card); border-radius: 22px; padding: 8px 8px 10px; display: flex; flex-direction: column; gap: 2px; transition: transform .18s, border-color .2s, box-shadow .2s; }
.pcard:active { transform: scale(.96); } .pcard.on { border-color: var(--pa); box-shadow: 0 10px 22px -12px var(--pa); }
.pmini { display: flex; flex-direction: column; gap: 7px; height: 118px; padding: 7px; border-radius: 14px; background: var(--pb); overflow: hidden; border: 1px solid rgba(0, 0, 0, .06); }
.pm-top { display: block; height: 10px; width: 55%; border-radius: 6px; background: var(--pi); opacity: .85; }
.pm-mid { display: flex; align-items: center; gap: 7px; background: var(--ps); border-radius: 10px; padding: 6px; } .pm-mid > span { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pm-ring { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; border: 5px solid var(--pa); border-right-color: color-mix(in srgb, var(--pa) 25%, transparent); box-sizing: border-box; }
.pm-line { display: block; height: 5px; border-radius: 3px; background: var(--pi); opacity: .55; } .pm-line.s { width: 60%; opacity: .3; }
.pm-btn { display: block; height: 16px; border-radius: 999px; background: var(--pa); }
.pm-nav { margin-top: auto; display: flex; justify-content: space-around; align-items: center; height: 14px; border-radius: 8px; background: var(--ps); } .pm-nav b { width: 8px; height: 8px; border-radius: 50%; background: var(--pi); opacity: .35; } .pm-nav b.on { background: var(--pa); opacity: 1; }
.pname { font-size: 14px; font-weight: 600; color: var(--ink); margin-top: 6px; } .pdesc { font-size: 11.5px; color: var(--muted); line-height: 1.3; }
.pchk { position: absolute; top: 14px; right: 14px; width: 24px; height: 24px; border-radius: 50%; background: var(--pa); color: #fff; display: grid; place-items: center; box-shadow: 0 2px 6px rgba(0, 0, 0, .25); animation: pchk .3s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes pchk { from { transform: scale(0); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .pchk { animation: none; } }

#onb.dream .dnext.fab { position: fixed; right: 14px; bottom: 16px; z-index: 30; }
#sub.dress .dnext.fab { display: flex; position: sticky; right: auto; left: auto; bottom: 16px; margin: 0 14px 0 auto; width: max-content; z-index: 30; }
body:has(.dbar) #sub.dress .dnext.fab { bottom: 96px; }
.dbar .dbtns:empty { display: none; }

.warnline { color: var(--warn-ink); background: var(--warn-soft); border-radius: 8px; padding: 3px 8px; margin-top: 4px; display: inline-block; }
/* ทุกโหมด */
.hubsearch { display: flex; align-items: center; gap: 6px; background: var(--card); border: 1.5px solid var(--line); border-radius: 999px; padding: 0 16px; } .hubsearch input { border: 0 !important; background: transparent !important; padding-left: 4px; box-shadow: none; } .hubsearch:focus-within { border-color: var(--accent); }
.hq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.hq { position: relative; text-align: left; border: 0; border-radius: 24px; padding: 14px; color: #fff; min-height: 112px; display: flex; flex-direction: column; gap: 2px; overflow: hidden; box-shadow: 0 14px 24px -16px rgba(60, 30, 100, .55); transition: transform .12s; } .hq:active { transform: scale(.97); }
.hq b { font-size: 16px; font-weight: 700; margin-top: 8px; } .hq-s { font-size: 12.5px; opacity: .92; }
.hq-ic { width: 38px; height: 38px; border-radius: 12px; background: rgba(255, 255, 255, .25); display: grid; place-items: center; }
.hq::after { content: ""; position: absolute; right: -22px; top: -22px; width: 92px; height: 92px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.q-food { background: linear-gradient(135deg, #FFB93D, #F58F2B); } .q-work { background: linear-gradient(135deg, #8155C9, #4C5DDA); } .q-water { background: linear-gradient(135deg, #4DB6E8, #4C7BDA); } .q-weigh { background: linear-gradient(135deg, #F0679B, #C94B8E); }
.hq-bar { display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, .3); margin-top: 8px; overflow: hidden; } .hq-bar b { display: block; height: 100%; margin: 0; background: #fff; border-radius: 999px; transition: width .6s; }
.hubchips { display: flex; gap: 6px; overflow-x: auto; margin: 16px -16px 0; padding: 2px 16px 6px; scrollbar-width: none; } .hubchips::-webkit-scrollbar { display: none; }
.hchip { flex: 0 0 auto; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font-size: 14px; white-space: nowrap; } .hchip.on { background: var(--ink); color: var(--bg); border-color: transparent; font-weight: 600; }
.hubsec { display: flex; align-items: center; gap: 8px; margin-top: 18px; } .hubn { font-size: 11px; background: var(--soft); color: var(--muted); border-radius: 999px; padding: 1px 8px; font-weight: 500; }
.hgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.htile { text-align: left; border: 1.5px solid var(--line); background: var(--card); border-radius: 22px; padding: 12px; display: flex; flex-direction: column; gap: 2px; color: var(--ink); min-height: 104px; transition: transform .12s; } .htile:active { transform: scale(.97); } .htile[disabled] { opacity: .5; }
.htile b { font-size: 14.5px; font-weight: 600; margin-top: 6px; } .htile .s { font-size: 12px; color: var(--muted); line-height: 1.35; }
.hic { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; }
.htile.amber .hic { background: #FFEFC2; color: #B66A0B; } .htile.green .hic { background: var(--green-soft); color: var(--green); } .htile.blue .hic { background: #E4E8FB; color: #3A48BD; } .htile.rose .hic { background: #FFE0EA; color: #D6336C; } .htile.violet .hic { background: var(--soft); color: var(--accent); }
:root[data-theme="dark"] .htile.amber .hic { background: #4D4220; color: #F3D77F; } :root[data-theme="dark"] .htile.blue .hic { background: #28325F; color: #B5C0FF; } :root[data-theme="dark"] .htile.rose .hic { background: #55303F; color: #F7B1C0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .htile.amber .hic { background: #4D4220; color: #F3D77F; } :root:not([data-theme="light"]) .htile.blue .hic { background: #28325F; color: #B5C0FF; } :root:not([data-theme="light"]) .htile.rose .hic { background: #55303F; color: #F7B1C0; } }

/* ปุ่ม + เด่นขึ้น */
.nav .fab { width: 70px; height: 70px; margin: -32px auto 0; flex-direction: column; gap: 0; padding: 0; border-width: 5px; box-shadow: 0 12px 26px -8px rgba(129, 85, 201, .75), 0 0 0 7px rgba(129, 85, 201, .13); }
.nav .fab .ic { width: 28px; height: 28px; margin-top: 2px; } .nav .fab .fl { font-size: 11px; font-weight: 700; line-height: 1; margin-top: -1px; letter-spacing: .2px; }
.nav .fab::after { inset: -9px; border-width: 3px; }
@keyframes fabhop { 0%, 78%, 100% { transform: translateY(0); } 84% { transform: translateY(-9px); } 90% { transform: translateY(0); } 94% { transform: translateY(-4px); } }
.nav.attn .fab { animation: fabhop 3.6s ease-in-out 2.4s infinite; }
@media (prefers-reduced-motion: reduce) { .nav.attn .fab { animation: none; } }
/* หน้าแรก: การ์ด 2 ใบ */
.hq-grid.home { margin-top: 12px; } .hq-grid.home .hq { min-height: 124px; }
/* สอนใช้ */
#tut { position: fixed; inset: 0; z-index: 90; pointer-events: none; } #tut .tb { position: fixed; background: rgba(20, 10, 40, .66); pointer-events: auto; display: block; }
#tut.done .tb { display: none; }
#tut .tring { position: fixed; border-radius: 18px; border: 3px solid #fff; box-shadow: 0 0 0 4px rgba(240, 103, 155, .8); animation: tpulse 1.4s ease-in-out infinite; pointer-events: none; }
@keyframes tpulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(240, 103, 155, .85); } 50% { box-shadow: 0 0 0 11px rgba(240, 103, 155, .15); } }
.tbub { position: fixed; left: 14px; right: 14px; max-width: 420px; margin: 0 auto; background: #fff; color: #24193B; border-radius: 22px; padding: 14px 16px; box-shadow: 0 18px 40px -10px rgba(0, 0, 0, .55); pointer-events: auto; font-size: 15px; line-height: 1.5; }
.tbub p { margin: 6px 0 10px; } .tbub b { font-weight: 700; font-size: 16px; display: block; }
.thead { display: flex; align-items: center; justify-content: space-between; } .tdots { display: inline-flex; gap: 5px; } .tdots i { width: 8px; height: 8px; border-radius: 50%; background: #DDD5EC; } .tdots i.on { background: #F0679B; width: 22px; border-radius: 6px; } .tdots i.ok { background: #8155C9; }
.tskip { border: 0; background: none; color: #6B6080; font-size: 13px; padding: 4px 6px; text-decoration: underline; }
.trow { display: flex; gap: 8px; justify-content: flex-end; } .tbub .btn.primary { background: #24193B; color: #fff; }
.tbub .btn { color: #24193B; background: #fff; }
#tutinv { position: fixed; inset: 0; z-index: 85; background: rgba(20, 10, 40, .45); display: flex; align-items: flex-end; padding-bottom: 120px; } #tutinv .tbub { position: relative; left: auto; right: auto; width: calc(100% - 28px); }
@media (prefers-reduced-motion: reduce) { #tut .tring { animation: none; } }
body:has(#tut) #instbar, body:has(#tutinv) #instbar { display: none; }
/* บันทึกวันนี้ */
.dnav { display: flex; align-items: center; justify-content: space-between; text-align: center; margin-bottom: 12px; } .dnav b { font-size: 18px; } .dnav .iconbtn[disabled] { opacity: .3; } .dnav .fwd svg { transform: scaleX(-1); }
.dhero { position: relative; display: flex; align-items: center; gap: 16px; padding: 16px; border-radius: 28px; color: #fff; background: linear-gradient(135deg, #8155C9, #F0679B 75%, #F58F2B 125%); box-shadow: 0 18px 30px -20px rgba(80, 40, 140, .7); }
.tring2 { width: 124px; height: 124px; flex: 0 0 124px; } .tring2 circle { fill: none; stroke-width: 10; } .tring2 .bg { stroke: rgba(255, 255, 255, .25); } .tring2 .fg { stroke: #fff; stroke-linecap: round; transition: stroke-dasharray .8s; } .tring2 .fg.over { stroke: #FFD66B; }
.dh-in { position: absolute; left: 16px; top: 16px; width: 124px; height: 124px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; } .dh-in .muted { color: rgba(255, 255, 255, .85); } .dh-big { font: 700 30px var(--font-display); }
.dh-side { flex: 1; display: grid; gap: 8px; } .dh-side div { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid rgba(255, 255, 255, .22); padding-bottom: 5px; } .dh-side b { font-size: 18px; } .dh-side .xs { color: rgba(255, 255, 255, .85); } .dh-side .warnt { color: #FFD66B; }
.dmac { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; margin-top: 10px; padding: 10px 14px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); font-size: 12.5px; color: var(--ink); } .dmac span { display: inline-flex; align-items: center; gap: 5px; } .dmac i { width: 9px; height: 9px; border-radius: 50%; } .m1 { background: #8155C9; } .m2 { background: #F58F2B; } .m3 { background: #F0679B; } .dmac svg { transform: scaleX(-1); color: var(--muted); }
.dchips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.dper { display: flex; align-items: center; gap: 8px; margin: 18px 4px 8px; } .dper b { font-size: 15px; flex: 1; } .dper-ic { width: 28px; height: 28px; border-radius: 10px; background: #FFEFC2; color: #B66A0B; display: grid; place-items: center; } .dper-ic.w { background: #E4E8FB; color: #3A48BD; }
.dlist { padding: 4px 6px; } .dit { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 8px; color: var(--ink); border-radius: 14px; } .dit + .dit { border-top: 1px solid var(--line); border-radius: 0; } button.dit:active { background: var(--soft); }
.dt { flex: 0 0 46px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; } .dn { flex: 1; min-width: 0; } .dn b { display: block; font-size: 15px; font-weight: 500; } .dn small { display: block; font-size: 12px; color: var(--muted); margin-top: 1px; } .dk { font-weight: 600; font-size: 15px; } .dk.w { color: var(--accent); }
.dempty { text-align: center; padding: 32px 10px 8px; } .dempty-ic { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 10px; display: grid; place-items: center; background: var(--soft); color: var(--accent); }
.dadd { display: flex; gap: 10px; margin-top: 14px; position: sticky; bottom: 12px; } .dadd .btn { flex: 1; box-shadow: 0 10px 20px -12px rgba(36, 25, 59, .6); }

/* IF รุ่นใหม่ */
.iffcard { display: flex; align-items: center; gap: 12px; margin-top: 12px; text-align: left; width: 100%; border: 1.5px solid var(--line); border-radius: 22px; padding: 12px 14px; background: var(--card); color: var(--ink); } .iffcard .grow { min-width: 0; flex: 1; } .iffcard b { display: block; font-size: 15px; } .iffcard > svg { transform: scaleX(-1); color: var(--muted); flex: 0 0 auto; }
.iffcard.open { border-color: var(--green); background: var(--green-soft); } .ifc-ic { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); color: var(--accent); } .iffcard.open .ifc-ic { background: #fff; color: var(--green); }
.iffbar2 { display: block; height: 6px; border-radius: 999px; background: var(--soft); margin-top: 8px; overflow: hidden; } .iffbar2 b { display: block; height: 100%; margin: 0; border-radius: 999px; background: linear-gradient(90deg, #8155C9, #F0679B); transition: width .6s; }
.ifacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; } .ifacts .btn { flex: 1 1 auto; font-size: 14px; white-space: nowrap; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; } .grid3 b { font-size: 17px; }
.iffchart { width: 100%; height: auto; display: block; } .iffchart text { font-size: 9px; fill: var(--muted); } .iffchart .v { font-size: 9px; fill: var(--ink); font-weight: 600; } .iffchart .bok { fill: #8155C9; } .iffchart .bno { fill: #E5534B; opacity: .7; } .iffchart .tl { stroke: var(--green); stroke-width: 1.5; stroke-dasharray: 4 3; } .iffchart .tt { fill: var(--green); font-weight: 600; }
.iffdot.skip { background: var(--soft); color: var(--muted); }
.hint.warnh { background: var(--warn-soft); border-color: transparent; color: var(--warn-ink); }

.reckey { font: 700 17px/1.5 ui-monospace, Menlo, monospace; letter-spacing: .3px; white-space: nowrap; text-align: center; padding: 14px 8px; border-radius: 16px; background: var(--soft); user-select: all; word-break: break-all; }
.linst.lacct { margin-left: 8px; }
/* ชิปเมนู: ไอคอนอาหารตามชนิด ลากเพื่อลบ */
.mchips { gap: 8px; } .mchip { touch-action: pan-y; user-select: none; -webkit-user-select: none; position: relative; transition: transform .22s cubic-bezier(.2, .9, .3, 1.1), background .15s, color .15s, opacity .18s; padding-left: 7px; }
.mchip.dragging { transition: none; z-index: 5; box-shadow: 0 10px 20px -8px rgba(0, 0, 0, .35); } .mchip.gone { opacity: 0; }
.mchip .ci { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; flex: 0 0 26px; background: var(--soft); transition: background .15s, color .15s, transform .2s; } .mchip .cn { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mchip small { color: var(--muted); font-size: 12px; margin-left: 2px; }
.mchip.arm { background: var(--danger-soft); color: var(--danger-ink); border-color: transparent; } .mchip.arm .ci { background: #E5534B; color: #fff; transform: scale(1.12); } .mchip.arm small { color: var(--danger-ink); }
.fc-drink .ci { background: #E4E8FB; color: #3A48BD; } .fc-fruit .ci, .fc-veg .ci { background: var(--green-soft); color: var(--green); } .fc-dessert .ci { background: #FFE0EA; color: #D6336C; } .fc-snack .ci { background: #FFEFC2; color: #B66A0B; } .fc-noodle .ci, .fc-rice .ci { background: #FFEFC2; color: #B66A0B; } .fc-meat .ci { background: #FCE3E0; color: #A33A2D; } .fc-egg .ci, .fc-bread .ci { background: #FFF0C9; color: #7A5A00; } .fc-fast .ci { background: #FFE0D0; color: #C2410C; } .fc-work .ci { background: var(--green-soft); color: var(--green); }
.mchip.arm .ci { background: #E5534B !important; color: #fff !important; }
.dragtip { margin-left: auto; font-weight: 400; }
.toast.undo { display: flex; align-items: center; gap: 14px; pointer-events: auto; } .toast.undo button { border: 0; background: rgba(255, 255, 255, .2); color: inherit; font: inherit; font-weight: 600; padding: 4px 12px; border-radius: 999px; }

/* รุ่นลากไปปุ่ม +: แถวเดียวเลื่อนข้าง ชิปกดค้างแล้วลอยตามนิ้ว */
.mchips { flex-wrap: nowrap !important; overflow-x: auto; margin: 0 -16px; padding: 4px 16px 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; } .mchips::-webkit-scrollbar { display: none; }
.mchip { flex: 0 0 auto; touch-action: auto !important; -webkit-touch-callout: none; transition: opacity .15s, background .15s !important; }
.mchip.ghost { opacity: .25; }
.mchip.lifted { position: fixed; z-index: 200; margin: 0; pointer-events: none; transform-origin: center; box-shadow: 0 14px 26px -8px rgba(0, 0, 0, .45); transition: transform .22s cubic-bezier(.2, .9, .3, 1.1), opacity .2s !important; }
.mchip.lifted.arm { background: var(--danger-soft); color: var(--danger-ink); border-color: transparent; } .mchip.lifted.arm .ci { background: #E5534B !important; color: #fff !important; }
.mchip.lifted:not(.dropping) { transition: none !important; }
body.chip-drag { user-select: none; -webkit-user-select: none; }
.nav .fab.trash { background: linear-gradient(135deg, #E5534B, #C0392B) !important; transform: scale(1.14); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), background .15s; animation: none !important; box-shadow: 0 12px 26px -8px rgba(229, 83, 75, .8), 0 0 0 7px rgba(229, 83, 75, .18); }
.nav .fab.trash::after { border-color: #E5534B; animation: none; opacity: .5; }
.nav .fab.trash.hot { transform: scale(1.34); box-shadow: 0 14px 30px -6px rgba(229, 83, 75, .95), 0 0 0 12px rgba(229, 83, 75, .28); }
@keyframes fabshake { 0%, 100% { rotate: 0deg; } 25% { rotate: -9deg; } 75% { rotate: 9deg; } }
.nav .fab.trash.hot .ic { animation: fabshake .35s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .nav .fab.trash.hot .ic { animation: none; } }

/* ก้อนเกี๊ยว (rig.js) */
.rigstage { cursor: default; }
canvas.rig { display: block; width: 100%; aspect-ratio: 380 / 290; }

/* โปรแกรมออกกำลังกาย (fit.js) */
.fchip { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: 16px; padding: 11px 14px; margin-bottom: 8px; font: inherit; cursor: pointer; }
.fchip b { font-weight: 600; font-size: 15px; } .fchip span { font-size: 12.5px; color: var(--muted); font-weight: 400; }
.fchip.on { border-color: var(--accent); background: var(--soft); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.fchip.sm { display: inline-flex; width: auto; flex: 0 0 auto; flex-direction: row; padding: 7px 14px; border-radius: 999px; margin: 0 4px 6px 0; font-size: 13.5px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; } .fgrid .fchip { margin: 0; min-height: 56px; justify-content: center; }
.frow { display: flex; flex-wrap: wrap; gap: 8px; } .frow .fchip { width: auto; margin: 0; padding: 9px 16px; border-radius: 999px; }
.fprog { display: flex; gap: 4px; } .fprog i { flex: 1; height: 5px; border-radius: 3px; background: var(--line); } .fprog i.on { background: var(--accent); } .fprog i.cur { background: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.fweek { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-top: 10px; } .fweek span { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 12px; background: var(--card); border: 1px solid var(--line); min-height: 52px; font-size: 14px; color: var(--muted); } .fweek em { font-style: normal; font-size: 12px; } .fweek .pl { color: var(--accent); } .fweek .dn { background: var(--green-soft); color: var(--green); border-color: transparent; } .fweek .now { border-color: var(--accent); }
.fana { display: grid; grid-template-columns: 62px 1fr minmax(56px, auto); gap: 8px; align-items: center; font-size: 13px; margin: 6px 0; } .fana i { height: 8px; border-radius: 4px; background: var(--soft); overflow: hidden; display: block; } .fana b { display: block; height: 100%; border-radius: 4px; background: var(--green); } .fana b.low { background: var(--warn, #E08A3C); } .fana b.high { background: var(--accent); } .fana em { font-style: normal; color: var(--muted); text-align: right; font-size: 12px; }
.fcats { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; } .fcats span { font-size: 12px; background: var(--soft); border-radius: 999px; padding: 3px 10px; color: var(--muted); } .fcats b { color: var(--ink); }
.pbit { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--line); } .pbit .grow { flex: 1; min-width: 0; } .pbctl { display: flex; gap: 4px; } .pbctl button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 13px; cursor: pointer; }
.ftag { font-size: 11px; background: var(--soft); border-radius: 999px; padding: 1px 8px; color: var(--muted); font-weight: 500; } .fok { font-size: 12px; background: var(--green-soft); color: var(--green); border-radius: 999px; padding: 2px 10px; }
.fapx { position: absolute; left: 10px; top: 10px; font-size: 11px; background: rgba(36,25,59,.72); color: #fff; border-radius: 999px; padding: 2px 10px; }
.fnorig { height: 190px; display: flex; flex-direction: column; gap: 8px; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; }
.linkb { background: none; border: 0; color: var(--muted); text-decoration: underline; font: inherit; padding: 6px 0; cursor: pointer; }
button.item { background: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; color: inherit; font: inherit; cursor: pointer; }
.fweek span { font-variant-numeric: tabular-nums; }
.row .btn { white-space: nowrap; }

/* สถิติ น้ำหนักที่ยก (lifts.js) */
.fwt { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 6px; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); font-size: 14px; }
.fwt span { grid-column: 1 / -1; font-size: 12px; color: var(--muted); } .fwt.recap { grid-template-columns: auto 1fr auto auto 1fr auto; } .fwt.recap span { grid-column: 1 / -1; }
.fwt:not(.recap) { grid-template-columns: 1fr auto auto auto; } .fwt:not(.recap) span { grid-column: 1; } .fwt:not(.recap) b { text-align: center; min-width: 96px; }
.fwt button { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); font-size: 18px; cursor: pointer; } .fwt b { text-align: center; font-weight: 600; font-size: 14px; }
.ptiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; } .ptile { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 2px; } .ptile b { font-size: 20px; font-variant-numeric: tabular-nums; } .ptile span { font-size: 11px; color: var(--muted); }
.mleg { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; color: var(--muted); margin-top: 6px; } .mleg i { width: 90px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--soft), var(--accent)); }
.fana small { font-size: 10px; opacity: .8; } .fana b.none { background: transparent; }

/* คาร์ดิโอ GPS (gps.js) */
.gstats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 12px; } .gstats div { display: flex; flex-direction: column; gap: 2px; min-width: 0; } .gstats b { font-size: 15px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; } .gstats span { font-size: 11px; color: var(--muted); }

/* ฟื้นตัว (recover.js) */
.rdot { width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto; display: inline-block; }
.row.between { justify-content: space-between; }

/* หน้าเริ่มต้น (สแปลชและหน้าแรกก่อนใช้งาน) เป็นธีมสว่างเสมอ แม้เครื่องตั้งโหมดมืด */
.splash { --bg: #F9F5ED; --soft: #ECE7F6; --ink: #24193B; --muted: #6B6080; --accent: #6B3FC0; --card: #FFFFFF; color-scheme: light; }
.ltod { display: none !important; }
#sub.dress .dnext.top, #onb.dream .dnext.top, .dnext.top { bottom: auto; top: 10px; right: 10px; min-height: 34px; padding: 5px 11px 5px 13px; font-size: 13px; }

/* ---------- ปุ่ม "โปรแกรมออกกำลังกาย": เด่น มีแสงวิ่งผ่าน หัวใจเต้น ลูกศรขยับชวนกด ---------- */
.progcta { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 12px; padding: 13px 16px 13px 13px; border: 0; border-radius: 22px; color: var(--accent-ink); text-align: left; cursor: pointer; overflow: hidden; isolation: isolate;
  background: var(--accent); background: linear-gradient(115deg, var(--accent) 0%, color-mix(in srgb, var(--accent) 62%, #F0679B) 100%); box-shadow: 0 10px 22px -10px var(--accent); animation: pcglow 2.4s ease-in-out infinite; transition: transform .12s; }
.progcta:active { transform: scale(.97); }
.progcta::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .45) 50%, transparent 65%); transform: translateX(-120%); animation: pcshine 3.2s ease-in-out .6s infinite; }
.pc-ic { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .28); position: relative; animation: pcbeat 1.5s ease-in-out infinite; }
.pc-ic::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); animation: pcring 1.5s ease-out infinite; }
.pc-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.pc-t b { font-size: 17px; font-weight: 700; letter-spacing: .1px; } .pc-t small { font-size: 12.5px; opacity: .9; margin-top: 2px; }
.pc-go { flex: none; display: grid; place-items: center; }
.pc-go svg { transform: rotate(180deg); animation: pcnudge 1.2s ease-in-out infinite; }
@keyframes pcshine { 0%, 45% { transform: translateX(-120%); } 85%, 100% { transform: translateX(120%); } }
@keyframes pcglow { 0%, 100% { box-shadow: 0 10px 22px -10px var(--accent); } 50% { box-shadow: 0 12px 30px -6px var(--accent); } }
@keyframes pcbeat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes pcring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }
@keyframes pcnudge { 0%, 100% { transform: rotate(180deg) translateX(0); } 50% { transform: rotate(180deg) translateX(-5px); } }
@media (prefers-reduced-motion: reduce) { .progcta, .progcta::after, .pc-ic, .pc-ic::before, .pc-go svg { animation: none; } }
/* ---------- คลังท่า: ภาพเล็กทางซ้าย และแผนที่กล้ามเนื้อของน้องเกี๊ยว ---------- */
.rt { flex: none; width: 64px; height: 64px; border-radius: 16px; background: #FFF1E3; display: block; }
.rt.ph { display: grid; place-items: center; background: var(--soft); color: var(--accent); }
.mmcard { padding: 12px 12px 10px; margin-bottom: 12px; }
.mmhead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 0 4px 2px; }
svg.mmap { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto; touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; }
.mmseg { margin: 8px auto 0; max-width: 250px; }
.mz { cursor: pointer; outline: none; }
.mz .r { fill: var(--accent); fill-opacity: .2; stroke: transparent; stroke-width: 7px; paint-order: stroke; pointer-events: all; transform-box: fill-box; transform-origin: center; animation: mzidle 3.2s ease-in-out var(--d, 0s) infinite; transition: fill-opacity .2s; }
.mz:focus-visible .r { fill-opacity: .45; }
.mz.on .r { fill-opacity: .82; animation: mzflex 1.1s ease-in-out infinite; filter: drop-shadow(0 0 3px var(--accent)); }
.mbob { animation: mmbob 2.6s ease-in-out infinite; }
.mheart .r { fill: var(--accent); fill-opacity: .16; }
.mheart .hi { fill: var(--accent); fill-opacity: .55; transform-box: fill-box; transform-origin: center; animation: mmbeat 1.3s ease-in-out infinite; pointer-events: none; }
.mheart.on .hi { fill-opacity: 1; }
.mtxt { font: 600 10px var(--font-body); fill: var(--muted); pointer-events: none; }
.mmsel { padding: 4px 0 6px; } .mmsel .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mmsel .chip.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
@keyframes mzidle { 0%, 100% { fill-opacity: .16; } 50% { fill-opacity: .34; } }
@keyframes mzflex { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.09); } }
@keyframes mmbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes mmbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 30% { transform: scale(1); } 45% { transform: scale(1.14); } }
@media (prefers-reduced-motion: reduce) { .mz .r, .mz.on .r, .mbob, .mheart .hi { animation: none; } .mz.on .r { fill-opacity: .82; } }
.mview[hidden] { display: none; }

/* ---------- หน้าโปรแกรม: ทางเข้าหลัก 3 ช่อง ---------- */
.pgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 12px 0 4px; }
.pgrid > * { animation: ptin .5s cubic-bezier(.2, .9, .3, 1) both; } .pgrid > :nth-child(2) { animation-delay: .08s; } .pgrid > :nth-child(3) { animation-delay: .16s; }
.pbig, .hubt { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 22px; text-align: left; color: var(--ink); cursor: pointer; transition: transform .12s; }
.pbig:active, .hubt:active { transform: scale(.97); }
.pbig { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 4px; padding: 14px 14px 12px; background: linear-gradient(135deg, var(--soft), var(--card) 75%); }
.pbig::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, .5) 50%, transparent 60%); transform: translateX(-130%); animation: pcshine 4.2s ease-in-out 1s infinite; pointer-events: none; }
.pb-top { display: flex; align-items: center; justify-content: space-between; font-size: 17px; }
.pb-go { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); } .pb-go svg { transform: rotate(180deg); animation: pcnudge 1.3s ease-in-out infinite; }
.pb-s { font-size: 12.5px; color: var(--muted); }
.pb-th { display: flex; gap: 8px; margin-top: 8px; }
.pb-th .rt { flex: 1; min-width: 0; width: auto; height: auto; aspect-ratio: 1; max-width: 76px; border-radius: 16px; animation: pfloat 2.6s ease-in-out calc(var(--i, 0) * .35s) infinite; }
.hubt { display: flex; flex-direction: column; gap: 3px; padding: 14px; min-height: 132px; }
.hubt b { font-size: 15px; line-height: 1.3; margin-top: 8px; font-weight: 600; } .pt-s { font-size: 12px; opacity: .8; }
.t-stat { background: var(--blue-soft); color: var(--blue-ink); } .t-gps { background: var(--green-soft); color: var(--green); }
.t-stat .pt-s, .t-gps .pt-s { color: inherit; } .t-stat b, .t-gps b { color: var(--ink); }
.pt-ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: flex-end; justify-content: center; gap: 4px; padding-bottom: 11px; background: rgba(255, 255, 255, .55); }
.t-gps .pt-ic { align-items: center; padding: 0; animation: pgbob 1.4s ease-in-out infinite; }
.pt-ic i { width: 6px; border-radius: 3px; background: currentColor; height: 10px; animation: pbar 1.6s ease-in-out infinite; } .pt-ic i:nth-child(2) { animation-delay: .2s; } .pt-ic i:nth-child(3) { animation-delay: .4s; }
.t-gps::after { content: ""; position: absolute; right: -10px; top: 24px; width: 70px; height: 70px; border-radius: 50%; border: 2px dashed currentColor; opacity: .25; animation: pspin 14s linear infinite; }
@keyframes ptin { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes pfloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes pbar { 0%, 100% { height: 8px; } 50% { height: 22px; } }
@keyframes pgbob { 0%, 100% { transform: translateX(-2px); } 50% { transform: translateX(3px); } }
@keyframes pspin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pgrid > *, .pbig::after, .pb-go svg, .pb-th .rt, .pt-ic, .pt-ic i, .t-gps::after { animation: none; } .pt-ic i { height: 16px; } }

.rt.sm { width: 46px; height: 46px; border-radius: 13px; }

/* ช่องรหัสผ่านให้หน้าตาเหมือนช่องกรอกอื่น (เป็นหน้าแรกที่ผู้ใช้ใหม่ทุกคนเจอในด่านสมัครสมาชิก) */
input[type=password], input[type=email] { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; min-height: 44px; }

/* ---------- ป๊อปอัพสมัครสมาชิก: เด้งขึ้นกลางจอ น้องเกี๊ยวลอยและกะพริบ ดาวระยิบ แถบความแข็งแรงรหัสผ่าน ---------- */
#modal:has(.gatep) { animation: gfade .25s ease-out both; backdrop-filter: blur(3px); }
#modal .panel.gatep { position: relative; padding: 20px 18px 18px; transform-origin: 50% 80%; animation: gatein .6s cubic-bezier(.2, 1.35, .4, 1) both; box-shadow: 0 30px 60px -20px rgba(36, 25, 59, .55); }
.gate > :not(.gx) { animation: ptin .45s cubic-bezier(.2, .9, .3, 1) both; }
.gate > :nth-child(3) { animation-delay: .05s; } .gate > :nth-child(4) { animation-delay: .1s; } .gate > :nth-child(5) { animation-delay: .15s; } .gate > :nth-child(n+6) { animation-delay: .2s; }
.gate h2 { text-align: center; font-size: 20px; padding: 0 34px; margin-top: 2px; } .gsub { text-align: center; margin: 4px 0 10px; }
.gx { position: absolute; top: 10px; right: 10px; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); cursor: pointer; z-index: 2; }
.gate .btn.primary { position: relative; overflow: hidden; isolation: isolate; }
.gate .btn.primary::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); transform: translateX(-120%); animation: pcshine 3s ease-in-out .8s infinite; }
.gate input:focus { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 22%, transparent); }
.pwbar { display: block; height: 5px; margin: 7px 2px 0; border-radius: 3px; background: var(--soft); overflow: hidden; }
.pwbar b { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--danger-ink); transition: width .3s, background .3s; }
.pwbar b[data-l="1"] { background: #E8A33D; } .pwbar b[data-l="2"] { background: #8CBF5A; } .pwbar b[data-l="3"] { background: var(--green); }
@keyframes gfade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gatein { 0% { opacity: 0; transform: translateY(60px) scale(.82) rotate(-2.5deg); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #modal:has(.gatep), #modal .panel.gatep, .gate > *, .gate .btn.primary::after { animation: none; } }


/* ปิดไฮไลต์สี่เหลี่ยมสีน้ำเงินของเบราว์เซอร์มือถือตอนแตะ (ไม่ตามขอบมนของการ์ด) ใช้ท่าย่อเล็กน้อยบอกว่ากดโดนแทน */
* { -webkit-tap-highlight-color: transparent; }
.hq, .tile { transition: transform .12s; } .hq:active, .tile:active { transform: scale(.97); }

/* สลับมุมมองตัวอย่างท่า: ด้านข้าง / ด้านหน้า */
.rigstage { position: relative; }
.rigtog { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .78); box-shadow: 0 4px 12px -6px rgba(36, 25, 59, .5); backdrop-filter: blur(4px); }
.rigtog button { border: 0; background: transparent; color: #6B6080; font: 600 12px var(--font-body); padding: 5px 11px; border-radius: 999px; cursor: pointer; transition: background .2s, color .2s; }
.rigtog button.on { background: #6B3FC0; background: var(--accent); color: var(--accent-ink); }

/* ======== ระบบโหมด: หัวหน้าโหมด หน้าแบบแท็บ ช่องโหมดเด่น ======== */
/* หน้าย่อยทุกหน้าไล่ขึ้นมาทีละส่วนตอนเปิด (ไม่เล่นซ้ำตอนกดในหน้า) */
#sub.enter:not(.dress) .inner > :not(.subhead) { animation: ptin .5s cubic-bezier(.2, .9, .3, 1) both; }
#sub.enter:not(.dress) .inner > :nth-child(3) { animation-delay: .04s; } #sub.enter:not(.dress) .inner > :nth-child(4) { animation-delay: .08s; } #sub.enter:not(.dress) .inner > :nth-child(5) { animation-delay: .12s; }
#sub.enter:not(.dress) .inner > :nth-child(6) { animation-delay: .16s; } #sub.enter:not(.dress) .inner > :nth-child(7) { animation-delay: .2s; } #sub.enter:not(.dress) .inner > :nth-child(n+8) { animation-delay: .24s; }
/* หัวหน้าโหมด */
.mhero { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 14px; padding: 16px; margin: 0 0 12px; border-radius: 24px; color: #fff; background-size: 220% 220%; animation: mhflow 9s ease-in-out infinite; box-shadow: 0 14px 26px -16px rgba(36, 25, 59, .55); }
.mhero.amber, .hfeat.amber { background-image: linear-gradient(120deg, #FFB347, #F7882F, #FFB347); } .mhero.green { background-image: linear-gradient(120deg, #5CC48B, #2F9E69, #5CC48B); }
.mhero.blue { background-image: linear-gradient(120deg, #6B8CF0, #4D6FE0, #6B8CF0); } .mhero.rose { background-image: linear-gradient(120deg, #F4709A, #E0547E, #F4709A); } .mhero.violet { background-image: linear-gradient(120deg, #8D6CF0, #6B3FC0, #8D6CF0); }
.mh-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; } .mh-bg i, .hf-bg i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .16); animation: mhfloat 6s ease-in-out infinite; }
.mh-bg i:nth-child(1) { width: 90px; height: 90px; right: -20px; top: -30px; } .mh-bg i:nth-child(2) { width: 46px; height: 46px; right: 70px; bottom: -16px; animation-delay: -2s; } .mh-bg i:nth-child(3) { width: 26px; height: 26px; right: 26px; bottom: 14px; animation-delay: -4s; }
.mh-ic { position: relative; flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .26); animation: mhbob 3s ease-in-out infinite; }
.mh-ic::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .6); animation: pcring 2.4s ease-out infinite; }
.mh-t { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; } .mh-t b { font-size: 18px; font-weight: 700; } .mh-t span { font-size: 12.5px; opacity: .92; margin-top: 2px; }
/* แท็บของหน้าที่รวมหลายโหมด */
.mtabs { margin: 0 0 12px; } .mtabs button { transition: background .2s, transform .12s; min-width: 0; font-size: 14px; padding: 9px 6px; } .mtabs button:active { transform: scale(.95); }
.mtabs button.on { box-shadow: 0 6px 14px -8px rgba(36, 25, 59, .5); color: var(--accent); }
.mbody.swap { animation: mswap .38s cubic-bezier(.2, .9, .3, 1) both; }
.mlock { text-align: center; padding: 26px 18px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ml-ic { width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); animation: mhbob 2.4s ease-in-out infinite; }
/* ช่องโหมดเด่นบนหน้าทุกโหมด */
.hfeat { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 12px; width: 100%; margin: 14px 0 4px; padding: 22px 18px 20px; min-height: 156px; border: 0; border-radius: 30px; color: #fff; text-align: left; cursor: pointer; background-image: linear-gradient(125deg, #7B4FE0, #B14FD8 45%, #F0679B 80%, #FF9A5C); background-size: 220% 220%; animation: mhflow 8s ease-in-out infinite, hfglow 2.6s ease-in-out infinite; box-shadow: 0 20px 36px -16px #7B4FE0; transition: transform .12s; }
.hfeat:active { transform: scale(.98); }
.hfeat::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .38) 50%, transparent 62%); transform: translateX(-130%); animation: pcshine 4s ease-in-out .8s infinite; }
.hf-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hf-bg i:nth-child(1) { width: 120px; height: 120px; right: -30px; top: -40px; } .hf-bg i:nth-child(2) { width: 60px; height: 60px; left: 40%; bottom: -24px; animation-delay: -1.5s; } .hf-bg i:nth-child(3) { width: 30px; height: 30px; left: 8px; top: 12px; animation-delay: -3s; } .hf-bg i:nth-child(4) { width: 20px; height: 20px; right: 120px; top: 22px; animation-delay: -4.5s; }
.hf-tag { position: absolute; top: 12px; left: 16px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .24); font-size: 11.5px; font-weight: 600; letter-spacing: .3px; }
.hf-tag svg { animation: mhspin 3s linear infinite; }
.hf-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding-top: 14px; } .hf-t { font-size: 26px; font-weight: 800; letter-spacing: .2px; line-height: 1.15; } .hf-line { font-size: 13.5px; opacity: .96; line-height: 1.4; }
.hf-cta { margin-top: 10px; align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 8px 15px; border-radius: 999px; background: #fff; color: #6B3FC0; font-weight: 700; font-size: 14px; box-shadow: 0 8px 16px -8px rgba(36, 25, 59, .6); }
.hf-cta svg { transform: rotate(180deg); animation: pcnudge 1.2s ease-in-out infinite; }
.hf-ring { position: relative; flex: none; width: 96px; height: 96px; } .hf-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hf-ring .rb { fill: none; stroke: rgba(255, 255, 255, .28); stroke-width: 7; } .hf-ring .rf { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .85)); animation: hfring 1.3s cubic-bezier(.2, .9, .3, 1) both; }
.hf-ic { position: absolute; inset: 0; display: grid; place-items: center; animation: mhbob 2.6s ease-in-out infinite; }
.htile { position: relative; animation: ptin .45s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * .04s); }
.htile.soon { opacity: .85; background: linear-gradient(110deg, var(--card) 30%, var(--soft) 50%, var(--card) 70%); background-size: 220% 100%; animation: ptin .45s both, soonshim 2.6s linear infinite; }
.soonbadge, .tabsbadge { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--accent); }
.tabsbadge { top: auto; bottom: 10px; }
@keyframes mhflow { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes mhfloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-10px, 8px); } }
@keyframes mhbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes mhspin { to { transform: rotate(360deg); } }
@keyframes hfglow { 0%, 100% { box-shadow: 0 20px 36px -16px #7B4FE0; } 50% { box-shadow: 0 22px 44px -10px #B14FD8; } }
@keyframes hfring { from { stroke-dashoffset: 213.6; } }
@keyframes mswap { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }
@keyframes soonshim { to { background-position: -220% 0; } }
@media (prefers-reduced-motion: reduce) { .mhero, .mh-ic, .mh-ic::before, .mh-bg i, .hf-bg i, .hfeat, .hfeat::after, .hf-ring .rf, .hf-ic, .hf-tag svg, .hf-cta svg, .htile, .htile.soon, .ml-ic, .mbody.swap, #sub.enter:not(.dress) .inner > * { animation: none !important; } }

/* นาฬิกา 24 ชั่วโมงของโหมด IF */
.ifdialcard { display: flex; align-items: center; gap: 14px; padding: 12px 14px; margin: 10px 0; }
.ifdial { flex: none; width: 150px; height: 150px; overflow: visible; }
.ifdial .idt { fill: none; stroke: var(--soft); stroke-width: 16; } .ifdial .ide { fill: none; stroke: var(--green); stroke-width: 16; stroke-linecap: round; transition: stroke-dasharray .6s cubic-bezier(.2, .9, .3, 1), stroke-dashoffset .6s cubic-bezier(.2, .9, .3, 1); animation: ifdraw 1.1s cubic-bezier(.2, .9, .3, 1) both; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--green) 55%, transparent)); }
.ifdial .idk line { stroke: var(--line); stroke-width: 1.4; stroke-linecap: round; } .ifdial .idk line.tb { stroke: var(--muted); stroke-width: 2; }
.ifdial .idl text { font: 600 9px var(--font-body); fill: var(--muted); }
.ifdial .idc { font: 700 17px var(--font-display); fill: var(--ink); } .ifdial .ids { font: 500 10.5px var(--font-body); fill: var(--muted); }
.ifdial .idn { transform-origin: 100px 100px; transition: transform 1s; } .ifdial .idnd { fill: #fff; stroke: var(--accent); stroke-width: 3; } .ifdial .idnr { fill: var(--accent); opacity: .35; transform-box: fill-box; transform-origin: center; animation: ifnow 1.8s ease-out infinite; }
.ifdial.pop .idc, .ifdial.pop .ids { animation: ptin .4s both; }
.ifd-side { display: flex; flex-direction: column; gap: 8px; min-width: 0; } .ifd-side b { font-size: 15px; }
.ifleg { display: flex; align-items: center; gap: 7px; font-size: 13px; } .ifleg i { width: 12px; height: 12px; border-radius: 50%; flex: none; } .ifleg i.g { background: var(--green); } .ifleg i.v { background: var(--soft); border: 1px solid var(--line); }
.iffdot { animation: dotpop .45s cubic-bezier(.2, 1.4, .4, 1) both; animation-delay: calc(var(--i, 0) * .05s); } .iffdot.now { animation: dotpop .45s both, ifnow 2s ease-out .6s infinite; }
.btn.go { position: relative; overflow: hidden; isolation: isolate; } .btn.go::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .35) 50%, transparent 65%); transform: translateX(-120%); animation: pcshine 3s ease-in-out .8s infinite; }
@keyframes ifdraw { from { stroke-dasharray: 0 480; } }
@keyframes ifnow { 0% { transform: scale(.6); opacity: .6; } 100% { transform: scale(2.2); opacity: 0; } }
@keyframes dotpop { from { opacity: 0; transform: scale(.3); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ifdial .ide, .ifdial .idnr, .iffdot, .iffdot.now, .btn.go::after, .ifdial.pop .idc, .ifdial.pop .ids { animation: none !important; } }

/* นิ้วมือชี้ชวนจิ้มบนแผนที่กล้ามเนื้อ */
.mfing { pointer-events: none; }
.mf-hand { fill: #FFE2C4; stroke: #2A1D45; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; transform-box: view-box; animation: mftap 3s ease-in-out 1s infinite; opacity: 0; filter: drop-shadow(0 3px 3px rgba(36, 25, 59, .3)); }
.mf-hand .mf-cuff { fill: var(--accent); }
.mf-rip { fill: none; stroke: var(--accent); stroke-width: 2.4; opacity: 0; transform-box: fill-box; transform-origin: center; animation: mfrip 3s ease-out 1s infinite; } .mf-rip.r2 { animation-delay: 1.25s; }
.mmhint { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 600; animation: mhpulse 1.6s ease-in-out infinite; }
.mmhint i { font-style: normal; display: inline-block; animation: mfwig 1.2s ease-in-out infinite; transform-origin: 50% 90%; }
@keyframes mftap { 0% { opacity: 0; transform: translate(34px, 36px) rotate(14deg); } 18% { opacity: 1; transform: translate(0, 0) rotate(0); } 30% { opacity: 1; transform: translate(0, 4px) scale(.93); } 40% { opacity: 1; transform: translate(0, 0) scale(1); } 62% { opacity: 1; transform: translate(0, 0); } 82%, 100% { opacity: 0; transform: translate(34px, 36px) rotate(14deg); } }
@keyframes mfrip { 0%, 26% { opacity: 0; transform: scale(.5); } 32% { opacity: .85; } 62%, 100% { opacity: 0; transform: scale(4.2); } }
@keyframes mhpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
@keyframes mfwig { 0%, 100% { transform: rotate(-12deg); } 50% { transform: rotate(10deg) translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .mf-hand { animation: none; opacity: 1; } .mf-rip, .mmhint, .mmhint i { animation: none; } }

/* ======== ป้าย IF บนตัวละคร · แถบ IF ในชีท + · หน้าบันทึกกิน/ออกกำลังกายแบบใหม่ ======== */
.tabsbadge { top: 10px; bottom: auto; }
/* ป้าย IF ขวาบนของตัวละคร (ใต้ปุ่มสลับกลางวัน/กลางคืน) */
.ifbadge { position: absolute; top: 6px; right: 80px; z-index: 4; width: 52px; height: 52px; border-radius: 50%; border: 0; padding: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; background: rgba(255, 255, 255, .94); box-shadow: 0 8px 18px -8px rgba(36, 25, 59, .6); animation: ifpop .55s cubic-bezier(.2, 1.4, .4, 1) both; }
:root[data-theme="dark"] .ifbadge { background: var(--card); }
.ifbadge svg { position: absolute; inset: 1px; width: 50px; height: 50px; transform: rotate(-90deg); }
.ibb { fill: none; stroke: rgba(107, 63, 192, .18); stroke-width: 4; } .ibf { fill: none; stroke: #8D6CF0; stroke-width: 4; stroke-linecap: round; animation: hfring 1.2s cubic-bezier(.2, .9, .3, 1) both; }
.ifbadge.eat .ibf { stroke: var(--green); } .ifbadge.rest .ibf { stroke: #B6A9CF; }
.ifbadge b { position: relative; font: 800 15px/1 var(--font-display); letter-spacing: .3px; margin-top: 2px; }
.ifbadge i { position: relative; font-style: normal; font-size: 9px; font-weight: 700; line-height: 1.2; color: #8D6CF0; } .ifbadge.eat i { color: var(--green); } .ifbadge.rest i { color: #9C90B5; }
.ifbadge.fast { animation: ifpop .55s cubic-bezier(.2, 1.4, .4, 1) both, ifbreath 2.6s ease-in-out .7s infinite; }
/* แถบ IF ในชีท "เพิ่มอะไรดี" */
.ifstrip { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 12px; padding: 12px 14px; border: 0; border-radius: 22px; color: #fff; text-align: left; cursor: pointer; background-image: linear-gradient(120deg, #7B4FE0, #B14FD8, #F0679B, #B14FD8, #7B4FE0); background-size: 260% 100%; animation: mhflow 8s ease-in-out infinite; box-shadow: 0 14px 26px -14px #7B4FE0; transition: transform .12s; }
.ifstrip:active { transform: scale(.97); }
.ifstrip::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, .35) 50%, transparent 62%); transform: translateX(-130%); animation: pcshine 3.6s ease-in-out .6s infinite; }
.ifs-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; } .ifs-bg i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .15); animation: mhfloat 6s ease-in-out infinite; }
.ifs-bg i:nth-child(1) { width: 70px; height: 70px; right: -14px; top: -26px; } .ifs-bg i:nth-child(2) { width: 34px; height: 34px; right: 60px; bottom: -12px; animation-delay: -2s; } .ifs-bg i:nth-child(3) { width: 18px; height: 18px; left: 40%; top: 8px; animation-delay: -4s; }
.ifs-ic { position: relative; flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .2); animation: mhbob 2.8s ease-in-out infinite; }
.ifs-ic svg { position: absolute; inset: 0; width: 48px; height: 48px; transform: rotate(-90deg); } .ifs-ic .ibb { stroke: rgba(255, 255, 255, .3); } .ifs-ic .ibf { stroke: #fff; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .8)); }
.ifs-ic b { position: relative; font: 800 14px var(--font-display); }
.ifs-t { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.3; } .ifs-t b { font-size: 16px; font-weight: 700; } .ifs-t span { font-size: 12.5px; opacity: .94; }
.ifs-go { flex: none; display: grid; place-items: center; } .ifs-go svg { transform: rotate(180deg); animation: pcnudge 1.2s ease-in-out infinite; }
/* หน้าบันทึกอาหาร/ออกกำลังกาย */
.mh-t .mh-bar { display: block; height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .3); margin-top: 9px; overflow: hidden; }
.mh-bar b { display: block; height: 100%; border-radius: inherit; background: #fff; box-shadow: 0 0 8px rgba(255, 255, 255, .85); animation: mbar 1.1s cubic-bezier(.2, .9, .3, 1) both; }
.composer { background: var(--card); border: 1.5px solid var(--line); border-radius: 26px; padding: 14px; box-shadow: 0 16px 30px -24px rgba(36, 25, 59, .55); transition: border-color .2s, box-shadow .2s; }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent), 0 16px 30px -24px rgba(36, 25, 59, .55); }
.composer textarea { border: 0; background: var(--soft); border-radius: 18px; min-height: 92px; }
.composer .row .btn { border-radius: 999px; min-height: 42px; }
.lgex { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.lgx { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: 999px; border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--card)); color: var(--accent); font-size: 13px; cursor: pointer; animation: ptin .4s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * .06s + .15s); transition: transform .12s; }
.lgx:active { transform: scale(.94); } .lgx svg { animation: mfwig 2.2s ease-in-out infinite; transform-origin: 50% 80%; }
.lgempty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 8px; text-align: center; color: var(--muted); font-size: 13px; }
.lge-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); animation: mhbob 2.6s ease-in-out infinite; } .lgempty b { color: var(--ink); margin-top: 8px; font-size: 15px; }
.lgtotal { padding: 12px 16px; border-radius: 18px; background: var(--soft); } .lgtotal b { color: var(--accent); animation: ptin .35s both; }
.composer ~ .card .item:last-child { animation: itempop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes ifpop { from { opacity: 0; transform: scale(.3) rotate(-30deg); } to { opacity: 1; transform: none; } }
@keyframes ifbreath { 0%, 100% { box-shadow: 0 8px 18px -8px rgba(36, 25, 59, .6), 0 0 0 0 rgba(141, 108, 240, .5); } 50% { box-shadow: 0 8px 18px -8px rgba(36, 25, 59, .6), 0 0 0 8px rgba(141, 108, 240, 0); } }
@keyframes mbar { from { width: 0 !important; } }
@keyframes itempop { from { opacity: 0; transform: translateY(-8px) scale(.96); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ifbadge, .ifbadge.fast, .ibf, .ifstrip, .ifstrip::after, .ifs-bg i, .ifs-ic, .ifs-go svg, .mh-bar b, .lgx, .lgx svg, .lge-ic, .lgtotal b, .composer ~ .card .item:last-child { animation: none !important; } }

/* แถวปุ่มล่างของช่องพิมพ์: ตีความ (ซ้าย) · ทางลัด (ขวา กดแล้วเด้งหน้าต่างให้เลือก) */
.lgbar { margin-top: 12px; gap: 10px; } .lgbar .btn { min-height: 48px; border-radius: 999px; justify-content: center; } .lgbar .btn.primary { flex: 1.5; } .lgbar .lgaid { flex: 1; }
.lgaid { background: color-mix(in srgb, var(--accent) 10%, var(--card)); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); color: var(--accent); font-weight: 600; }
.lgaid svg { animation: lgplus 3s ease-in-out infinite; } @keyframes lgplus { 0%, 70%, 100% { transform: rotate(0); } 85% { transform: rotate(90deg) scale(1.15); } }
/* หน้าต่างทางลัด */
.aid { max-height: 76vh; overflow-y: auto; padding-bottom: 4px; }
.aidh { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; } .gx2 { width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--muted); cursor: pointer; }
.aids { font-weight: 600; font-size: 13px; color: var(--muted); margin: 16px 2px 6px; }
.aidx .sec { margin-top: 14px !important; }
@media (prefers-reduced-motion: reduce) { .lgaid svg, .lgm { animation: none !important; transition: none !important; } }

/* เมนูวงโค้งล้อมรอบปุ่ม "ทางลัด": ยุบเก็บหลังปุ่ม กดแล้วกระจายออกมา ลากนิ้วไปปล่อยบนตัวเลือกได้ */
.lgaidwrap { position: relative; flex: 1; display: flex; } .lgaidwrap .lgaid { flex: 1; touch-action: none; user-select: none; -webkit-user-select: none; transition: background .2s, color .2s, transform .15s; }
.lgaid.on { background: var(--accent); color: var(--accent-ink); border-color: transparent; } .lgaid.on svg { animation: none; transform: rotate(45deg); transition: transform .3s cubic-bezier(.2, 1.4, .4, 1); }
.lgmenu { position: absolute; left: 50%; top: 50%; width: 0; height: 0; z-index: 30; }
.lgm { position: absolute; width: 46px; height: 46px; margin: -23px 0 0 -23px; padding: 0; border-radius: 50%; display: grid; place-items: center; cursor: pointer; border: 1.5px solid color-mix(in srgb, var(--accent) 40%, var(--line)); background: var(--card); color: var(--accent); box-shadow: 0 10px 20px -8px rgba(36, 25, 59, .55);
  opacity: 0; pointer-events: none; transform: translate(0, 0) scale(.3); transition: transform .38s cubic-bezier(.2, 1.4, .4, 1) calc(var(--i, 0) * .035s), opacity .18s calc(var(--i, 0) * .035s), background .15s, color .15s; touch-action: none; }
.lgmenu.open .lgm { opacity: 1; pointer-events: auto; transform: translate(var(--x), var(--y)) scale(1); }
.lgm em { position: absolute; top: calc(100% + 3px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-style: normal; font-size: 10.5px; font-weight: 600; color: var(--ink); background: var(--card); padding: 0 7px; border-radius: 999px; box-shadow: 0 2px 6px -2px rgba(36, 25, 59, .4); }
.lgmenu.open .lgm.hl, .lgmenu.open .lgm:active { transform: translate(var(--x), var(--y)) scale(1.28); background: var(--accent); color: var(--accent-ink); z-index: 2; }

/* ---- เมนูวงโค้งแบบเรียบร้อย: ส่วนโค้งเดียว ป้ายชื่ออยู่นอกวง ฉากหลังหรี่ให้ชัดว่าเป็นอีกชั้น ---- */
.lgm { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.lgm em { top: 50%; left: 50%; transform: translate(calc(-50% + var(--ex, 0px)), calc(-50% + var(--ey, 0px))); font-size: 11px; opacity: 0; pointer-events: none; transition: opacity .2s .18s; }
.lgmenu.open .lgm em { opacity: 1; }
.lgmenu .lgscrim { position: fixed; inset: 0; z-index: -1; width: 100%; height: 100%; border: 0; padding: 0; background: rgba(36, 25, 59, .5); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .25s; cursor: default; }
.lgmenu.open .lgscrim { opacity: 1; pointer-events: auto; }
.lgaidwrap .lgaid { position: relative; z-index: 31; }
/* เวลา + วัน อยู่แถวเดียวกัน วันเป็นปุ่มสลับที่มีแถบเลื่อน */
.lgdt { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; } .lgdt.one { grid-template-columns: 1fr; } .lgdt-c { min-width: 0; } .lgdt-c label.f { margin-top: 12px; }
.lgdt-c input[type=time] { width: 100%; min-height: 46px; border-radius: 16px; font-weight: 600; }
.whenseg { position: relative; height: 46px; padding: 3px; border-radius: 16px; }
.whenseg button { position: relative; z-index: 1; min-height: 40px; background: transparent !important; box-shadow: none !important; font-weight: 600; color: var(--muted); border-radius: 13px; transition: color .2s; } .whenseg button.on { color: var(--accent); }
.whenseg .wsi { position: absolute; top: 3px; left: 3px; width: calc(50% - 3px); height: calc(100% - 6px); border-radius: 13px; background: var(--card); box-shadow: 0 6px 14px -8px rgba(36, 25, 59, .55); transition: transform .38s cubic-bezier(.2, 1.2, .4, 1); }
/* แถวรายการ: ไอคอนอาหาร / ภาพท่าออกกำลังกาย */
.lgav { flex: none; width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; background: var(--soft); color: var(--accent); animation: ptin .35s both; }
.lgrow { gap: 12px; }
/* ตัวอย่างผลหลังบันทึก / เปรียบเทียบสนุกๆ */
.lgproj { margin-top: 8px; padding: 10px 14px; border-radius: 16px; border: 1px dashed var(--line); background: var(--card); }
.lgbar2 { display: block; height: 8px; border-radius: 999px; background: var(--soft); margin-top: 7px; overflow: hidden; } .lgbar2 b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #8BCB6B); animation: mbar 1s cubic-bezier(.2, .9, .3, 1) both; }
.lgproj.over .lgbar2 b { background: linear-gradient(90deg, #F4A340, #E0547E); }
.lgfun { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 10px 14px; border-radius: 16px; background: var(--warn-soft); color: var(--warn-ink); font-size: 13px; } .lgfun svg { flex: none; animation: mfwig 2.2s ease-in-out infinite; transform-origin: 50% 80%; }
.lgbar .btn.primary.ready { animation: lgready 1.8s ease-in-out infinite; }
.lgsave svg { margin-right: 2px; }
@keyframes lgready { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ink) 38%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .lgav, .lgbar2 b, .lgfun svg, .lgbar .btn.primary.ready, .whenseg .wsi { animation: none !important; transition: none !important; } }

/* หน้าเป้าหมายสัปดาห์แบบใหม่ */
.gov { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 12px; background: linear-gradient(135deg, var(--soft), var(--card) 70%); }
.gov-ring { position: relative; flex: none; width: 76px; height: 76px; } .gov-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gov-ring .rb { fill: none; stroke: var(--line); stroke-width: 7; } .gov-ring .rf { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--accent) 50%, transparent)); animation: hfring 1.2s cubic-bezier(.2, .9, .3, 1) both; }
.gov-ring b { position: absolute; inset: 0; display: grid; place-items: center; font: 800 18px var(--font-display); }
.gov-t { min-width: 0; display: flex; flex-direction: column; gap: 3px; } .gov-t b { font-size: 16px; }
.gcoin { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; margin-top: 4px; padding: 3px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-ink); font-size: 12px; font-weight: 600; } .gcoin svg { animation: mhbob 2s ease-in-out infinite; }
.gpgrid { display: grid; gap: 12px; }
.gpick { position: relative; padding: 14px; border-radius: 24px; border: 1.5px solid var(--line); transition: border-color .25s, box-shadow .25s, opacity .25s; animation: ptin .45s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * .06s); }
.gpick.on { border-color: var(--accent); box-shadow: 0 14px 26px -18px var(--accent); } .gpick.ok { border-color: var(--green); box-shadow: 0 14px 26px -18px var(--green); background: linear-gradient(135deg, var(--green-soft), var(--card) 65%); }
.gp-h { display: flex; align-items: center; gap: 12px; } .gp-h .grow { display: flex; flex-direction: column; min-width: 0; } .gp-h b { font-size: 16px; }
.glic.big { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 16px; transition: transform .3s cubic-bezier(.2, 1.4, .4, 1); } .gpick.on .glic.big { background: var(--accent); color: var(--accent-ink); animation: mhbob 2.8s ease-in-out infinite; } .gpick.ok .glic.big { background: var(--green); color: #fff; animation: none; }
.gp-badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 11.5px; font-weight: 600; animation: ifpop .5s cubic-bezier(.2, 1.4, .4, 1) both; } .gpick.ok .gp-badge { background: var(--green); color: #fff; }
.gp-prog { margin-top: 12px; } .gp-prog .gbar { height: 10px; margin-top: 5px; } .gp-prog .gbar i { animation: mbar 1s cubic-bezier(.2, .9, .3, 1) both; }
.gp-lv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.gpl { position: relative; display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 10px 4px 8px; border-radius: 18px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; transition: transform .12s, background .2s, border-color .2s, color .2s; } .gpl:active { transform: scale(.95); }
.gpl b { font-size: 14px; } .gpl small { font-size: 11px; color: var(--muted); } .gpl i { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--warn-ink); background: var(--warn-soft); padding: 1px 8px; border-radius: 999px; }
.gpl.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); animation: gpop .4s cubic-bezier(.2, 1.4, .4, 1) both; box-shadow: 0 10px 18px -10px var(--accent); } .gpl.on small { color: inherit; opacity: .85; }
.gpick.ok .gpl.on { background: var(--green); border-color: var(--green); }
.gpick.full:not(.on) { opacity: .6; } .gpick.full:not(.on) .gpl { border-style: dashed; }
.gp-drop { display: block; margin: 8px auto 0; }
@keyframes gpop { 0% { transform: scale(.85); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .gov-ring .rf, .gcoin svg, .gpick, .gpick.on .glic.big, .gp-badge, .gp-prog .gbar i, .gpl.on { animation: none !important; } }

/* ======== ยกระดับหน้าที่ยังโล่ง/เก่า: สถานะว่าง น้ำ-นอน สุ่มเมนู แผนมื้อ โปรแกรมสำเร็จรูป ======== */
#sub .card { box-shadow: 0 12px 26px -22px rgba(36, 25, 59, .5); }
#sub .sec::before { content: ""; display: inline-block; width: 4px; height: 14px; margin-right: 8px; border-radius: 2px; background: var(--accent); vertical-align: -2px; }
input[type=checkbox], input[type=radio] { accent-color: var(--accent); }
input[type=date] { width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 11px 14px; min-height: 44px; }
.item:active { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.empty2 { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 12px; text-align: center; color: var(--muted); font-size: 13px; width: 100%; }
.e2-ic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); animation: mhbob 2.6s ease-in-out infinite; } .empty2 b { color: var(--ink); margin-top: 8px; font-size: 15px; }
/* น้ำ: แก้วใหญ่มีคลื่น + แก้วเล็กกดบันทึก */
.watank { display: flex; align-items: center; gap: 16px; padding: 16px; }
.wt-glass { position: relative; flex: none; width: 94px; height: 124px; border-radius: 14px 14px 30px 30px; border: 3px solid var(--blue-ink); overflow: hidden; background: color-mix(in srgb, var(--blue-soft) 50%, var(--card)); }
.wt-fill { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #7CC8F2, #4D93D1); transition: height .8s cubic-bezier(.2, .9, .3, 1); animation: wtrise 1s cubic-bezier(.2, .9, .3, 1) both; }
.wt-fill::before { content: ""; position: absolute; left: 0; top: -10px; width: calc(100% + 48px); height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 12'%3E%3Cpath d='M0 6 Q12 0 24 6 T48 6 V12 H0Z' fill='%237CC8F2'/%3E%3C/svg%3E") repeat-x; background-size: 48px 12px; animation: wtwave 2.4s linear infinite; }
.wt-fill[style*="height:0%"] { display: none; }
.wt-n { position: absolute; inset: 0; display: grid; place-items: center; font: 800 30px var(--font-display); color: var(--ink); text-shadow: 0 0 8px rgba(255, 255, 255, .9); } .wt-n small { font-size: 13px; font-weight: 600; margin-left: 1px; align-self: end; margin-bottom: 38px; }
.wt-t { display: flex; flex-direction: column; gap: 5px; min-width: 0; } .wt-t > b { font-size: 16px; }
.wglasses { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 6px; }
.wglasses .glass { width: 33px; height: 42px; transition: transform .15s; } .wglasses .glass:active { transform: scale(.88); } .glass.on::after { animation: glassfill .55s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 1) * .04s); }
.sleepcard { margin-top: 12px; padding: 14px; } .sl-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .sl-h .grow { display: flex; flex-direction: column; }
.sl-ic { flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-ink); animation: mhbob 3s ease-in-out infinite; }
.sl-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.slb { display: flex; flex-direction: column; align-items: center; padding: 8px 0 6px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; transition: transform .12s, background .2s; } .slb:active { transform: scale(.92); } .slb b { font-size: 16px; } .slb small { font-size: 10px; color: var(--muted); }
.slb.on { background: var(--blue-ink); border-color: transparent; color: #fff; animation: gpop .4s cubic-bezier(.2, 1.4, .4, 1) both; } .slb.on small { color: inherit; opacity: .85; }
/* สุ่มเมนู */
.pickcard { text-align: center; margin-top: 14px; padding: 26px 16px; background: linear-gradient(160deg, var(--soft), var(--card) 70%); }
.pk-ic { width: 78px; height: 78px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 10px; background: var(--card); color: var(--accent); box-shadow: 0 14px 24px -14px var(--accent); animation: mhbob 2.6s ease-in-out infinite; }
.pk-n { font-size: 26px; font-weight: 700; } .pk-k { display: inline-block; margin-top: 8px; padding: 3px 12px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-ink); font-weight: 600; font-size: 13px; }
[data-act=pkre] svg { transition: transform .5s cubic-bezier(.2, 1.2, .4, 1); } [data-act=pkre]:active svg { transform: rotate(360deg) scale(1.2); }
/* แผนมื้อสัปดาห์ */
.plday { padding: 14px; animation: ptin .4s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * .05s); }
.pl-dn { display: flex; align-items: center; gap: 8px; font-weight: 700; } .pl-dn i { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-style: normal; font-size: 13px; }
.pl-k { padding: 2px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-ink); font-size: 12px; font-weight: 600; }
.pl-meals { display: grid; gap: 8px; margin-top: 10px; } .pl-m { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; background: var(--soft); } .pl-m .grow { display: flex; flex-direction: column; min-width: 0; } .pl-m small { font-size: 11px; color: var(--muted); }
.pl-mi { flex: none; width: 30px; height: 30px; border-radius: 10px; background: var(--card); color: var(--accent); display: grid; place-items: center; } .chip.shop svg { color: var(--green); }
/* โปรแกรมออกกำลังกาย: การ์ดสำเร็จรูป */
.fd-desc { color: var(--muted); font-size: 13px; margin: 0 0 10px; }
.fdhero { position: relative; overflow: hidden; isolation: isolate; border-radius: 24px; padding: 18px 16px; color: #fff; background-image: linear-gradient(125deg, #6B3FC0, #8D6CF0 50%, #4D6FE0); background-size: 220% 220%; animation: mhflow 9s ease-in-out infinite; box-shadow: 0 14px 26px -16px #6B3FC0; }
.fd-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; } .fd-bg i { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .15); animation: mhfloat 6s ease-in-out infinite; } .fd-bg i:nth-child(1) { width: 90px; height: 90px; right: -18px; top: -30px; } .fd-bg i:nth-child(2) { width: 40px; height: 40px; left: 30%; bottom: -14px; animation-delay: -3s; }
.fd-s { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; } .fd-s span { display: flex; flex-direction: column; font-size: 12px; opacity: .96; } .fd-s b { font: 800 28px/1.1 var(--font-display); animation: ptin .5s both; } .fd-s span:nth-child(2) b { animation-delay: .08s; } .fd-s span:nth-child(3) b { animation-delay: .16s; }
.pcgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; text-align: left; padding: 12px; min-height: 150px; border-radius: 22px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; overflow: hidden; animation: ptin .45s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * .04s); transition: transform .12s, box-shadow .2s; } .pcard:active { transform: scale(.97); }
.pc-i { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 6px; }
.pcard.amber .pc-i { background: #FFEFC2; color: #B66A0B; } .pcard.green .pc-i { background: var(--green-soft); color: var(--green); } .pcard.blue .pc-i { background: #E4E8FB; color: #3A48BD; } .pcard.rose .pc-i { background: #FFE0EA; color: #D6336C; } .pcard.violet .pc-i { background: var(--soft); color: var(--accent); }
:root[data-theme="dark"] .pcard.amber .pc-i { background: #4D4220; color: #F3D77F; } :root[data-theme="dark"] .pcard.blue .pc-i { background: #28325F; color: #B5C0FF; } :root[data-theme="dark"] .pcard.rose .pc-i { background: #55303F; color: #F7B1C0; }
.pcard b { font-size: 14.5px; line-height: 1.3; } .pc-d { font-size: 12px; color: var(--muted); line-height: 1.35; }
.pc-m { display: flex; flex-wrap: wrap; gap: 4px; margin-top: auto; padding-top: 8px; } .pc-m i { font-style: normal; font-size: 10.5px; padding: 2px 8px; border-radius: 999px; background: var(--soft); color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.pc-ok { position: absolute; top: 10px; right: 10px; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--green-soft); color: var(--green); display: inline-flex; gap: 3px; align-items: center; }
.pcact { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; } .pcact .btn { justify-content: center; }
/* หน้าฟื้นตัว: เคล็ดลับเป็นข้อๆ · วิเคราะห์แผน · ตั้งค่าโปรแกรม */
.tips { padding: 6px 14px; } .tip { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; animation: ptin .4s cubic-bezier(.2, .9, .3, 1) both; animation-delay: calc(var(--i, 0) * .05s); } .tip + .tip { border-top: 1px solid var(--line); }
.tip span { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--green-soft); color: var(--green); display: grid; place-items: center; margin-top: 1px; } .tip p { margin: 0; font-size: 13.5px; }
.rdot { animation: rdpulse 2s ease-in-out infinite; } @keyframes rdpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.fana i b { animation: mbar 1s cubic-bezier(.2, .9, .3, 1) both; } .fchip { transition: transform .12s, border-color .2s, background .2s; } .fchip:active { transform: scale(.97); } .fchip.on { animation: gpop .35s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes wtrise { from { height: 0 !important; } } @keyframes wtwave { to { transform: translateX(-48px); } } @keyframes glassfill { from { height: 0; } }
@media (prefers-reduced-motion: reduce) { .e2-ic, .wt-fill, .wt-fill::before, .glass.on::after, .sl-ic, .slb.on, .pk-ic, .plday, .fdhero, .fd-bg i, .fd-s b, .pcard, .tip, .rdot, .fana i b, .fchip.on { animation: none !important; } }

/* ===== uplift 3: ทุกหน้าที่เหลือ ===== */
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 12px; }
.pills .pill { flex: 1 1 0; min-width: 72px; padding: 11px 8px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 700 14px var(--font-display); transition: transform .15s, background .2s, border-color .2s, box-shadow .2s; }
.pills .pill:active { transform: scale(.95); }
.pills .pill.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 18px -10px var(--accent); animation: gpop .35s; }
.ifqr { display: flex; gap: 10px; align-items: flex-start; margin-top: 8px; padding: 10px 12px; border-radius: 14px; background: var(--soft); }
.ifqr input { width: 22px; height: 22px; margin-top: 1px; flex: none; accent-color: var(--accent); }
.ifqr.ok { background: var(--warn-soft); margin-top: 12px; }
.ifeff { display: flex; flex-direction: column; gap: 10px; }
.ife { display: flex; gap: 12px; align-items: center; animation: ptin .4s both; }
.ife b { display: block; font-size: 14px; } .ife span:not(.ife-i) { font-size: 12.5px; color: var(--muted); }
.ife-i { flex: none; width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--soft); }
.ife-i.rose { background: #fde4ea; color: #d6356a; } .ife-i.amber { background: #fff0cf; color: #b87400; } .ife-i.green { background: #dcf5e6; color: #1f9a58; } .ife-i.blue { background: #e0ebff; color: #3a68d8; }
.mgrid { display: grid; gap: 10px; }
.mcard { padding: 12px 14px; animation: ptin .45s both; animation-delay: calc(var(--i, 0) * 50ms); }
.mc-h { display: flex; gap: 10px; align-items: center; }
.mc-h b { display: block; font-size: 14.5px; } .mc-h .grow { min-width: 0; }
.mc-ic { flex: none; width: 38px; height: 38px; border-radius: 13px; display: grid; place-items: center; background: var(--soft); color: var(--accent); }
.mc-f { display: flex; justify-content: flex-end; margin-top: 8px; }
.mcard.ready { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent), 0 12px 24px -16px var(--accent); animation: ptin .45s both, mcglow 2.4s ease-in-out .5s infinite; }
.mcard.ready .mc-ic { background: var(--accent); color: #fff; }
@keyframes mcglow { 50% { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent), 0 14px 28px -14px var(--accent); } }
.mcard.got { opacity: .78; }
.chh { margin-bottom: 12px; } .chh-t { display: flex; align-items: center; gap: 6px; font: 700 14px var(--font-display); margin-bottom: 8px; position: relative; }
.medal { animation: gpop .5s both; } .medalcell:nth-child(2n) .medal { animation-delay: .06s; } .medalcell:nth-child(3n) .medal { animation-delay: .12s; }
.letter { position: relative; background: linear-gradient(180deg, #fffaf0, #fdf1d8) !important; color: #4a3a22 !important; border: 1px solid #ecd9ae !important; border-radius: 6px 6px 16px 16px !important; box-shadow: 0 14px 28px -18px #8a6a28; animation: ptin .6s both; font-family: var(--font-body); line-height: 1.8; }
.letter::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; background: repeating-linear-gradient(90deg, #d6356a 0 12px, #fff 12px 18px, #3a68d8 18px 30px, #fff 30px 36px); opacity: .55; border-radius: 6px 6px 0 0; }
.letter::after { content: "♥"; position: absolute; right: 14px; top: 14px; color: #d6356a; opacity: .5; font-size: 22px; animation: mhbob 2.4s ease-in-out infinite; }
.gpsmap { height: 160px; border-radius: 18px; margin: 10px 0; position: relative; overflow: hidden; background: linear-gradient(135deg, var(--soft), var(--card)); }
input:not([type]), input[type="text"]:not(.bare), input[type="number"]:not(.bare) { border-radius: 12px; }
@media (prefers-reduced-motion: reduce) { .mcard, .mcard.ready, .letter, .letter::after, .medal, .ife, .pills .pill.on { animation: none !important; } }
#sub input:not([type]), #sub input[type="search"], #sub input[type="text"] { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 500 15px var(--font-body); outline: none; transition: border-color .2s, box-shadow .2s; margin: 2px 0 8px; }
#sub input:not([type]):focus, #sub input[type="search"]:focus, #sub input[type="text"]:focus { border-color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent); }
.gpsmap { display: block; } .gpsmap svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.gm-grid path { stroke: var(--line); stroke-width: 1; fill: none; opacity: .8; }
.gm-route { fill: none; stroke: var(--accent); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 8 9; opacity: .55; animation: gmflow 1.2s linear infinite; }
@keyframes gmflow { to { stroke-dashoffset: -34; } }
.gm-dot, .gm-ping { position: absolute; left: 10%; top: 81%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px #fff; }
.gm-ping { background: var(--accent); opacity: .5; animation: gmping 1.8s ease-out infinite; box-shadow: none; }
@keyframes gmping { to { transform: scale(3.2); opacity: 0; } }
.gm-t { position: absolute; left: 0; right: 0; bottom: 8px; text-align: center; font-size: 12px; color: var(--muted); padding: 0 12px; }
@media (prefers-reduced-motion: reduce) { .gm-route, .gm-ping { animation: none !important; } }
/* สูตรอาหารในตู้เย็น */
.frc { margin-bottom: 8px; animation: ptin .4s both; } .frc > .item { margin-bottom: 0; }
.frr { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 4px; padding: 9px 12px; border-radius: 12px; border: 1px dashed var(--line); background: var(--soft); color: var(--accent); font: 600 12.5px var(--font-body); text-align: left; } .frr i { margin-left: auto; font-style: normal; }
.frs { list-style: none; margin: 6px 0 0; padding: 12px 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.frs li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.55; animation: ptin .35s both; animation-delay: calc(var(--i) * 70ms); }
.frs li b { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; display: grid; place-items: center; margin-top: 1px; }
@media (prefers-reduced-motion: reduce) { .frc, .frs li { animation: none !important; } }
.rchero { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: 22px; color: #fff; background-image: linear-gradient(125deg, #E8884A, #F0679B 60%, #8D6CF0); background-size: 220% 220%; animation: mhflow 9s ease-in-out infinite; box-shadow: 0 14px 26px -16px #E8884A; }
.rchero b { display: block; font: 800 20px var(--font-display); } .rchero span:not(.rch-ic) { font-size: 13px; opacity: .92; }
.rch-ic { flex: none; width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: rgba(255,255,255,.25); animation: mhbob 3s ease-in-out infinite; }
.rcchips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; } .rcchips span { padding: 6px 14px; border-radius: 999px; background: var(--soft); font-size: 13px; font-weight: 600; animation: gpop .35s both; animation-delay: calc(var(--i) * 50ms); }
@media (prefers-reduced-motion: reduce) { .rchero, .rch-ic, .rcchips span { animation: none !important; } }
/* แผนมื้อสัปดาห์: เลือกเอง + สุ่ม */
.plbar { display: flex; gap: 8px; margin-bottom: 10px; } .plbar .btn { flex: 1; }
.plstrip { display: flex; gap: 6px; margin-bottom: 10px; } .pld { flex: 1; padding: 8px 0; border-radius: 14px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 2px; transition: transform .15s, background .2s; } .pld small { font-size: 11px; color: var(--muted); } .pld b { font: 800 16px var(--font-display); } .pld:active { transform: scale(.94); }
.pld.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 8px 16px -10px var(--accent); animation: gpop .3s; } .pld.on small { color: #ffffffcc; }
.plcard { padding: 14px; animation: ptin .35s both; } .pl-k.over { color: var(--danger, #d6356a); }
.plms { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; } .plm { display: flex; gap: 6px; align-items: stretch; }
.plm-b { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--soft); text-align: left; color: var(--ink); } .plm-b small { display: block; font-size: 11px; color: var(--muted); } .plm-b b { font-size: 14.5px; } .plm-b:active { transform: scale(.98); }
.plm-r { flex: none; width: 46px; border-radius: 14px; background: var(--soft); color: var(--accent); display: grid; place-items: center; } .plm-r:active svg { transform: rotate(180deg); transition: transform .3s; }
.plshop { margin-top: 10px; padding: 12px 14px; } .plshop summary { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; list-style: none; } .plshop summary::-webkit-details-marker { display: none; }
.plpt { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 6px; } .plpt .pill { flex: none; padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line); background: var(--card); color: var(--ink); font: 700 13px var(--font-display); } .plpt .pill.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.plpl { display: flex; flex-direction: column; } .plpi { display: flex; align-items: center; gap: 8px; padding: 13px 4px; border-bottom: 1px solid var(--line); background: none; text-align: left; color: var(--ink); font-size: 14.5px; } .plpi[hidden] { display: none; } .plpi.cur { color: var(--accent); font-weight: 700; } .plpi:active { background: var(--soft); }
.plm-ch { font-size: 22px; color: var(--muted); line-height: 1; }
.plm-b, .plm-r, .plpi { border: 0; font-family: inherit; } .plpi { border-bottom: 1px solid var(--line); border-radius: 0; width: 100%; }
