/* Quran Quest: the memorisation garden. A meadow of surah plots in four beds, and for each surah a winding garden path
   where every ayah is a plant that grows from a seed to a full eight-petal bloom. Day is a fresh morning meadow;
   Lantern time (dark) is a moonlit garden with glowing blooms. Logical properties throughout; still for reduced motion. */

.qq {
    --qq-grass: #8ED69A; --qq-grass-2: #5DBF73; --qq-soil: #C98F62; --qq-soil-2: #A86E44;
    --qq-stem: #3F9F55; --qq-leaf: #5DBF73; --qq-leaf-2: #86D68F;
    --qq-panel: rgba(255, 255, 255, .78); --qq-panel-edge: rgba(255, 255, 255, .95);
    --qq-meadow: linear-gradient(180deg, #E9F9EC 0%, #CBEFD3 100%);
    --qq-gold: #F7AE24;
    --qq-arabic: "Amiri Quran", "Amiri", "Noto Naskh Arabic", serif;
    --qq-trail: #F3DDBE; --qq-trail-edge: #E2C49C;
}
:root[data-theme="dark"] .qq {
    --qq-panel: rgba(46, 40, 108, .78); --qq-panel-edge: rgba(255, 255, 255, .12);
    --qq-meadow: linear-gradient(180deg, #24406A 0%, #1C3A4E 100%);
    --qq-soil: #8C5E44; --qq-soil-2: #6A432E;
    --qq-trail: #5B4F8F; --qq-trail-edge: #46407A;
}

/* Petal colours, one per ayah in turn. */
.qq-hue-0 { --qq-petal: #FF8FB8; --qq-petal-2: #FFD0E2; }
.qq-hue-1 { --qq-petal: #FFC84A; --qq-petal-2: #FFF0B8; }
.qq-hue-2 { --qq-petal: #A98BFF; --qq-petal-2: #E3D8FF; }
.qq-hue-3 { --qq-petal: #FF8A6E; --qq-petal-2: #FFD6CB; }
.qq-hue-4 { --qq-petal: #5FB8F5; --qq-petal-2: #CDEBFF; }
.qq-hue-5 { --qq-petal: #FF9FD0; --qq-petal-2: #FFE0F1; }

.qq-defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ================= The garden home ================= */
.qq-hero {
    position: relative; overflow: hidden; isolation: isolate;
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: center; gap: 12px;
    padding: clamp(22px, 4vw, 42px); margin-bottom: 22px; border-radius: 40px;
    background:
        radial-gradient(55% 70% at 80% 42%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 70%),
        radial-gradient(100% 70% at 50% 120%, #9FE0AA 0%, rgba(159, 224, 170, 0) 60%),
        linear-gradient(165deg, #E4F6FF 0%, #E9FBEF 55%, #D4F3DC 100%);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .95), var(--shadow-l);
}
:root[data-theme="dark"] .qq-hero {
    background:
        radial-gradient(55% 70% at 80% 42%, rgba(255, 216, 107, .2), rgba(255, 216, 107, 0) 70%),
        radial-gradient(100% 70% at 50% 125%, rgba(93, 191, 115, .45) 0%, rgba(93, 191, 115, 0) 60%),
        linear-gradient(165deg, #2C2B6E 0%, #2B4A78 60%, #1F5560 100%);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .1), var(--shadow-l);
}
.qq-hero::after {
    /* A faint eight-point star lattice, like garden tiles. */
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: .35; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%235DBF73' stroke-opacity='.35' stroke-width='1.2'%3E%3Crect x='18' y='18' width='20' height='20'/%3E%3Crect x='18' y='18' width='20' height='20' transform='rotate(45 28 28)'/%3E%3C/g%3E%3C/svg%3E");
    -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); mask-image: linear-gradient(90deg, #000, transparent 60%);
}
:root[dir="rtl"] .qq-hero::after { -webkit-mask-image: linear-gradient(270deg, #000, transparent 60%); mask-image: linear-gradient(270deg, #000, transparent 60%); }
.qq-hero-copy { position: relative; z-index: 2; }
.qq-hero-ar { display: inline-block; font-family: "Baloo Bhaijaan 2", var(--font-arabic); font-weight: 700; font-size: 1.25rem; color: var(--leaf-deep); }
:root[data-theme="dark"] .qq-hero-ar { color: #FFE3A0; }
.qq-hero h1 {
    font-size: clamp(2.6rem, 6.4vw, 4.6rem); font-weight: 800; margin: 0 0 6px; line-height: 1;
    color: var(--ink); text-shadow: 0 3px 0 rgba(255, 255, 255, .8), 0 14px 30px rgba(63, 159, 85, .25);
}
:root[data-theme="dark"] .qq-hero h1 { text-shadow: 0 2px 0 rgba(30, 26, 78, .6), 0 0 30px rgba(255, 210, 140, .4); }
:root[lang="ar"] .qq-hero h1, :root[lang="ur"] .qq-hero h1 { line-height: 1.35; letter-spacing: 0; }
.qq-hero-intro { font-size: 1.2rem; font-weight: 600; color: var(--ink-soft); margin: 0 0 14px; max-width: 560px; }
.qq-hero .k-guide .k-bubble { max-width: 470px; }
.qq-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 18px; padding: 0; }
.qq-stat {
    display: flex; flex-direction: column-reverse; min-width: 116px; padding: 8px 16px 10px; border-radius: 20px;
    background: var(--qq-panel); box-shadow: inset 0 0 0 1.5px var(--qq-panel-edge), 0 10px 20px -16px rgba(43, 35, 80, .5);
    border-block-end: 4px solid var(--t, var(--leaf));
}
.qq-stat dt { font-size: .82rem; font-weight: 700; color: var(--ink-soft); line-height: 1.2; }
.qq-stat dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 2rem; line-height: 1.05; color: var(--td, var(--leaf-deep)); }
:root[data-theme="dark"] .qq-stat dd { color: #FFE3A0; }
.qq-hero-go .k-ico { width: 30px; height: 30px; }

.qq-hero-art { position: relative; z-index: 1; display: grid; place-items: center; min-height: 320px; }
.qq-hero-isle {
    width: min(430px, 100%); height: auto; display: block;
    -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 47%, #000 74%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 47%, #000 74%, transparent 100%);
    filter: drop-shadow(0 30px 34px rgba(63, 159, 85, .25));
    animation: qq-float 6s ease-in-out infinite;
}
.qq-hero-flower { position: absolute; width: 64px; height: 88px; filter: drop-shadow(0 10px 12px rgba(43, 35, 80, .2)); animation: qq-sway 4.5s ease-in-out infinite; transform-origin: 50% 92%; }
.qq-hero-flower--1 { --qq-petal: #FF8FB8; --qq-petal-2: #FFD0E2; inset-inline-start: 6%; top: 14%; width: 74px; height: 102px; }
.qq-hero-flower--2 { --qq-petal: #FFC84A; --qq-petal-2: #FFF0B8; inset-inline-end: 4%; top: 10%; animation-delay: -1.2s; }
.qq-hero-flower--3 { --qq-petal: #A98BFF; --qq-petal-2: #E3D8FF; inset-inline-end: 10%; bottom: 8%; width: 82px; height: 112px; animation-delay: -2.4s; }
.qq-hero-flower--4 { --qq-petal: #5FB8F5; --qq-petal-2: #CDEBFF; inset-inline-start: 12%; bottom: 10%; animation-delay: -3.1s; }
.qq-hero-spark { position: absolute; z-index: 3; width: 14px; height: 14px; background: #FFD45C; clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: qq-twinkle 2.6s ease-in-out infinite; }
.qq-hero-spark--1 { top: 22%; inset-inline-start: 30%; }
.qq-hero-spark--2 { top: 36%; inset-inline-end: 22%; animation-delay: .9s; background: #FF9EC4; }
.qq-hero-spark--3 { bottom: 24%; inset-inline-start: 46%; animation-delay: 1.7s; background: #7FD3F7; }

@keyframes qq-float { 50% { translate: 0 -12px; } }
@keyframes qq-sway { 0%, 100% { rotate: -4deg; } 50% { rotate: 4deg; } }
@keyframes qq-twinkle { 0%, 100% { transform: scale(.4); opacity: .3; } 50% { transform: scale(1.1) rotate(45deg); opacity: 1; } }

/* ---------- Thirsty flowers ---------- */
.qq-review {
    display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 14px 22px; align-items: center;
    padding: 16px clamp(16px, 2.5vw, 26px); margin-bottom: 26px; border-radius: 30px;
    background:
        radial-gradient(80% 140% at 0% 50%, rgba(95, 184, 245, .22), transparent 60%),
        var(--qq-panel);
    box-shadow: inset 0 0 0 1.5px var(--qq-panel-edge), var(--shadow);
}
:root[dir="rtl"] .qq-review { background: radial-gradient(80% 140% at 100% 50%, rgba(95, 184, 245, .22), transparent 60%), var(--qq-panel); }
.qq-review-head { display: flex; align-items: center; gap: 12px; }
.qq-review-can { width: 76px; height: 57px; flex: none; animation: qq-pour 3.4s ease-in-out infinite; transform-origin: 30% 80%; }
:root[dir="rtl"] .qq-review-can { scale: -1 1; }
@keyframes qq-pour { 0%, 60%, 100% { rotate: 0deg; } 75% { rotate: 14deg; } }
.qq-review h2 { font-size: 1.45rem; margin: 0; }
.qq-review-head p { margin: 2px 0 0; font-size: .95rem; line-height: 1.35; color: var(--ink-soft); font-weight: 600; }
.qq-review-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.qq-review-list:empty { display: none; }
.qq-due {
    display: flex; align-items: center; gap: 10px; padding: 8px 16px 8px 10px; border-radius: 20px; text-decoration: none;
    background: linear-gradient(180deg, #F2FAFF, #DDF0FF); color: var(--ink);
    box-shadow: inset 0 -3px 0 rgba(31, 128, 204, .2), 0 10px 18px -14px rgba(31, 128, 204, .8);
    transition: transform .2s var(--ease-bounce);
}
:root[data-theme="dark"] .qq-due { background: linear-gradient(180deg, #2E4F8F, #233F7A); }
.qq-due:hover, .qq-due:focus-visible { transform: translateY(-3px); }
.qq-due-drop { width: 26px; height: 26px; flex: none; animation: qq-drip 2s ease-in-out infinite; }
@keyframes qq-drip { 50% { translate: 0 3px; } }
.qq-due-ar { font-family: var(--qq-arabic); font-size: 1.5rem; line-height: 1; color: var(--sky-deep); }
:root[data-theme="dark"] .qq-due-ar { color: #9BE3FF; }
.qq-due-text { display: flex; flex-direction: column; line-height: 1.15; }
.qq-due-text b { font-family: var(--font-display); font-weight: 600; }
.qq-due-text small { font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.qq-review-empty { display: flex; align-items: center; gap: 10px; margin: 0; font-weight: 700; color: var(--ink-soft); }
.qq-review-empty svg { width: 40px; height: 54px; flex: none; --qq-petal: #FF8FB8; --qq-petal-2: #FFD0E2; }

/* ---------- The beds ---------- */
.qq-beds { display: grid; gap: 22px; }
.qq-bed {
    position: relative; padding: 16px clamp(14px, 2vw, 22px) 20px; border-radius: 34px;
    background:
        radial-gradient(120% 80% at 50% 0%, var(--qq-panel), transparent 70%),
        var(--qq-meadow);
    box-shadow: inset 0 0 0 1.5px var(--qq-panel-edge), inset 0 -10px 0 color-mix(in srgb, var(--qq-grass-2) 30%, transparent), var(--shadow);
}
.qq-bed-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.qq-bed-plant { width: 44px; height: 60px; flex: none; --qq-petal: #FFC84A; --qq-petal-2: #FFF0B8; }
.qq-bed--bloom .qq-bed-plant { --qq-petal: #FF8FB8; --qq-petal-2: #FFD0E2; }
.qq-bed-head h2 { font-size: 1.5rem; margin: 0; }
.qq-bed-head p { margin: 0; font-size: .95rem; font-weight: 600; color: var(--ink-soft); }
.qq-bed-count { margin-inline-start: auto; padding: 4px 12px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; font-size: .85rem; background: var(--qq-panel); color: var(--ink-soft); white-space: nowrap; }
.qq-plots { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr)); }
.qq-plot {
    position: relative; height: 100%; display: flex; flex-direction: column; gap: 4px;
    padding: 12px 14px 12px; border-radius: 24px; text-decoration: none; color: var(--ink);
    background: var(--glass-strong);
    box-shadow: inset 0 -4px 0 rgba(63, 159, 85, .14), inset 0 0 0 1.5px var(--qq-panel-edge), 0 14px 22px -18px rgba(43, 35, 80, .6);
    transition: transform .25s var(--ease-bounce), box-shadow .25s;
}
.qq-plot:hover, .qq-plot:focus-visible { transform: translateY(-4px) rotate(-.4deg); box-shadow: inset 0 -4px 0 rgba(63, 159, 85, .2), inset 0 0 0 2px var(--leaf), 0 22px 30px -20px rgba(43, 35, 80, .7); }
.qq-plot:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; }
.qq-plot-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.qq-plot-no {
    display: grid; place-items: center; width: 30px; height: 30px; flex: none;
    font-family: var(--font-display); font-weight: 700; font-size: .9rem; color: #fff;
    background: var(--leaf); clip-path: polygon(50% 0, 64% 14%, 85% 15%, 86% 36%, 100% 50%, 86% 64%, 85% 85%, 64% 86%, 50% 100%, 36% 86%, 15% 85%, 14% 64%, 0 50%, 14% 36%, 15% 15%, 36% 14%);
}
.qq-plot-ar { font-family: var(--qq-arabic); font-size: 1.9rem; line-height: 1.25; color: var(--leaf-deep); }
:root[data-theme="dark"] .qq-plot-ar { color: #B8F0C4; }
.qq-plot-name { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 8px; }
.qq-plot-name b { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.qq-plot-count { white-space: nowrap; }
.qq-plot-name small { font-size: .82rem; font-weight: 700; color: var(--ink-faint); }
.qq-plot-about { font-family: var(--font-read); font-size: .88rem; line-height: 1.35; color: var(--ink-soft); }
.qq-plot-foot { margin-top: auto; padding-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.qq-plot-row { display: flex; flex-wrap: wrap; gap: 3px; }
.qq-plot-row i {
    width: 11px; height: 11px; border-radius: 50% 50% 50% 0; rotate: -45deg;
    background: color-mix(in srgb, var(--ink) 12%, transparent);
}
.qq-plot-row i.is-1 { background: #9ADBA6; }
.qq-plot-row i.is-2 { background: #FFB3CF; }
.qq-plot-row i.is-3 { background: radial-gradient(circle at 50% 50%, #FFD45C 0 28%, #FF8FB8 30%); box-shadow: 0 0 6px rgba(255, 143, 184, .7); }
.qq-plot-row i.is-due { outline: 2px solid #4FA8EE; outline-offset: 1px; }
.qq-plot-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; font-size: .8rem; font-weight: 700; color: var(--ink-faint); }
.qq-plot-state { padding: 2px 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 7%, transparent); color: var(--ink-soft); white-space: nowrap; }
.qq-plot.is-learned .qq-plot-state { background: linear-gradient(180deg, #FFE69A, #F7AE24); color: #2B2350; }
.qq-plot.is-learned { box-shadow: inset 0 -4px 0 rgba(247, 174, 36, .35), inset 0 0 0 2px #FFD45C, 0 14px 22px -18px rgba(43, 35, 80, .6); }
.qq-plot.is-due .qq-plot-state { background: #DDF0FF; color: var(--sky-deep); }
.qq-plot.is-growing .qq-plot-state { background: var(--leaf-soft); color: #1F6E35; }
/* The sunshine stat keeps its warmth but reads clearly on white (WCAG AA for large text and more). */
.qq-stat.c-sun dd { color: #9A6200; }
:root[data-theme="dark"] .qq-plot.is-due .qq-plot-state { background: #233F7A; color: #9BE3FF; }
:root[data-theme="dark"] .qq-plot.is-growing .qq-plot-state { background: #244E54; color: #B8F0C4; }

/* ================= One surah ================= */
.qq-shero {
    position: relative; overflow: hidden; isolation: isolate;
    padding: clamp(18px, 3vw, 32px); margin-bottom: 16px; border-radius: 40px;
    background:
        radial-gradient(70% 60% at 20% 10%, rgba(255, 255, 255, .85), transparent 70%),
        linear-gradient(175deg, #E4F6FF 0%, #EDFBF0 46%, #CDEFD5 100%);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .95), var(--shadow-l);
}
:root[data-theme="dark"] .qq-shero {
    background:
        radial-gradient(60% 60% at 18% 8%, rgba(255, 216, 107, .16), transparent 70%),
        linear-gradient(175deg, #2C2B6E 0%, #2A4775 55%, #1F5560 100%);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .1), var(--shadow-l);
}
.qq-shero-title { display: flex; align-items: center; gap: clamp(14px, 3vw, 28px); margin-bottom: 14px; }
.qq-arch {
    position: relative; flex: none; display: grid; place-items: center;
    width: 150px; height: 176px; padding: 34px 10px 14px;
    border-radius: 999px 999px 26px 26px;
    background:
        radial-gradient(80% 60% at 50% 34%, rgba(255, 246, 201, .95), rgba(255, 212, 92, .4) 60%, transparent 85%),
        linear-gradient(180deg, #3FBF9B, #1A8F70);
    box-shadow: inset 0 0 0 5px rgba(255, 255, 255, .55), inset 0 -10px 0 rgba(0, 0, 0, .12), 0 20px 34px -18px rgba(26, 143, 112, .8);
}
.qq-arch::before {
    content: ""; position: absolute; inset: 9px 9px 9px; border-radius: inherit; border: 2px dashed rgba(255, 255, 255, .6); pointer-events: none;
}
.qq-arch span { position: relative; font-family: var(--qq-arabic); font-size: 2.1rem; line-height: 1.3; color: #1E4F3F; text-align: center; text-shadow: 0 1px 0 rgba(255, 255, 255, .7); }
.qq-shero-kicker { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 6px; }
.qq-shero-kicker .k-chip { background: var(--qq-panel); box-shadow: inset 0 0 0 1px var(--qq-panel-edge); }
.qq-shero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 800; margin: 0; line-height: 1.05; }
.qq-shero-ar { font-family: var(--qq-arabic); font-weight: 400; font-size: .7em; color: var(--leaf-deep); margin-inline-start: 6px; }
:root[data-theme="dark"] .qq-shero-ar { color: #B8F0C4; }
.qq-shero-meaning { margin: 2px 0 0; font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--ink-soft); }
.qq-shero-about { margin: 6px 0 0; max-width: 720px; font-family: var(--font-read); font-size: 1.02rem; color: var(--ink-soft); }
.qq-about-label { font-weight: 700; color: var(--ink); }

/* The garden path */
.qq-garden {
    position: relative; padding: 12px 14px 8px; border-radius: 30px;
    background:
        radial-gradient(120% 60% at 50% 110%, rgba(93, 191, 115, .55), transparent 70%),
        linear-gradient(180deg, rgba(255, 255, 255, .55), rgba(190, 236, 200, .55));
    box-shadow: inset 0 0 0 1.5px var(--qq-panel-edge), inset 0 -8px 0 rgba(63, 159, 85, .2);
}
:root[data-theme="dark"] .qq-garden { background: radial-gradient(120% 60% at 50% 110%, rgba(93, 191, 115, .35), transparent 70%), linear-gradient(180deg, rgba(46, 40, 108, .55), rgba(31, 85, 96, .55)); }
.qq-garden { overflow: hidden; isolation: isolate; }
.qq-garden::before {
    /* Rolling hills behind the path. */
    content: ""; position: absolute; inset: auto 0 0; height: 62%; z-index: -1; pointer-events: none;
    background:
        radial-gradient(60% 90% at 15% 100%, rgba(93, 191, 115, .45), transparent 70%),
        radial-gradient(55% 80% at 85% 100%, rgba(134, 214, 143, .5), transparent 70%),
        radial-gradient(70% 60% at 50% 100%, rgba(63, 159, 85, .35), transparent 75%);
}
.qq-garden-palm { position: absolute; z-index: 0; bottom: 18px; width: 70px; height: 96px; opacity: .9; pointer-events: none; }
.qq-garden-palm--a { inset-inline-start: 6px; }
.qq-garden-palm--b { inset-inline-end: 6px; width: 58px; height: 80px; }
.qq-garden-head { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 6px; }
.qq-garden-head h2 { font-size: 1.15rem; margin: 0; }
.qq-garden-count { font-family: var(--font-display); font-weight: 600; font-size: .95rem; padding: 2px 12px; border-radius: 999px; background: var(--qq-panel); }
/* The path always runs in one direction for drawing; in Arabic and Urdu the first ayah sits on the right. */
.qq-path { position: relative; z-index: 1; direction: ltr; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x proximity; scrollbar-width: thin; padding: 10px 0 16px; }
.qq-stops {
    position: relative; z-index: 1; list-style: none; margin: 0; padding: 0 6px;
    display: flex; gap: clamp(8px, 2vw, 30px); width: max-content; min-width: 100%; justify-content: space-evenly;
}
:root[dir="rtl"] .qq-stops { flex-direction: row-reverse; }
.qq-trail { position: absolute; top: 0; left: 0; pointer-events: none; overflow: visible; z-index: 0; }
.qq-trail-bed { fill: none; stroke: var(--qq-trail-edge); stroke-width: 22; stroke-linecap: round; opacity: .9; }
.qq-trail-stones { fill: none; stroke: var(--qq-trail); stroke-width: 16; stroke-linecap: round; stroke-dasharray: 2 14; opacity: .95; }
.qq-stop { position: relative; z-index: 1; flex: none; scroll-snap-align: center; }
.qq-stop:nth-child(4n + 2) { translate: 0 18px; }
.qq-stop:nth-child(4n + 3) { translate: 0 6px; }
.qq-stop:nth-child(4n + 4) { translate: 0 -10px; }
.qq-stop button {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 0;
    width: 92px; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 24px;
    -webkit-tap-highlight-color: transparent;
}
.qq-stop button:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }
.qq-stop-plant { width: 84px; height: 116px; overflow: visible; transform-origin: 50% 92%; transition: transform .3s var(--ease-bounce); filter: drop-shadow(0 6px 6px rgba(43, 35, 80, .18)); }
.qq-stop button:hover .qq-stop-plant { transform: scale(1.08) rotate(-3deg); }
.qq-stop-stone {
    position: relative; z-index: 1;
    display: grid; place-items: center; width: 44px; height: 32px; margin-top: -14px; border-radius: 50%;
    font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: #6A4B2C;
    background: linear-gradient(180deg, #FFF3DF, #EBD3AF); box-shadow: inset 0 -3px 0 rgba(106, 75, 44, .25), 0 3px 6px rgba(43, 35, 80, .2);
}
:root[data-theme="dark"] .qq-stop-stone { background: linear-gradient(180deg, #E9DEFF, #B9A8EE); color: #2B2350; }
.qq-stop.is-now .qq-stop-stone { background: linear-gradient(180deg, #FFE69A, #F7AE24); color: #2B2350; box-shadow: 0 0 0 4px rgba(255, 212, 92, .45), 0 4px 10px rgba(247, 174, 36, .6); }
.qq-stop.is-now .qq-stop-plant { animation: qq-sway 3.6s ease-in-out infinite; }
.qq-stop.is-bloom .qq-stop-plant { filter: drop-shadow(0 0 10px rgba(255, 212, 92, .6)) drop-shadow(0 6px 6px rgba(43, 35, 80, .18)); }
.qq-stop-drop { position: absolute; z-index: 2; top: 0; inset-inline-end: 4px; width: 28px; height: 28px; display: none; animation: qq-drip 1.8s ease-in-out infinite; }
.qq-stop-drop svg { width: 100%; height: 100%; }
.qq-stop.is-due .qq-stop-drop { display: block; }
.qq-stop.is-due .qq-stop-plant { rotate: -6deg; }
.qq-stop.is-growing .qq-stop-plant { animation: qq-grow .9s var(--ease-bounce); }
@keyframes qq-grow { 0% { transform: scale(.4, .2); } 60% { transform: scale(1.15, 1.2); } 100% { transform: scale(1); } }
.qq-legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 0; padding: 0 6px 4px; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.qq-legend li { display: flex; align-items: center; gap: 4px; --qq-petal: #FF8FB8; --qq-petal-2: #FFD0E2; }
.qq-legend svg { width: 20px; height: 26px; }
.qq-legend li:last-child svg { width: 16px; height: 16px; }

/* ---------- Settings bar ---------- */
.qq-bar {
    position: sticky; top: calc(var(--top-h, 80px) - 6px); z-index: 20;
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px;
    padding: 8px 14px; margin-bottom: 14px; border-radius: 22px;
    background: var(--glass-strong); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 0 0 1.5px var(--glass-edge), var(--shadow-s);
}
.qq-field { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.qq-field select {
    min-height: 40px; max-width: 230px; padding: 4px 30px 4px 12px; border-radius: 14px; border: 2px solid var(--line);
    background: var(--paper); color: var(--ink); font-weight: 700; font-size: .92rem;
}
:root[dir="rtl"] .qq-field select { padding: 4px 12px 4px 30px; }
.qq-seg { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 14px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
.qq-seg-label { padding-inline: 8px 4px; font-weight: 700; font-size: .85rem; color: var(--ink-soft); }
.qq-seg button {
    min-height: 36px; min-width: 40px; padding: 2px 12px; border: 0; border-radius: 11px; cursor: pointer;
    font-family: var(--font-display); font-weight: 600; font-size: .95rem; background: transparent; color: var(--ink-soft);
    transition: background .2s, color .2s, transform .2s var(--ease-bounce);
}
.qq-seg button[aria-pressed="true"] { background: var(--paper); color: #1F6E35; box-shadow: 0 3px 8px -3px rgba(43, 35, 80, .35); }
:root[data-theme="dark"] .qq-seg button[aria-pressed="true"] { color: #B8F0C4; }
.qq-seg button:focus-visible { outline: 3px solid var(--grape); outline-offset: 1px; }
.qq-seg--big button { min-height: 46px; padding: 4px 18px; font-size: 1.05rem; }
.qq-switch { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.qq-switch input {
    appearance: none; -webkit-appearance: none; position: relative; width: 44px; height: 26px; margin: 0; border-radius: 999px; cursor: pointer;
    background: color-mix(in srgb, var(--ink) 18%, transparent); transition: background .2s;
}
.qq-switch input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .25); transition: inset-inline-start .2s var(--ease-bounce); }
.qq-switch input:checked { background: var(--leaf); }
.qq-switch input:checked::after { inset-inline-start: 21px; }
.qq-switch input:disabled { opacity: .4; cursor: not-allowed; }
.qq-switch input:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }

/* ---------- The studio ---------- */
.qq-studio {
    display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start;
    padding: clamp(12px, 2vw, 20px); margin-bottom: 28px; border-radius: 34px;
    background: var(--glass-strong); box-shadow: inset 0 0 0 1.5px var(--glass-edge), var(--shadow-l);
}
.qq-steps { display: flex; flex-direction: column; gap: 6px; position: relative; }
.qq-steps::before { content: ""; position: absolute; inset-block: 22px; inset-inline-start: 25px; width: 3px; border-radius: 3px; background: repeating-linear-gradient(180deg, color-mix(in srgb, var(--leaf) 50%, transparent) 0 6px, transparent 6px 12px); }
.qq-step {
    position: relative; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px 6px 6px;
    border: 0; border-radius: 18px; cursor: pointer; text-align: start;
    font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink-soft); background: transparent;
    transition: background .2s, color .2s, transform .2s var(--ease-bounce);
}
:root[dir="rtl"] .qq-step { padding: 6px 6px 6px 12px; }
.qq-step .k-ico { width: 22px; height: 22px; opacity: .8; }
.qq-step-no {
    position: relative; z-index: 1; display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%;
    font-weight: 700; background: var(--paper); color: var(--ink-soft); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--leaf) 45%, transparent);
}
.qq-step:hover { background: color-mix(in srgb, var(--leaf) 10%, transparent); }
.qq-step[aria-selected="true"] { background: linear-gradient(180deg, color-mix(in srgb, var(--leaf) 22%, var(--paper)), color-mix(in srgb, var(--leaf) 12%, var(--paper))); color: var(--ink); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--leaf) 45%, transparent); }
.qq-step[aria-selected="true"] .qq-step-no { background: var(--leaf); color: #fff; box-shadow: 0 6px 12px -6px var(--leaf-deep); }
.qq-step.is-done .qq-step-no { background: linear-gradient(180deg, #FFE69A, #F7AE24); color: #2B2350; box-shadow: none; }
.qq-step:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }

.qq-stage { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.qq-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.qq-nav {
    display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; cursor: pointer;
    font-family: var(--font-display); font-size: 1.8rem; font-weight: 700; line-height: 1; color: var(--leaf-deep);
    background: var(--paper); box-shadow: inset 0 -3px 0 rgba(63, 159, 85, .2), 0 6px 12px -6px rgba(43, 35, 80, .4);
}
.qq-nav:disabled { opacity: .35; cursor: default; }
.qq-nav:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }
.qq-medal { display: flex; align-items: center; gap: 8px; font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.qq-medal-plant { width: 34px; height: 46px; --qq-petal: #FF8FB8; --qq-petal-2: #FFD0E2; }
.qq-basmalah {
    display: flex; align-items: center; justify-content: center; gap: 10px; margin: 0 auto; padding: 4px 8px 4px 18px; border-radius: 999px;
    font-family: var(--qq-arabic); font-size: 1.5rem; color: var(--ink-soft); background: color-mix(in srgb, var(--sun) 14%, transparent);
}
.qq-mini { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; cursor: pointer; background: var(--paper); color: var(--leaf-deep); box-shadow: 0 4px 8px -4px rgba(43, 35, 80, .4); }
.qq-mini .k-ico { width: 20px; height: 20px; }

.qq-card {
    position: relative; overflow: hidden; padding: clamp(16px, 3vw, 28px) clamp(14px, 3vw, 30px); border-radius: 28px; text-align: center;
    background:
        radial-gradient(80% 80% at 50% 0%, rgba(255, 246, 201, .9), transparent 70%),
        linear-gradient(180deg, #FFFDF6, #FFF6E2);
    box-shadow: inset 0 0 0 2px rgba(247, 174, 36, .35), inset 0 -6px 0 rgba(247, 174, 36, .18);
    transition: box-shadow .4s;
}
:root[data-theme="dark"] .qq-card { background: radial-gradient(80% 80% at 50% 0%, rgba(255, 216, 107, .18), transparent 70%), linear-gradient(180deg, #2F2A6E, #29245F); box-shadow: inset 0 0 0 2px rgba(255, 212, 92, .3); }
.qq-card::before, .qq-card::after {
    /* Corner rosettes. */
    content: ""; position: absolute; width: 46px; height: 46px; opacity: .45; pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 40 40'%3E%3Cg fill='none' stroke='%23F7AE24' stroke-width='1.6'%3E%3Crect x='10' y='10' width='20' height='20'/%3E%3Crect x='10' y='10' width='20' height='20' transform='rotate(45 20 20)'/%3E%3Ccircle cx='20' cy='20' r='4'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.qq-card::before { top: 10px; inset-inline-start: 10px; }
.qq-card::after { bottom: 10px; inset-inline-end: 10px; }
.qq-card.is-playing { box-shadow: inset 0 0 0 3px rgba(93, 191, 115, .7), 0 0 0 6px rgba(93, 191, 115, .18); }
.qq-card.is-waiting .qq-ayah { opacity: .7; }
.qq-ayah {
    margin: 0; font-family: var(--qq-arabic); font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 2.1; color: var(--ink);
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0 .4em; direction: rtl;
}
.qq-w { position: relative; display: inline-flex; flex-direction: column; align-items: center; border-radius: 14px; transition: background .25s, color .25s; }
.qq-w b { font-weight: 400; }
.qq-w small { margin-top: -.45em; font-family: var(--font-read); font-size: .9rem; font-weight: 700; line-height: 1.2; color: var(--leaf-deep); direction: ltr; }
:root[data-theme="dark"] .qq-w small { color: #B8F0C4; }
.no-translit .qq-w small, .no-translit .qq-translit, .no-translit .qq-line-tl { display: none; }
.no-meaning .qq-meaning, .no-meaning .qq-line-en { display: none; }
.qq-mark { color: var(--ink-faint); }
.is-reading .qq-card .qq-ayah { color: var(--leaf-deep); }
:root[data-theme="dark"] .is-reading .qq-card .qq-ayah { color: #FFE3A0; }
.qq-w.is-hidden { cursor: pointer; }
.qq-w.is-hidden b, .qq-w.is-hidden small { visibility: hidden; }
.qq-w.is-hidden::after {
    content: ""; position: absolute; inset: 22% 4% 30%; border-radius: 999px;
    background: linear-gradient(90deg, #A9E5B4, #86D68F); box-shadow: inset 0 -3px 0 rgba(63, 159, 85, .35);
}
.qq-w.is-hidden:hover::after, .qq-w.is-hidden:focus-visible::after { background: linear-gradient(90deg, #FFD0E2, #FF8FB8); }
.qq-w.is-hidden:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }
.qq-w.is-peeked b, .qq-w.is-peeked small { visibility: visible; }
.qq-w.is-peeked::after { display: none; }
.qq-w.is-peeked { background: rgba(255, 212, 92, .3); animation: qq-peek .5s var(--ease-bounce); }
@keyframes qq-peek { from { transform: scale(.7); } }
.qq-card .qq-translit { display: none; }
.qq-translit { margin: 6px 0 0; font-family: var(--font-read); font-size: 1.1rem; font-weight: 700; color: var(--ink-soft); }
.qq-meaning { margin: 8px auto 0; max-width: 720px; font-family: var(--font-read); font-size: 1.08rem; color: var(--ink-soft); }
.qq-ref { font-size: .82em; color: var(--ink-faint); white-space: nowrap; }
.qq-loading { padding: 30px 0; }

.qq-panels { min-height: 120px; }
.qq-panel { padding: 4px 2px; }
.qq-hint { margin: 0 0 10px; font-weight: 700; font-size: 1.02rem; color: var(--ink-soft); }
.qq-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.qq-status { min-height: 1.4em; margin: 6px 0 0; font-family: var(--font-display); font-weight: 600; color: var(--leaf-deep); }
:root[data-theme="dark"] .qq-status { color: #B8F0C4; }
.qq-status--big { font-size: 1.2rem; }
.qq-row .qq-status { margin: 0; }
.qq-play {
    position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 66px; padding: 8px 28px 8px 10px; border: 0; border-radius: 999px; cursor: pointer;
    font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; color: #fff;
    background: linear-gradient(180deg, #7BD38A, #3FA857); box-shadow: inset 0 -5px 0 rgba(26, 100, 50, .35), 0 16px 26px -14px rgba(47, 143, 73, .9);
    transition: transform .2s var(--ease-bounce);
}
:root[dir="rtl"] .qq-play { padding: 8px 10px 8px 28px; }
.qq-play:hover { transform: translateY(-3px); }
.qq-play:active { transform: translateY(2px) scale(.98); }
.qq-play:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; }
.qq-play-icon { position: relative; z-index: 1; display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: #fff; color: #3FA857; }
.qq-play-icon .k-ico { width: 28px; height: 28px; }
.qq-play-ring { position: absolute; inset-inline-start: 10px; top: 8px; width: 50px; height: 50px; border-radius: 50%; }
:root[dir="rtl"] .qq-play-ring { inset-inline-start: auto; inset-inline-end: 10px; }
.qq-play.is-playing .qq-play-ring { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); animation: qq-ring 1.4s ease-out infinite; }
@keyframes qq-ring { to { box-shadow: 0 0 0 18px rgba(255, 255, 255, 0); } }

.qq-rec {
    display: inline-flex; align-items: center; gap: 10px; min-height: 58px; padding: 8px 24px 8px 12px; border: 0; border-radius: 999px; cursor: pointer;
    font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: #fff;
    background: linear-gradient(180deg, #FF9E8E, #E0503F); box-shadow: inset 0 -4px 0 rgba(140, 40, 30, .3), 0 14px 24px -14px rgba(224, 80, 63, .9);
}
:root[dir="rtl"] .qq-rec { padding: 8px 12px 8px 24px; }
.qq-rec:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; }
.qq-rec-dot { width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 7px #FF6B5A; }
.qq-rec.is-recording .qq-rec-dot { border-radius: 6px; box-shadow: inset 0 0 0 6px #FF6B5A; animation: qq-blink 1s steps(2) infinite; }
@keyframes qq-blink { 50% { opacity: .5; } }
.qq-note { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 0; padding: 10px 14px; border-radius: 18px; font-family: var(--font-read); font-size: .95rem; color: var(--ink-soft); background: color-mix(in srgb, var(--sky) 12%, transparent); }
.qq-note .k-ico { width: 26px; height: 26px; flex: none; }

.qq-rates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.qq-rate {
    display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 8px 12px; border: 0; border-radius: 24px; cursor: pointer;
    background: var(--paper); color: var(--ink); text-align: center;
    box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--rc) 35%, transparent), inset 0 0 0 2px color-mix(in srgb, var(--rc) 40%, transparent), 0 10px 18px -14px rgba(43, 35, 80, .6);
    transition: transform .2s var(--ease-bounce);
    --qq-petal: #FF8FB8; --qq-petal-2: #FFD0E2;
}
.qq-rate--1 { --rc: #5DBF73; }
.qq-rate--2 { --rc: #FF8FB8; }
.qq-rate--3 { --rc: #F7AE24; }
.qq-rate svg { width: 54px; height: 74px; transition: transform .3s var(--ease-bounce); }
.qq-rate:hover { transform: translateY(-4px); }
.qq-rate:hover svg { transform: scale(1.1) rotate(-4deg); }
.qq-rate:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; }
.qq-rate b { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.15; }
.qq-rate small { font-size: .82rem; font-weight: 700; color: var(--ink-faint); }

/* ---------- The whole surah ---------- */
.qq-sheet-wrap { margin-bottom: 28px; }
.qq-sheet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.qq-sheet { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qq-line {
    display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 22px; background: var(--glass-strong);
    box-shadow: inset 0 0 0 1.5px var(--glass-edge), 0 8px 16px -14px rgba(43, 35, 80, .6);
    transition: box-shadow .3s, transform .3s var(--ease-soft);
}
.qq-line-no {
    display: grid; place-items: center; width: 42px; height: 42px; font-family: var(--font-display); font-weight: 700; color: #fff;
    background: var(--qq-petal); clip-path: polygon(50% 0, 64% 14%, 85% 15%, 86% 36%, 100% 50%, 86% 64%, 85% 85%, 64% 86%, 50% 100%, 36% 86%, 15% 85%, 14% 64%, 0 50%, 14% 36%, 15% 15%, 36% 14%);
    text-shadow: 0 1px 1px rgba(0, 0, 0, .25);
}
.qq-line-ar { margin: 0; font-family: var(--qq-arabic); font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.9; text-align: right; direction: rtl; }
.qq-line-ar .qq-w { display: inline; }
.qq-line-tl { margin: 0; font-family: var(--font-read); font-size: .92rem; font-weight: 700; color: var(--leaf-deep); }
:root[data-theme="dark"] .qq-line-tl { color: #B8F0C4; }
.qq-line-en { margin: 2px 0 0; font-family: var(--font-read); font-size: .95rem; color: var(--ink-soft); }
.qq-line-go { min-height: 40px; padding: 4px 14px; border: 0; border-radius: 999px; cursor: pointer; font-family: var(--font-display); font-weight: 600; background: var(--leaf-soft); color: #1F6E35; white-space: nowrap; }
:root[data-theme="dark"] .qq-line-go { color: #B8F0C4; }
.qq-line-go:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }
.qq-line.is-current { box-shadow: inset 0 0 0 2.5px color-mix(in srgb, var(--leaf) 70%, transparent), 0 10px 20px -14px rgba(43, 35, 80, .6); }
.qq-line.is-playing { transform: scale(1.01); box-shadow: inset 0 0 0 3px #F7AE24, 0 0 0 6px rgba(255, 212, 92, .25), 0 14px 26px -16px rgba(247, 174, 36, .9); }
.qq-line.is-bloom .qq-line-no { box-shadow: none; filter: drop-shadow(0 0 6px rgba(255, 212, 92, .9)); }
.qq-line.is-due .qq-line-no { outline: 3px solid #4FA8EE; }

/* ---------- Garden games ---------- */
.qq-games {
    padding: clamp(14px, 2.5vw, 26px); margin-bottom: 22px; border-radius: 34px; scroll-margin-top: 140px;
    background: radial-gradient(90% 80% at 100% 0%, rgba(255, 200, 74, .2), transparent 60%), var(--qq-meadow);
    box-shadow: inset 0 0 0 1.5px var(--qq-panel-edge), var(--shadow);
}
.qq-games-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.qq-games-head .k-section-title { margin-bottom: 2px; }
.qq-games-head p { margin: 0 0 14px; font-weight: 600; color: var(--ink-soft); }
.qq-games-stars { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink-soft); }
.qq-game-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.qq-game-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px 16px; border: 0; border-radius: 26px; cursor: pointer; text-align: start;
    background: var(--glass-strong); color: var(--ink);
    box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--t) 25%, transparent), inset 0 0 0 1.5px var(--glass-edge), 0 14px 24px -18px rgba(43, 35, 80, .7);
    transition: transform .25s var(--ease-bounce);
}
.qq-game-card:hover { transform: translateY(-5px) rotate(-.6deg); }
.qq-game-card:focus-visible { outline: 3px solid var(--grape); outline-offset: 3px; }
.qq-game-card b { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; }
.qq-game-card small { font-size: .92rem; font-weight: 600; color: var(--ink-soft); }
.qq-game-art { display: flex; gap: 6px; margin-bottom: 6px; }
.qq-game-art i {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-style: normal; font-family: var(--font-display); font-weight: 700; color: #fff;
    background: var(--t); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15);
}
.qq-game-art i:nth-child(2) { rotate: 6deg; background: var(--td); }
.qq-game-art i:nth-child(3) { rotate: -5deg; }
.qq-game-art--gap i { width: 34px; }
.qq-game-art--gap i.is-gap { background: transparent; color: var(--td); border: 3px dashed var(--t); }
.qq-game-art--match i.is-line { width: 30px; height: 6px; margin-block: 17px; border-radius: 3px; rotate: 0deg; background: var(--t); }

.qq-game, .qq-studio, .qq-sheet-wrap { scroll-margin-top: 170px; }
.qq-game { padding: clamp(12px, 2vw, 20px); border-radius: 28px; background: var(--glass-strong); box-shadow: inset 0 0 0 1.5px var(--glass-edge), var(--shadow); }
.qq-game-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 10px; }
.qq-game-title { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; }
.qq-game-round { margin-inline-start: auto; padding: 3px 12px; border-radius: 999px; font-family: var(--font-display); font-weight: 600; background: var(--sun-soft); }
.qq-game-round:empty { display: none; }
.qq-game-prompt { margin: 0 0 12px; font-family: var(--font-display); font-weight: 600; font-size: 1.25rem; text-align: center; }
.qq-game-say { min-height: 1.5em; margin: 12px 0 0; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--leaf-deep); }
:root[data-theme="dark"] .qq-game-say { color: #B8F0C4; }
.qq-order-placed { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 6px; }
.qq-order-done { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 16px; background: var(--leaf-soft); font-family: var(--qq-arabic); font-size: 1.4rem; animation: qq-peek .45s var(--ease-bounce); }
.qq-order-done [dir="rtl"] { flex: 1; text-align: right; }
.qq-order-no { display: grid; place-items: center; width: 32px; height: 32px; flex: none; border-radius: 50%; font-family: var(--font-display); font-size: 1rem; font-weight: 700; color: #fff; background: var(--leaf); }
.qq-order-pool { display: grid; gap: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.qq-order-card, .qq-choice {
    padding: 10px 16px; border: 0; border-radius: 18px; cursor: pointer; font-family: var(--qq-arabic); font-size: clamp(1.4rem, 2.6vw, 1.8rem); line-height: 1.8;
    background: var(--paper); color: var(--ink); box-shadow: inset 0 -4px 0 rgba(43, 35, 80, .1), inset 0 0 0 2px var(--line);
    transition: transform .2s var(--ease-bounce), box-shadow .2s;
}
.qq-order-card:hover, .qq-choice:hover { transform: translateY(-2px); box-shadow: inset 0 -4px 0 rgba(43, 35, 80, .1), inset 0 0 0 2px var(--leaf); }
.qq-order-card:focus-visible, .qq-choice:focus-visible, .qq-number:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }
.is-nudge { animation: qq-nudge .45s ease; }
@keyframes qq-nudge { 20%, 60% { translate: -6px 0; } 40%, 80% { translate: 6px 0; } }
.is-right { box-shadow: inset 0 0 0 3px var(--leaf), 0 0 0 5px rgba(93, 191, 115, .25) !important; }
.qq-choice:disabled:not(.is-right) { opacity: .45; cursor: default; }
.qq-gap-ayah, .qq-opening { margin: 0 0 14px; padding: 12px; border-radius: 20px; font-family: var(--qq-arabic); font-size: clamp(1.8rem, 3.6vw, 2.5rem); line-height: 2; text-align: center; background: color-mix(in srgb, var(--sun) 12%, transparent); }
.qq-gap { display: inline-block; min-width: 3.2em; border-block-end: 4px dashed var(--grape); color: var(--grape-deep); }
.qq-gap.is-filled { border-block-end-color: var(--leaf); color: var(--leaf-deep); animation: qq-peek .45s var(--ease-bounce); }
:root[data-theme="dark"] .qq-gap.is-filled { color: #B8F0C4; }
.qq-choices { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.qq-numbers { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.qq-number { position: relative; display: grid; place-items: center; width: 84px; height: 108px; padding: 0; border: 0; border-radius: 22px; cursor: pointer; background: var(--paper); box-shadow: inset 0 -4px 0 rgba(43, 35, 80, .1), inset 0 0 0 2px var(--line); transition: transform .2s var(--ease-bounce); }
.qq-number:hover { transform: translateY(-3px); }
.qq-number svg { width: 54px; height: 74px; margin-top: -18px; }
.qq-number b { position: absolute; bottom: 6px; inset-inline-start: 50%; translate: -50% 0; min-width: 34px; padding: 0 8px; border-radius: 999px; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.5; color: #2B2350; background: linear-gradient(180deg, #FFF3DF, #EBD3AF); box-shadow: inset 0 -2px 0 rgba(106, 75, 44, .25); }
:root[dir="rtl"] .qq-number b { translate: 50% 0; }
.qq-number:disabled:not(.is-right) { opacity: .4; cursor: default; }
.qq-game-done { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; --qq-petal: #FF8FB8; --qq-petal-2: #FFD0E2; }
.qq-game-done svg { width: 90px; height: 124px; animation: qq-grow .9s var(--ease-bounce); }
.qq-game-done h3 { margin: 0; font-size: 1.8rem; }
.qq-game-done h3:focus { outline: none; }
.qq-game-done p { margin: 0 0 8px; font-weight: 700; color: var(--ink-soft); }

/* ---------- Previous / next surah ---------- */
.qq-pager { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 8px; }
.qq-pager-link {
    display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 18px; border-radius: 20px; text-decoration: none; color: var(--ink);
    background: var(--glass-strong); box-shadow: inset 0 0 0 1.5px var(--glass-edge), var(--shadow-s); font-family: var(--font-display); font-size: 1.3rem;
}
.qq-pager-link span { display: flex; flex-direction: column; line-height: 1.15; }
.qq-pager-link small { font-family: var(--font-body); font-size: .8rem; font-weight: 700; color: var(--ink-faint); }
.qq-pager-link b { font-size: 1.05rem; font-weight: 600; }
.qq-pager-link .k-ico { width: 26px; height: 26px; }
.qq-pager-all { margin-inline: auto; }
.qq-pager-next { text-align: end; }
.qq-pager-link:focus-visible { outline: 3px solid var(--grape); outline-offset: 2px; }

/* ---------- The grown-ups' progress report ---------- */
.qq-parent { margin-bottom: 24px; padding: clamp(16px, 2.5vw, 26px); }
.qq-parent-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 10px; }
.qq-parent-head .k-section-title { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.qq-parent-head p { margin: 0 0 12px; color: var(--ink-soft); font-family: var(--font-read); }
.qq-parent-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0 0 14px; }
.qq-parent-stats div { padding: 8px 12px; border-radius: 16px; background: var(--leaf-soft); }
.qq-parent-stats div.is-due { background: var(--sky-soft); }
.qq-parent-stats dt { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
.qq-parent-stats dd { margin: 0; font-family: var(--font-display); font-weight: 700; font-size: 1.6rem; }
.qq-parent-none { margin: 0; color: var(--ink-soft); }
.qq-parent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qq-parent-list li { display: grid; grid-template-columns: 90px minmax(140px, 1fr) minmax(80px, 1.2fr) auto; align-items: center; gap: 12px; padding: 8px 12px; border-radius: 16px; background: color-mix(in srgb, var(--ink) 4%, transparent); }
.qq-parent-ar { font-family: "Amiri", var(--font-arabic); font-size: 1.4rem; color: var(--leaf-deep); }
:root[data-theme="dark"] .qq-parent-ar { color: #B8F0C4; }
.qq-parent-name { display: flex; flex-direction: column; line-height: 1.2; }
.qq-parent-name small { font-size: .82rem; font-weight: 700; color: var(--ink-soft); }
.qq-parent-bar { height: 10px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 10%, transparent); overflow: hidden; }
.qq-parent-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #86D68F, #FF8FB8); }
.qq-parent-tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.qq-parent-learned { background: linear-gradient(180deg, #FFE69A, #F7AE24); color: #2B2350; }
.qq-parent-due { background: var(--sky-soft); }
@media (max-width: 700px) {
    .qq-parent-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .qq-parent-list li { grid-template-columns: minmax(0, 1fr) auto; }
    .qq-parent-bar { grid-column: 1 / -1; }
    .qq-parent-tags { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ================= Phones and tablets ================= */
@media (max-width: 900px) {
    .qq-hero { grid-template-columns: 1fr; padding: 20px 18px; border-radius: 32px; }
    .qq-hero-art { order: -1; min-height: 0; margin: -6px 0 -16px; }
    .qq-hero-isle { width: min(250px, 72%); }
    .qq-hero-flower { width: 46px; height: 64px; }
    .qq-hero-flower--1, .qq-hero-flower--3 { width: 54px; height: 74px; }
    .qq-review { grid-template-columns: 1fr; }
    .qq-studio { grid-template-columns: 1fr; }
    .qq-steps { flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; scrollbar-width: none; }
    .qq-steps::before { display: none; }
    .qq-step { flex: 1 0 auto; flex-direction: column; gap: 2px; min-height: 0; padding: 6px 8px; font-size: .88rem; text-align: center; }
    :root[dir="rtl"] .qq-step { padding: 6px 8px; }
    .qq-step .k-ico { display: none; }
    .qq-step-no { width: 34px; height: 34px; }
    .qq-game-cards { grid-template-columns: 1fr; }
    .qq-game-card { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .qq-game-card .qq-game-art { margin: 0 6px 0 0; }
    .qq-game-card small { flex-basis: 100%; }
}
@media (max-width: 560px) {
    .qq-shero { padding: 16px 12px; border-radius: 30px; }
    .qq-shero-title { flex-direction: column; align-items: flex-start; gap: 10px; }
    .qq-arch { width: 100%; height: auto; min-height: 92px; padding: 14px; border-radius: 60px 60px 22px 22px; }
    .qq-garden { padding: 10px 6px 6px; }
    .qq-stop button { width: 64px; }
    .qq-stop-plant { width: 60px; height: 82px; }
    .qq-garden-palm { display: none; }
    .qq-bar { position: static; padding: 8px 10px; gap: 8px; }
    .qq-field { flex-basis: 100%; }
    .qq-field select { flex: 1; max-width: none; }
    .qq-rates { grid-template-columns: 1fr; }
    .qq-rate { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 6px 14px; text-align: start; }
    .qq-rate svg { width: 40px; height: 54px; }
    .qq-rate b { flex: 1; }
    .qq-line { grid-template-columns: 34px minmax(0, 1fr); padding: 10px; }
    .qq-line-no { width: 34px; height: 34px; font-size: .85rem; }
    .qq-line-go { grid-column: 1 / -1; justify-self: end; }
    .qq-play { font-size: 1.15rem; }
    .qq-plots { grid-template-columns: 1fr 1fr; gap: 8px; }
    .qq-plot { padding: 10px; border-radius: 20px; }
    .qq-plot-ar { font-size: 1.5rem; }
    .qq-plot-about { display: none; }
    .qq-bed-count { display: none; }
    .qq-pager-all { order: 3; margin: 0; flex-basis: 100%; justify-content: center; }
    .qq-pager-link:not(.qq-pager-all) { flex: 1 1 40%; }
    .qq-pager-next { justify-content: flex-end; }
}

@media (prefers-reduced-motion: reduce) {
    .qq-hero-isle, .qq-hero-flower, .qq-hero-spark, .qq-review-can, .qq-due-drop, .qq-stop-drop, .qq-stop.is-now .qq-stop-plant,
    .qq-stop.is-growing .qq-stop-plant, .qq-play.is-playing .qq-play-ring, .qq-rec.is-recording .qq-rec-dot, .is-nudge, .qq-w.is-peeked,
    .qq-order-done, .qq-gap.is-filled, .qq-game-done svg { animation: none !important; }
    .qq-plot, .qq-due, .qq-stop-plant, .qq-rate, .qq-game-card, .qq-line { transition: none; }
}

/* ================= My Quran Garden (/quran-quest/my-garden) =================
   The child's memorisation progress as a garden: a ring for the whole path, four terraced beds of plants grown from
   the child's own ratings, a panel (a bottom sheet on phones) with every ayah's flower and its next watering day, and
   the week of reviews ahead. Calm by design: no scores, no streaks, no red. */
.qqg-hero { grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); }
.qqg-stats .qq-stat { min-width: 104px; }
.qqg-who { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 14px 6px 8px; border-radius: 999px; background: var(--qq-panel); box-shadow: inset 0 0 0 1.5px var(--qq-panel-edge); font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.qqg-who .k-ico { width: 24px; height: 24px; flex: none; }

/* The ring: every ayah on the path, filled as ayahs reach full bloom. */
.qqg-ring { position: relative; z-index: 1; justify-self: center; display: grid; place-items: center; width: min(280px, 100%); aspect-ratio: 1; }
.qqg-ring > svg:first-child { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; filter: drop-shadow(0 18px 24px rgba(63, 159, 85, .25)); }
:root[dir="rtl"] .qqg-ring > svg:first-child { scale: -1 1; rotate: 90deg; }
.qqg-ring-track { fill: rgba(255, 255, 255, .72); stroke: rgba(93, 191, 115, .2); stroke-width: 18; }
.qqg-ring-fill { fill: none; stroke: url(#qqg-ring-fill); stroke-width: 18; stroke-linecap: round; transition: stroke-dasharray 1.2s var(--ease-soft); }
.qqg-ring-flower { position: absolute; top: -18px; inset-inline-end: 12%; width: 70px; height: 96px; transform-origin: 50% 92%; animation: qq-sway 4.5s ease-in-out infinite; filter: drop-shadow(0 8px 10px rgba(43, 35, 80, .2)); }
.qqg-ring-text { position: relative; display: grid; justify-items: center; text-align: center; gap: 2px; max-width: 66%; }
.qqg-ring-text b { font-family: var(--font-display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: 1; color: #1F6E35; }
.qqg-ring-text span { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.qqg-ring-text small { font-weight: 700; font-size: .8rem; color: var(--ink-soft); }
:root[data-theme="dark"] .qqg-ring-track { fill: rgba(30, 26, 78, .55); stroke: rgba(255, 255, 255, .12); }
:root[data-theme="dark"] .qqg-ring-text b { color: #FFE3A0; }

/* Nothing planted yet. */
.qqg-empty { display: flex; align-items: center; gap: 18px; margin-bottom: 22px; padding: 18px 22px; }
.qqg-empty-seed { width: 76px; height: 104px; flex: none; }
.qqg-empty h2 { margin: 0 0 4px; font-size: 1.4rem; }
.qqg-empty p { margin: 0 0 12px; color: var(--ink-soft); font-weight: 600; }

/* The garden and the close-up panel side by side. */
.qqg-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 370px); gap: 20px; align-items: start; margin-bottom: 24px; }
.qqg-field {
    position: relative; overflow: hidden; padding: 18px clamp(14px, 2vw, 22px) 22px; border-radius: 34px;
    background:
        radial-gradient(70% 40% at 85% 0%, rgba(255, 236, 160, .55), transparent 70%),
        linear-gradient(180deg, #DFF3FF 0%, #EEF9F0 22%, #D9F2DF 100%);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .95), var(--shadow);
    transition: opacity .3s;
}
:root[data-theme="dark"] .qqg-field {
    background: radial-gradient(70% 40% at 85% 0%, rgba(255, 216, 107, .16), transparent 70%), linear-gradient(180deg, #2C2B6E 0%, #26406E 40%, #1C3A4E 100%);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .1), var(--shadow);
}
.qq[data-state="loading"] .qqg-field { opacity: .7; }
.qqg-field-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.qqg-field-head h2 { margin: 0; font-size: 1.45rem; }
.qqg-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; font-size: .8rem; font-weight: 700; color: var(--ink-soft); }
.qqg-legend li { display: inline-flex; align-items: center; gap: 2px; }
.qqg-legend svg { width: 20px; height: 26px; }
.qqg-legend li:last-child svg { width: 16px; height: 16px; margin-inline-end: 2px; }
.qqg-pick { display: flex; align-items: center; gap: 6px; margin: 6px 0 4px; font-weight: 700; font-size: .92rem; color: var(--ink-soft); }
.qqg-pick .k-ico { width: 20px; height: 20px; flex: none; }

/* Four terraces of soil, from the first seedlings to the tall palms. */
.qqg-beds { display: grid; gap: 6px; }
.qqg-bed { position: relative; padding-top: 8px; }
.qqg-bed h3 { display: flex; align-items: center; gap: 4px; margin: 0; font-size: 1rem; color: var(--ink-soft); }
.qqg-bed h3 svg { width: 22px; height: 30px; }
.qqg-plots { position: relative; display: flex; flex-wrap: wrap; gap: 10px 4px; margin: 0; padding: 0 0 8px; list-style: none; }
/* Each plant stands in its own mound of rich soil; side by side the mounds make the bed, row after row. */
.qqg-plots li::before {
    content: ""; position: absolute; z-index: -1; inset-inline: -3px; bottom: 0; height: 74px; border-radius: 22px 22px 16px 16px; pointer-events: none;
    background: linear-gradient(180deg, #95623B 0%, #6E4426 100%);
    box-shadow: inset 0 6px 0 rgba(255, 255, 255, .16), 0 10px 16px -12px rgba(120, 70, 30, .6);
}
.qqg-bed--seed .qqg-plots li::before { background: linear-gradient(180deg, #9A6A3F, #74492A); }
.qqg-bed--tree .qqg-plots li::before { background: linear-gradient(180deg, #8C5934, #64391F); }
.qqg-plots li { position: relative; z-index: 1; isolation: isolate; }
.qqg-plot {
    position: relative; display: grid; justify-items: center; align-content: end; gap: 0; width: 98px; min-height: 154px; padding: 6px 4px 8px;
    border: 0; border-radius: 22px; cursor: pointer; background: transparent; color: var(--ink); font: inherit;
    transition: transform .3s var(--ease-bounce), background .2s, box-shadow .2s;
}
.qqg-plot:hover { transform: translateY(-4px); }
.qqg-plot:focus-visible { outline: 4px solid var(--grape); outline-offset: 2px; }
.qqg-plot.is-selected { background: radial-gradient(60% 45% at 50% 32%, rgba(255, 240, 180, .85), rgba(255, 240, 180, 0) 75%); box-shadow: inset 0 0 0 3px #FFD45C, 0 0 22px -4px rgba(255, 196, 90, .9); }
:root[data-theme="dark"] .qqg-plot.is-selected { background: radial-gradient(60% 45% at 50% 32%, rgba(255, 216, 107, .3), rgba(255, 216, 107, 0) 75%); }
.qqg-plant { width: 64px; height: 88px; transform-origin: 50% 92%; transition: transform .5s var(--ease-bounce); filter: drop-shadow(0 6px 6px rgba(43, 35, 80, .15)); }
.qqg-plot.is-stage-0 .qqg-plant { transform: scale(.82); }
.qqg-plot.is-stage-1 .qqg-plant { transform: scale(.92); }
.qqg-plot.is-stage-3 .qqg-plant { transform: scale(1.1); animation: qq-sway 5s ease-in-out infinite; }
.qqg-plot.is-learned::before {
    /* A little star of light over every surah learned by heart. */
    content: ""; position: absolute; top: 8px; inset-inline-start: 14px; width: 14px; height: 14px; background: #FFD45C;
    clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); animation: qq-twinkle 2.6s ease-in-out infinite;
}
.qqg-drop { position: absolute; top: 6px; inset-inline-end: 12px; width: 24px; height: 24px; opacity: 0; transform: translateY(-6px) scale(.6); transition: opacity .3s, transform .4s var(--ease-bounce); }
.qqg-plot.is-due .qqg-drop { opacity: 1; transform: none; animation: qqg-drip 2.2s ease-in-out infinite; }
@keyframes qqg-drip { 50% { translate: 0 5px; } }
.qqg-plot-ar { margin-top: 6px; font-family: var(--qq-arabic); font-size: 1.2rem; line-height: 1.3; color: #F6FFF4; text-shadow: 0 1px 2px rgba(80, 40, 10, .55); }
.qqg-plot-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-display); font-weight: 600; font-size: .78rem; line-height: 1.2; color: #FFF7EE; text-shadow: 0 1px 2px rgba(80, 40, 10, .6); }
.qqg-petals { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 86px; margin-top: 4px; }
.qqg-petals i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255, 255, 255, .45); box-shadow: inset 0 0 0 1px rgba(80, 40, 10, .25); }
.qqg-petals i.is-1 { background: color-mix(in srgb, var(--qq-petal) 45%, #fff); }
.qqg-petals i.is-2 { background: color-mix(in srgb, var(--qq-petal) 75%, #fff); }
.qqg-petals i.is-3 { background: var(--qq-petal); box-shadow: 0 0 0 1.5px #fff; }
.qqg-petals i.is-due { box-shadow: 0 0 0 2px #2E9BEA; }
/* Longer surahs get smaller petals so every ayah still fits on the bed. */
.qqg-petals:has(i:nth-child(9)) { gap: 2px; }
.qqg-petals:has(i:nth-child(9)) i { width: 5px; height: 5px; }

/* The close-up panel. */
.qqg-detail {
    position: sticky; top: calc(var(--top-h) + 12px); display: grid; gap: 12px; padding: 18px; border-radius: 30px;
    background: var(--qq-panel); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: inset 0 0 0 1.5px var(--qq-panel-edge), var(--shadow-l); max-height: calc(100vh - var(--top-h) - 30px); overflow: auto;
}
.qqg-detail:focus { outline: none; }
.qqg-detail-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.qqg-detail-plant { width: 56px; height: 77px; }
.qqg-detail-ar { display: block; font-family: var(--qq-arabic); font-size: 1.4rem; line-height: 1.2; color: #1F6E35; }
:root[data-theme="dark"] .qqg-detail-ar { color: #B8F0C4; }
.qqg-detail h2 { margin: 0; font-size: 1.3rem; line-height: 1.15; }
.qqg-detail-state { margin: 2px 0 0; font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.qqg-close { display: none; width: 44px; height: 44px; }
.qqg-close svg { width: 22px; height: 22px; }
.qqg-ayahs { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.qqg-ayah { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 18px; background: rgba(255, 255, 255, .6); box-shadow: inset 0 0 0 1px var(--line); }
:root[data-theme="dark"] .qqg-ayah { background: rgba(255, 255, 255, .06); }
.qqg-ayah.is-bloom { background: color-mix(in srgb, var(--qq-petal) 16%, var(--paper)); }
.qqg-ayah.is-due { box-shadow: inset 0 0 0 2px #7FC4F5; }
.qqg-ayah-plant { width: 34px; height: 46px; flex: none; }
.qqg-ayah-text { min-width: 0; flex: 1; line-height: 1.25; }
.qqg-ayah-text b { display: block; font-family: var(--font-display); font-weight: 700; font-size: .98rem; }
.qqg-ayah-text b span { font-weight: 600; color: var(--ink-soft); }
.qqg-ayah-text small { display: block; font-weight: 600; font-size: .82rem; color: var(--ink-soft); }
.qqg-ayah-drop { width: 22px; height: 22px; flex: none; animation: qqg-drip 2.2s ease-in-out infinite; }
.qqg-games { margin: 0; padding: 8px 12px; border-radius: 16px; background: var(--sun-soft); font-weight: 700; font-size: .9rem; }
.qqg-games.is-due { background: var(--sky-soft); }
.qqg-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.qqg-detail-actions .k-btn { flex: 1 1 auto; justify-content: center; }
.qqg-btn-drop { width: 22px; height: 22px; }

/* The week ahead. */
.qqg-week { margin-bottom: 18px; padding: 18px clamp(16px, 2.5vw, 26px); }
.qqg-week-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.qqg-week-head h2 { margin: 0; font-size: 1.35rem; }
.qqg-week-head p { margin: 2px 0 0; color: var(--ink-soft); font-weight: 600; font-size: .95rem; }
.qqg-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; list-style: none; }
.qqg-day { display: grid; justify-items: center; gap: 4px; padding: 8px 4px 10px; border-radius: 20px; background: var(--cream); text-align: center; }
.qqg-day.is-today { background: var(--leaf-soft); box-shadow: inset 0 0 0 2px #5DBF73; }
.qqg-day-bar { position: relative; display: flex; align-items: flex-end; justify-content: center; width: 26px; height: 72px; border-radius: 13px; background: rgba(43, 35, 80, .06); overflow: visible; }
.qqg-day-bar i { display: block; width: 100%; min-height: 0; border-radius: 13px; background: linear-gradient(180deg, #9BE3FF, #2E9BEA); transition: height .8s var(--ease-soft); }
.qqg-day-bar svg { position: absolute; top: -12px; width: 20px; height: 20px; }
.qqg-day b { font-family: var(--font-display); font-weight: 700; font-size: .88rem; }
.qqg-day small { font-weight: 700; font-size: .76rem; color: var(--ink-soft); }
.qqg-week-empty { margin: 10px 0 0; font-weight: 700; color: var(--ink-soft); }
.qqg-loading { display: flex; justify-content: center; padding: 6px; }
.qq[data-state="ready"] .qqg-loading { display: none; }
.qqg-back { margin: 8px 0 0; }

@media (max-width: 1100px) {
    .qqg-plot { width: 90px; }
}
/* Phones and small tablets: one column, and the close-up rises as a sheet over the garden. */
@media (max-width: 899px) {
    .qqg-hero { grid-template-columns: 1fr; }
    .qqg-ring { order: -1; width: min(220px, 70%); margin-bottom: 4px; }
    .qqg-layout { grid-template-columns: 1fr; }
    .qqg-detail {
        position: fixed; z-index: 80; top: auto; inset-inline: 8px; bottom: 8px; max-height: 76dvh; border-radius: 30px 30px 26px 26px;
        background: var(--paper); padding-bottom: calc(18px + env(safe-area-inset-bottom));
        animation: qqg-sheet .4s var(--ease-bounce);
    }
    body:not(.qqg-sheet-open) .qqg-detail { display: none; }
    .qqg-close { display: inline-grid; }
    /* The dimmed garden behind the sheet sits in the sheet's own stacking context, and the tab bar steps aside. */
    body.qqg-sheet-open .qqg-layout::before { content: ""; position: fixed; inset: 0; z-index: 79; background: rgba(43, 35, 80, .35); }
    body.qqg-sheet-open .k-tabbar { display: none; }
    .qqg-days { gap: 4px; }
    .qqg-day { padding-inline: 2px; }
    .qqg-day-bar { width: 20px; height: 56px; }
}
@keyframes qqg-sheet { from { transform: translateY(40px); opacity: 0; } }
@media (max-width: 560px) {
    .qqg-plot { width: calc((100vw - 84px) / 3); min-height: 146px; }
    .qqg-plots { justify-content: space-around; }
    .qqg-empty { flex-direction: column; text-align: center; }
    .qqg-day small { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
    .qqg-ring-flower, .qqg-plot.is-stage-3 .qqg-plant, .qqg-plot.is-learned::before, .qqg-plot.is-due .qqg-drop, .qqg-ayah-drop, .qqg-detail { animation: none !important; }
    .qqg-plot, .qqg-plant, .qqg-ring-fill, .qqg-day-bar i { transition: none; }
}

/* The garden home's way into My Quran Garden, beside the big Start button. */
.qq-hero-go { vertical-align: middle; }
.qq-garden-link {
    display: inline-flex; align-items: center; gap: 8px; min-height: 56px; margin-inline-start: 10px; padding: 4px 18px 4px 6px; border-radius: 999px; vertical-align: middle;
    text-decoration: none; color: var(--ink); background: var(--qq-panel); box-shadow: inset 0 0 0 1.5px var(--qq-panel-edge), 0 10px 20px -14px rgba(43, 35, 80, .5);
    transition: transform .25s var(--ease-bounce);
}
.qq-garden-link:hover { transform: translateY(-2px); }
.qq-garden-link:focus-visible { outline: 4px solid var(--grape); outline-offset: 2px; }
.qq-garden-link svg { width: 36px; height: 50px; flex: none; }
.qq-garden-link b, .qq-garden-link small { display: block; line-height: 1.2; }
.qq-garden-link b { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; }
.qq-garden-link small { font-weight: 600; font-size: .8rem; color: var(--ink-soft); }
@media (max-width: 560px) {
    .qq-garden-link { margin: 10px 0 0; }
}
/* Nothing in bloom yet: no stray dot of a zero-length arc. */
.qqg-ring-fill[stroke-dasharray^="0 "], .qqg-ring-fill[stroke-dasharray^="0.00 "] { opacity: 0; }
