:root{
  --bg:#120E0B; --bg-deep:#080605; --ink:#F2E8DA; --ink-strong:#FFF6EA;
  --muted:#CFC1AC; --faint:#B5A58F; --amber:#E9A85A; --amber-soft:rgba(233,168,90,.45);
  --card:rgba(242,232,218,.05); --line:rgba(242,232,218,.18);
  --serif:'Lora',Georgia,serif; --sans:'Be Vietnam Pro',system-ui,sans-serif;
}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink);font-family:var(--sans);-webkit-font-smoothing:antialiased}
body{overscroll-behavior:none}
a{color:var(--muted);text-decoration:none}
a:hover{color:var(--ink)}
button{font:inherit;cursor:pointer}
input,textarea{font:inherit}
:focus-visible{outline:2px solid var(--amber);outline-offset:3px}

#app{min-height:100dvh;max-width:480px;margin:0 auto;position:relative;overflow:hidden}
.screen{min-height:100dvh;position:relative;padding:calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:20px}
.screen.deep{background:var(--bg-deep)}
.topbar{display:flex;justify-content:space-between;align-items:center;gap:12px;position:relative;z-index:2}
.eyebrow{font-size:14px;font-weight:500;letter-spacing:.01em;color:var(--muted)}
.serif{font-family:var(--serif)}
h1,h2{margin:0;font-family:var(--serif);font-weight:500}
h1{font-size:28px}
p{margin:0;line-height:1.5}
.muted{color:var(--muted)}
.faint{color:var(--faint)}
.small{font-size:14px;line-height:1.45}
.center{text-align:center}
.grow{flex:1}

