/* focus-zones.css — zone boxes + condensed sounds on the ORIGINAL green/purple design
   (Audi 2026-10-17: "พอกลับมาเป็นแบบเดิมมันก็ยังไงๆ … สร้างกล่องแบ่งโซนให้มันหรอ" → chose กล่องแบ่งโซน + ย่อเสียง).
   Uses the page's own mode colour (--mode / --mode-rgb: green focus · purple meditation · blue community).
   Scoped under html.fz so it reverts by dropping one class. */

/* zone boxes: mode-tinted glass, lighter than the sky, one per zone */
html.fz #focus-app :is(.timer-container, .sounds-section, .stats-section, .leaderboard-section, .meditation-timer-card, .meditation-options, .meditation-analytics, .community-card) {
    background: linear-gradient(160deg, rgba(var(--mode-rgb), .16) 0%, rgba(16, 26, 46, .9) 42%, rgba(11, 18, 34, .92) 100%) !important;
    border: 1px solid rgba(var(--mode-rgb), .34) !important;
    border-radius: 24px !important;
    box-shadow: 0 22px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .06), 0 0 40px rgba(var(--mode-rgb), .08) !important;
    padding: clamp(22px, 2.6vw, 32px) !important;
}
html.fz[data-theme=light] #focus-app :is(.timer-container, .sounds-section, .stats-section, .leaderboard-section, .meditation-timer-card, .meditation-options, .meditation-analytics, .community-card) {
    background: linear-gradient(160deg, rgba(var(--mode-rgb), .16) 0%, #ffffff 46%, #f7f9fd 100%) !important;
    border-color: rgba(var(--mode-rgb), .45) !important;
    box-shadow: 0 18px 40px rgba(40, 70, 140, .12), inset 0 1px 0 #fff !important;
}

/* the timer is the focal point: bigger glowing ring in the mode colour */
html.fz #focus-app .timer-ring-wrap { width: clamp(260px, 26vw, 320px); height: clamp(260px, 26vw, 320px); }
html.fz #focus-app #timer-ring { filter: drop-shadow(0 0 10px rgba(var(--mode-rgb), .65)) !important; stroke-width: 7 !important; }
html.fz #focus-app #ring-bg { stroke: rgba(var(--mode-rgb), .16) !important; stroke-width: 7 !important; }
html.fz #focus-app .timer-container { background-image: radial-gradient(circle at 50% 52%, rgba(var(--mode-rgb), .16), transparent 46%), linear-gradient(160deg, rgba(var(--mode-rgb), .16) 0%, rgba(16, 26, 46, .9) 42%, rgba(11, 18, 34, .92) 100%) !important; }
html.fz[data-theme=light] #focus-app .timer-container { background-image: radial-gradient(circle at 50% 52%, rgba(var(--mode-rgb), .14), transparent 46%), linear-gradient(160deg, rgba(var(--mode-rgb), .16) 0%, #ffffff 46%, #f7f9fd 100%) !important; }

/* sounds: one quick row first, everything else folded */
html.fz #focus-app .fz-quick { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
html.fz #focus-app .fz-chip { min-height: 48px; padding: 0 18px; border-radius: 999px; border: 1px solid rgba(var(--mode-rgb), .4); background: rgba(255, 255, 255, .05);
    color: var(--text); font-family: var(--font-body); font-size: 1rem; font-weight: 600; cursor: pointer; transition: background .2s, border-color .2s, box-shadow .2s, translate .12s; }
html.fz #focus-app .fz-chip:hover { border-color: rgba(var(--mode-rgb), .8); background: rgba(var(--mode-rgb), .1); }
html.fz #focus-app .fz-chip:active { translate: 0 1px; }
html.fz #focus-app .fz-chip[aria-pressed="true"] { background: var(--mode); color: var(--mode-ink); border-color: var(--mode); box-shadow: 0 0 20px rgba(var(--mode-rgb), .45); }
html.fz #focus-app .fz-chip:focus-visible, html.fz #focus-app .fz-more > summary:focus-visible { outline: 3px solid rgba(var(--mode-rgb), .8); outline-offset: 3px; }
html.fz[data-theme=light] #focus-app .fz-chip:not([aria-pressed="true"]) { background: #ffffff; color: #1c2433; border-color: rgba(var(--mode-rgb), .55); }
html.fz #focus-app .fz-quick-note { margin: 2px 0 0; font-size: .92rem; color: var(--calm-ink-2); }
html.fz #focus-app .fz-more { margin-top: 14px; border-top: 1px solid rgba(var(--mode-rgb), .2); padding-top: 4px; }
html.fz #focus-app .fz-more > summary { list-style: none; cursor: pointer; min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-weight: 600; color: var(--text); }
html.fz #focus-app .fz-more > summary::-webkit-details-marker { display: none; }
html.fz #focus-app .fz-more > summary::after { content: '▾'; font-size: 1.1rem; color: var(--mode-soft); transition: rotate .2s; }
html.fz #focus-app .fz-more[open] > summary::after { rotate: 180deg; }
html.fz[data-theme=light] #focus-app .fz-more > summary { color: #1c2433; }
html.fz[data-theme=light] #focus-app .fz-more > summary::after { color: #0f5e44; }