.btn{min-height:48px;border-radius:24px;border:1px solid var(--line);background:transparent;color:var(--ink);display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:0 18px;font-size:15px}
.btn.primary{background:var(--amber);color:#120E0B;border:none;font-weight:700}
.btn.outline{border-color:var(--amber);color:var(--amber);font-weight:600}
.btn.block{width:100%;min-height:54px;border-radius:28px}
.btn:disabled{opacity:.5;cursor:default}
.icon-btn{width:44px;height:44px;border-radius:22px;border:none;background:rgba(242,232,218,.08);color:var(--ink);display:inline-flex;align-items:center;justify-content:center}
.row{display:flex;gap:8px}
.row>.btn{flex:1}
.card{background:var(--card);border-radius:20px;padding:16px}
.card.glow{background:rgba(242,232,218,.08);border:1px solid var(--amber-soft);border-radius:22px}
.stack{display:flex;flex-direction:column;gap:10px}
.field{display:flex;flex-direction:column;gap:8px}
.field input[type=text],.field input[type=email]{background:rgba(242,232,218,.06);border:1px solid var(--line);border-radius:16px;color:var(--ink);padding:14px 16px;font-size:16px}
.check{display:flex;gap:12px;align-items:flex-start;font-size:14px;line-height:1.5}
.check input{width:22px;height:22px;accent-color:var(--amber);flex-shrink:0;margin-top:1px}
.chips{display:flex;gap:8px;flex-wrap:wrap}
.chip{min-height:44px;padding:0 16px;border-radius:22px;border:1px solid var(--line);background:transparent;color:var(--ink);font-size:14px}
.chip[aria-pressed=true]{background:var(--ink);color:var(--bg);border-color:var(--ink);font-weight:700}
.stat-row{display:flex;gap:10px}
.stat{flex:1;background:var(--card);border-radius:18px;padding:14px;display:flex;flex-direction:column;gap:2px}
.stat b{font-size:24px}
.stat.hi{background:var(--amber);color:#120E0B}
.list-item{display:flex;align-items:center;gap:12px;background:var(--card);border-radius:16px;padding:12px 14px;font-size:14px}
.toast{position:fixed;left:50%;bottom:calc(24px + env(safe-area-inset-bottom));transform:translateX(-50%);background:var(--ink);color:var(--bg);padding:12px 18px;border-radius:16px;font-size:14px;z-index:50;max-width:90vw}

/* ===== Thiền đường ===== */
.scene{position:absolute;inset:0}
.hall{position:absolute;inset:0;pointer-events:none}
.rain{display:none}
.arch{position:absolute;left:50%;top:calc(92*var(--u,1px));width:calc(300*var(--u,1px));height:calc(440*var(--u,1px));margin-left:calc(-150*var(--u,1px));border-radius:calc(150*var(--u,1px)) calc(150*var(--u,1px)) 4px 4px;border:1px solid rgba(233,168,90,.3);background:radial-gradient(ellipse 70% 62% at 50% 90%,rgba(240,180,105,.72) 0%,rgba(233,168,90,.52) 18%,rgba(233,168,90,.34) 34%,rgba(233,168,90,.2) 50%,rgba(233,168,90,.1) 66%,rgba(233,168,90,.04) 82%,rgba(233,168,90,0) 100%);transition:opacity 2s;overflow:hidden}
.arch::after{content:'';position:absolute;inset:0;opacity:.09;mix-blend-mode:overlay;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.arch.breath{animation:archbreathe var(--breath,10s) ease-in-out infinite}
@keyframes archbreathe{0%,100%{transform:scale(.975);filter:brightness(.82)}50%{transform:scale(1);filter:brightness(1.12)}}
.bamboo{position:absolute;left:50%;top:calc(92*var(--u,1px));width:calc(300*var(--u,1px));height:calc(440*var(--u,1px));margin-left:calc(-150*var(--u,1px));border-radius:calc(150*var(--u,1px)) calc(150*var(--u,1px)) 4px 4px;overflow:hidden}
.bamboo i{position:absolute;top:0;bottom:0;width:calc(10*var(--u,1px));margin-left:calc(-3*var(--u,1px));background:linear-gradient(90deg,rgba(18,14,11,0),rgba(18,14,11,.38) 50%,rgba(18,14,11,0))}
.flames{position:absolute;left:50%;top:calc(500*var(--u,1px));width:calc(340*var(--u,1px));margin-left:calc(-170*var(--u,1px));height:calc(80*var(--u,1px))}
.flame{position:absolute;border-radius:50%;background:radial-gradient(circle,rgba(255,214,150,.95) 0%,rgba(233,168,90,.35) 45%,transparent 70%);animation:flicker 3.2s ease-in-out infinite;transition:opacity 1.5s}
.flame.off{opacity:0}
.hall-screen{--u:min(1px,calc((100dvh - 290px) / 560))}
.hall-count{position:absolute;left:0;right:0;top:calc(250*var(--u,1px));z-index:2;text-align:center;display:flex;flex-direction:column;gap:6px;pointer-events:none}
.hall-count .num{font-family:var(--serif);font-size:calc(40*var(--u,1px));color:var(--ink-strong);line-height:1.15}
.hall-count .sub{font-family:var(--serif);font-style:italic;font-size:17px}
.hall-bottom{position:relative;z-index:2;margin-top:auto;display:flex;flex-direction:column;gap:12px;width:100%}
.hall-row{display:flex;flex-direction:column;gap:12px}
.entries{display:flex;gap:8px}
.entries .btn{flex:1;padding:0 8px}
.tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.tool{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:72px;border-radius:18px;background:rgba(242,232,218,.06);border:1px solid rgba(242,232,218,.1);color:var(--ink);font-size:13px;text-align:center;padding:8px 4px;transition:background .2s,border-color .2s}
.tool:hover{background:rgba(242,232,218,.1);color:var(--ink)}
.tool svg{color:var(--muted)}
.tool.accent{border-color:rgba(233,168,90,.5)}
.tool.accent svg{color:var(--amber)}
.login-form{max-width:420px;margin-left:auto;margin-right:auto}
.tile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.tile{display:flex;flex-direction:column;gap:4px;justify-content:flex-end;min-height:92px;padding:14px;border-radius:18px;background:var(--card);border:1px solid rgba(242,232,218,.08);color:var(--ink)}
.tile:hover{background:rgba(242,232,218,.09);color:var(--ink)}
.dots{display:grid;gap:4px}
.dots i{aspect-ratio:1;border-radius:4px;display:block}
.yt-close{position:absolute;top:6px;right:6px;width:32px;height:32px;border-radius:16px;border:none;background:rgba(8,6,5,.8);color:var(--ink);z-index:2}
.yt-wrap.music{bottom:calc(16px + env(safe-area-inset-bottom));opacity:1}
select{font:inherit}
.slot-card{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--ink)}
.slot-card .tag{font-size:14px;color:var(--amber);font-weight:600}
.slot-card .go{background:var(--amber);color:#120E0B;border-radius:18px;padding:10px 14px;font-size:14px;font-weight:700;white-space:nowrap}

/* ===== Đang ngồi ===== */
.sit-glow{position:absolute;left:50%;top:160px;width:510px;height:510px;margin-left:-255px;border-radius:50%;background:radial-gradient(circle,rgba(233,168,90,.22) 0%,rgba(233,168,90,.06) 40%,transparent 68%);animation:breathe 12s ease-in-out infinite;pointer-events:none;transition:opacity 2s}
.dot{width:8px;height:8px;border-radius:4px;background:var(--amber);box-shadow:0 0 10px var(--amber);display:inline-block}
.timer{font-variant-numeric:tabular-nums}
.yt-wrap{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(164px + env(safe-area-inset-bottom));width:min(342px,88vw);aspect-ratio:16/9;border-radius:14px;overflow:hidden;z-index:5;box-shadow:0 0 0 1px var(--line);background:#000;transition:width .3s}
.yt-wrap iframe{width:100%;height:100%;border:0}
.soundmap{width:112px;height:112px;border-radius:50%;border:1px solid var(--line);position:relative;flex-shrink:0}
.soundmap span{position:absolute;width:12px;height:12px;border-radius:6px}
.legend{display:flex;align-items:center;gap:8px;color:#D9CDBD;font-size:14px}
.legend i{width:10px;height:10px;border-radius:5px;display:inline-block}

/* ===== Sadhu ===== */
.ripples{position:relative;width:300px;height:300px;margin:0 auto}
.ripples i{position:absolute;inset:0;border-radius:50%;border:1px solid rgba(233,168,90,.7);animation:ripple 4s ease-out infinite;opacity:0}
.ripples i:nth-child(2){animation-delay:1.3s}.ripples i:nth-child(3){animation-delay:2.6s}
.ripples.burst i{animation-duration:1.6s}
.sadhu-btn{position:absolute;left:50%;top:50%;width:148px;height:148px;margin:-74px 0 0 -74px;border-radius:50%;border:none;background:radial-gradient(circle at 50% 40%,#F5C68A,#E9A85A 60%,#C9853C);color:#120E0B;font-family:var(--serif);font-size:26px;box-shadow:0 0 60px rgba(233,168,90,.45)}
.sadhu-btn:disabled{opacity:.7}

/* ===== Nhịp thở / Hít thở ===== */
canvas.wave{width:100%;height:110px;display:block}
.big-num{font-family:var(--serif);font-size:56px;color:var(--ink-strong)}
.breath-orb-wrap{flex:1;display:flex;align-items:center;justify-content:center;min-height:320px}
.breath-orb{width:280px;height:280px;border-radius:50%;background:radial-gradient(circle at 50% 45%,rgba(255,214,150,.9),rgba(233,168,90,.55) 55%,rgba(233,168,90,.08) 75%);display:flex;align-items:center;justify-content:center;will-change:transform}
.breath-orb span{font-family:var(--serif);font-size:24px;color:#120E0B}

@keyframes breathe{0%,100%{opacity:.6;transform:scale(.96)}50%{opacity:1;transform:scale(1)}}
@keyframes rain{from{background-position:0 0}to{background-position:-40px 160px}}
@keyframes flicker{0%,100%{filter:brightness(.85)}50%{filter:brightness(1.12)}}
@keyframes ripple{0%{transform:scale(.4);opacity:.9}100%{transform:scale(1.6);opacity:0}}
@media (prefers-reduced-motion:reduce){.rain,.arch.breath,.flame,.sit-glow,.ripples i{animation:none}.ripples i{opacity:.3}}
@media (min-width:600px){#app{border-left:1px solid rgba(242,232,218,.06);border-right:1px solid rgba(242,232,218,.06)}}


/* ===== Máy tính (màn hình lớn) ===== */
@media (min-width:900px){
  #app{max-width:none;border:none}
  .screen{max-width:680px;margin:0 auto;padding-top:40px}
  .screen.hall-screen{max-width:none;padding:28px 48px 32px;--u:min(1.3px,calc((100vh - 240px) / 600))}
  .hall-screen .topbar{width:100%;max-width:1040px;margin:0 auto}
  .hall-count .sub{font-size:20px}
  .hall-bottom{max-width:1040px;margin:auto auto 0}
  .hall-row{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);gap:12px;align-items:stretch}
  .hall-row #slot-card,.hall-row #slot-card>a{height:100%}
  .entries .btn{min-height:100%;font-size:16px}
  .tools{gap:12px}
  .tool{flex-direction:row;min-height:56px;font-size:14px;gap:10px}
  .tile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .screen.deep{max-width:none;align-items:center}
  .screen.deep>*{width:100%;max-width:680px}
  .screen.deep>.sit-glow{width:820px;height:820px;max-width:none;margin-left:-410px;top:80px}
}

.hub-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.hub-card{display:flex;flex-direction:column;gap:6px;padding:16px 18px;border-radius:20px;background:var(--card);border:1px solid rgba(242,232,218,.08);color:var(--ink)}
.hub-card:hover{background:rgba(242,232,218,.09);color:var(--ink)}
.hub-card.accent{border-color:rgba(233,168,90,.45)}
@media (min-width:700px){.hub-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (min-width:1100px){.has-side .screen:has(.hub-grid){max-width:1000px}.hub-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.hub-card{min-height:150px;justify-content:flex-end}}
/* ===== Đang ngồi: nghe là chính ===== */
.sit-screen{overflow:hidden}
.sit-center{margin:auto 0;padding-bottom:210px;gap:12px;position:relative;z-index:1}
.sit-line{font-style:italic;font-size:22px;line-height:1.5;color:#E6DACA}
.sit-controls{position:relative;z-index:6;display:flex;flex-direction:column;gap:12px}
.sound-chips{flex-wrap:nowrap}
.sound-chips .chip{min-height:40px;padding:0 14px;display:inline-flex;align-items:center;gap:8px;white-space:nowrap}
.sit-controls .btn{white-space:nowrap}
.yt-wrap.big{width:94vw}
.yt-wrap .yt-close svg{display:block;margin:auto}
.side{display:none}
.avatar{width:36px;height:36px;border-radius:18px;background:rgba(233,168,90,.2);color:var(--amber);font-weight:700;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0}
.together-grid{display:flex;flex-direction:column;gap:20px}

@media (min-width:900px){
  .yt-wrap{left:auto;right:48px;transform:none;bottom:32px;width:356px}
  .yt-wrap.big{width:720px;right:50%;transform:translateX(50%);bottom:50%;margin-bottom:-202px}
  .yt-wrap.music{width:400px;right:24px;bottom:24px;transform:none;margin:0}
  .sit-center{padding-bottom:0}
  .sit-line{font-size:30px}
  .screen.deep.sit-screen>*{max-width:none}
  .sit-controls{flex-direction:row;align-items:center;justify-content:flex-start;padding-right:400px;width:100%}
}

/* ===== Bố cục web máy tính ===== */
@media (min-width:1100px){
  body.has-side{display:flex;align-items:flex-start;height:auto;min-height:100vh}
  body.has-side.focus .side{display:none}
  .has-side .side{display:flex;flex-direction:column;gap:28px;width:248px;flex-shrink:0;box-sizing:border-box;padding:28px 18px;border-right:1px solid rgba(242,232,218,.08);background:#0E0B09;position:sticky;top:0;height:100vh}
  .has-side #app{flex:1;min-width:0;max-width:none;margin:0}
  .side-logo{display:flex;align-items:center;gap:10px;padding:0 8px;color:var(--ink);font-size:22px}
  .logo-arch{width:34px;height:34px;border-radius:17px 17px 4px 4px;background:radial-gradient(ellipse at 50% 90%,rgba(255,214,150,.9),rgba(233,168,90,.25) 60%,rgba(233,168,90,.05));border:1px solid rgba(233,168,90,.45)}
  .side-nav{display:flex;flex-direction:column;gap:4px}
  .side-nav a{display:flex;align-items:center;gap:12px;min-height:44px;padding:0 14px;border-radius:14px;color:var(--muted);font-size:15px}
  .side-nav a svg{color:var(--faint)}
  .side-nav a:hover{background:rgba(242,232,218,.05);color:var(--ink)}
  .side-nav a.on{background:rgba(233,168,90,.14);color:var(--ink);font-weight:600}
  .side-nav a.on svg{color:var(--amber)}
  .side-foot{margin-top:auto;display:flex;flex-direction:column;gap:12px}
  .side-sound{display:flex;align-items:center;gap:10px;min-height:44px;padding:0 14px;border-radius:14px;border:1px solid rgba(242,232,218,.12);background:transparent;color:var(--muted);font-size:14px}
  .side-me{display:flex;align-items:center;gap:10px;padding:0 8px;color:var(--ink)}

  .desk-home{min-height:100vh;box-sizing:border-box;padding:28px 36px;display:flex;flex-direction:column;gap:22px}
  .desk-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px}
  .live-pill{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--muted);padding:8px 14px;border-radius:20px;border:1px solid rgba(242,232,218,.12)}
  .desk-grid{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:20px;flex:1;min-height:440px}
  .hero{position:relative;overflow:hidden;border-radius:28px;background:radial-gradient(ellipse at 72% 100%,#2A1E14 0%,#17110D 55%,#120E0B 100%);border:1px solid rgba(242,232,218,.08);display:flex}
  .hero-scene{position:absolute;top:0;bottom:0;left:40%;right:0;--u:min(1.3px,calc((100vh - 340px) / 600))}
  .hero-text{position:relative;z-index:2;width:460px;max-width:54%;padding:40px;display:flex;flex-direction:column;justify-content:center;gap:16px}
  .hero-text .btn{padding:0 14px}
  .hero-text .row{flex-wrap:nowrap!important}
  .hero-title{font-size:40px;line-height:1.1;color:var(--ink-strong)}
  .desk-col{display:flex;flex-direction:column;gap:16px;min-height:0}
  .desk-col .slot-card{flex-wrap:wrap}
  .desk-tools{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
  .tool-card{display:flex;flex-direction:column;gap:8px;padding:18px;border-radius:20px;background:var(--card);border:1px solid rgba(242,232,218,.08);color:var(--ink)}
  .tool-card:hover{background:rgba(242,232,218,.09);color:var(--ink)}
  .tool-card.accent{border-color:rgba(233,168,90,.45)}
  .tool-ic{width:44px;height:44px;border-radius:14px;background:rgba(242,232,218,.06);display:flex;align-items:center;justify-content:center;color:var(--muted)}
  .tool-card.accent .tool-ic{background:rgba(233,168,90,.18);color:var(--amber)}
  .has-side .screen{max-width:760px}
  .has-side .screen.deep{max-width:none}
  .has-side .screen.hall-screen{max-width:none}
  .together-grid{display:grid;grid-template-columns:380px minmax(0,1fr);gap:20px;align-items:start}
  .together-grid .dots{grid-template-columns:repeat(var(--n),minmax(0,1fr))!important;max-width:720px}
  .has-side .screen:has(.together-grid){max-width:1100px}
}

/* ===== Cài app ===== */
.install-chip{position:fixed;left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));z-index:40;display:flex;align-items:center;gap:12px;padding:12px 12px 12px 14px;border-radius:20px;background:#211913;border:1px solid rgba(233,168,90,.45);box-shadow:0 10px 30px rgba(0,0,0,.5);max-width:460px;margin:0 auto}
.logo-arch{display:inline-block;border-radius:14px 14px 3px 3px;background:radial-gradient(ellipse at 50% 90%,rgba(255,214,150,.9),rgba(233,168,90,.25) 60%,rgba(233,168,90,.05));border:1px solid rgba(233,168,90,.45)}

/* ===== Chọn ngôn ngữ ===== */
.lang-switch{display:inline-flex;border:1px solid var(--line);border-radius:18px;padding:3px;gap:2px;flex-shrink:0}
.lang-switch button{min-width:40px;min-height:32px;border:none;border-radius:14px;background:transparent;color:var(--muted);font-size:13px;font-weight:600}
.lang-switch button[aria-pressed=true]{background:var(--ink);color:var(--bg)}
.side-foot .lang-switch{align-self:flex-start;margin-left:8px}

/* ===== Ghi chú, Xả lo âu ===== */
textarea{width:100%;box-sizing:border-box;background:rgba(242,232,218,.06);border:1px solid var(--line);border-radius:16px;color:var(--ink);padding:14px 16px;font-size:16px;line-height:1.5;resize:vertical}
.release-box{position:relative;min-height:220px}
.release-box textarea{min-height:220px;font-family:var(--serif);font-size:19px}
.smoke{padding:14px 16px;font-family:var(--serif);font-size:19px;line-height:1.5;color:var(--ink);min-height:220px;word-break:break-word}
.smoke span{display:inline-block;transition:transform 2.4s cubic-bezier(.2,.6,.3,1),opacity 2.4s ease-out,filter 2.4s ease-out;will-change:transform,opacity,filter}
@media (prefers-reduced-motion:reduce){.smoke span{transition:opacity 1.2s}}

/* ===== Thanh âm thanh ===== */
.sbar{display:flex;align-items:center;gap:8px;padding:6px 6px 6px 14px;border-radius:32px;background:rgba(242,232,218,.07);border:1px solid var(--line);position:relative;z-index:6}
.sbar-main{flex:1;min-width:0;min-height:48px;border:none;background:transparent;color:var(--ink);font:inherit;display:flex;align-items:center;gap:12px;text-align:left;padding:0;cursor:pointer}
.sbar-label{font-size:15px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sbar-dots{display:flex;flex-shrink:0}
.sbar-dots i{width:12px;height:12px;border-radius:6px;display:block;box-shadow:0 0 0 2px #1a1512}
.sbar-dots i+i{margin-left:-4px}
.sbar-mute{width:48px;height:48px;border-radius:24px;border:none;background:rgba(242,232,218,.1);color:var(--ink);display:flex;align-items:center;justify-content:center;flex-shrink:0;cursor:pointer}
.sbar-mute[aria-pressed="true"]{color:var(--faint)}
.sheet-back{position:fixed;inset:0;z-index:60;background:rgba(0,0,0,.5);display:flex;align-items:flex-end;justify-content:center}
.sheet-back[hidden]{display:none}
.sheet{width:100%;max-width:520px;background:#17120F;border-radius:28px 28px 0 0;border-top:1px solid var(--line);padding:12px 20px calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:18px;max-height:90dvh;overflow:auto}
.sheet-grip{width:40px;height:4px;border-radius:2px;background:rgba(242,232,218,.25);align-self:center}
.sheet-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px}
.sheet-head b{font-size:18px}
.sheet-row{display:flex;justify-content:space-between;font-size:14px;color:var(--muted)}
.sheet input[type=range]{width:100%;accent-color:var(--amber);min-height:32px}
.sheet-actions{display:flex;gap:10px}
.sheet-actions .btn{flex:1}
.sound-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.sound-tile{min-height:84px;border-radius:18px;border:1px solid var(--line);background:rgba(242,232,218,.04);color:#D9CDBD;font:inherit;font-size:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:8px 4px;cursor:pointer;text-align:center}
.sound-tile i{width:14px;height:14px;border-radius:7px;display:block}
.sound-tile[aria-pressed="true"]{background:rgba(233,168,90,.16);border-color:var(--amber);color:var(--ink);font-weight:600}
@media (min-width:900px){.sit-controls .sbar{flex:1;max-width:420px}}
@media (min-width:900px){.sheet-back{align-items:center}.sheet{border-radius:28px}}

/* ===== Tối màn hình ===== */
.dim-overlay{position:fixed;inset:0;z-index:200;background:#000;cursor:none;display:flex;align-items:flex-end;justify-content:center;padding-bottom:calc(48px + env(safe-area-inset-bottom));touch-action:manipulation;outline:none}
.dim-hint{color:#7a6d5e;font-size:14px;opacity:0;transition:opacity .8s}
.dim-overlay.show-hint .dim-hint{opacity:1}

/* Bộ trộn sẵn */
.mix-btn{display:flex;align-items:center;gap:12px;min-height:58px;padding:0 14px;border-radius:16px;border:1px solid var(--line);background:rgba(242,232,218,.04);color:#D9CDBD;font:inherit;font-size:15px;text-align:left;width:100%;cursor:pointer}
.mix-btn[aria-pressed="true"]{background:rgba(233,168,90,.16);border-color:var(--amber);color:var(--ink)}
.sound-tile.dim{opacity:.4}

/* Sách */
.input{background:rgba(242,232,218,.06);border:1px solid var(--line);border-radius:16px;color:var(--ink);padding:14px 16px;font-size:16px;width:100%;box-sizing:border-box;min-width:0}
.book-row{display:flex;gap:14px;align-items:center;text-decoration:none;color:inherit}
.book-cover{border-radius:6px 10px 10px 6px;object-fit:cover;flex-shrink:0;box-shadow:0 6px 18px rgba(0,0,0,.35),inset 3px 0 0 rgba(255,255,255,.08);display:flex;align-items:flex-end;padding:8px;box-sizing:border-box;color:#F2E8DA;font-family:var(--serif,serif);line-height:1.2;overflow:hidden}
.idea-n{flex-shrink:0;width:26px;height:26px;border-radius:50%;background:rgba(233,168,90,.16);color:var(--amber);display:grid;place-items:center;font-size:13px;font-weight:600}
/* Thân & tâm */
.hbar{height:10px;border-radius:6px;background:rgba(242,232,218,.08);overflow:hidden}
.hbar i{display:block;height:100%;background:var(--amber);border-radius:6px;transition:width .8s}
.chip.mood{font-size:22px;min-width:48px}
.steps-ol{padding-left:20px;line-height:1.55}
.steps-ol code,#st-tok{background:rgba(242,232,218,.08);padding:2px 6px;border-radius:6px}
a.chip,label.chip{display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.chip.mood{min-width:44px;padding:0 8px}
.hall-sound{margin-top:14px}
.hall-sound .sbar{background:rgba(20,17,14,.55);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px)}
.mix-row{display:grid;grid-template-columns:10px 92px 1fr;align-items:center;gap:10px;font-size:14px;color:#D9CDBD}
.mix-row i{width:10px;height:10px;border-radius:50%}
.linkbtn{background:none;border:0;padding:0;color:var(--amber);font-family:inherit;cursor:pointer}
/* Routine */
.rt-bar{position:fixed;left:50%;transform:translateX(-50%);top:calc(env(safe-area-inset-top) + 8px);z-index:55;width:min(560px,calc(100% - 20px));display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:18px;background:rgba(36,30,24,.96);border:1px solid var(--amber);box-shadow:0 10px 30px rgba(0,0,0,.45);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.rt-bar .btn{min-height:40px;padding:0 14px;flex:none}
.rt-bar .icon-btn{width:38px;height:38px;flex:none}
body.has-rt .screen{padding-top:calc(76px + env(safe-area-inset-top))}
.rt-steps{margin:0;padding-left:18px;line-height:1.6}
.rt-item{display:flex;align-items:center;gap:10px;padding:10px 12px}
.rt-item select{background:rgba(242,232,218,.06);color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:6px 8px;font:inherit;font-size:14px}
.rt-n{width:24px;height:24px;border-radius:50%;background:rgba(233,168,90,.16);color:var(--amber);display:grid;place-items:center;font-size:12px;font-weight:600;flex:none}
.rt-row{display:flex;gap:8px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.rt-row::-webkit-scrollbar{display:none}
.rt-row .chip{flex:none;white-space:nowrap}
.rt-all{color:var(--amber);border-color:var(--amber)}
/* Trang chủ gọn (điện thoại) */
.home-screen{gap:16px}
.home-top{display:flex;align-items:center;gap:10px}
.home-greet{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.home-greet b{font-family:var(--serif);font-weight:500;font-size:20px;color:var(--ink-strong);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sos-pill{height:44px;padding:0 14px;border-radius:22px;border:1px solid var(--amber);background:rgba(233,168,90,.1);color:var(--amber);font-size:14px;font-weight:600;display:inline-flex;align-items:center;gap:6px;text-decoration:none}
.sos-pill svg{width:16px;height:16px}
.home-hero{position:relative;flex:1;min-height:min(300px,38dvh);display:flex;flex-direction:column;justify-content:flex-end;gap:12px;padding:0 2px 14px}
.home-hero .hall-count{position:relative;top:auto;margin-bottom:18px}
.home-hero .hall-count .num{font-size:38px}
.home-hero .btn{position:relative;z-index:1}
.home-sit{min-height:54px;font-size:17px}
.home-glow{position:absolute;left:50%;top:auto;bottom:215px;width:320px;height:320px;transform:translate(-50%,50%);border-radius:50%;background:radial-gradient(circle,rgba(233,168,90,.30) 0%,rgba(233,168,90,.12) 35%,rgba(18,14,11,0) 70%);animation:hglow 6s ease-in-out infinite;pointer-events:none}
.home-ff{position:absolute;inset:0;pointer-events:none}
.home-ff .ff{position:absolute;width:6px;height:6px;border-radius:50%;background:#F6C98A;box-shadow:0 0 10px 3px rgba(246,201,138,.55);opacity:0;animation:hdrift 12s ease-in-out infinite}
.home-ff .ff.sm{width:4px;height:4px;box-shadow:0 0 8px 2px rgba(246,201,138,.45)}
@keyframes hdrift{0%{opacity:0;transform:translate(0,0)}20%{opacity:.9}50%{opacity:.5;transform:translate(18px,-26px)}80%{opacity:.85;transform:translate(-12px,-44px)}100%{opacity:0;transform:translate(6px,-60px)}}
@keyframes hglow{0%,100%{opacity:.75;transform:translate(-50%,50%) scale(.95)}50%{opacity:1;transform:translate(-50%,50%) scale(1.05)}}
@media (prefers-reduced-motion:reduce){.home-ff .ff,.home-glow{animation:none}.home-ff .ff{opacity:.6}}
.home-label{font-size:13px;color:var(--faint);font-weight:600}
.home-rt{display:flex;align-items:center;gap:14px;padding:14px 14px 14px 16px;border-radius:20px;border:1px solid var(--line);background:rgba(242,232,218,.05);color:var(--ink);font:inherit;width:100%;cursor:pointer}
.home-play{width:46px;height:46px;border-radius:50%;background:rgba(233,168,90,.16);color:var(--amber);display:grid;place-items:center;flex:none}
.home-slot{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:16px;background:rgba(242,232,218,.03);color:#D9CDBD;text-decoration:none;font-size:14px}
.home-slot i{width:8px;height:8px;border-radius:50%;background:var(--amber);flex:none}
.home-slot.live i{box-shadow:0 0 0 4px rgba(233,168,90,.25)}
.home-slot b{color:var(--ink-strong)}
.home-slot .muted{font-size:13px;white-space:nowrap}
.sit-opt{display:flex;align-items:center;gap:14px;min-height:64px;padding:12px 16px;border-radius:18px;border:1px solid var(--line);background:rgba(242,232,218,.05);color:var(--ink);text-decoration:none}
/* Thanh điều hướng dưới */
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;padding:6px 8px calc(8px + env(safe-area-inset-bottom));background:rgba(22,17,13,.96);border-top:1px solid rgba(242,232,218,.08);backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}
.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;min-height:50px;font-size:11px;color:#A89A88;text-decoration:none}
.tabbar a.on{color:var(--amber);font-weight:600}
.tabbar svg{width:22px;height:22px}
.tabbar span{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}
body.has-tabs .screen{padding-bottom:calc(84px + env(safe-area-inset-bottom))}
body.has-tabs .install-chip{bottom:calc(80px + env(safe-area-inset-bottom))}
body.has-tabs .yt-wrap{bottom:calc(164px + 70px)}

/* Sắp xếp Tiện ích */
.hub-row{display:flex;align-items:center;gap:6px;padding:8px 8px 8px 16px;border-radius:16px;border:1px solid var(--line);background:rgba(242,232,218,.04)}
.hub-row.off b{opacity:.45;text-decoration:line-through}
.hub-row .icon-btn{width:40px;height:40px;font-size:18px}
.hub-row .icon-btn:disabled{opacity:.25}
.hub-row [aria-pressed="true"]{color:var(--amber)}
#mus-pick .chip{white-space:nowrap}
body.has-tabs .toast{bottom:calc(84px + env(safe-area-inset-bottom))}

/* Nhắc routine */
.rt-remind{display:inline-flex;align-items:center;gap:8px;align-self:flex-start;min-height:40px;padding:0 14px;border-radius:20px;border:1px dashed var(--line);background:none;color:var(--muted,#A89A88);font:inherit;font-size:14px;cursor:pointer}
.rt-remind.on{border-style:solid;border-color:rgba(233,168,90,.45);color:var(--amber)}
.rt-rem-form{padding:12px;border-radius:14px;background:rgba(242,232,218,.04)}
.rt-rem-form input[type=time]{color-scheme:dark;min-height:44px}

/* Logo mới: ngọn nến trong vòng hơi thở */
.logo-arch{background:url(/logo.svg) center/cover no-repeat!important;border-radius:24%!important;box-shadow:none!important}
.logo-arch::before,.logo-arch::after{display:none!important}

/* Ngọn lửa */
.streak-pill{display:inline-flex;align-items:center;gap:5px;height:44px;padding:0 14px;border-radius:22px;border:1px solid var(--line);background:rgba(242,232,218,.05);color:#A89A88;font:inherit;font-size:15px;font-weight:700;cursor:pointer}
.streak-pill.lit{color:var(--amber);border-color:rgba(233,168,90,.45);background:rgba(233,168,90,.1)}
.sk-week{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.sk-day{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12px;color:#A89A88}
.sk-day i{width:38px;height:38px;border-radius:50%;display:grid;place-items:center;border:1px solid var(--line);background:rgba(242,232,218,.03)}
.sk-day.on i{background:rgba(233,168,90,.18);border-color:rgba(233,168,90,.5);color:var(--amber)}
.sk-day.grace i{border-style:dashed;border-color:rgba(233,168,90,.45)}
.sk-day.today span{color:var(--ink-strong);font-weight:700}

/* Chúc mừng đạt mục tiêu bước */
.goal-win{position:relative;display:flex;align-items:center;gap:12px;padding:14px 16px;border-radius:16px;background:linear-gradient(135deg,rgba(233,168,90,.22),rgba(233,168,90,.08));border:1px solid rgba(233,168,90,.45);color:var(--ink-strong);overflow:hidden}
.goal-win .small{color:#E6D7C3}
.goal-ic{color:var(--amber);flex:none}
.goal-burst{position:absolute;left:30px;top:50%;width:0;height:0;pointer-events:none}
.goal-burst i{position:absolute;width:6px;height:6px;border-radius:50%;background:#F6C98A;opacity:0}
.goal-win.pop{animation:goalpop .6s ease-out}
.goal-win.pop .goal-burst i{animation:burst 1.2s ease-out forwards}
.goal-win.pop .goal-burst i:nth-child(1){--x:40px;--y:-26px}.goal-win.pop .goal-burst i:nth-child(2){--x:-30px;--y:-30px}.goal-win.pop .goal-burst i:nth-child(3){--x:56px;--y:6px}.goal-win.pop .goal-burst i:nth-child(4){--x:-40px;--y:14px}.goal-win.pop .goal-burst i:nth-child(5){--x:20px;--y:34px}.goal-win.pop .goal-burst i:nth-child(6){--x:-14px;--y:-40px}.goal-win.pop .goal-burst i:nth-child(7){--x:70px;--y:-18px}.goal-win.pop .goal-burst i:nth-child(8){--x:-24px;--y:36px}.goal-win.pop .goal-burst i:nth-child(9){--x:88px;--y:20px}.goal-win.pop .goal-burst i:nth-child(10){--x:4px;--y:-34px}
@keyframes burst{0%{opacity:1;transform:translate(0,0) scale(1)}100%{opacity:0;transform:translate(var(--x),var(--y)) scale(.4)}}
@keyframes goalpop{0%{transform:scale(.96)}60%{transform:scale(1.02)}100%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.goal-win.pop,.goal-win.pop .goal-burst i{animation:none}}

/* Nhóm nhỏ */
.ci-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 8px 10px 12px;border-radius:14px;background:rgba(242,232,218,.04)}
.ci-name{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ci-flame{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;flex:none;color:#6E6357;border:1px solid var(--line)}
.ci-flame.on{color:var(--amber);border-color:rgba(233,168,90,.5);background:rgba(233,168,90,.14)}
.ci-row .icon-btn{width:40px;height:40px;flex:none}
.ci-row .icon-btn:disabled,.ci-nudge:disabled{opacity:.35}
.btn.ci-nudge{gap:6px;min-height:44px;font-size:14px}
.ci-invite{display:flex;align-items:center;gap:10px;padding:10px 12px;border-radius:14px;border:1px dashed rgba(233,168,90,.4)}
.ci-code{flex:1;font-size:20px;letter-spacing:.2em;color:var(--amber);font-family:ui-monospace,Menlo,monospace}

.ci-sadhu-n{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;border-radius:12px;background:rgba(233,168,90,.12);font-size:13px;font-weight:700;color:var(--amber);flex:none}
.ci-sadhu{min-height:40px;padding:0 16px;font-size:14px;color:var(--amber);border-color:rgba(233,168,90,.45);margin-right:auto}
.ci-sadhu.sent{opacity:.35}
.ci-acts{width:100%;display:flex;justify-content:flex-end;gap:8px;margin-top:-2px}

/* Trang Ngọn lửa */
.ci-streak{font-size:13px;font-weight:600;color:#8C7F70;margin-left:4px}
.ci-streak.lit{color:var(--amber)}
.fl-hero{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px 0 8px}
.fl-hero svg{position:relative;filter:grayscale(.75) brightness(.7);transition:filter .6s}
.fl-hero.lit svg{filter:none;animation:flflick 3s ease-in-out infinite}
.fl-glow{position:absolute;top:0;left:50%;width:260px;height:260px;transform:translateX(-50%);border-radius:50%;background:radial-gradient(circle,rgba(233,168,90,.28),rgba(233,168,90,0) 65%);opacity:.35}
.fl-hero.lit .fl-glow{opacity:1}
.fl-num{position:relative;font-family:var(--serif);font-size:64px;line-height:1;color:var(--ink-strong)}
.fl-unit{font-size:15px;color:#B8AB9A;margin-bottom:6px}
@keyframes flflick{0%,100%{transform:scale(1)}50%{transform:scale(1.04) translateY(-2px)}}
@media (prefers-reduced-motion:reduce){.fl-hero.lit svg{animation:none}}
.fl-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.fl-stats div{display:flex;flex-direction:column;align-items:center;gap:2px;padding:14px 6px;border-radius:16px;background:rgba(242,232,218,.04);text-align:center}
.fl-stats b{font-size:24px;color:var(--amber)}
.fl-stats span{font-size:12px;color:#A89A88;line-height:1.3}
.fl-cal{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;text-align:center}
.fl-cal em{font-style:normal;font-size:12px;color:#8C7F70}
.fl-d{aspect-ratio:1;display:grid;place-items:center;border-radius:50%;font-size:13px;color:#A89A88;border:1px solid transparent}
.fl-d.on{background:rgba(233,168,90,.22);color:var(--ink-strong);font-weight:700}
.fl-d.grace{border:1px dashed rgba(233,168,90,.5)}
.fl-d.future{opacity:.35}
.fl-d.today{border-color:var(--amber)}
.fl-ms{display:grid;grid-template-columns:repeat(6,1fr);gap:6px}
.fl-ms span{padding:8px 0;border-radius:14px;text-align:center;font-weight:700;font-size:14px;border:1px solid var(--line);color:#8C7F70}
.fl-ms span.got{background:rgba(233,168,90,.18);border-color:rgba(233,168,90,.5);color:var(--amber)}
.fl-friend{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:12px}
.fl-friend.me{background:rgba(233,168,90,.08)}
.fl-rank{width:22px;color:#8C7F70;font-weight:700}
.fl-fs{font-weight:700;color:#8C7F70}.fl-fs.lit{color:var(--amber)}

/* Ảnh đại diện + hồ sơ bạn trong nhóm */
.av{position:relative;flex:none;border-radius:50%;display:inline-grid;place-items:center;color:var(--amber);font-weight:700;overflow:hidden;box-shadow:0 0 0 2px rgba(242,232,218,.06)}
.av img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.av.lit{box-shadow:0 0 0 2px #17120F,0 0 0 4px rgba(233,168,90,.85),0 0 18px rgba(233,168,90,.35)}
.ci-who{display:flex;align-items:center;gap:12px;flex:1;min-width:0;background:none;border:0;padding:0;color:inherit;font:inherit;cursor:pointer;text-align:left;-webkit-tap-highlight-color:transparent}
.ci-who:active .av{transform:scale(.96)}
.ci-who .ci-name{display:block}
.fl-friend{width:100%;border:0;background:none;color:inherit;font:inherit;cursor:pointer}
.sheet-back{animation:mpfade .2s ease}
.sheet-back .sheet{animation:mpup .28s cubic-bezier(.2,.8,.2,1)}
.sheet-back.closing{opacity:0;transition:opacity .2s}
@keyframes mpfade{from{opacity:0}}
@keyframes mpup{from{transform:translateY(40px);opacity:.4}}
@media (prefers-reduced-motion:reduce){.sheet-back,.sheet-back .sheet{animation:none}}
.mp-sheet{gap:16px}
.mp-head{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding-top:6px;text-align:center}
.mp-head .av{margin-bottom:6px}
.mp-glow{position:absolute;top:-30px;left:50%;width:220px;height:180px;transform:translateX(-50%);background:radial-gradient(circle,rgba(233,168,90,.22),rgba(233,168,90,0) 65%);opacity:.3;pointer-events:none}
.mp-glow.on{opacity:1}
.mp-name{font-family:var(--serif);font-size:26px;line-height:1.15;color:var(--ink-strong)}
.mp-flame{display:flex;align-items:center;gap:14px;padding:14px 16px;border-radius:18px;background:rgba(242,232,218,.04);border:1px solid var(--line)}
.mp-flame.on{background:linear-gradient(135deg,rgba(233,168,90,.16),rgba(233,168,90,.04));border-color:rgba(233,168,90,.35)}
.mp-fl-n{font-size:28px;font-weight:700;color:var(--amber);white-space:nowrap;filter:grayscale(.6)}
.mp-flame.on .mp-fl-n{filter:none}
.mp-week{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;text-align:center}
.mp-day{display:flex;flex-direction:column;align-items:center;gap:4px}
.mp-day i{width:26px;height:26px;border-radius:50%;border:1px solid var(--line);display:block}
.mp-day.on i{background:radial-gradient(circle at 50% 60%,#FFE7BE,#E9A85A 70%);border-color:transparent;box-shadow:0 0 10px rgba(233,168,90,.4)}
.mp-day.today i{outline:1px dashed rgba(233,168,90,.6);outline-offset:3px}
.mp-day em{font-style:normal;font-size:11px;color:#8C7F70}
.mp-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mp-stats div{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:16px;background:rgba(242,232,218,.04)}
.mp-stats b{font-size:22px;color:var(--ink-strong)}
.mp-stats span{font-size:12px;color:#A89A88}
.mp-bar{display:block;height:4px;border-radius:2px;background:rgba(242,232,218,.08);margin-top:6px;overflow:hidden}
.mp-bar u{display:block;height:100%;background:var(--amber);border-radius:2px}
.mp-foot{display:flex;justify-content:space-between;gap:10px;font-size:13px;color:#A89A88;padding:0 4px}
.mp-acts{display:flex;gap:8px}
.mp-acts .btn{flex:1;min-height:46px;font-size:14px}
.mp-sadhu{color:var(--amber);border-color:rgba(233,168,90,.45)}
.mp-sadhu.sent{opacity:.4}
.mp-acts .btn:disabled{opacity:.35}
.pf-av{display:flex;flex-direction:column;align-items:center;gap:6px;padding:4px 0 8px}
.pf-av-pick{position:relative;cursor:pointer;border-radius:50%}
.pf-cam{position:absolute;right:-2px;bottom:-2px;width:32px;height:32px;border-radius:50%;display:grid;place-items:center;background:var(--amber);color:#17120F;box-shadow:0 0 0 3px #0F0B09}
.side-me .av{width:36px;height:36px}

/* Hướng dẫn kết nối số bước có hình mô phỏng */
.st-hero{display:flex;flex-direction:column;align-items:center;gap:12px;padding:6px 0 4px}
.st-flow{display:flex;align-items:center;gap:8px}
.st-flow img{width:52px;height:52px;border-radius:12px}
.st-flow .st-sc{background:linear-gradient(135deg,#E94BA8,#6A5CF5)}
.st-flow i{width:26px;height:2px;background:repeating-linear-gradient(90deg,var(--amber) 0 5px,transparent 5px 9px)}
.st-card{display:flex;flex-direction:column;gap:10px;padding:16px;border-radius:22px;background:rgba(242,232,218,.04);border:1px solid var(--line)}
.st-head{display:flex;align-items:center;gap:12px}
.st-head b{font-size:17px;line-height:1.3}
.st-n{flex:none;width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--amber);color:#17120F;font-weight:800;font-size:16px}
.st-d{color:#C9BCAA;line-height:1.55;margin:0}
.st-d b,.st-tip b{color:var(--ink-strong)}
.st-btn .btn{width:100%;min-height:48px}
.st-tip{margin:0;padding:10px 12px;border-radius:14px;background:rgba(233,168,90,.1);border:1px solid rgba(233,168,90,.3);color:#D9CBB7;line-height:1.5}
.sc-phone{display:flex;flex-direction:column;gap:8px;padding:14px;border-radius:18px;background:#000;font-family:-apple-system,BlinkMacSystemFont,"SF Pro Text",system-ui,sans-serif;font-size:14px;color:#fff}
.sc-act{border-radius:14px;background:#1C1C1E;overflow:hidden}
.sc-act.hl,.sc-row.hl,.sc-field.hl,.sc-name.hl,.sc-plus.hl,.sc-times .hl,.sc-al-b.hl{box-shadow:inset 0 0 0 2px var(--amber)}
.sc-top{display:flex;align-items:center;gap:8px;padding:12px;font-weight:600;flex-wrap:wrap;line-height:1.6}
.sc-ic{width:24px;height:24px;border-radius:6px;display:grid;place-items:center;flex:none}
.sc-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border-top:1px solid #2C2C2E;color:#EBEBF5}
.sc-row:first-child{border-top:0}
.sc-act .sc-row.hl{border-radius:10px;margin:2px 6px}
.sc-b{color:#0A84FF;font-weight:500}
.sc-pill{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:7px;background:#2C2C2E;color:#0A84FF;font-size:13px;font-weight:500}
.sc-mono{font-family:ui-monospace,Menlo,monospace;color:#EBEBF5}
.sc-field{display:flex;align-items:center;gap:8px;margin:4px 6px 8px;padding:8px 10px;border-radius:10px;background:#2C2C2E}
.sc-field .sc-k{flex:1;color:#EBEBF5}
.sc-field em{font-style:normal;font-size:11px;color:#8E8E93}
.sc-bar{display:flex;justify-content:space-between;align-items:center;font-size:22px}
.sc-plus{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;color:#0A84FF;font-size:26px;background:#1C1C1E}
.sc-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.sc-grid i{height:46px;border-radius:12px;background:#1C1C1E}
.sc-name{align-self:center;padding:8px 14px;border-radius:12px;font-weight:600;background:#1C1C1E}
.sc-name span{color:#8E8E93}
.sc-alert{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px;border-radius:14px;background:#2C2C2E;text-align:center}
.sc-al-b{width:100%;padding:8px;border-radius:10px;color:#0A84FF;font-weight:600}
.sc-out{padding:10px 12px;border-radius:12px;background:#1C1C1E;font-family:ui-monospace,Menlo,monospace;font-size:12px;color:#EBEBF5}
.sc-times{display:flex;gap:8px;justify-content:center}
.sc-times span{padding:8px 14px;border-radius:10px;background:#1C1C1E;font-weight:600;font-size:16px}
.sc-check{color:#0A84FF;font-weight:700}
.st-done{display:flex;flex-direction:column;align-items:center;gap:4px;padding:16px;text-align:center;border-radius:20px;background:linear-gradient(135deg,rgba(233,168,90,.16),rgba(233,168,90,.04))}
.st-done>b{font-size:18px;color:var(--amber)}
.st-more{padding:12px 16px;border-radius:16px;background:rgba(242,232,218,.04)}
.st-more summary{cursor:pointer;font-weight:600;padding:4px 0}
.st-more[open] summary{margin-bottom:6px}
.st-more p{line-height:1.55}

.sc-app{width:24px;height:24px;border-radius:6px}
.sc-act .sc-ic:has(.sc-app){background:none!important}
.st-appic{float:left;width:44px;height:44px;border-radius:10px;margin:2px 10px 0 0}
.sc-more{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1.5px solid #0A84FF;color:#0A84FF;font-size:14px;font-weight:700}
.sc-add{color:#0A84FF;justify-content:flex-start}
.sc-tg{width:40px;height:24px;border-radius:12px;background:#34C759;position:relative}
.sc-tg::after{content:"";position:absolute;right:2px;top:2px;width:20px;height:20px;border-radius:50%;background:#fff}
.sc-row .sc-pill{margin-left:4px}
.sc-top{flex-wrap:nowrap;align-items:flex-start}.sc-top>span{flex:1;min-width:0}.sc-top .sc-ic{margin-top:2px}

.sc-chev{color:#8E8E93;font-size:18px}
.sc-minus,.sc-plusg{flex:none;width:20px;height:20px;border-radius:50%;background:#FF453A;position:relative}
.sc-plusg{background:#30D158;margin-right:8px}
.sc-minus::after,.sc-plusg::after,.sc-plusg::before{content:"";position:absolute;left:5px;right:5px;top:9px;height:2px;background:#fff;border-radius:1px}
.sc-plusg::before{left:9px;right:9px;top:5px;bottom:5px;height:auto;width:2px}
.sc-add{color:#8E8E93}
.sc-act>.sc-row.sc-add:first-of-type{color:#0A84FF}

.sc-tg.off{background:#3A3A3C}.sc-tg.off::after{right:auto;left:2px}
.sc-search{padding:9px 12px;border-radius:12px;background:#2C2C2E;color:#8E8E93}
.sc-chips{display:flex;gap:8px;overflow:hidden}
.sc-chips span{white-space:nowrap;padding:7px 12px;border-radius:16px;background:#2C2C2E;color:#0A84FF;font-weight:500}

/* Trang chủ màn hình rộng: ngọn nến giống điện thoại */
@media (min-width:1100px){
  .desk-head .streak-pill,.desk-head .sos-pill{flex:none}
  .desk-candle{position:relative;overflow:hidden;border-radius:28px;border:1px solid rgba(242,232,218,.08);background:radial-gradient(ellipse at 50% 100%,#22180F 0%,#15100C 60%,#120E0B 100%);display:flex;align-items:flex-end;justify-content:center;min-height:440px}
  .desk-candle .home-glow{bottom:150px;width:520px;height:520px}
  .desk-candle-in{position:relative;z-index:1;width:100%;max-width:420px;display:flex;flex-direction:column;gap:12px;padding:0 24px 40px}
  .desk-candle .hall-count{position:relative;top:auto;margin-bottom:22px}
  .desk-candle .hall-count .num{font-size:46px}
  .desk-candle .btn{width:100%}
  .desk-col #slot-card:empty{display:none}
  .cm-list{display:flex;flex-direction:column;gap:4px}
  .cm-row{display:flex;align-items:center;gap:10px;padding:6px 8px;border-radius:12px;border:0;background:none;color:inherit;font:inherit;font-size:14px;cursor:pointer;text-align:left}
  .cm-row:hover{background:rgba(242,232,218,.05)}
  .cm-row .grow{min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
}
/* iPad dựng đứng: cột rộng hơn, bớt khoảng trống */
@media (min-width:600px) and (max-width:899px){
  #app{max-width:680px}
  .screen{padding-left:32px;padding-right:32px}
}
@media (min-width:600px) and (min-height:1000px){
  .home-hero{flex:0 0 auto;min-height:520px}
  .home-glow{width:420px;height:420px}
}

/* Tập trung (Pomodoro) */
.fo-modes{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.fo-mode{padding:14px 12px!important}
.fo-mode{display:flex;flex-direction:column;gap:2px;padding:16px;border-radius:18px;border:1px solid var(--line);background:rgba(242,232,218,.04);color:var(--ink);font:inherit;text-align:left;cursor:pointer}
.fo-mode b{font-size:22px;font-family:var(--serif);color:var(--ink-strong)}
.fo-mode span{font-size:13px;color:#A89A88}
.fo-mode[aria-pressed=true]{border-color:rgba(233,168,90,.6);background:rgba(233,168,90,.12)}
.fo-today{display:flex;justify-content:space-between;align-items:baseline;padding:12px 16px;border-radius:16px;background:rgba(242,232,218,.04);font-size:14px;color:#A89A88}
.fo-today b{color:var(--ink-strong);font-weight:600}
.fo-done{padding:12px 16px;border-radius:16px;background:rgba(233,168,90,.1);border:1px solid rgba(233,168,90,.3);font-size:14px}
.fo-ring{position:relative;width:min(300px,78vw);aspect-ratio:1;margin:0 auto}
.fo-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.fo-track{fill:none;stroke:rgba(242,232,218,.08);stroke-width:8}
.fo-prog{fill:none;stroke:var(--amber);stroke-width:8;stroke-linecap:round;transition:stroke-dashoffset .5s linear}
.fo-run.brk .fo-prog{stroke:#8DB38B}
.fo-mid{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px}
.fo-mid b{font-family:var(--serif);font-size:56px;font-weight:500;color:var(--ink-strong);font-variant-numeric:tabular-nums}

/* Mẹ & bé */
.mb-card{gap:6px}
.mb-on{display:flex;align-items:center;gap:10px;padding:12px 16px;border-radius:16px;background:rgba(233,168,90,.1);font-size:14px}
.mb-on i{width:8px;height:8px;border-radius:50%;background:var(--amber);box-shadow:0 0 0 4px rgba(233,168,90,.25);animation:hglow 3s ease-in-out infinite}
#ru-vol{width:100%;accent-color:var(--amber);min-height:32px}

/* Đường dây hỗ trợ trong SOS */
.hl-box{padding:12px 14px;border-radius:16px;background:rgba(242,232,218,.04);border:1px solid var(--line)}
.hl-box summary{cursor:pointer;font-weight:600;color:var(--ink-strong)}
.hl-row{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:14px;background:rgba(242,232,218,.05);color:inherit;text-decoration:none}
.hl-ic{width:34px;height:34px;flex:none;border-radius:50%;display:grid;place-items:center;background:rgba(233,168,90,.16);color:var(--amber)}
.hl-num{font-weight:700;font-size:17px;color:var(--amber);white-space:nowrap}
.hl-row{align-items:flex-start}.hl-ic{margin-top:2px}

.gd-dark{color:#7d7266}.gd-dark h1,.gd-dark #gd-line{color:#8a7d6e!important}.gd-dark .btn.primary{background:#3a2c1f;color:#c9a978}
.mb-warn{padding:10px 12px;border-radius:14px;background:rgba(217,119,79,.12);border:1px solid rgba(217,119,79,.35);line-height:1.5}
.kid-orb{flex:1;display:grid;place-items:center;min-height:180px}
.kid-orb i{width:140px;height:140px;border-radius:50%;background:radial-gradient(circle at 40% 35%,#FFE7BE,#E9A85A 60%,#C77F3A);box-shadow:0 0 50px rgba(233,168,90,.45);animation:kidbreath 8s ease-in-out infinite}
@keyframes kidbreath{0%,100%{transform:scale(.6)}45%,55%{transform:scale(1)}}
@media (prefers-reduced-motion:reduce){.kid-orb i{animation:none}}

/* Tiện ích chia nhóm + Lối tắt trang chủ */
.hub-group{font-size:13px;font-weight:700;letter-spacing:.04em;color:var(--amber);text-transform:uppercase;margin-top:6px}
.hub-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.hub-ic{width:36px;height:36px;border-radius:12px;display:grid;place-items:center;background:rgba(233,168,90,.12);color:var(--amber)}
.hub-row.sub{margin-left:16px}
.ls-row{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;position:relative;z-index:1;margin:4px 0 8px}
.ls-item{display:flex;flex-direction:column;align-items:center;gap:6px;text-decoration:none;color:var(--ink)}
.ls-ico{width:52px;height:52px;border-radius:50%;display:grid;place-items:center;background:rgba(242,232,218,.06);border:1px solid var(--line);color:var(--amber);transition:transform .15s}
.ls-item:active .ls-ico{transform:scale(.94)}
.ls-lbl{font-size:12.5px;text-align:center;line-height:1.25;color:#D9CDBD}
.ls-row.desk{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:0}
.ls-row.desk .ls-item{flex-direction:row;justify-content:flex-start;gap:14px;padding:16px 18px;border-radius:20px;background:rgba(242,232,218,.04);border:1px solid var(--line)}
.ls-row.desk .ls-ico{width:44px;height:44px;border:0;background:rgba(233,168,90,.12)}
.ls-row.desk .ls-lbl{font-size:15px;font-weight:600;text-align:left}
/* Điện thoại: ô tiện ích gọn 2 cột, ẩn mô tả dài để đỡ phải cuộn */
@media (max-width:599px){
  .hub-group + .hub-grid,.hub-grid{grid-template-columns:1fr 1fr;gap:10px}
  .hub-grid .hub-card{padding:14px;gap:6px;min-height:0}
  .hub-grid .hub-card > .small.muted{display:none}
  .hub-grid .hub-card b{font-size:15px!important;line-height:1.3}
  .hub-top{flex-direction:column;align-items:flex-start;gap:8px}
}
.hub-card.mb-card{min-height:0!important;justify-content:flex-start!important}

/* ===== Trang chủ vừa khít một màn hình, không cuộn ===== */
.home-screen{height:100dvh;min-height:0;overflow:hidden;gap:clamp(8px,1.6dvh,16px)}
body.has-tabs .home-screen{padding-bottom:calc(76px + env(safe-area-inset-bottom))}
.home-screen .home-hero{flex:1 1 0;min-height:0;padding:0;justify-content:flex-end}
.home-screen .home-hero .hall-count{margin-bottom:4px}
.home-screen .home-hero .hall-count .num{font-size:clamp(28px,5dvh,40px)}
.home-screen .home-glow{bottom:40px;width:min(320px,42dvh);height:min(320px,42dvh)}
.home-acts{display:flex;gap:10px;position:relative;z-index:1}
.home-acts .home-sit{flex:2;min-height:52px}
.home-acts .home-breath{flex:1;min-height:52px;padding:0 10px}
.home-screen .ls-row{margin:2px 0 0}
.home-today{display:flex;flex-direction:column;border-radius:20px;border:1px solid var(--line);background:rgba(242,232,218,.05);overflow:hidden;flex:none}
.home-today .home-rt{border:0;border-radius:0;background:none;padding:12px 12px 12px 16px}
.home-today #slot-card .home-slot{border-radius:0;border-top:1px solid var(--line);padding:10px 16px;background:none}
.home-rt-t{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block}
.home-today .home-play{width:42px;height:42px}
/* Máy thấp (iPhone SE…): thu gọn bớt */
@media (max-height:700px){
  .home-screen .ls-lbl{display:none}
  .home-screen .ls-ico{width:44px;height:44px}
  .home-screen .home-greet .small{display:none}
}
/* iPad dọc: cột rộng, vẫn không cuộn */
@media (min-width:600px) and (min-height:1000px){
  .home-screen .home-hero{flex:1 1 0;min-height:0}
  .home-screen .home-glow{width:420px;height:420px}
}
/* Máy tính / iPad ngang: khít một màn hình */
@media (min-width:1100px){
  .desk-home{height:100vh;min-height:0;overflow:hidden;padding:24px 32px;gap:18px}
  .desk-grid{flex:1 1 0;min-height:0;grid-template-columns:minmax(0,1fr) 340px}
  .desk-candle{min-height:0}
  .desk-candle-in{padding-bottom:28px}
  .desk-candle .home-acts .btn{width:auto}
  .desk-col{min-height:0;overflow:hidden}
  .desk-col .home-rt{flex:none}
  .desk-fill{flex:1 1 0;min-height:0;overflow:hidden}
}
/* Cân đối phần "Chỉ mình bạn": chữ nằm giữa vùng trống, ánh nến toả đúng sau chữ */
.home-screen .home-hero{justify-content:center}
.home-screen .home-hero .hall-count{margin:0}
.home-screen .home-glow{top:50%;bottom:auto;transform:translate(-50%,-50%)}
@keyframes hglowc{0%,100%{opacity:.75;transform:translate(-50%,-50%) scale(.96)}50%{opacity:1;transform:translate(-50%,-50%) scale(1.04)}}
.home-screen .home-glow,.desk-candle .home-glow{animation:hglowc 6s ease-in-out infinite}
@media (min-width:1100px){
  .desk-candle{align-items:center}
  .desk-candle .home-glow{top:42%;bottom:auto;transform:translate(-50%,-50%)}
  .desk-candle-in{padding:0 24px;gap:26px;align-items:center}
  .desk-candle .hall-count{margin:0}
  .desk-candle .home-acts{width:100%;max-width:380px}
}
@media (prefers-reduced-motion:reduce){.home-screen .home-glow,.desk-candle .home-glow{animation:none}}

/* ===== Trang chủ bản 10: ngọn nến làm tâm điểm ===== */
.home-screen .home-hero{flex:1 1 0;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;padding:0}
.hc-candle{flex:0 1 auto;width:auto;height:auto;max-width:min(230px,60vw);max-height:100%;min-height:0;overflow:visible}
.home-screen .hc-candle{max-height:calc(100% - 70px)}
.hc-br{transform-origin:150px 150px;animation:hcbr 8s ease-in-out infinite}
@keyframes hcbr{0%,100%{transform:scale(.88);opacity:.75}50%{transform:scale(1.06);opacity:1}}
.hc-fl{transform-origin:150px 210px;animation:hcfl 3s ease-in-out infinite}
@keyframes hcfl{0%,100%{transform:scale(1)}50%{transform:scale(1.03,1.06)}}
.still .hc-br,.still .hc-fl{animation:none}
@media (prefers-reduced-motion:reduce){.hc-br,.hc-fl{animation:none}}
.home-screen .home-hero .hall-count{position:relative;top:auto;margin:-6px 0 0;flex:none}
.home-screen .home-hero .hall-count .num{font-size:clamp(24px,3.6dvh,30px)}
.home-screen .home-hero .hall-count .sub{font-size:15px}
.home-screen .home-sit{min-height:54px;flex:none}
.home-or{align-self:center;margin-top:-6px;font-size:14px;color:#D9CDBD;text-decoration:none;flex:none}
.home-or u{color:var(--amber);text-decoration-color:rgba(233,168,90,.6);text-underline-offset:4px}
.home-rt-k{font-size:12px;font-weight:700;letter-spacing:.03em;color:var(--amber);text-transform:uppercase}
.home-rt-s{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-height:700px){.home-screen .hc-candle{max-width:150px}.home-or{margin-top:-8px}}
@media (min-width:1100px){
  .desk-candle{display:flex;align-items:center;justify-content:center;background:radial-gradient(ellipse at 50% 45%,#22180F 0%,#15100C 60%,#120E0B 100%)}
  .desk-candle-in{display:flex;flex-direction:column;align-items:center;gap:8px;max-width:none;padding:0 24px;height:100%;justify-content:center;min-height:0}
  .desk-candle .hc-candle{max-width:250px;max-height:calc(100% - 200px)}
  .desk-candle .hall-count{position:relative;top:auto;margin:-4px 0 0}
  .desk-candle .hall-count .num{font-size:40px}
  .desk-candle .home-acts{display:flex;gap:12px;margin-top:14px;width:auto;max-width:none}
  .desk-candle .home-acts .home-sit{flex:none;padding:0 44px;min-height:52px}
  .desk-candle .home-acts .home-breath{flex:none;padding:0 24px;min-height:52px}
}
@media (min-width:600px) and (min-height:1000px){.home-screen .hc-candle{max-width:320px}.home-screen .home-hero .hall-count .num{font-size:36px}}
@media (min-width:1100px) and (min-height:860px){.desk-candle .hc-candle{max-width:300px}}
.yt-wrap{min-height:200px;min-width:200px}

/* Tập trung: video Pomodoro đặt cạnh đồng hồ (màn rộng) hoặc ngay trên đồng hồ (điện thoại), không che nút */
.fo-stage{display:flex;flex-direction:column;align-items:center;gap:20px;width:100%}
.fo-vslot{display:none}
body.fo-vid .fo-run .fo-vslot{display:block;width:min(356px,100%);aspect-ratio:16/9;min-height:200px;flex:none}
body.fo-vid .fo-run .fo-ring{width:min(210px,56vw)}
body.fo-vid .fo-run .fo-mid b{font-size:42px}
@media (min-width:600px){
  body.fo-vid .fo-run .fo-stage{flex-direction:row;justify-content:center;align-items:center;gap:28px}
  body.fo-vid .fo-run .fo-vslot{width:auto;flex:1 1 0;max-width:520px;min-width:280px}
  body.fo-vid .fo-run .fo-ring{width:230px;flex:none}
}
@media (min-width:1100px){
  body.fo-vid .has-side .screen.fo-run,body.fo-vid .screen.fo-run{max-width:960px}
}

.fo-vurl{flex:1;min-width:0;min-height:44px;padding:0 14px;border-radius:12px;border:1px solid var(--line);background:rgba(242,232,218,.05);color:var(--ink);font:inherit;font-size:15px}
.fo-vurl{flex:1 1 auto!important}

/* ===== Giới thiệu app ===== */
.intro{align-items:stretch;text-align:center}
.intro-hero{display:flex;justify-content:center}
.intro-hero.lit-up .hc-candle{animation:introLit 1.4s ease-out both}
@keyframes introLit{from{transform:scale(.7);opacity:0}to{transform:none;opacity:1}}
.intro-h{font-size:28px;line-height:1.3;max-width:360px}
.intro-pts{display:flex;flex-direction:column;gap:10px;text-align:left;max-width:380px;margin:0 auto;width:100%}
.intro-pts>div{display:grid;grid-template-columns:36px 1fr;column-gap:12px;align-items:center;padding:12px 14px;border-radius:16px;background:var(--card);border:1px solid var(--line)}
.intro-pts span{grid-row:span 2;font-size:22px;text-align:center}
.intro-pts small{color:var(--muted);font-size:13px}
.intro-go{min-height:56px;font-size:17px;max-width:420px;margin:0 auto;width:100%}
.intro-orb-wrap{position:relative;width:260px;height:260px;margin:0 auto;display:flex;align-items:center;justify-content:center}
.intro-orb{position:absolute;inset:0;border-radius:50%;background:radial-gradient(circle,rgba(243,190,114,.55),rgba(233,168,90,.12) 62%,transparent 72%);transform:scale(.55);will-change:transform}
.intro-orb-t{position:relative;font-family:var(--serif);font-size:26px;color:var(--ink-strong)}
.rm-opts{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.rm-opt{display:flex;flex-direction:column;gap:2px;align-items:center;padding:14px 6px;border-radius:16px;border:1px solid var(--line);background:var(--card);color:var(--ink)}
.rm-opt b{font-size:20px}
.rm-opt[aria-pressed="true"]{border-color:var(--amber);background:rgba(233,168,90,.12);color:var(--amber)}
.rm-custom{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:12px 14px;border-radius:14px;border:1px solid var(--line)}
.rm-custom input{background:transparent;border:0;color:var(--ink);font-size:17px;color-scheme:dark}

/* ===== Nhiệm vụ & quà ===== */
.q-pill{position:relative;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;border-radius:22px;border:1px solid var(--line);color:var(--amber);background:rgba(233,168,90,.06)}
.q-pill i{position:absolute;top:-4px;right:-4px;min-width:18px;height:18px;padding:0 5px;border-radius:9px;background:#E0645A;color:#fff;font-style:normal;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.q-row{display:grid;grid-template-columns:28px 1fr auto;gap:12px;align-items:center;padding:10px 0;border-top:1px solid rgba(242,232,218,.08)}
.q-row:first-of-type{border-top:0}
.q-check{width:26px;height:26px;border-radius:50%;border:1.5px solid var(--line);display:flex;align-items:center;justify-content:center;font-size:14px;color:#1A120B;font-weight:800}
.q-row.done .q-check{background:var(--amber);border-color:var(--amber)}
.q-row.done b{color:var(--muted);text-decoration:line-through;text-decoration-color:rgba(207,193,172,.4)}
.q-row.ready{background:rgba(233,168,90,.07);border-radius:14px;padding:10px;margin:0 -10px}
.q-main{display:flex;flex-direction:column;gap:2px;color:var(--ink);min-width:0}
.q-claim{min-height:38px;padding:0 14px;font-size:14px;animation:qPulse 1.8s ease-in-out infinite}
@keyframes qPulse{50%{box-shadow:0 0 0 6px rgba(233,168,90,.18)}}
.q-gift{opacity:.75}
.q-badge{font-size:20px}
.q-skin{display:inline-block;width:22px;height:28px;border-radius:50% 50% 45% 45%/60% 60% 40% 40%;background:linear-gradient(var(--a),var(--b))}
.q-skins{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:10px}
.q-sk{position:relative;display:flex;flex-direction:column;align-items:center;gap:6px;padding:12px 6px;border-radius:14px;border:1px solid var(--line);background:var(--card);color:var(--ink)}
.q-sk.on{border-color:var(--amber);background:rgba(233,168,90,.12)}
.q-sk.locked{opacity:.4;cursor:default}
.q-sk.locked .q-skin{filter:grayscale(1)}
.q-sk i{position:absolute;top:6px;right:8px;font-style:normal;font-size:12px}
.q-lotus{font-weight:700;color:#F5A9C0}
.q-bd{padding:6px 10px;border-radius:999px;background:rgba(233,168,90,.1);border:1px solid rgba(233,168,90,.3);font-size:13px}
.q-cele{position:fixed;inset:0;z-index:200;background:rgba(8,6,5,.72);display:flex;align-items:center;justify-content:center;padding:24px;animation:qFade .25s ease-out}
.q-cele-in{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;max-width:340px;padding:28px 24px;border-radius:24px;background:#1C1510;border:1px solid rgba(233,168,90,.35);animation:qPop .45s cubic-bezier(.2,1.4,.4,1)}
.q-cele-in b{font-family:var(--serif);font-size:22px;font-weight:500}
.q-cele-ic{font-size:44px}
.q-burst{position:absolute;top:56px;left:50%;width:0;height:0}
.q-burst i{position:absolute;width:6px;height:6px;border-radius:50%;background:var(--amber);animation:qBurst .9s ease-out forwards}
.q-burst i:nth-child(3n){background:#F5A9C0}.q-burst i:nth-child(3n+1){background:#A9D98A}
.q-burst i:nth-child(1){--x:70px;--y:-10px}.q-burst i:nth-child(2){--x:-70px;--y:-14px}.q-burst i:nth-child(3){--x:50px;--y:-60px}.q-burst i:nth-child(4){--x:-50px;--y:-58px}.q-burst i:nth-child(5){--x:0;--y:-80px}.q-burst i:nth-child(6){--x:84px;--y:30px}.q-burst i:nth-child(7){--x:-84px;--y:30px}.q-burst i:nth-child(8){--x:30px;--y:-84px}.q-burst i:nth-child(9){--x:-30px;--y:-84px}.q-burst i:nth-child(10){--x:96px;--y:-40px}.q-burst i:nth-child(11){--x:-96px;--y:-40px}.q-burst i:nth-child(12){--x:0;--y:60px}
@keyframes qBurst{from{transform:translate(0,0) scale(1);opacity:1}to{transform:translate(var(--x),var(--y)) scale(.4);opacity:0}}
@keyframes qPop{from{transform:scale(.7);opacity:0}to{transform:none;opacity:1}}
@keyframes qFade{from{opacity:0}}
.hub-lock{border-style:dashed}
@media (prefers-reduced-motion:reduce){.q-claim,.q-burst i,.q-cele-in,.intro-hero.lit-up .hc-candle{animation:none}}
.home-top .home-greet{flex:1;min-width:0}
.home-top .home-greet>*{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:360px){.home-top #home-sound{display:none}}
@media (max-width:420px){.home-top{gap:6px}.home-top .streak-pill{padding:0 10px}.home-top .sos-pill{padding:0 11px}.home-top .q-pill,.home-top #home-sound{width:40px;height:40px}}

/* ===== Nhạc nền YouTube ===== */
.ytm{position:fixed;right:12px;bottom:calc(84px + env(safe-area-inset-bottom));z-index:55;width:200px;height:113px;border-radius:12px;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,.5);border:1px solid var(--line);background:#000}
.ytm iframe{width:100%;height:100%;display:block}
.ytm-x{position:absolute;top:4px;right:4px;width:28px;height:28px;border-radius:14px;border:0;background:rgba(0,0,0,.65);color:#fff;font-size:13px}
@media (min-width:900px){.ytm{bottom:20px;right:20px}}
.ytm-add{display:flex;gap:8px;align-items:center}
.ytm-add input{flex:1;min-width:0;height:40px;padding:0 12px;border-radius:12px;border:1px solid var(--line);background:rgba(242,232,218,.04);color:var(--ink);font-size:15px}
.ytm-add .chip{flex-shrink:0}
.mus-item{display:inline-flex;align-items:center;gap:2px}
.mus-item .chip{max-width:220px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mus-del{width:28px;height:28px;border-radius:14px;border:0;background:transparent;color:var(--faint);font-size:12px}
.mus-chip{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* ===== Thử thách nhóm ===== */
.tc-card{display:flex;flex-direction:column;gap:12px;padding:14px;border-radius:16px;background:rgba(233,168,90,.06);border:1px solid rgba(233,168,90,.28)}
.tc-card.win{background:rgba(233,168,90,.12)}
.tc-big{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.tc-big b{font-family:var(--serif);font-size:34px;font-weight:500;color:var(--amber)}
.tc-bar{position:relative;height:10px;border-radius:6px;background:rgba(242,232,218,.08)}
.tc-bar i{display:block;height:100%;border-radius:6px;background:var(--amber);transition:width .8s}
.tc-bar em{position:absolute;top:-4px;bottom:-4px;width:2px;background:var(--ink);opacity:.5;border-radius:1px}
.tc-days{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.tc-day{display:flex;flex-direction:column;align-items:center;gap:4px}
.tc-day i{width:100%;max-width:34px;aspect-ratio:1;border-radius:10px;border:1px solid var(--line);background:linear-gradient(to top,rgba(233,168,90,.85) calc(var(--f)*100%),transparent 0)}
.tc-day.now i{border-color:var(--amber)}
.tc-day.fut i{opacity:.35;border-style:dashed}
.tc-day small{font-size:11px;color:var(--faint)}
.tc-who{display:flex;flex-direction:column;gap:8px}
.tc-avs{display:flex;flex-wrap:wrap;gap:6px}
.tc-av{position:relative;opacity:.55}
.tc-av.lit{opacity:1}
.tc-av i{position:absolute;right:-3px;bottom:-3px;width:16px;height:16px;border-radius:8px;background:var(--amber);color:#1A120B;font-style:normal;font-size:10px;font-weight:800;display:flex;align-items:center;justify-content:center}
.tc-qr{width:240px;max-width:70vw;padding:14px;background:#F2E8DA;border-radius:18px}
.tc-qr svg{display:block;width:100%;height:auto}

/* ===== Ngắt dòng gọn: tiêu đề chia đều các dòng, đoạn văn không để một chữ mồ côi ===== */
h1,h2,h3,.intro-h,.sheet-head b,.q-cele-in b,.tc-card>b,.hall-count,.center{text-wrap-style:balance}
p,.muted,.small,.faint,li,label,summary{text-wrap-style:pretty}
/* Chống ngắt dòng xấu */
b{text-wrap-style:balance}
.chip,.btn,.ci-code,.q-claim{white-space:nowrap}
.btn.grow{white-space:normal;text-wrap:balance}
.hub-grid>:last-child:nth-child(odd){grid-column:1/-1}
.q-row.ready{grid-template-columns:28px 1fr}
.q-row.ready .q-claim{grid-column:2;justify-self:start}
.ci-nudge.grow{font-size:14px;gap:6px;padding:0 10px}
.ci-nudge.grow span{white-space:nowrap}
.pf-link{display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:left;width:100%;color:var(--ink);font:inherit;cursor:pointer}
.pf-link b{color:var(--ink)}
.ci-lit{color:var(--amber)}

/* ===== Huy hiệu ===== */
.bd-count{padding:6px 12px;border-radius:999px;border:1px solid rgba(233,168,90,.4);color:var(--amber);font-weight:700;font-size:14px;white-space:nowrap}
.bd-link{display:flex;justify-content:space-between;align-items:center;gap:12px;color:var(--ink);background:rgba(233,168,90,.08);border-color:rgba(233,168,90,.3)}
.bd-here{color:var(--amber)}
.bd-gt{font-size:17px}
.bd-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
@media (min-width:600px){.bd-grid{grid-template-columns:repeat(auto-fill,minmax(130px,1fr))}}
.bd-tile{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 6px 12px;border-radius:16px;border:1px solid var(--line);background:var(--card);color:var(--ink);text-align:center;min-width:0}
.bd-tile b{font-size:13px;line-height:1.3;font-weight:600}
.bd-tile.got{border-color:rgba(233,168,90,.35);background:rgba(233,168,90,.06)}
.bd-tile:not(.got) b{color:var(--muted)}
.bd-medal{display:block;flex-shrink:0}
.bd-ok{color:var(--amber);font-weight:600}
.bd-bar{width:70%;height:4px;border-radius:2px;background:rgba(242,232,218,.1);overflow:hidden}
.bd-bar i{display:block;height:100%;background:var(--amber);opacity:.7}
.bd-route{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}
.bd-route li{position:relative;display:flex;gap:14px;padding:0 0 14px 0}
.bd-route li:last-child{padding-bottom:0}
.bd-route li>i{position:relative;flex-shrink:0;width:14px;height:14px;margin-top:3px;border-radius:50%;border:2px solid rgba(242,232,218,.25);background:var(--bg)}
.bd-route li:not(:last-child)>i::after{content:'';position:absolute;left:4px;top:14px;width:2px;height:calc(100% + 20px);background:rgba(242,232,218,.12)}
.bd-route li.done>i{border-color:var(--amber);background:var(--amber)}
.bd-route li.done:not(:last-child)>i::after{background:rgba(233,168,90,.6)}
.bd-route li.cur>i{border-color:var(--amber);box-shadow:0 0 0 4px rgba(233,168,90,.18)}
.bd-route li:not(.done) b{color:var(--muted);font-weight:500}

/* ===== Bảng xếp hạng ===== */
.lb-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:8px}
.lb-row{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:14px;background:rgba(242,232,218,.03)}
.lb-row.me{background:rgba(233,168,90,.08)}
.lb-rank{width:22px;flex-shrink:0;text-align:center;font-weight:700;color:var(--faint)}
.lb-rank.r1{color:#E9B949}.lb-rank.r2{color:#C3CCDB}.lb-rank.r3{color:#C08457}
.lb-name{display:flex;align-items:center;gap:4px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-name b{overflow:hidden;text-overflow:ellipsis}
.lb-tt{font-size:14px;letter-spacing:1px}
.lb-bar{height:4px;border-radius:2px;background:rgba(242,232,218,.08);overflow:hidden}
.lb-bar i{display:block;height:100%;background:var(--amber);border-radius:2px}
.lb-val{display:flex;flex-direction:column;align-items:flex-end;flex-shrink:0;min-width:64px}
.lb-val b{font-size:15px}
.lb-val small{font-size:11px;color:var(--faint)}
.lb-titles{display:flex;flex-direction:column;gap:8px;padding-top:12px;border-top:1px solid rgba(242,232,218,.08)}
.lb-tgrid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.lb-t{display:flex;gap:8px;align-items:flex-start;padding:10px;border-radius:12px;background:rgba(233,168,90,.06);min-width:0}
.lb-ti{font-size:20px;line-height:1.2}
.lb-t b{font-size:13px}
.lb-tn{color:var(--amber);font-weight:600}
.lb-who{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lb-name b{white-space:nowrap}
.lb-name{gap:6px}
.lb-sub{display:flex;align-items:center;gap:8px}
.lb-sub .lb-bar{flex:1}
.lb-tt{font-size:13px;letter-spacing:2px;flex-shrink:0;line-height:1}
.lb-tgrid{grid-template-columns:1fr}
.lb-t{align-items:center;gap:10px}
.lb-tn{font-size:14px;font-weight:600;color:var(--amber);white-space:nowrap}
.lb-who{max-width:42%;text-align:right}
.lb-why{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.lb-t .lb-who{max-width:100%;text-align:left;font-size:15px}
.q-cele-in span{text-wrap-style:balance}
/* Kiểu nhóm */
.ci-modes{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:4px;border-radius:16px;border:1px solid var(--line);background:rgba(242,232,218,.03)}
.ci-mo{display:flex;align-items:center;justify-content:center;gap:5px;min-height:38px;padding:0 6px;border:0;border-radius:12px;background:none;color:var(--muted);font:inherit;font-size:13px;font-weight:600;white-space:nowrap}
.ci-mo[aria-pressed="true"]{background:rgba(233,168,90,.16);color:var(--amber)}
.lb-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
.lb-tabs::-webkit-scrollbar{display:none}
.lb-tabs .chip{flex-shrink:0}
.lb-tabs.four{display:grid;grid-template-columns:1fr 1fr;gap:8px;overflow:visible}
.lb-tabs.four .chip{min-height:40px;padding:0 10px;font-size:13px}
.ci-mo svg{flex-shrink:0}

/* Hành trình nhiều chặng */
.q-prog{display:block;height:5px;border-radius:3px;background:rgba(242,232,218,.12);overflow:hidden;margin-top:6px}
.q-prog i{display:block;height:100%;background:var(--amber);border-radius:3px}
.q-pn{display:block;margin-top:3px;white-space:nowrap}
.q-stage{border-top:1px solid rgba(242,232,218,.08);padding-top:6px}
.q-stage:first-of-type{border-top:0;padding-top:0}
.q-stage>summary{display:flex;align-items:center;gap:12px;list-style:none;cursor:pointer;padding:8px 0}
.q-stage>summary::-webkit-details-marker{display:none}
.q-st-n{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:rgba(233,168,90,.18);color:var(--amber);font-weight:600;font-size:13px;flex:none}
.q-st-t{display:flex;flex-direction:column;gap:1px;flex:1;min-width:0}
.q-st-c{white-space:nowrap}
.q-stage[open]>summary .q-st-c::after{content:" ˅"}
.q-stage:not([open])>summary .q-st-c::after{content:" ›"}

/* Hướng dẫn kết nối số bước: 3 màn hình */
.wz{display:flex;flex-direction:column;gap:12px;padding:18px;border-radius:22px;background:rgba(242,232,218,.05);border:1px solid var(--line)}
.wz-dots{display:flex;gap:6px}.wz-dots i{flex:1;height:4px;border-radius:2px;background:rgba(242,232,218,.16)}.wz-dots i.on{background:var(--amber)}
.wz-h{margin:0;font-size:22px;line-height:1.3;text-wrap-style:balance}
.wz-d{margin:0;line-height:1.55;text-wrap-style:pretty}
.wz-tip{margin:0;line-height:1.5;text-wrap-style:pretty}
.wz-code{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 14px;border-radius:12px;border:1px solid var(--line)}
.wz-code code{font-size:14px}
.wz-big{padding-top:15px;padding-bottom:15px;font-size:17px}
.wz-st{display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:12px;font-size:15px}
.wz-st.wait{background:rgba(233,168,90,.14);color:var(--amber)}
.wz-st.ok{background:rgba(120,200,140,.16);color:#9fe0b0}
.wz-watch{display:flex;flex-direction:column;gap:6px;padding:12px 14px;border-radius:14px;background:rgba(233,168,90,.12);border:1px solid rgba(233,168,90,.4);font-size:15px;line-height:1.5}
.wz-watch ol{margin:0;padding-left:20px;display:flex;flex-direction:column;gap:3px}

.bd-st{border-top:1px solid rgba(242,232,218,.1);padding-top:12px}
.bd-st>summary{cursor:pointer;list-style:none;display:flex;justify-content:space-between;align-items:baseline;gap:12px;padding-bottom:12px;font-weight:600}
.bd-st>summary::-webkit-details-marker{display:none}
.bd-chev{display:inline-block;margin-left:6px;font-style:normal;transition:transform .2s}
.bd-st[open]>summary .bd-chev{transform:rotate(90deg)}

.hub-dim{opacity:.42;text-align:left;font:inherit;color:inherit;cursor:pointer;width:100%}
#hub-q::-webkit-search-cancel-button{display:none}