/* phones: boxes take the full column width (the mobile flex column does not stretch them) */
@media (max-width: 768px) {
    html.fz #focus-app :is(.timer-container, .sounds-section, .stats-section, .leaderboard-section, .meditation-timer-card, .meditation-options, .meditation-analytics, .community-card) { width: 100%; box-sizing: border-box; align-self: stretch; padding: 20px 16px !important; }
    html.fz #focus-app .timer-ring-wrap { width: 240px; height: 240px; }
}
/* light mode: the mode-coloured headline gets a deep ink of the same hue so it stays readable */
html.fz[data-theme=light] #focus-hero .hero-brand { color: #0f6b4c !important; }
html.fz[data-theme=light] body[data-practice-mode="meditation"] #focus-hero .hero-brand { color: #5a3fb0 !important; }
html.fz[data-theme=light] body[data-practice-mode="community"] #focus-hero .hero-brand { color: #3340b0 !important; }
html.fz[data-theme=light] #focus-app :is(.task-support, .kbd-hint, .session-dots-caption, .fz-quick-note, .mixer-persistence-note) { color: #3d4a63 !important; }
html.fz[data-theme=light] #focus-app .focus-work-label { color: #13264a !important; }

/* ══ v2 (Audi 2026-10-17: "ยังไม่สวย … ออกแบบตำแหน่งปุ่ม ทำแต่ง preset ได้ไม่ดี … สีกล่องเข้มกว่านี้ … นั่งสมาธิไม่ต่างจากโฟกัส … 16bit meditate") ══ */
/* darker, clearer zone boxes */
html.fz #focus-app :is(.timer-container, .sounds-section, .stats-section, .leaderboard-section, .meditation-options, .meditation-analytics, .community-card) {
    background: linear-gradient(160deg, rgba(var(--mode-rgb), .24) 0%, rgba(7, 15, 27, .96) 40%, rgba(4, 9, 18, .98) 100%) !important;
    border: 1px solid rgba(var(--mode-rgb), .5) !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 50px rgba(var(--mode-rgb), .12) !important; }
html.fz #focus-app .timer-container { background-image: radial-gradient(circle at 50% 56%, rgba(var(--mode-rgb), .2), transparent 44%), linear-gradient(160deg, rgba(var(--mode-rgb), .24) 0%, rgba(7, 15, 27, .96) 40%, rgba(4, 9, 18, .98) 100%) !important; }

/* desktop: the right column stacks sounds + stats + ranking so both sides end together */
@media (min-width: 769px) {
    html.fz body[data-practice-mode="solo"] #solo-panel.active { grid-template-areas: "timer atmosphere" "timer sidebar" "ticker ticker" !important; grid-template-rows: auto 1fr auto; row-gap: 22px !important; align-items: start; }
    html.fz #focus-app .focus-sidebar { grid-area: sidebar !important; display: grid !important; grid-template-columns: 1fr !important; grid-template-areas: "stats" "leaderboard" "task" "quote" !important; gap: 22px !important; align-self: stretch; }
    html.fz #focus-app .timer-container { align-self: start !important; position: sticky !important; top: 84px !important; }
}

/* sound presets = four big tiles with 16-bit icons */
html.fz #focus-app .fz-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 10px 0 6px; }
html.fz #focus-app .fz-chip { min-height: 96px; padding: 12px 6px 10px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    background: linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)); border: 1px solid rgba(var(--mode-rgb), .32); font-size: .95rem; }
html.fz #focus-app .fz-chip .fz-ico svg { width: 40px; height: 40px; display: block; image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgba(0,0,0,.35)); }
html.fz #focus-app .fz-chip .fz-emoji { display: none; }
html.fz #focus-app .fz-chip[aria-pressed="true"] { background: linear-gradient(180deg, rgba(var(--mode-rgb), .9), rgba(var(--mode-rgb), .65)); color: var(--mode-ink); }
html.fz #focus-app .fz-chip[aria-pressed="true"] .fz-ico svg { animation: fzBob 1s steps(2) infinite; }
@keyframes fzBob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -3px; } }
html.fz[data-motion=paused] #focus-app .fz-chip .fz-ico svg { animation: none; }
@media (prefers-reduced-motion: reduce) { html.fz #focus-app .fz-chip .fz-ico svg { animation: none; } }
@media (max-width: 420px) { html.fz #focus-app .fz-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } html.fz #focus-app .fz-chip { min-height: 84px; } }
html.fz[data-theme=light] #focus-app .fz-chip:not([aria-pressed="true"]) { background: #ffffff; }

/* ══ 🫧 meditation is its own place: one calm column, a big breathing orb, a 16-bit meditator, purple aurora sky ══ */
body[data-practice-mode="meditation"]::after {
    background: radial-gradient(ellipse 60% 40% at 50% 18%, rgba(159,140,255,.28), transparent 70%),
                radial-gradient(ellipse 40% 30% at 20% 60%, rgba(255,150,210,.12), transparent 70%),
                radial-gradient(ellipse 40% 30% at 80% 70%, rgba(110,170,255,.12), transparent 70%) !important; }
html.fz #focus-app .meditation-shell { grid-template-columns: 1fr !important; max-width: 820px; margin: 0 auto; gap: 26px !important; }
html.fz #focus-app .meditation-timer-card { background: none !important; border: 0 !important; box-shadow: none !important; padding: 0 !important; text-align: center; }
html.fz #focus-app .meditation-card-head { justify-content: center; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
html.fz #focus-app .meditation-card-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
html.fz #focus-app .meditation-routines { display: flex; flex-direction: column; align-items: center; }
html.fz #focus-app .meditation-routine-list { justify-content: center; }
html.fz #focus-app .fz-monk { display: block; width: 84px; height: 84px; position: absolute; left: 50%; top: calc(50% - 150px); margin-left: -42px; z-index: 3; pointer-events: none; }
html.fz #focus-app .meditation-stage .meditation-clock { margin-top: 84px; }
@media (max-width: 768px) { html.fz #focus-app .fz-monk { top: calc(50% - 128px); width: 70px; height: 70px; margin-left: -35px; } html.fz #focus-app .fz-monk svg { width: 70px; height: 70px; } }
html.fz #focus-app .fz-monk svg { width: 84px; height: 84px; image-rendering: pixelated; filter: drop-shadow(0 0 18px rgba(199,155,255,.6)) drop-shadow(0 4px 0 rgba(0,0,0,.35)); animation: fzBreathe 8s steps(4) infinite; transform-origin: 50% 100%; }
@keyframes fzBreathe { 0%, 100% { scale: 1 1; } 40%, 60% { scale: 1.06 1.08; } }
html.fz #focus-app .meditation-timer-card.is-running .fz-monk svg { animation-duration: 10s; }
html.fz[data-motion=paused] #focus-app .fz-monk svg { animation: none; }
@media (prefers-reduced-motion: reduce) { html.fz #focus-app .fz-monk svg { animation: none; } }
html.fz #focus-app .meditation-stage { min-height: 380px !important; position: relative; }
html.fz #focus-app .meditation-orbit { width: min(360px, 82vw) !important; border-color: rgba(199,155,255,.35) !important; box-shadow: 0 0 120px rgba(159,140,255,.3), inset 0 0 60px rgba(159,140,255,.12) !important;
    background: radial-gradient(circle, rgba(159,140,255,.22), rgba(40,20,90,.15) 60%, transparent 70%) !important; }
html.fz #focus-app .meditation-presets, html.fz #focus-app .meditation-controls { justify-content: center; max-width: 560px; margin-left: auto; margin-right: auto; }
html.fz #focus-app .meditation-options { max-width: 820px; }
@media (min-width: 769px) {
    html.fz #focus-app .meditation-options { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; }
    html.fz #focus-app .meditation-options > :is(.meditation-option-block:last-of-type, .meditation-note, .meditation-sound-note) { grid-column: 1 / -1; }
}
html.fz[data-theme=light] body[data-practice-mode="meditation"]::after {
    background: radial-gradient(ellipse 60% 40% at 50% 18%, rgba(159,140,255,.22), transparent 70%), radial-gradient(ellipse 40% 30% at 20% 60%, rgba(255,150,210,.14), transparent 70%) !important; }
html.fz[data-theme=light] #focus-app :is(.timer-container, .sounds-section, .stats-section, .leaderboard-section, .meditation-options, .meditation-analytics, .community-card) {
    background: linear-gradient(160deg, rgba(var(--mode-rgb), .2) 0%, #ffffff 46%, #f6f8fc 100%) !important; border-color: rgba(var(--mode-rgb), .55) !important; box-shadow: 0 18px 40px rgba(40,70,140,.14) !important; }

/* meditation first screen: start/reset sit right under the orb, durations after (start stays on the first screen) */
html.fz #focus-app .meditation-timer-card { display: flex !important; flex-direction: column; }
html.fz #focus-app .meditation-timer-card > * { order: 5; }
html.fz #focus-app .meditation-timer-card > :is(.meditation-card-head, .meditation-routines) { order: 0; }
html.fz #focus-app .meditation-timer-card > .meditation-stage { order: 1; }
html.fz #focus-app .meditation-timer-card > .meditation-controls { order: 2; margin-top: 4px; }
html.fz #focus-app .meditation-timer-card > .meditation-presets { order: 3; margin-top: 18px; }
html.fz #focus-app .meditation-timer-card > .meditation-custom { order: 4; }
html.fz #focus-app .meditation-local-badge { display: none; }
html.fz #focus-app .meditation-card-head h2 { margin-bottom: 0; }
html.fz #focus-app .meditation-stage { min-height: 340px !important; margin: 6px 0 10px !important; }
html.fz #focus-app .meditation-orbit { width: min(330px, 80vw) !important; }
html.fz #focus-app .fz-monk { top: calc(50% - 140px); }
@media (max-width: 768px) {
    html.fz #focus-app .meditation-stage { min-height: 290px !important; }
    html.fz #focus-app .meditation-orbit { width: min(280px, 76vw) !important; }
    html.fz #focus-app .fz-monk { top: calc(50% - 118px); }
    html.fz #focus-app .meditation-stage .meditation-clock { margin-top: 64px; }
    html.fz #focus-app .meditation-card-head h2 { font-size: 1.4rem; }
}
html.fz #focus-app .meditation-controls { display: flex !important; justify-content: center; gap: 12px; flex-wrap: nowrap; }
html.fz #focus-app .meditation-controls .meditation-button { white-space: nowrap; min-width: 128px; min-height: 48px; padding-inline: 20px; }
html.fz[data-theme=light] #focus-app .meditation-timer-card { background: none !important; border: 0 !important; box-shadow: none !important; }
html.fz[data-theme=light] #focus-app .meditation-orbit { background: radial-gradient(circle, rgba(159,140,255,.25), rgba(255,255,255,.4) 62%, transparent 72%) !important; box-shadow: 0 0 90px rgba(159,140,255,.35), inset 0 0 40px rgba(159,140,255,.15) !important; border-color: rgba(120,90,220,.35) !important; }
html.fz[data-theme=light] #focus-app :is(.meditation-preset, .meditation-routine):not(.active):not([aria-pressed="true"]) { background: #ffffff !important; border: 1px solid #c9b8e6 !important; color: #241a3a !important; }
html.fz[data-theme=light] #focus-hero .hero-brand { -webkit-text-fill-color: currentColor !important; }

/* ══ v3 (Audi 2026-10-17: "ปุ่มพวกนี้ดูไม่สวยเลย มันดูอ้วนๆ บวมๆ" · "ตั้งค่าเสียงเพิ่ม … นึกว่ากดไม่ได้") ══ */
/* durations = one slim segmented bar, not five fat pills */
html.fz #focus-app .meditation-presets { display: inline-flex !important; flex-wrap: nowrap; gap: 2px !important; padding: 4px; margin: 16px auto 0; align-self: center;
    border-radius: 999px; background: rgba(255,255,255,.05); border: 1px solid rgba(var(--mode-rgb), .28); width: auto !important; max-width: 100%; }
html.fz #focus-app .meditation-presets .meditation-preset { min-height: 38px !important; padding: 0 16px !important; border: 0 !important; border-radius: 999px !important; background: transparent !important;
    font-size: .92rem !important; font-weight: 600; color: var(--calm-ink-2) !important; box-shadow: none !important; white-space: nowrap; flex: 0 0 auto; }
html.fz #focus-app .meditation-presets .meditation-preset:hover { color: var(--text) !important; background: rgba(255,255,255,.06) !important; }
html.fz #focus-app .meditation-presets .meditation-preset:is(.active, [aria-pressed="true"]) { background: var(--mode) !important; color: var(--mode-ink) !important; box-shadow: 0 0 14px rgba(var(--mode-rgb), .4) !important; }
html.fz #focus-app .meditation-custom { order: 4; align-self: center; display: inline-flex !important; align-items: center; gap: 8px; margin-top: 10px; font-size: .9rem; color: var(--calm-ink-2); border: 0 !important; background: none !important; padding: 0 !important; width: auto !important; }
html.fz #focus-app .meditation-custom input { width: 64px !important; min-height: 34px !important; text-align: center; border-radius: 10px !important; padding: 0 6px !important; }
html.fz[data-theme=light] #focus-app .meditation-presets { background: #ffffff; border-color: #d4c6ec; }
html.fz[data-theme=light] #focus-app .meditation-presets .meditation-preset:not(.active):not([aria-pressed="true"]) { color: #3a2a55 !important; background: transparent !important; border: 0 !important; }
html.fz[data-theme=light] #focus-app .meditation-custom { color: #3a2a55; }
/* routines + meditation sound/choice pills: slimmer */
html.fz #focus-app :is(.meditation-routine, .meditation-choice, .meditation-sound) { min-height: 40px !important; padding: 0 14px !important; font-size: .92rem !important; }
html.fz #focus-app .meditation-routine small { font-weight: 500; }

/* anything that folds looks pressable: a button row with an open/close pill */
html.fz #focus-app :is(.fz-more, .focus-time-settings) > summary { min-height: 52px; padding: 0 14px 0 16px; border-radius: 14px; border: 1px solid rgba(var(--mode-rgb), .35);
    background: rgba(var(--mode-rgb), .08); cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: background .2s, border-color .2s; list-style: none; }
html.fz #focus-app :is(.fz-more, .focus-time-settings) > summary::-webkit-details-marker { display: none; }
html.fz #focus-app :is(.fz-more, .focus-time-settings) > summary:hover { background: rgba(var(--mode-rgb), .16); border-color: rgba(var(--mode-rgb), .7); }
html.fz #focus-app .fz-more > summary::after { content: 'เปิด ▾'; rotate: none !important; flex: none; font-size: .85rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--mode); color: var(--mode-ink); }
html.fz #focus-app .fz-more[open] > summary::after { content: 'ปิด ▴'; }
html.fz #focus-app .fz-more { border-top: 0 !important; padding-top: 0 !important; margin-top: 16px; }
html.fz #focus-app .fz-more[open] > summary { margin-bottom: 14px; }
html.fz #focus-app .focus-time-settings > summary > span:last-child { flex: none; font-size: .85rem; font-weight: 700; padding: 4px 12px; border-radius: 999px; background: var(--mode); color: var(--mode-ink); }
html.fz[data-theme=light] #focus-app :is(.fz-more, .focus-time-settings) > summary { background: rgba(var(--mode-rgb), .1); color: #1c2433; }
html.fz #focus-app .meditation-custom { white-space: nowrap; }
@media (max-width: 560px) {
    html.fz #focus-app .meditation-presets { display: flex !important; flex-wrap: wrap; width: 100% !important; justify-content: center; border-radius: 22px; }
    html.fz #focus-app .meditation-presets .meditation-preset { flex: 1 1 0 !important; padding: 0 8px !important; min-width: 0; }
    html.fz #focus-app .meditation-presets .meditation-custom { flex: 1 0 100%; justify-content: center; margin: 6px 0 2px; }
}

/* ══ v4 (Audi 2026-10-17: "แสดงเฉพาะตัวจับเวลา / ดูอันดับ ติดปุ่มข้างบนไป" · "เสียงรอบตัว ซ้ำกับจัดบรรยากาศ … เอาที่ปรับเสียงขึ้นไปไว้ข้างบน … เพิ่ม 16bit และ binaural … ทำแบบเดียวกันกับนั่งสมาธิ") ══ */
html.fz #focus-app .focus-overview-actions { margin-top: 18px !important; }
html.fz #focus-app .focus-time-settings { margin-top: 10px; }
/* six tiles: 3 per row */
html.fz #focus-app .fz-quick { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
html.fz #focus-app .fz-chip { min-height: 88px; }
/* the ambient group is gone from the fold (its sounds are the tiles; its volume rows moved up) */
html.fz #focus-app #mixer-panel-ambient { display: none !important; }
/* volume rows under the tiles: only for sounds that are on */
html.fz #focus-app .fz-vol { display: grid; gap: 8px; margin: 10px 0 2px; }
html.fz #focus-app .fz-vol .ambient-list { display: grid; gap: 8px; }
html.fz #focus-app .fz-vol .ambient-row { display: none !important; grid-template-columns: 120px 1fr 48px; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 14px;
    background: rgba(var(--mode-rgb), .08); border: 1px solid rgba(var(--mode-rgb), .28); }
html.fz #focus-app .fz-vol .ambient-row:is(.active, .is-pending) { display: grid !important; }
html.fz #focus-app .fz-vol .ambient-toggle { min-height: 36px !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important; justify-content: flex-start; color: var(--text) !important; font-size: .9rem; white-space: nowrap; }
html.fz #focus-app .fz-vol .ambient-toggle::after { content: ' ✕'; color: var(--calm-ink-2); font-size: .8rem; }
html.fz #focus-app .fz-vol .amb-slider { width: 100%; accent-color: var(--mode); }
html.fz #focus-app .fz-vol .amb-pct { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-size: .88rem; }
html.fz #focus-app .fz-vol .ambient-sound-copy small, html.fz #focus-app .fz-vol .sound-secondary-label { display: none; }
html.fz #focus-app .fz-vol #binaural-type-row:not([hidden]) { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 4px; }
html.fz #focus-app .fz-vol #binaural-type-row .beat-btn { min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(var(--mode-rgb), .35); background: transparent; color: var(--text); font-size: .85rem; }
html.fz #focus-app .fz-vol #binaural-type-row .beat-btn.active { background: var(--mode); color: var(--mode-ink); border-color: var(--mode); }
html.fz #focus-app .fz-bin-note { display: none; margin: 4px 0 0; font-size: .88rem; color: var(--calm-ink-2); }
html.fz #focus-app .sounds-section:has(.ambient-row[data-sound="binaural"].active) .fz-bin-note { display: block; }
html.fz[data-theme=light] #focus-app .fz-vol .ambient-toggle, html.fz[data-theme=light] #focus-app .fz-vol .amb-pct { color: #1c2433 !important; }
html.fz[data-theme=light] #focus-app .fz-vol #binaural-type-row .beat-btn { color: #1c2433; }
html.fz[data-theme=light] #focus-app .fz-bin-note { color: #3d4a63; }
@media (max-width: 420px) { html.fz #focus-app .fz-quick { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } html.fz #focus-app .fz-chip { min-height: 80px; font-size: .85rem; } html.fz #focus-app .fz-vol .ambient-row { grid-template-columns: 96px 1fr 42px; } }

/* 🫧 meditation sounds: the same 16-bit tile style, five across */
html.fz #focus-app .meditation-options > .meditation-option-block:has(.meditation-sounds) { grid-column: 1 / -1; }
html.fz #focus-app .meditation-sounds { display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px !important; }
html.fz #focus-app .meditation-sounds .meditation-sound { min-height: 84px !important; padding: 10px 4px 8px !important; border-radius: 16px !important; display: flex !important; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: .88rem !important; }
html.fz #focus-app .meditation-sounds .fz-ico svg { width: 36px; height: 36px; display: block; image-rendering: pixelated; filter: drop-shadow(0 3px 0 rgba(0,0,0,.3)); }
html.fz #focus-app .meditation-sounds .meditation-sound:is(.active, [aria-pressed="true"]) { background: linear-gradient(180deg, rgba(var(--mode-rgb), .9), rgba(var(--mode-rgb), .65)) !important; color: var(--mode-ink) !important; border-color: transparent !important; }
html.fz #focus-app .meditation-sounds .meditation-sound:is(.active, [aria-pressed="true"]) .fz-ico svg { animation: fzBob 1.2s steps(2) infinite; }
html.fz[data-motion=paused] #focus-app .meditation-sounds .fz-ico svg { animation: none; }
@media (max-width: 560px) { html.fz #focus-app .meditation-sounds { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
html.fz #focus-app .fz-vol .ambient-row { grid-template-columns: max-content minmax(80px, 1fr) 44px !important; }
html.fz #focus-app .fz-vol .ambient-toggle { gap: 6px; }
@media (max-width: 560px) {
    html.fz #focus-app .fz-vol .ambient-row { grid-template-columns: minmax(0, 1fr) 44px !important; row-gap: 2px; }
    html.fz #focus-app .fz-vol .ambient-toggle { grid-column: 1 / -1; }
}

/* ══ v5 (Audi 2026-10-17 20:25: routine pills "ไม่ตรงกล่อง" · "layout ควรจัดเหมือนโฟกัส ซ้ายขวา") ══ */
/* routine pills: label + duration centred on one line */
html.fz #focus-app .meditation-routine { display: inline-flex !important; align-items: center !important; justify-content: center; gap: 8px; line-height: 1.2 !important; padding: 0 16px !important; }
html.fz #focus-app .meditation-routine :is(strong, small) { margin: 0 !important; line-height: 1.2 !important; display: inline-block; }
html.fz #focus-app .meditation-routine small { color: inherit; opacity: .8; }
/* desktop: same left/right skeleton as focus — orb + start left, choices right; mood stays meditation (aurora, meditator, purple) */
@media (min-width: 1024px) {
    html.fz #focus-app .meditation-shell { grid-template-columns: minmax(0, 1.1fr) minmax(340px, .9fr) !important; max-width: 1180px; align-items: start; }
    html.fz #focus-app .meditation-timer-card { background: linear-gradient(160deg, rgba(var(--mode-rgb), .24) 0%, rgba(7, 15, 27, .96) 40%, rgba(4, 9, 18, .98) 100%) !important;
        border: 1px solid rgba(var(--mode-rgb), .5) !important; border-radius: 24px !important; padding: 28px !important; box-shadow: 0 24px 60px rgba(0,0,0,.5), 0 0 50px rgba(var(--mode-rgb), .12) !important; position: sticky; top: 84px; }
    html.fz #focus-app .meditation-options { display: flex !important; flex-direction: column; gap: 4px; max-width: none; }
    html.fz #focus-app .meditation-sounds { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    html.fz[data-theme=light] #focus-app .meditation-timer-card { background: linear-gradient(160deg, rgba(var(--mode-rgb), .2) 0%, #ffffff 46%, #f6f8fc 100%) !important; border-color: rgba(var(--mode-rgb), .55) !important; box-shadow: 0 18px 40px rgba(40,70,140,.14) !important; }
}

/* v6: duration bar lines up (Audi 2026-10-17: "อันนี้เรียงตัวไม่ตรงไหม") — every segment 38px, custom field same height, centred */
html.fz #focus-app .meditation-presets { align-items: center !important; }
html.fz #focus-app .meditation-presets > .meditation-preset { height: 38px !important; min-height: 38px !important; max-height: 38px; line-height: 38px !important; padding-top: 0 !important; padding-bottom: 0 !important; display: inline-flex !important; align-items: center; }
html.fz #focus-app .meditation-presets > .meditation-custom { height: 38px !important; min-height: 38px !important; box-sizing: border-box; margin: 0 !important; padding: 0 4px 0 12px !important; gap: 8px; line-height: 1; }
html.fz #focus-app .meditation-presets > .meditation-custom input { height: 30px !important; min-height: 30px !important; line-height: 30px; padding: 0 6px !important; }
@media (max-width: 560px) { html.fz #focus-app .meditation-presets > .meditation-custom { margin-top: 6px !important; } }

/* armed sound: plays with ▶ (never on load) */
html.fz #focus-app :is(.fz-chip, .meditation-sound).fz-armed:not([aria-pressed="true"]) { border-style: dashed !important; border-color: rgba(var(--mode-rgb), .85) !important; position: relative; }
html.fz #focus-app :is(.fz-chip, .meditation-sound).fz-armed:not([aria-pressed="true"])::after { content: '▶ ตอนเริ่ม'; position: absolute; top: 6px; right: 6px; font-size: .68rem; font-weight: 700; padding: 1px 6px; border-radius: 999px; background: var(--mode); color: var(--mode-ink); }
html.fz #focus-app .fz-auto { margin: 8px 0 0; font-size: .9rem; line-height: 1.6; color: var(--calm-ink-2); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
html.fz #focus-app .fz-auto b { color: var(--text); }
html.fz #focus-app .fz-auto-btn { min-height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(var(--mode-rgb), .45); background: transparent; color: var(--text); font: inherit; font-size: .85rem; cursor: pointer; }
html.fz #focus-app .fz-auto-btn:hover { background: rgba(var(--mode-rgb), .12); }
html.fz #focus-app .fz-auto-btn:focus-visible { outline: 3px solid rgba(var(--mode-rgb), .8); outline-offset: 2px; }
html.fz[data-theme=light] #focus-app .fz-auto { color: #3d4a63; }
html.fz[data-theme=light] #focus-app :is(.fz-auto b, .fz-auto-btn) { color: #1c2433; }

/* ══ v7 (Audi 2026-10-17 21:25: "ตามลมหายใจ / เงียบ กดแล้วไม่เห็นอะไรเลย" · headings need emoji · "16bit ตอนกดเริ่มกับไม่ได้กดเริ่ม คนละ action") ══ */
/* practice choice = two cards that say what each does */
html.fz #focus-app .meditation-choice-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; }
html.fz #focus-app .meditation-choice { min-height: 0 !important; padding: 12px 14px !important; border-radius: 16px !important; display: grid !important; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; text-align: left; align-items: center; }
html.fz #focus-app .meditation-choice > span { grid-row: 1 / 3; font-size: 1.5rem; }
html.fz #focus-app .meditation-choice > small { display: block !important; font-size: .82rem; line-height: 1.45; opacity: .9; font-weight: 500; }
/* the clock always says what will happen; breath idle = gentle preview pulse, silent idle = still */
html.fz #focus-app #meditation-breath-label { display: block !important; margin-top: 6px; font-size: .95rem; font-weight: 600; color: var(--mode-soft); }
html.fz[data-theme=light] #focus-app #meditation-breath-label { color: #5a3fb0; }
html.fz #focus-app .meditation-timer-card:not(.is-running)[data-practice="breath"] .meditation-breath-core { animation: fzPreview 10s ease-in-out infinite; }
@keyframes fzPreview { 0%, 100% { transform: scale(.9); } 40% { transform: scale(1.02); } }
html.fz #focus-app .meditation-timer-card[data-practice="silent"] .meditation-orbit::before { animation: none !important; opacity: .45; }
/* meditator: idle = eyes open, still; running = eyes closed, breathing, twinkling aura */
html.fz #focus-app .fz-monk .fz-pose { position: absolute; inset: 0; display: block; }
html.fz #focus-app .fz-monk .fz-pose.run { display: none; }
html.fz #focus-app .meditation-timer-card.is-running .fz-monk .fz-pose.idle { display: none; }
html.fz #focus-app .meditation-timer-card.is-running .fz-monk .fz-pose.run { display: block; }
html.fz #focus-app .fz-monk .fz-pose.idle svg { animation: fzSway 4s steps(2) infinite; }
@keyframes fzSway { 0%, 100% { translate: 0 0; } 50% { translate: 0 -2px; } }
html.fz #focus-app .fz-monk .fz-pose.run > svg { animation: fzBreathe 10s steps(4) infinite; filter: drop-shadow(0 0 22px rgba(199,155,255,.85)) drop-shadow(0 4px 0 rgba(0,0,0,.35)); }
html.fz #focus-app .fz-monk .fz-aura { position: absolute; inset: 0; }
html.fz #focus-app .fz-monk .fz-aura svg { animation: fzTwinkle 1.6s steps(2) infinite; filter: none; }
@keyframes fzTwinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
html.fz #focus-app .fz-monk svg { animation: none; }
html.fz[data-motion=paused] #focus-app .fz-monk *, html.fz[data-motion=paused] #focus-app .meditation-breath-core { animation: none !important; }
@media (prefers-reduced-motion: reduce) { html.fz #focus-app .fz-monk *, html.fz #focus-app .meditation-timer-card:not(.is-running) .meditation-breath-core { animation: none !important; } }

/* real brand logos for YouTube / Spotify (Audi 2026-10-17: "YouTube Spotify ใส่ logo มาด้วยไหม") */
html.fz #focus-app .fz-brand { width: 20px; height: 20px; vertical-align: -4px; margin-right: 6px; display: inline-block; }
html.fz #focus-app .fz-sum { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
html.fz #focus-app .fz-sum .fz-brand { margin: 0 0 0 4px; background: #fff; border-radius: 50%; padding: 2px; box-sizing: content-box; width: 16px; height: 16px; }
html.fz #focus-app .custom-source-label { display: inline-flex; align-items: center; }
html.fz #focus-app .fz-chip[data-music] { position: relative; }
html.fz #focus-app .fz-chip[data-music]::before { content: ''; position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; background: #fff url(/assets/brand-logos/spotify.svg) center / 14px no-repeat; border-radius: 50%; }

/* 16-bit reading scene under the timer: กุ้งกิ reads, the green Slime dozes (Audi chose option ก, 2026-10-17) */
html.fz #focus-app .fz-scene { margin: 18px 0 0; width: 100%; border-radius: 16px; overflow: hidden; border: 1px solid rgba(var(--mode-rgb), .35); box-shadow: 0 10px 26px rgba(0,0,0,.35); line-height: 0; }
html.fz #focus-app .fz-scene img { width: 100%; height: auto; display: block; image-rendering: pixelated; }
@media (max-width: 768px) { html.fz #focus-app .fz-scene { margin-top: 14px; } }

/* v9: meditation scene lives in its own 16-bit box under the buttons, like focus (Audi 2026-10-17: "ไม่ต้องไปอยู่ตรงเลขนาฬิกา") */
html.fz #focus-app .fz-monk { display: none !important; }
html.fz #focus-app .meditation-stage .meditation-clock { margin-top: 0 !important; }
/* routines = three equal tiles in one row (name over duration), never a 2 + 1 wrap */
html.fz #focus-app .meditation-routine-list { display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 480px; margin: 0 auto; }
html.fz #focus-app .meditation-routine { display: flex !important; flex-direction: column; justify-content: center; align-items: center; gap: 2px; min-height: 56px !important; padding: 6px 4px !important; border-radius: 14px !important; text-align: center; }
html.fz #focus-app .meditation-routine strong { font-size: .92rem; white-space: nowrap; }
html.fz #focus-app .meditation-routine small { font-size: .8rem; }
