/* Caregiver & admin area. Calm, warm neutrals with the board's green accent. */

:root {
    --bg: #F5F3EE;
    --surface: #FFFFFF;
    --surface-2: #FAF9F6;
    --ink: #1C2024;
    --ink-2: #3C4249;
    --muted: #6E737A;
    --edge: #E7E3DA;
    --edge-strong: #D6D1C6;
    --accent: #2F6F4F;
    --accent-hover: #255A40;
    --accent-ink: #FFFFFF;
    --accent-soft: #E4F2E9;
    --danger: #B42318;
    --danger-soft: #FDECEA;
    --sidebar: #17251E;
    --sidebar-ink: #DCE7E0;
    --sidebar-muted: #8FA59A;
    --sidebar-hover: rgba(255, 255, 255, 0.07);
    --radius: 14px;
    --radius-sm: 9px;
    --shadow: 0 1px 2px rgba(28, 32, 36, 0.05), 0 2px 8px rgba(28, 32, 36, 0.04);
    --shadow-pop: 0 12px 32px rgba(28, 32, 36, 0.16);
    --sidebar-w: 252px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
h1 { font-size: 1.75rem; line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 0; }
h3 { font-size: 0.95rem; margin: 0; }

.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.center { text-align: center; }
.right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Sidebar ---------- */

.with-sidebar { padding-left: var(--sidebar-w); }

.sidebar {
    position: fixed; inset: 0 auto 0 0; z-index: 20;
    width: var(--sidebar-w);
    display: flex; flex-direction: column; gap: 8px;
    padding: 20px 14px;
    background: var(--sidebar); color: var(--sidebar-ink);
}

.brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 10px 18px;
    color: #FFF; text-decoration: none; font-weight: 800; font-size: 1.1rem;
}
.brand-mark {
    display: grid; place-items: center; width: 36px; height: 36px;
    border-radius: 10px; background: #2F6F4F; font-size: 1.2rem;
}

.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.nav-heading {
    padding: 14px 12px 6px;
    color: var(--sidebar-muted); font-size: 0.72rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
}
.nav-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius-sm);
    color: var(--sidebar-ink); text-decoration: none; font-weight: 600;
}
.nav-link:hover { background: var(--sidebar-hover); color: #FFF; }
.nav-link.active { background: #FFF; color: var(--sidebar); }
.nav-icon { width: 22px; text-align: center; font-size: 1.1rem; }
.nav-sub { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 6px 23px; padding-left: 12px; border-left: 1px solid rgba(255, 255, 255, 0.14); }
.nav-sublink {
    padding: 7px 10px; border-radius: 8px;
    color: var(--sidebar-muted); text-decoration: none; font-weight: 600; font-size: 0.9rem;
}
.nav-sublink:hover { color: #FFF; background: var(--sidebar-hover); }
.nav-sublink.active { color: #FFF; background: rgba(255, 255, 255, 0.12); }
/* The parent app stays highlighted softly while a sub-page is open. */
.nav-link.active + .nav-sub { border-left-color: rgba(255, 255, 255, 0.3); }

.side-user {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 6px 0;
}
.side-user-info { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.side-user-text { display: flex; flex-direction: column; min-width: 0; }
.side-user-text strong { color: #FFF; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user-text .role { align-self: flex-start; margin-top: 2px; }
.side-user .initials { background: #2F6F4F; color: #FFF; border: 0; }
.side-user-actions { display: flex; gap: 6px; }
.side-user-actions form { margin: 0; flex: 1; }
.side-action {
    display: block; width: 100%; padding: 7px 10px; border-radius: 8px;
    background: var(--sidebar-hover); border: 0;
    color: var(--sidebar-ink); font: inherit; font-size: 0.85rem; font-weight: 600;
    text-align: center; text-decoration: none; cursor: pointer;
}
.side-user-actions > a { flex: 1; }
.side-action:hover, .side-action.active { background: rgba(255, 255, 255, 0.16); color: #FFF; }

/* ---------- Page ---------- */

.page { max-width: 1240px; margin: 0 auto; padding: 32px 36px 56px; }
.page-center { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; max-width: none; }

.page-head {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
    margin-bottom: 24px;
}
.page-sub { margin: 6px 0 0; color: var(--muted); }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.flash {
    display: flex; align-items: center; gap: 10px;
    margin: 0 0 20px; padding: 12px 16px;
    background: var(--accent-soft); color: var(--accent);
    border: 1px solid #C8E3D2; border-radius: var(--radius-sm); font-weight: 600;
}

.footnote { margin: 24px 0 0; color: var(--muted); font-size: 0.875rem; }

/* ---------- Cards & layout ---------- */

.card {
    background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius);
    padding: 22px; box-shadow: var(--shadow);
}
/* No overflow clipping, so popovers inside can extend past the card. */
.card-flush { padding: 0; }
.card-flush .table th:first-child { border-top-left-radius: var(--radius); }
.card-flush .table th:last-child { border-top-right-radius: var(--radius); }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.card-sub { margin: 2px 0 0; color: var(--muted); font-size: 0.85rem; }
.narrow { max-width: 460px; }
.sticky { position: sticky; top: 24px; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }

/* ---------- Stats ---------- */

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
    display: flex; align-items: center; gap: 16px;
    background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius);
    padding: 18px 20px; box-shadow: var(--shadow);
}
.stat-icon { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; font-size: 1.4rem; }
.stat-value { display: block; font-size: 1.75rem; font-weight: 800; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--muted); font-weight: 600; font-size: 0.875rem; }

.tone-green { background: #E4F2E9; }
.tone-blue { background: #E3EDFB; }
.tone-yellow { background: #FFF3CC; }
.tone-pink { background: #FCE4EE; }
.tone-purple { background: #EEE6FB; }

/* ---------- Lists ---------- */

.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--edge); }
.list-item:first-child { border-top: 0; padding-top: 4px; }
.list-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.list-main .small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.empty { padding: 16px 0; color: var(--muted); }

.avatar {
    flex: none; display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 50%;
    background: #FFF3B0; font-size: 1.3rem;
}
.avatar-lg { width: 56px; height: 56px; font-size: 1.8rem; }
.initials {
    flex: none; display: grid; place-items: center;
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--surface-2); border: 1px solid var(--edge);
    color: var(--ink-2); font-weight: 800;
}

.role {
    display: inline-block; padding: 2px 10px; border-radius: 999px;
    background: #E3EDFB; color: #2B5C9E; font-size: 0.75rem; font-weight: 700;
}
.role-admin { background: #FFF3CC; color: #7A5B00; }
.you {
    margin-left: 6px; padding: 1px 7px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent); font-size: 0.72rem; font-weight: 700;
}

/* ---------- Tables ---------- */

.table-wrap { overflow: visible; }
.table { width: 100%; border-collapse: collapse; }
.table th {
    padding: 12px 16px; background: var(--surface-2);
    border-bottom: 1px solid var(--edge);
    color: var(--muted); font-size: 0.75rem; font-weight: 700; text-align: left;
    text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap;
}
.table th.center { text-align: center; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--edge); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }

.person { display: flex; align-items: center; gap: 12px; }
.nowrap { white-space: nowrap; }
.table-toolbar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 12px 16px; border-bottom: 1px solid var(--edge);
}
.table-search {
    width: min(280px, 100%); padding: 8px 12px;
    font: inherit; color: var(--ink);
    background: var(--surface-2); border: 1px solid var(--edge-strong); border-radius: var(--radius-sm);
}
.table-search:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); background: var(--surface); }
.card-flush .table-toolbar + .table-wrap .table th:first-child,
.card-flush .table-toolbar + .table-wrap .table th:last-child { border-radius: 0; }

/* ---------- Dialogs ---------- */

.modal {
    width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
    padding: 24px; border: 0; border-radius: 18px;
    background: var(--surface); color: var(--ink); box-shadow: var(--shadow-pop);
}
.modal::backdrop { background: rgba(23, 37, 30, 0.45); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.confirm-modal { width: min(440px, calc(100vw - 32px)); }
.confirm-modal h2 { margin: 0 0 8px; font-size: 1.2rem; }
.confirm-modal p { margin: 0 0 18px; color: var(--ink-2); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { background: #932015; border-color: #932015; }
.field .error { margin: 0; }
.password-row { display: flex; gap: 6px; }
.password-row input { flex: 1; min-width: 0; font-family: Consolas, "SFMono-Regular", monospace; letter-spacing: 0.02em; }
.perm-chips { display: flex; flex-wrap: wrap; gap: 4px; }

/* Roles & permissions grid */
.role-matrix input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--accent); cursor: pointer; }
.role-matrix input[type="checkbox"]:disabled { cursor: not-allowed; opacity: 0.7; }
.role-matrix .matrix-group td {
    background: var(--surface-2); color: var(--muted);
    font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; padding: 8px 16px;
}
.role-count { margin-top: 4px; text-transform: none; letter-spacing: 0; font-weight: 600; }
.perm {
    padding: 2px 9px; border-radius: 999px;
    background: var(--surface-2); border: 1px solid var(--edge);
    color: var(--ink-2); font-size: 0.78rem; font-weight: 600; white-space: nowrap;
}
.perm-all { background: #FFF3CC; border-color: #F2DE9B; color: #7A5B00; }

.actions { display: inline-flex; gap: 6px; justify-content: flex-end; align-items: center; }
.table .actions { flex-wrap: nowrap; }
.actions form { margin: 0; }

/* ---------- Forms ---------- */

.form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 0.9rem; }
.field small { font-weight: 400; }
.field output { font-weight: 600; float: right; }

input[type="text"], input[type="email"], input[type="url"], input[type="password"], select, textarea {
    width: 100%; padding: 10px 12px;
    font: inherit; font-weight: 400; color: var(--ink);
    background: var(--surface); border: 1px solid var(--edge-strong); border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-ends { display: flex; justify-content: space-between; font-weight: 400; margin-top: -4px; }

.check { display: flex; align-items: center; gap: 10px; font-size: 0.9rem; }
.check input, .perm-option input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.error { margin: -8px 0 0; color: var(--danger); font-size: 0.85rem; font-weight: 600; }

/* Role switch */
.segmented { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--edge); border-radius: 11px; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; }
.segmented span {
    display: block; padding: 8px; border-radius: 8px;
    text-align: center; font-weight: 600; color: var(--muted); cursor: pointer;
}
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segmented input:focus-visible + span { outline: 3px solid var(--accent-soft); }

/* Permission checkboxes */
.perm-list { display: grid; gap: 6px; margin: 0; padding: 0; border: 0; }
.perm-list legend { padding: 0; margin-bottom: 6px; font-weight: 600; font-size: 0.9rem; }
.perm-group { margin-top: 4px; color: var(--muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.perm-option {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--radius-sm);
    cursor: pointer;
}
.perm-option:hover { background: var(--surface-2); }
.perm-option:has(input:checked) { border-color: #B9DCC6; background: var(--accent-soft); }
.perm-option span { display: flex; flex-direction: column; font-size: 0.9rem; }
.perm-option small { font-weight: 400; line-height: 1.35; }
.perm-list.is-off { opacity: 0.45; }

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 16px; border-radius: var(--radius-sm);
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--edge-strong);
    font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--surface-2); border-color: #C5BFB2; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-soft); border-color: #F1C0BA; }
.btn-small { padding: 6px 11px; font-size: 0.85rem; }
.btn-icon { padding: 6px 9px; }
.btn-block { width: 100%; padding: 12px; }

/* ---------- Popovers (inline mini forms) ---------- */

.popover { position: relative; display: inline-block; }
.popover > summary { list-style: none; }
.popover > summary::-webkit-details-marker { display: none; }
.popover[open] > summary { background: var(--surface-2); border-color: var(--accent); }
.popover-body {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 30;
    width: 320px; padding: 16px;
    background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius);
    box-shadow: var(--shadow-pop); text-align: left;
}
.popover-body h3 { margin-bottom: 2px; }

/* ---------- Communicator cards ---------- */

.profile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.profile-card { display: flex; flex-direction: column; gap: 16px; padding: 18px; }
.profile-card-head { display: flex; align-items: center; gap: 12px; }
.profile-card-head h2 { font-size: 1.15rem; }
.profile-section { display: grid; gap: 6px; }
.section-label { color: var(--muted); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.profile-card-foot { display: flex; justify-content: flex-end; border-top: 1px solid var(--edge); padding-top: 10px; margin-top: -4px; }
.profile-card-foot form { margin: 0; }

.voice-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.voice-row form { margin: 0; }
.voice-row select { width: auto; padding: 6px 10px; font-size: 0.875rem; }
.field .voice-row select { flex: 1; padding: 10px 12px; font-size: 0.95rem; }
.voice-custom .popover-body { left: 0; right: auto; width: 340px; }
.voice-custom select { width: 100%; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip {
    display: inline-flex; align-items: center; gap: 4px; margin: 0;
    padding: 4px 10px; border-radius: 999px;
    background: var(--accent-soft); color: var(--accent); font-size: 0.85rem; font-weight: 600;
}
form.chip { padding-right: 4px; }
.chip button {
    display: grid; place-items: center; width: 22px; height: 22px; padding: 0;
    border: 0; border-radius: 50%; background: transparent;
    color: inherit; font-size: 1rem; line-height: 1; cursor: pointer;
}
.chip button:hover { background: rgba(0, 0, 0, 0.08); }

.empty-card { grid-column: 1 / -1; text-align: center; padding: 40px; }
.empty-icon { font-size: 2.5rem; }

/* ---------- Top bar (users) ---------- */

.topbar {
    position: sticky; top: 0; z-index: 20;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 24px;
    background: var(--surface); border-bottom: 1px solid var(--edge);
}
.brand-dark { padding: 0; color: var(--ink); }
.topbar-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar-actions form { margin: 0; }
.topbar-user { display: flex; align-items: center; gap: 8px; margin: 0 4px 0 8px; font-weight: 600; }
.topbar-user .initials { width: 32px; height: 32px; font-size: 0.85rem; background: var(--accent-soft); color: var(--accent); border: 0; }
.btn.is-current { background: var(--accent-soft); }

/* ---------- Home: app boxes, centered ---------- */

.page-home { min-height: calc(100vh - 60px); display: grid; place-items: center; }
.home { width: 100%; max-width: 1180px; text-align: center; }
.home-head { margin-bottom: 32px; }
.home-head h1 { font-size: 2.2rem; }
.home-head .page-sub { font-size: 1.15rem; }

/* Four apps to a row on a wide screen; fewer on smaller ones. */
.app-boxes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
@media (max-width: 1000px) { .app-boxes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .app-boxes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; } }
@media (max-width: 440px) { .app-boxes { grid-template-columns: minmax(0, 1fr); } }
.app-box {
    min-width: 0;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 24px 16px 20px; border-radius: 22px;
    background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--shadow);
    color: var(--ink); text-decoration: none; text-align: center;
}
.app-box { position: relative; }
.app-box[hidden] { display: none; }
.app-box:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-pop); }
.app-box:focus-visible { outline: 4px solid var(--ink); outline-offset: 3px; }
.app-box strong { font-size: 1.15rem; margin-top: 4px; }
.app-box .muted { font-size: 0.88rem; line-height: 1.35; }
.app-box-icon {
    display: grid; place-items: center;
    width: 84px; height: 84px; border-radius: 22px; font-size: 2.8rem;
}
@media (prefers-reduced-motion: reduce) { .app-box:hover { transform: none; } }
.app-box-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; width: 100%; }
.app-box-actions .btn { flex: 1; justify-content: center; }

/* Preview pop-up on Home */
.app-preview { width: min(720px, calc(100vw - 32px)); overflow-y: auto; text-align: left; }
.app-preview h2 { margin: 0; font-size: 1.3rem; }
.app-preview-text { margin: 12px 0 6px; color: var(--ink-2); font-size: 1.02rem; }
.app-preview-features { margin: 0 0 16px; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 18px; }
.app-preview-features li { position: relative; padding-left: 24px; line-height: 1.4; color: var(--ink-2); }
.app-preview-features li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--accent); }

/* Pinned to the bottom-right corner of the page. */
.visit-counter {
    position: fixed; right: 16px; bottom: 12px; z-index: 5; margin: 0;
    padding: 6px 12px; border-radius: 999px; font-size: 0.85rem;
    background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow);
}
.visit-counter strong { color: var(--ink); }

/* ---------- Benefits ---------- */

/* Wider than other pages so the five plan cards have room. */
.page-benefits { max-width: 1480px; }
.benefits { width: 100%; max-width: 1400px; margin: 0 auto; }
.benefits-head { text-align: center; margin: 8px auto 28px; max-width: 680px; }
.benefits-head h1 { font-size: 2.2rem; margin: 0; }
.benefits-head .page-sub { font-size: 1.1rem; line-height: 1.5; margin-bottom: 18px; }
.benefit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.benefit { display: flex; flex-direction: column; gap: 8px; }
.benefit h2 { margin: 4px 0 0; font-size: 1.1rem; }
.benefit p { margin: 0; color: var(--ink-2); line-height: 1.5; }
.benefit-icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; font-size: 1.8rem; }
/* Below Follow Us: why a picture board helps, tips, and a note. */
.why { margin-top: 48px; }
.why-head { text-align: center; max-width: 640px; margin: 0 auto 26px; }
.why-eyebrow { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.why-head h2 { margin: 10px 0 6px; font-size: 1.9rem; }
.why-head p { margin: 0; color: var(--ink-2); font-size: 1.05rem; line-height: 1.5; }
.reason-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; }
.reason {
    position: relative; overflow: hidden; gap: 10px; padding: 24px 22px 22px; border-radius: 18px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.reason::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--accent); opacity: 0.85; }
.reason:hover { transform: translateY(-4px); box-shadow: var(--shadow-pop); border-color: var(--accent); }
.reason h3 { margin: 6px 0 0; font-size: 1.12rem; }
.reason-num { position: absolute; top: 16px; right: 18px; font-size: 1.6rem; font-weight: 800; color: var(--edge-strong); font-variant-numeric: tabular-nums; }
.reason .benefit-icon { width: 60px; height: 60px; border-radius: 18px; }

.tips { margin-top: 44px; padding: 30px 28px 32px; border-radius: 22px; background: var(--accent-soft); }
.tips-head { text-align: center; margin-bottom: 22px; }
.tips-head h2 { margin: 0 0 4px; font-size: 1.5rem; }
.tips-head p { margin: 0; color: var(--ink-2); }
.tip-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 14px; }
.tip { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); }
.tip-num { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; }
.tip strong { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: 2px; }
.tip p { margin: 0; color: var(--ink-2); line-height: 1.5; font-size: 0.95rem; }

.benefits-note { display: flex; align-items: flex-start; gap: 12px; max-width: 720px; margin: 28px auto 8px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--edge-strong); background: var(--surface); }
.benefits-note p { margin: 0; color: var(--ink-2); font-size: 0.92rem; line-height: 1.5; }
.benefits-note-icon { font-size: 1.3rem; line-height: 1.3; }
@media (prefers-reduced-motion: reduce) { .reason:hover { transform: none; } }
@media (max-width: 700px) { .tips { padding: 22px 14px 24px; } .why-head h2 { font-size: 1.6rem; } }

.benefits-title { text-align: center; font-size: 1.5rem; margin: 8px 0 4px; }
.section-sub { text-align: center; margin: 0 0 18px; }
.plans { margin-bottom: 36px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
/* Each card spans 6 shared rows (heading, features, how to get it, buy, request access, offers), so the same parts line up across cards. */
.plan {
    display: grid; grid-template-rows: subgrid; grid-row: span 6; row-gap: 12px; align-content: start; position: relative;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
/* Hover: the card floats up. */
.plan:hover { transform: translateY(-6px); box-shadow: var(--shadow-pop); border-color: var(--accent); }
@media (prefers-reduced-motion: reduce) { .plan:hover { transform: none; } }
.plan.is-yours { border: 2px solid var(--accent); box-shadow: var(--shadow-pop); }
.plan-yours {
    position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
    padding: 2px 10px; border-radius: 999px; background: var(--accent); color: var(--accent-ink);
    font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.plan-head { grid-row: 1; display: flex; align-items: flex-start; gap: 12px; } /* names line up across cards */
.plan-head h3 { margin: 0; font-size: 1.2rem; }
.plan-features { grid-row: 2; list-style: none; margin: 0; padding: 0; display: grid; align-content: start; gap: 8px; font-size: 0.92rem; line-height: 1.4; }
.plan-features li { display: flex; gap: 8px; color: var(--ink-2); }
.plan-features li.is-off { color: var(--muted); }
.plan-mark { flex: none; width: 20px; font-weight: 800; color: var(--accent); }
.flash-code { flex-wrap: wrap; color: var(--ink); }
.flash-codes ul { list-style: none; margin: 6px 0 0; padding: 0; width: 100%; display: grid; gap: 6px; }
.flash-codes li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.flash-code code { font-size: 1.4rem; letter-spacing: 0.2em; padding: 2px 10px; background: var(--surface); border-radius: var(--radius-sm); color: var(--accent); }
.plan-how { grid-row: 3; margin: 0; align-self: start; padding-top: 12px; border-top: 1px solid var(--edge); font-size: 0.88rem; line-height: 1.45; color: var(--ink-2); }

/* ---------- Log in with a code ---------- */
.code-input { font-size: 1.3rem; letter-spacing: 0.25em; text-transform: uppercase; }
.code-input::placeholder { letter-spacing: 0.1em; text-transform: none; }
.code-actions { display: flex; gap: 10px; }
.code-help { border: 1px solid var(--edge); border-radius: var(--radius-sm); padding: 10px 14px; background: var(--surface-2); font-size: 0.92rem; line-height: 1.5; }
.code-help summary { cursor: pointer; font-weight: 700; color: var(--accent); }
.code-help p { margin: 8px 0 0; }
.code-plans { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
.is-off .plan-mark { color: var(--danger); }
.benefits-actions { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Feedback ---------- */

.feedback { width: 100%; max-width: 640px; margin: 0 auto; }
.mood-field { border: 0; padding: 0; margin: 0; }
.mood-field legend { padding: 0; margin-bottom: 8px; font-weight: 600; }
.mood-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.mood-option {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    padding: 12px 6px; border: 2px solid var(--edge); border-radius: var(--radius);
    background: var(--surface-2); cursor: pointer; font-weight: 600; font-size: 0.9rem;
}
.mood-option input { position: absolute; opacity: 0; pointer-events: none; }
.mood-face { font-size: 2.2rem; line-height: 1; }
.mood-option:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.mood-option:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.feedback textarea { resize: vertical; min-height: 120px; }
.feedback-actions { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.feedback-mood { font-size: 1.6rem; }
.feedback-message { white-space: pre-line; max-width: 520px; }

/* ---------- Home: apps (admin) ---------- */

.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; }
.app-card {
    display: flex; align-items: center; gap: 18px;
    padding: 24px; border-radius: 20px;
    background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--shadow);
    color: var(--ink); text-decoration: none;
}
.app-card:hover { border-color: var(--accent); }
.app-card:focus-visible { outline: 4px solid var(--ink); outline-offset: 2px; }
.app-icon { flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 18px; font-size: 2.3rem; }
.app-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.app-text strong { font-size: 1.25rem; }
.app-go { font-size: 1.5rem; color: var(--accent); }

/* ---------- Manage ---------- */

.section-title { margin: 8px 0 12px; color: var(--muted); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; }
.manage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-bottom: 24px; }
.manage-card { display: flex; flex-direction: column; gap: 16px; }
.manage-card-head { display: flex; gap: 14px; align-items: flex-start; }
.manage-card-head .app-icon { width: 52px; height: 52px; border-radius: 14px; font-size: 1.6rem; }
.manage-card-head p { margin: 4px 0 0; }
.manage-card-foot { display: flex; gap: 6px; margin-top: auto; }
.mini-stats { display: flex; gap: 10px; margin: 0; }
.mini-stats div { flex: 1; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--edge); }
.mini-stats dt { color: var(--muted); font-size: 0.78rem; font-weight: 600; }
.mini-stats dd { margin: 0; font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.manage-card.is-soon { background: var(--surface-2); box-shadow: none; border-style: dashed; }
.manage-card.is-soon .app-icon { filter: grayscale(0.6); opacity: 0.7; }
.soon {
    margin-left: 6px; padding: 2px 8px; border-radius: 999px; vertical-align: middle;
    background: var(--edge); color: var(--ink-2); font-size: 0.7rem; font-weight: 700;
}

/* Voice bars on the board overview */
.bar { display: block; height: 8px; margin-top: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.count { min-width: 2ch; text-align: right; font-weight: 800; font-size: 1.1rem; font-variant-numeric: tabular-nums; }

/* ---------- Profile picker ---------- */

.picker-app { text-align: center; }

.picker h1 { text-align: center; font-size: 2rem; margin-bottom: 24px; }
.picker-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; }
.picker-grid > .picker-card { width: 200px; }
.picker-card {
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    padding: 24px 16px; border-radius: 18px;
    background: var(--surface); border: 2px solid var(--edge); box-shadow: var(--shadow);
    color: var(--ink); text-decoration: none; font-size: 1.4rem; font-weight: 700;
}
.picker-card:hover { border-color: var(--accent); }
.picker-card:focus-visible { outline: 4px solid var(--ink); outline-offset: 2px; }
/* The card's picture and name open the board; Listen sits under them. */
.picker-open { display: flex; flex-direction: column; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.picker-open:focus-visible { outline: 4px solid var(--ink); outline-offset: 4px; border-radius: 12px; }
.picker-listen { margin-top: 2px; }
.picker-card img, .picker-initial { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; }
.picker-initial { display: grid; place-items: center; font-size: 3.5rem; background: #FFF3B0; }
.picker-empty { grid-column: 1 / -1; text-align: center; }
.picker-voice { margin-top: -8px; color: var(--muted); font-size: 0.95rem; font-weight: 600; }

/* ---------- Login ---------- */

/* ---------- Admin lists: page numbers, filters, export ---------- */
.pager.pager-numbered { justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.pager-pages { display: flex; flex-wrap: wrap; gap: 6px; }
.pager-pages a, .pager-pages span {
    min-width: 34px; padding: 6px 10px; text-align: center; border: 1px solid var(--edge-strong); border-radius: 8px;
    color: var(--ink); background: #FFF; font-size: 0.85rem; text-decoration: none;
}
.pager-pages a:hover { border-color: var(--accent); color: var(--accent); }
.pager-pages .is-current { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.pager-pages .is-disabled { opacity: 0.4; }
.pager-pages .is-gap { border-color: transparent; background: none; }
.head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
/* Wide admin lists (Users, Requests, Survey) use the whole width beside the side menu. */
.page.page-wide, .with-sidebar .page.page-wide { max-width: none; }
/* Horizontal bars for the survey and country statistics */
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: minmax(110px, 38%) minmax(0, 1fr) auto; align-items: center; gap: 12px; font-size: 0.9rem; }
.bars li.muted { display: block; }
.bars-label { overflow-wrap: anywhere; font-weight: 600; }
.bars-track { height: 12px; border-radius: 999px; background: var(--accent-soft); overflow: hidden; }
.bars-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.bars-value { white-space: nowrap; font-variant-numeric: tabular-nums; text-align: right; min-width: 72px; }
.survey-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.survey-grid .survey-wide { grid-column: 1 / -1; }
.survey-grid h2 { margin: 0; font-size: 1.05rem; }
.survey-countries { margin-bottom: 16px; }
.survey-countries summary { cursor: pointer; font-weight: 700; }
.survey-countries .bars { margin-top: 14px; }
@media (max-width: 800px) {
    .survey-grid { grid-template-columns: 1fr; }
    .bars li { grid-template-columns: minmax(0, 1fr) auto; }
    .bars-track { grid-column: 1 / -1; order: 3; }
}
.table-tools select { min-width: 0; }
.stats-4, .stats-5 { margin-bottom: 16px; }
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.table-tools select.sort-select { max-width: 230px; }
/* The Users table has many columns: tighter cells, actions wrap, and it never runs off the page. */
.table-users th, .table-users td { padding: 12px 10px; }
.table-users .perm-chips { max-width: 260px; }
.table-users .actions { flex-wrap: wrap; justify-content: flex-end; max-width: 360px; margin-left: auto; }
.table-users .col-apps { max-width: 200px; }
.col-apps { display: flex; flex-wrap: wrap; gap: 4px; max-width: 200px; }
.app-chip { padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.74rem; font-weight: 700; white-space: nowrap; }
.age-late { color: var(--danger); font-weight: 700; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; border-bottom: 1px solid var(--edge); background: var(--accent-soft); }
.bulk-bar[hidden] { display: none; }
.bulk-bar select { padding: 8px 10px; border: 1px solid var(--edge-strong); border-radius: var(--radius-sm); background: #FFF; font: inherit; }
.table th.check-col, .table td.check-col { width: 36px; padding-right: 0; }
.devices-list { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 8px; }
.devices-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--radius-sm); }
.devices-list .grow { flex: 1; min-width: 160px; }
.devices-list .actions { display: flex; gap: 6px; }

/* ---------- Profile page ---------- */
.profile-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; max-width: 1040px; margin: 0 auto; }
.profile-side { position: sticky; top: 16px; }
.profile-card { text-align: center; display: grid; gap: 6px; justify-items: center; }
.profile-card h1 { margin: 6px 0 0; font-size: 1.3rem; }
.profile-card p { margin: 0; overflow-wrap: anywhere; }
.profile-avatar {
    display: grid; place-items: center; width: 84px; height: 84px; border-radius: 50%;
    background: var(--accent-soft); color: var(--accent); font-size: 2.2rem; font-weight: 800;
}
.profile-plan { padding: 3px 12px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-size: 0.8rem; font-weight: 700; }
.profile-nav { display: grid; gap: 2px; width: 100%; margin: 12px 0; text-align: left; }
.profile-nav a { padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.92rem; }
.profile-nav a:hover { background: var(--accent-soft); }
.profile-nav a.active { background: var(--accent); color: var(--accent-ink); }
/* Apps submenu: indented under Apps, shown while Apps is open. */
.profile-subnav { display: grid; gap: 2px; margin: 0 0 4px 14px; padding-left: 8px; border-left: 2px solid var(--edge); }
.profile-subnav[hidden] { display: none; }
.profile-subnav a { padding: 7px 10px; font-size: 0.86rem; }
.profile-main > [hidden] { display: none; }
.profile-side-actions { display: grid; gap: 8px; width: 100%; padding-top: 12px; border-top: 1px solid var(--edge); }
.profile-main { display: grid; gap: 20px; min-width: 0; }
.profile-main .card { scroll-margin-top: 16px; }
.profile-main h2 { margin: 0; font-size: 1.1rem; }
.profile-subhead { margin: 20px 0 10px; padding-top: 16px; border-top: 1px solid var(--edge); font-size: 0.95rem; }
.profile-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.profile-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--radius-sm); background: var(--surface); }
.profile-list li.muted { justify-content: center; border-style: dashed; }
.profile-list-icon { font-size: 1.5rem; width: 2rem; text-align: center; flex: none; }
.profile-list-text { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
.profile-list-text small { flex-basis: 100%; }
.profile-badge { padding: 1px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 0.72rem; font-weight: 700; }
.profile-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.profile-app {
    display: grid; gap: 10px; align-content: space-between; padding: 14px; border: 1px solid var(--edge); border-radius: var(--radius);
    color: var(--ink); background: var(--surface);
}
.profile-app:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.profile-app-main { display: grid; gap: 4px; justify-items: start; text-align: left; padding: 0; border: 0; background: none; font: inherit; color: inherit; }
button.profile-app-main { cursor: pointer; }
.profile-app-more { margin-top: 4px; color: var(--accent); font-weight: 700; font-size: 0.85rem; }
.profile-panel-bar { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
#apps [hidden], #words[hidden] { display: none; }
.profile-app-icon { font-size: 1.8rem; }
.profile-apps[hidden] { display: none; }
@media (max-width: 800px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-side { position: static; }
}

.login-card.register-card { width: min(640px, 100%); }
.login-card.request-card { width: min(960px, 100%); }
/* Register page: the form on the left, the survey on the right (stacked on narrow screens). */
.register-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.register-col { display: grid; gap: 14px; min-width: 0; }
.register-survey { border: 1px solid var(--border, #ddd); border-radius: 12px; padding: 14px 16px 16px; margin: 0; }
.register-survey legend { font-weight: 800; padding: 0 6px; }
.register-survey .check { font-weight: 400; }
.code-form [hidden] { display: none !important; }
.register-step { display: grid; gap: 14px; }
.register-step-title { margin: 0; font-size: 1.1rem; }
@media (max-width: 720px) { .register-cols { grid-template-columns: 1fr; } }
.login-card { width: min(420px, 100%); padding: 36px 32px; box-shadow: var(--shadow-pop); border: 0; }
.login-head { text-align: center; margin-bottom: 26px; }
.login-head h1 { margin: 12px 0 6px; }
.login-head p { margin: 0; }
.login-logo {
    display: inline-grid; place-items: center; width: 64px; height: 64px;
    border-radius: 18px; background: var(--accent-soft); font-size: 2rem;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .layout-aside { grid-template-columns: minmax(0, 1fr); }
    .sticky { position: static; }
}

@media (max-width: 900px) {
    .with-sidebar { padding-left: 0; }
    .sidebar {
        position: static; width: auto;
        flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px;
        padding: 10px 16px;
    }
    .brand { padding: 0 8px 0 0; }
    .side-nav { flex-direction: row; flex: 1 1 100%; min-width: 0; order: 3; overflow-x: auto; }
    .nav-heading { display: none; }
    .nav-link { padding: 8px 12px; white-space: nowrap; }
    .side-user { margin-left: auto; border: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
    .side-user-info { margin: 0; }
    .side-user-text { display: none; }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .page { padding: 24px 16px 48px; }

    /* Narrow screens: stack the table rows as cards instead of scrolling sideways. */
    .table thead { display: none; }
    .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
    .table tr { padding: 12px 16px; border-bottom: 1px solid var(--edge); }
    .table tr:last-child { border-bottom: 0; }
    .table td { padding: 4px 0; border: 0; text-align: left; }
    .table td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); }
    .table-toolbar { flex-wrap: wrap; }
    .form-row { grid-template-columns: 1fr; }
    .table .actions { flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 600px) {
    .stats { grid-template-columns: minmax(0, 1fr); }
    .profile-grid { grid-template-columns: minmax(0, 1fr); }
    .popover-body, .voice-custom .popover-body { right: auto; left: 0; width: min(340px, calc(100vw - 48px)); }
    .side-action { padding: 8px 10px; }
    .side-action-label { display: none; }
    .topbar { padding: 10px 16px; }
    .topbar-label, .topbar-name { display: none; }
    .topbar .brand span:last-child { display: none; }
    .picker-grid { gap: 12px; }
    .picker-grid > .picker-card { width: calc(50% - 6px); padding: 18px 10px; font-size: 1.2rem; }
    .picker-card img, .picker-initial { width: 88px; height: 88px; font-size: 2.8rem; }
    .brand span:last-child { font-size: 1rem; }
    .head-actions { width: 100%; }
}

/* ---------- Facebook pages (Support, "How to get a code?") ---------- */
.fb-pages { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
.fb-page {
    display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px;
    border: 2px solid #1877F2; border-radius: 999px; background: var(--surface);
    color: #1877F2; font-weight: 700; text-decoration: none;
}
.fb-page img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--edge); }
.fb-page:hover { background: #1877F2; color: #fff; }
.code-delivery { padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-weight: 600; }

/* Support pop-up (Benefits page) */
.info-modal { width: min(560px, calc(100vw - 32px)); overflow-y: auto; }
.info-modal h2 { margin: 0; font-size: 1.3rem; }
.support-body { display: grid; gap: 12px; margin: 12px 0 16px; line-height: 1.55; color: var(--ink-2); }
.support-body p { margin: 0; }
.support-thanks {
    display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px;
    border-radius: var(--radius-sm); background: #FCE4EE; color: var(--ink);
}
.support-thanks > span:first-child { font-size: 1.6rem; line-height: 1; }
.support-thanks strong { display: block; font-size: 1.05rem; margin-bottom: 2px; }
/* The two Facebook pages: equal rectangles, logo above the name, even spacing. */
.support-body .fb-pages { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 4px 0 0; }
.support-body .fb-page {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
    aspect-ratio: 16 / 9; padding: 14px; border-radius: 14px; text-align: center; line-height: 1.25; font-size: 0.95rem;
}
.support-body .fb-page img { width: 72px; height: 72px; border-width: 2px; }

/* Under the plan cards: cost note and thank-you */
.info-modal .feedback-form { margin-top: 12px; }

/* "Good to know" section under the plan cards */
.plans-thanks {
    display: grid; gap: 12px; margin: 20px 0 0; padding: 20px 22px; /* full width: lines up with the first and last plan cards */
    background: var(--surface); border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow);
    color: var(--ink-2); line-height: 1.55; text-align: left;
}
.plans-thanks p { margin: 0; }
.plans-thanks-title { margin: 0 0 2px; font-size: 1.15rem; color: var(--ink); }
.plans-code { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--ink); font-weight: 600; }
.plans-cost { padding: 0 2px; }

/* Screenshot slider in the app Preview */
.slider { position: relative; margin: 14px 0 4px; }
.slider-track {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    border-radius: 12px; border: 1px solid var(--edge); box-shadow: var(--shadow); background: var(--surface-2);
}
.slider-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.slide img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.slide figcaption { padding: 8px 12px; font-size: 0.9rem; font-weight: 600; color: var(--ink-2); text-align: center; background: var(--surface); border-top: 1px solid var(--edge); }
.slider-arrow {
    position: absolute; top: calc(50% - 36px); width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; border: 0; cursor: pointer;
    background: rgba(255, 255, 255, 0.92); color: var(--ink); font-size: 1.6rem; line-height: 1; box-shadow: var(--shadow-pop);
}
.slider-prev { left: 10px; }
.slider-next { right: 10px; }
.slider-arrow:hover { background: #fff; }
.slider-dots { display: flex; justify-content: center; gap: 8px; margin-top: 10px; }
.slider-dots button { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: var(--edge-strong); cursor: pointer; }
.slider-dots button[aria-current="true"] { width: 24px; border-radius: 999px; background: var(--accent); }

/* "Who is talking?": ＋ Add communicator card */
.picker-add { border-style: dashed; justify-content: center; }
.picker-add .picker-open { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }
.picker-add-icon { background: var(--accent-soft); color: var(--accent); font-size: 3rem; font-weight: 300; }
.picker-add.is-full { opacity: 0.7; }
/* Buy now under the Paid plan */
.plan-buy { grid-row: 4; width: 100%; justify-content: center; font-weight: 800; align-self: start; }
/* Request access: same row and width on every card, whether or not the card has Buy now or See offers. */
.plan-request { grid-row: 5; width: 100%; justify-content: center; align-self: start; }

/* Facebook page names in "How to get it": highlighted links */
.page-link { padding: 0 4px; border-radius: 4px; background: #E7F0FE; color: #1877F2; font-weight: 700; text-decoration: none; white-space: nowrap; }
.page-link:hover { background: #1877F2; color: #fff; }

/* See offers under Buy now, and the offers pop-up */
.plan-offers { grid-row: 6; width: 100%; justify-content: center; align-self: start; background: #F1E8FD; border-color: #C9B0F2; color: #5B21B6; font-weight: 700; }
.plan-offers:hover { background: #E3D2FA; border-color: #A77DE8; }
.offers-modal { width: min(600px, calc(100vw - 32px)); }
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.offer {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center;
    padding: 20px 12px 16px; border: 2px solid var(--edge); border-radius: var(--radius); background: var(--surface-2);
}
.offer-best { border-color: var(--accent); background: var(--accent-soft); }
.offer-badge {
    position: absolute; top: -11px; left: 50%; transform: translateX(-50%); white-space: nowrap;
    padding: 2px 10px; border-radius: 999px; background: #E8590C; color: #fff; font-size: 0.75rem; font-weight: 800;
}
.offer-name { font-weight: 700; color: var(--ink-2); }
.offer-was { color: var(--muted); font-size: 1rem; }
.offer-was s { text-decoration-thickness: 2px; text-decoration-color: #E03131; }
.offer-price { font-size: 2rem; line-height: 1.1; color: var(--ink); }
.offer-benefits-title { margin: 4px 0 8px; font-size: 1.05rem; }
.offer-benefits { margin-bottom: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); column-gap: 18px; }
@media (max-width: 520px) { .offer-grid { grid-template-columns: 1fr; } }

/* Follow Us: white box, as wide as the row of plan cards */
.follow-us {
    margin-top: 16px; padding: 18px 22px; background: #FFFFFF;
    border: 1px solid var(--edge); border-radius: var(--radius); box-shadow: var(--shadow);
}
.follow-us h3 { margin: 0 0 12px; font-size: 1.15rem; }
.follow-us-pages { display: flex; flex-wrap: wrap; gap: 14px; }
.follow-us-page {
    flex: 1 1 260px; display: flex; align-items: center; gap: 14px; padding: 10px 14px;
    border: 2px solid var(--edge); border-radius: var(--radius); color: var(--ink); text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.follow-us-page:hover { border-color: #1877F2; box-shadow: var(--shadow-pop); }
.follow-us-page img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 1px solid var(--edge); background: #fff; flex: none; }
.follow-us-page strong { display: block; font-size: 1.05rem; }
.follow-us-page small { color: #1877F2; font-weight: 600; }

/* ---------- Admin: dashboard layout ---------- */
/* Dark sidebar, soft grey canvas, white cards with a little depth, one green accent. */

.with-sidebar {
    --bg: #F1F3F5;
    --surface: #FFFFFF;
    --surface-2: #F7F8FA;
    --ink: #111827;
    --ink-2: #374151;
    --muted: #6B7280;
    --edge: #E5E7EB;
    --edge-strong: #D1D5DB;
    --accent: #15803D;
    --accent-hover: #166534;
    --accent-soft: #E7F5EC;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(17, 24, 39, 0.06), 0 4px 12px rgba(17, 24, 39, 0.05);
    --sidebar: #111827;
    --sidebar-ink: #D1D5DB;
    --sidebar-muted: #6B7280;
    --sidebar-hover: rgba(255, 255, 255, 0.08);
    --sidebar-w: 256px;
}

/* Sidebar */
.with-sidebar .sidebar { padding: 20px 14px; }
.with-sidebar .brand { color: #FFF; font-weight: 700; padding-bottom: 20px; }
.with-sidebar .brand-mark { background: var(--accent); border-radius: 10px; }
.with-sidebar .nav-heading { padding: 18px 12px 6px; font-weight: 700; color: var(--sidebar-muted); }
.with-sidebar .nav-link { padding: 9px 12px; font-weight: 500; border-radius: var(--radius-sm); }
.with-sidebar .nav-link:hover { background: var(--sidebar-hover); color: #FFF; }
.with-sidebar .nav-link.active { background: var(--accent); color: #FFF; font-weight: 600; }
.with-sidebar .nav-link.in-app { color: #FFF; font-weight: 600; }
.with-sidebar .nav-sub { border-left-color: rgba(255, 255, 255, 0.14); margin-left: 23px; }
.with-sidebar .nav-sublink { padding: 7px 12px; font-weight: 500; }
.with-sidebar .nav-sublink:hover { color: #FFF; }
.with-sidebar .nav-sublink.active { color: #FFF; background: rgba(255, 255, 255, 0.12); font-weight: 600; }
.with-sidebar .side-user { border-top-color: rgba(255, 255, 255, 0.1); }
.with-sidebar .side-user-text strong { color: #FFF; }
.with-sidebar .side-action { color: var(--sidebar-ink); }
.with-sidebar .side-action:hover, .with-sidebar .side-action.active { background: var(--sidebar-hover); color: #FFF; }

/* Menus with a submenu: a › that turns when open. */
.nav-group > summary { list-style: none; cursor: pointer; }
.nav-group > summary::-webkit-details-marker { display: none; }
.nav-chevron { margin-left: auto; font-size: 1.15rem; line-height: 1; opacity: 0.6; transition: transform 0.15s; }
.nav-group[open] > summary .nav-chevron { transform: rotate(90deg); }

/* Page */
/* Every page beside the admin side menu uses the whole width, so tables can spread out. */
.with-sidebar .page { max-width: none; padding: 32px 40px 56px; }
.with-sidebar h1 { font-size: 1.6rem; font-weight: 700; }
.with-sidebar .page-head { margin-bottom: 24px; }
.with-sidebar .eyebrow { color: var(--accent); font-weight: 700; }
.with-sidebar .eyebrow a { color: var(--muted); text-decoration: none; font-weight: 600; }
.with-sidebar .eyebrow a:hover { color: var(--ink); }
.with-sidebar .page-sub { color: var(--muted); }

/* Cards and stat tiles */
.with-sidebar .card { background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.with-sidebar .stat { background: var(--surface); border: 1px solid var(--edge); box-shadow: var(--shadow); }
.with-sidebar .stat-value { font-weight: 700; }

/* Tables: a tinted header row, clear rows. */
.with-sidebar .table th {
    background: var(--surface-2); color: var(--muted); font-weight: 700; font-size: 0.75rem;
    text-transform: uppercase; letter-spacing: 0.05em; border-bottom: 1px solid var(--edge);
}
.with-sidebar .table td { border-bottom: 1px solid var(--edge); }
.with-sidebar .table tbody tr:hover { background: #F9FAFB; }

/* Buttons: solid green primary, white outlined others. */
.with-sidebar .btn { background: #FFF; border-color: var(--edge-strong); color: var(--ink); font-weight: 600; }
.with-sidebar .btn:hover { background: var(--surface-2); border-color: #9CA3AF; }
.with-sidebar .btn-primary { background: var(--accent); border-color: var(--accent); color: #FFF; }
.with-sidebar .btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.with-sidebar .btn-ghost { background: transparent; border-color: transparent; color: var(--accent); }
.with-sidebar .btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.with-sidebar .btn-danger { color: var(--danger); }
.with-sidebar .btn[disabled] { opacity: 0.4; cursor: not-allowed; }

/* Active / Inactive status (also a button that toggles). */
.status {
    display: inline-block; padding: 3px 12px; border-radius: 999px;
    border: 1px solid transparent; background: #F3F4F6; color: var(--muted);
    font: inherit; font-size: 0.78rem; font-weight: 700; line-height: 1.5;
}
button.status { cursor: pointer; }
button.status:hover:not(:disabled) { filter: brightness(0.96); }
button.status:disabled { cursor: default; }
.status-on { background: var(--accent-soft); color: var(--accent); }

.section-title { margin: 28px 0 12px; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.section-title:first-of-type { margin-top: 0; }
.block { display: block; }
.profile-card.is-inactive { opacity: 0.6; }

@media (max-width: 900px) {
    .with-sidebar .page { padding: 24px 16px 48px; }
    .nav-group { flex: none; display: flex; align-items: center; }
    .nav-group .nav-sub { flex-direction: row; margin: 0; padding: 0; border: 0; }
    .nav-chevron { margin-left: 4px; }
}

/* ---------- Admin additions ---------- */
/* The open app stays highlighted while one of its pages is showing. */
.with-sidebar .nav-link.in-app { background: rgba(255, 255, 255, 0.1); color: #FFF; font-weight: 600; }

/* On/off switch (a button, so it works as a form submit). */
.switch {
    position: relative; flex: none; width: 40px; height: 22px; padding: 0;
    border: 0; border-radius: 999px; background: #D1D5DB; cursor: pointer; transition: background 0.15s;
}
.switch::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
    border-radius: 50%; background: #FFF; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s;
}
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
.switch:disabled { opacity: 0.5; cursor: not-allowed; }
.switch:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: 2px; }
.switch-row { display: inline-flex; align-items: center; gap: 8px; font-size: 0.82rem; font-weight: 600; color: var(--muted); }

/* Icon-only action buttons. */
.icon-btn {
    display: inline-grid; place-items: center; width: 32px; height: 32px; padding: 0;
    border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--ink-2);
    cursor: pointer; text-decoration: none;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); border-color: var(--edge); color: var(--ink); }
.icon-btn.danger:hover:not(:disabled) { background: var(--danger-soft); color: var(--danger); border-color: #F1C0BA; }
.icon-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Dragging rows. */
.drag-handle { cursor: grab; color: var(--muted); font-size: 1.1rem; user-select: none; }
tr[draggable="true"].dragging { opacity: 0.4; }
tr.drop-above td { box-shadow: inset 0 2px 0 var(--accent); }
.table-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--edge); }
.table-tools .grow { flex: 1; min-width: 180px; }
.table-tools select, .table-tools input[type="search"] {
    padding: 8px 12px; border: 1px solid var(--edge-strong); border-radius: 8px; background: #FFF; font: inherit; color: var(--ink);
}
.table-tools input[type="search"] { width: 100%; }

/* Search and filters stay on one row (they wrap only on narrow screens). */
.table-tools { flex-wrap: nowrap; }
.table-tools > * { flex: none; }
.table-tools .grow { flex: 1 1 auto; min-width: 140px; }
.table-tools form { margin: 0; }
@media (max-width: 700px) { .table-tools { flex-wrap: wrap; } .table-tools > * { flex: 1 1 140px; } }
.settings-card { max-width: 560px; padding: 24px; }

/* Words and phrases: pictures per theme, and the picture picker. */
.pic { width: 30px; height: 30px; object-fit: contain; vertical-align: middle; }
.pic-emoji { font-size: 1.6rem; line-height: 30px; vertical-align: middle; }
.pic-text { font-size: 1.2rem; font-weight: 700; }
.pic-dot { display: inline-block; width: 22px; height: 22px; border-radius: 50%; vertical-align: middle; border: 1px solid var(--edge-strong); }
.pager { padding: 12px 16px; border-top: 1px solid var(--edge); display: flex; justify-content: center; }
.pager nav > div:first-child { display: flex; gap: 8px; }
.pager a, .pager span[aria-disabled] span { padding: 6px 12px; border: 1px solid var(--edge-strong); border-radius: 8px; text-decoration: none; color: var(--ink); background: #FFF; font-size: 0.85rem; }
.pager span[aria-disabled] span { opacity: 0.4; }
.modal-wide { width: min(720px, calc(100vw - 32px)); }
.pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 8px; max-height: 280px; overflow-y: auto; padding: 4px; border: 1px solid var(--edge); border-radius: 10px; }
.pick { cursor: pointer; }
.pick[hidden] { display: none; }
.pick input { position: absolute; opacity: 0; pointer-events: none; }
.pick-box { display: grid; gap: 4px; justify-items: center; padding: 8px 4px; border: 2px solid transparent; border-radius: 10px; background: var(--surface-2); }
.pick-row { display: flex; gap: 6px; align-items: center; }
.pick-label { font-size: 0.75rem; font-weight: 600; text-align: center; color: var(--ink-2); }
.pick input:checked + .pick-box { border-color: var(--accent); background: var(--accent-soft); }
.pick input:focus-visible + .pick-box { outline: 3px solid var(--accent-soft); }

/* The search and filters sit inside the table's card and always fit its width. */
.table-tools { width: 100%; max-width: 100%; box-sizing: border-box; gap: 8px; }
.table-tools > * { min-width: 0; flex: 0 1 auto; }
.table-tools .grow { flex: 1 1 160px; }
.table-tools select { max-width: 150px; }
.table-tools .btn { white-space: nowrap; }
form.table-tools.card { padding: 12px 16px; margin-bottom: 8px; }

/* Customize / Delete under a communicator you added. */
.picker-manage { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.picker-manage form { margin: 0; }

.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #FFF; font-size: 0.72rem; font-weight: 700; text-align: center; line-height: 20px; }
.login-alt { margin: 16px 0 0; text-align: center; font-size: 0.9rem; }

/* "How to get your code" for the chosen plan. */
.how-box { padding: 12px 14px; border: 1px solid var(--edge, #E7E3DA); border-radius: 10px; background: var(--accent-soft, #E4F2E9); font-size: 0.92rem; }
.how-box p { margin: 6px 0 0; }
.plan-request { margin-top: 8px; width: 100%; justify-content: center; }

/* Sign-in forms: side-by-side fields, and the remember-me / forgot-password row. */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; font-size: 0.9rem; }
.form-meta a { font-weight: 600; }
.form-section { margin: 4px 0 -4px; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted, #6b6b6b); }
.field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.field-head a { font-weight: 600; font-size: 0.85rem; }
.check { justify-content: flex-start; }

/* ---------- Support tickets ---------- */
.ticket-form { display: grid; gap: 10px; }
.ticket-actions { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.ticket-login { margin: 0; }
.ticket-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.ticket { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--edge); border-radius: var(--radius-sm); background: var(--surface-2); }
.ticket.card { background: var(--surface); }
.ticket-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ticket-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ticket-status { flex: none; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.ticket-open { background: #FEF3C7; color: #92400E; }
.ticket-closed { background: var(--surface-2); color: var(--muted); border: 1px solid var(--edge); }
.ticket-reply { display: grid; gap: 4px; padding: 10px 12px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: var(--radius-sm); }
.ticket-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.ticket-admin-list { display: grid; gap: 14px; }

/* ---------- Plan days, status and admin user profile ---------- */
.days { font-variant-numeric: tabular-nums; font-weight: 700; }
.days-red { color: var(--danger, #B3261E); font-weight: 800; }
.plan-note { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; line-height: 1.3; white-space: nowrap; }
.plan-note-soon { background: #FEF3C7; color: #92400E; }
.plan-note-ended { background: #FDE2E0; color: #B3261E; }
.plan-banner { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 16px; padding: 10px 14px; border: 1px solid var(--edge); border-radius: var(--radius-sm); background: var(--surface); }
.plan-banner .plan-note { margin-top: 0; font-size: 0.82rem; }
.status-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; }
.status-active { background: var(--accent-soft); color: var(--accent); }
.status-inactive { background: #FDE2E0; color: #B3261E; }
.user-summary { display: grid; gap: 16px; margin-bottom: 20px; }
.user-facts { display: flex; flex-wrap: wrap; gap: 16px 32px; margin: 0; }
.user-facts dt { color: var(--muted); font-size: 0.8rem; font-weight: 700; }
.user-facts dd { margin: 2px 0 0; font-weight: 700; }
.user-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.user-actions form { margin: 0; }
.user-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 20px; align-items: start; }
.info-list { display: grid; grid-template-columns: minmax(120px, 0.45fr) 1fr; gap: 8px 12px; margin: 0; }
.info-list dt { color: var(--muted); font-weight: 600; font-size: 0.9rem; }
.info-list dd { margin: 0; overflow-wrap: anywhere; }
.card-pad { padding: 16px 16px 0; }
.page-wide > .card { margin-bottom: 20px; }

/* Messages on the user's profile */
.message-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.message { display: grid; gap: 6px; padding: 14px; border: 1px solid var(--edge); border-radius: var(--radius-sm); background: var(--surface-2); }
.message.is-new { border-color: var(--accent); background: var(--accent-soft); }
.message-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.message-body { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.menu-badge { display: inline-block; min-width: 18px; padding: 0 6px; margin-left: 4px; border-radius: 999px; background: var(--danger, #B3261E); color: #fff; font-size: 0.72rem; font-weight: 800; line-height: 18px; text-align: center; }

/* Statistics tabs */
.stat-tabs { display: flex; gap: 6px; margin: 0 0 16px; border-bottom: 2px solid var(--edge); }
.stat-tab { padding: 9px 16px; margin-bottom: -2px; border: 2px solid transparent; border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--ink); font-weight: 700; text-decoration: none; }
.stat-tab:hover { background: var(--accent-soft); }
.stat-tab.active { background: var(--surface); border-color: var(--edge); color: var(--accent); }
.stat-filter { margin-bottom: 16px; }

/* ---------- Flash Cards app ---------- */
.flash-home, .flash-deck { max-width: 1040px; margin: 0 auto; }
.deck-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 16px; }
.deck-box {
    display: grid; justify-items: center; gap: 4px; padding: 20px 14px; text-align: center; text-decoration: none; color: var(--ink);
    background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius);
    box-shadow: var(--shadow-card, 0 1px 3px rgba(0, 0, 0, 0.08)); transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.deck-box:hover, .deck-box:focus-visible { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-pop); }
.deck-common { grid-column: 1 / -1; grid-template-columns: auto 1fr auto; text-align: left; justify-items: start; align-items: center; column-gap: 16px; border-color: var(--accent); background: var(--accent-soft); }
.deck-common .deck-icon { grid-row: span 2; }
.deck-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; font-size: 2rem; margin-bottom: 4px; }
.deck-count { margin-top: 4px; padding: 2px 10px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--edge); font-size: 0.78rem; font-weight: 700; color: var(--ink-2); }
.deck-common .deck-count { justify-self: end; grid-row: span 2; grid-column: 3; }
@media (max-width: 520px) { .deck-common { grid-template-columns: auto 1fr; } .deck-common .deck-count { grid-column: 2; grid-row: auto; justify-self: start; } }

.flash-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.flash-head h1 { margin: 0; flex: 1; font-size: 1.5rem; }
.flash-stage { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; }
.flash-stage[hidden], .flash-grid[hidden] { display: none; }
.flash-nav { width: 56px; height: 120px; border: 2px solid var(--edge); border-radius: var(--radius); background: var(--surface); font-size: 2.4rem; cursor: pointer; color: var(--accent); }
.flash-nav:hover { background: var(--accent-soft); }
.flash-card {
    display: grid; justify-items: center; align-content: center; gap: 12px; min-height: min(62vh, 480px); padding: 24px;
    border: 4px solid var(--edge-strong, #cfd8d2); border-radius: 24px; cursor: pointer; font: inherit; color: #1F2328;
}
.flash-card:focus-visible { outline: 4px solid var(--accent); outline-offset: 3px; }
.flash-pic { font-size: clamp(5rem, 22vw, 11rem); line-height: 1; display: grid; place-items: center; }
.flash-pic img { width: clamp(6rem, 24vw, 12rem); height: clamp(6rem, 24vw, 12rem); object-fit: contain; }
.flash-dot { width: clamp(6rem, 24vw, 12rem); height: clamp(6rem, 24vw, 12rem); border-radius: 50%; border: 4px solid rgba(31, 35, 40, 0.35); }
.flash-text { font-size: clamp(5rem, 22vw, 10rem); font-weight: 800; }
.flash-word { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 800; text-align: center; overflow-wrap: anywhere; }
.flash-controls { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 18px 0; }
.flash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.flash-mini { display: grid; justify-items: center; align-content: center; gap: 6px; min-height: 130px; padding: 10px; border: 3px solid var(--edge); border-radius: 16px; cursor: pointer; font: inherit; font-weight: 700; color: #1F2328; }
.flash-mini:hover { border-color: var(--accent); }
.flash-mini-pic { font-size: 3rem; line-height: 1; display: grid; place-items: center; }
.flash-mini-pic img { width: 3.4rem; height: 3.4rem; object-fit: contain; }
.flash-mini-pic .flash-dot { width: 3.2rem; height: 3.2rem; }
.flash-mini-pic .flash-text { font-size: 3rem; }
.flash-other { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--edge); }
.flash-chip { padding: 6px 12px; border: 1px solid var(--edge); border-radius: 999px; background: var(--surface); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.flash-chip:hover, .flash-chip.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (max-width: 520px) { .flash-nav { width: 40px; } }
@media print {
    .topbar, .sidebar, .flash-head .btn, .flash-controls, .flash-other, .flash-stage { display: none !important; }
    .flash-grid { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .flash-mini { break-inside: avoid; min-height: 2.4in; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Flash Cards quiz */
.quiz { max-width: 640px; margin: 0 auto; display: grid; gap: 14px; }
.quiz[hidden], .quiz-done[hidden], .quiz-question[hidden] { display: none; }
.quiz-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.quiz-score { font-size: 1.2rem; }
.quiz-question { display: grid; gap: 14px; justify-items: stretch; }
.quiz-card { min-height: min(34vh, 260px); width: 100%; }
.quiz-ask { margin: 0; text-align: center; font-size: 1.4rem; font-weight: 800; }
.quiz-options { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.quiz-option {
    min-height: 64px; padding: 10px 14px; border: 3px solid var(--edge); border-radius: 16px; background: var(--surface);
    font: inherit; font-size: 1.25rem; font-weight: 800; color: var(--ink); cursor: pointer; overflow-wrap: anywhere;
}
.quiz-option:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.quiz-option:disabled { cursor: default; }
.quiz-option.is-right { background: #C8F0C8; border-color: #2F8F4F; }
.quiz-option.is-wrong { background: #FFC4C4; border-color: #B3261E; }
.quiz-feedback { margin: 0; min-height: 1.6em; text-align: center; font-size: 1.15rem; font-weight: 700; }
.quiz-question > .btn { justify-self: center; }
.quiz-done { text-align: center; display: grid; gap: 6px; justify-items: center; padding: 20px 0; }
.quiz-done-emoji { margin: 0; font-size: 5rem; line-height: 1; }
.quiz-done h2 { margin: 0; font-size: 1.8rem; }
@media (max-width: 420px) { .quiz-options { grid-template-columns: 1fr; } }
/* Quiz type picker and picture answers */
.quiz-picker { width: min(560px, calc(100vw - 32px)); }
.quiz-types { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }
.quiz-type {
    display: grid; justify-items: center; gap: 4px; padding: 18px 12px; text-align: center; cursor: pointer; font: inherit; color: var(--ink);
    background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius);
}
.quiz-type:hover, .quiz-type:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.quiz-type-icon { font-size: 2.2rem; line-height: 1; }
.quiz-options-pictures { grid-template-columns: 1fr 1fr; }
.quiz-option-pic { display: grid; place-items: center; min-height: 120px; padding: 8px; }
.quiz-option-pic .flash-mini-pic { font-size: 4rem; }
.quiz-option-pic .flash-mini-pic img, .quiz-option-pic .flash-mini-pic .flash-dot { width: 4.5rem; height: 4.5rem; }
.quiz-card .flash-word { padding: 6px 0; }
@media (max-width: 420px) { .quiz-types { grid-template-columns: 1fr; } }
.quiz-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.quiz-actions .btn[hidden], .quiz-top .btn[hidden] { display: none; }
[data-flash-head][hidden], [data-flash-other][hidden] { display: none; }
.flash-controls[hidden], .flash-head[hidden], .flash-other[hidden], .flash-stage[hidden] { display: none !important; }

/* Use in a sentence */
.flash-sentences { display: grid; gap: 8px; max-width: 640px; margin: 14px auto 0; }
.flash-sentences[hidden] { display: none; }
.flash-sentence {
    padding: 12px 16px; text-align: left; font: inherit; font-size: 1.15rem; font-weight: 700; color: var(--ink); cursor: pointer;
    background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius);
}
.flash-sentence:hover { border-color: var(--accent); background: var(--accent-soft); }
/* Auto speak switch */
.auto-speak { display: inline-flex; align-items: center; gap: 8px; }
.auto-speak-track { position: relative; width: 38px; height: 22px; border-radius: 999px; background: var(--edge-strong, #c9c3b6); transition: background 0.15s ease; flex: none; }
.auto-speak-dot { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.15s ease; }
.auto-speak.is-on { border-color: var(--accent); background: var(--accent-soft); }
.auto-speak.is-on .auto-speak-track { background: var(--accent); }
.auto-speak.is-on .auto-speak-dot { transform: translateX(16px); }
@media (prefers-reduced-motion: reduce) { .auto-speak-track, .auto-speak-dot { transition: none; } }
/* ---------- Visual Schedule ---------- */
.sched { max-width: 820px; margin: 0 auto; }
.sched-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.sched-head h1 { margin: 0; flex: 1 1 auto; font-size: 1.5rem; }
.sched-tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface-2); border: 1px solid var(--edge); border-radius: 12px; }
.sched-tab { padding: 8px 14px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
.sched-tab.active { background: var(--accent); color: var(--accent-ink); }
.sched section[hidden] { display: none; }
.sched-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sched-bar { flex: 1; height: 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--edge); overflow: hidden; }
.sched-bar span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.3s ease; }
.sched-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.sched-card { display: flex; align-items: stretch; gap: 8px; border: 4px solid var(--edge); border-radius: 20px; transition: opacity 0.2s ease; }
.sched-card.is-next { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sched-card.is-done { opacity: 0.55; }
.sched-card.is-done .sched-word { text-decoration: line-through; }
.sched-main { flex: 1; display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 14px; padding: 12px 16px; border: 0; background: transparent; font: inherit; color: #1F2328; text-align: left; cursor: pointer; border-radius: 16px; }
.sched-main:focus-visible { outline: 4px solid var(--accent); outline-offset: 2px; }
.sched-num { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, 0.75); font-weight: 800; }
.sched-pic { font-size: 3.4rem; line-height: 1; display: grid; place-items: center; min-width: 4.2rem; }
.sched-pic img { width: 4.2rem; height: 4.2rem; object-fit: contain; }
.sched-pic .flash-dot { width: 3.6rem; height: 3.6rem; }
.sched-pic .flash-text { font-size: 3.4rem; }
.sched-word { font-size: 1.6rem; font-weight: 800; overflow-wrap: anywhere; }
.sched-tick { font-size: 2rem; min-width: 2.2rem; text-align: center; }
.sched-tools { display: grid; gap: 4px; padding: 6px 8px 6px 0; align-content: center; }
.sched-icon { width: 38px; height: 34px; border: 1px solid var(--edge); border-radius: 8px; background: var(--surface); font: inherit; font-weight: 800; cursor: pointer; color: var(--ink); }
.sched-icon:hover { border-color: var(--accent); background: var(--accent-soft); }
.sched-empty { text-align: center; padding: 28px 12px; color: var(--ink-2); }
.sched-done { margin: 16px 0; padding: 16px; text-align: center; border-radius: var(--radius); background: #C8F0C8; font-size: 1.5rem; font-weight: 800; }
.sched-done[hidden] { display: none; }
.sched-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 18px; }
.sched-actions .btn[hidden] { display: none; }
.sched-library { margin-top: 28px; padding-top: 18px; border-top: 2px solid var(--edge); }
.sched-library h2 { margin: 0 0 4px; }
.sched-library .flash-grid { margin-top: 12px; }

.ft { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: stretch; }
.ft-slot { display: grid; justify-items: center; align-content: center; gap: 8px; min-height: min(52vh, 360px); padding: 16px; border: 4px solid var(--edge); border-radius: 24px; background: var(--surface); font: inherit; color: #1F2328; cursor: pointer; }
.ft-slot.is-empty { border-style: dashed; }
.ft-slot.is-choosing { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.ft-slot.is-done { opacity: 0.6; }
.ft-slot.is-waiting { opacity: 0.55; }
.ft-title { font-size: 1.2rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.ft-pic { font-size: clamp(4rem, 14vw, 7rem); }
.ft-pic img { width: clamp(5rem, 16vw, 8rem); height: clamp(5rem, 16vw, 8rem); }
.ft .sched-word { font-size: 1.8rem; text-align: center; }
.ft-arrow { align-self: center; font-size: 2.4rem; }
@media (max-width: 560px) {
    .sched-main { grid-template-columns: auto 1fr auto; }
    .sched-num { display: none; }
    .ft { grid-template-columns: 1fr; }
    .ft-arrow { transform: rotate(90deg); justify-self: center; }
    .ft-slot { min-height: 200px; }
}
@media (prefers-reduced-motion: reduce) { .sched-bar span, .sched-card { transition: none; } }
/* Visual Schedule: save, time and print */
.sched-bar-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.sched-name { flex: 1 1 220px; }
.sched-name input { width: 100%; }
.sched-note { margin: 0 0 12px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--accent-soft); font-weight: 600; }
.sched-note.is-bad { background: var(--danger-soft, #FDECEA); color: var(--danger, #B42318); }
.sched-note[hidden] { display: none; }
.sched-time { display: block; margin-top: 2px; font-size: 0.95rem; font-weight: 700; color: #3b3f45; }
.sched-time-input { width: 108px; padding: 4px 6px; border: 1px solid var(--edge); border-radius: 8px; font: inherit; font-size: 0.9rem; background: var(--surface); }
.saved-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.saved-list li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--edge); border-radius: var(--radius-sm); background: var(--surface-2); }
.saved-list .actions { display: flex; gap: 6px; }

/* On paper: only the schedule. */
.sched-print { display: none; }
@media print {
    .topbar, .sidebar, .flash, .sched-head, .sched-bar-tools, .sched-note, .sched > section, .sched > dialog { display: none !important; }
    body, .page { background: #fff !important; }
    .with-sidebar .page, .with-topbar .page { margin: 0 !important; padding: 0 !important; max-width: none !important; }
    .sched-print { display: block; }
    .sched-print h1 { margin: 0 0 2px; font-size: 26pt; text-align: center; }
    .sched-print-date { margin: 0 0 14pt; text-align: center; color: #555; font-size: 11pt; }
    .sp-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10pt; }
    .sp-list li { display: flex; align-items: center; gap: 12pt; break-inside: avoid; }
    .sp-list .sp-card { flex: 1; }
    .sp-card { display: flex; align-items: center; gap: 14pt; padding: 8pt 14pt; border: 2.5pt solid #333; border-radius: 14pt; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .sp-num { display: grid; place-items: center; width: 24pt; height: 24pt; border-radius: 50%; border: 1.5pt solid #333; background: #fff; font-weight: 800; font-size: 13pt; }
    .sp-pic { font-size: 34pt; line-height: 1; display: grid; place-items: center; min-width: 44pt; }
    .sp-pic img { width: 44pt; height: 44pt; object-fit: contain; }
    .sp-pic .flash-dot { width: 36pt; height: 36pt; }
    .sp-pic .flash-text { font-size: 34pt; }
    .sp-word { font-size: 20pt; font-weight: 800; flex: 1; }
    .sp-time { font-size: 14pt; font-weight: 700; }
    .sp-box { flex: none; width: 28pt; height: 28pt; border: 2.5pt solid #333; border-radius: 6pt; }
    .sp-ft { display: grid; grid-template-columns: 1fr 1fr; gap: 20pt; }
    .sp-ft-slot h2 { margin: 0 0 8pt; text-align: center; font-size: 22pt; text-transform: uppercase; letter-spacing: 0.08em; }
    .sp-ft .sp-card { flex-direction: column; justify-content: center; min-height: 3.6in; text-align: center; }
    .sp-ft .sp-pic { font-size: 76pt; }
    .sp-ft .sp-pic img { width: 100pt; height: 100pt; }
    .sp-ft .sp-word { flex: none; font-size: 26pt; }
}
/* Apps that are on the way */
.app-box.is-soon { opacity: 0.78; border-style: dashed; background: var(--surface-2); }
.app-box.is-soon .app-box-icon { filter: grayscale(0.35); }
.soon-pill { margin-top: auto; padding: 4px 14px; border-radius: 999px; background: #FEF3C7; color: #92400E; font-size: 0.8rem; font-weight: 700; }
.sched-sub { margin: 0; flex-basis: 100%; }

/* ---------- Match ---------- */
.match { max-width: 820px; margin: 0 auto; }
.match-setup { display: grid; gap: 18px; }
.match-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.match-field legend { margin-bottom: 8px; padding: 0; font-weight: 800; font-size: 1.05rem; }
.match-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.match-small { grid-template-columns: repeat(3, 1fr); }
.match-choice {
    display: grid; justify-items: center; gap: 4px; padding: 14px 10px; font: inherit; color: var(--ink); text-align: center; cursor: pointer;
    background: var(--surface); border: 3px solid var(--edge); border-radius: var(--radius);
}
.match-choice > span:first-child { font-size: 1.8rem; line-height: 1.1; }
.match-choice strong { font-size: 1.1rem; }
.match-choice:hover { border-color: var(--accent); }
.match-choice.active { border-color: var(--accent); background: var(--accent-soft); }
.match-decks { display: flex; flex-wrap: wrap; gap: 8px; }
.match-deck { padding: 8px 14px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; background: var(--surface); border: 2px solid var(--edge); border-radius: 999px; }
.match-deck:hover { border-color: var(--accent); }
.match-deck.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.match-start { display: flex; justify-content: center; }
.match-go { min-width: 200px; padding: 14px 28px; font-size: 1.2rem; }
.match-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.match-score { margin-left: auto; font-weight: 800; }
.match-grid { --cols: 4; display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 12px; }
.match-tile {
    display: grid; place-items: center; aspect-ratio: 1; min-height: 84px; padding: 6px; font: inherit; color: #1F2328; cursor: pointer;
    border: 4px solid var(--edge); border-radius: 18px; background: var(--surface); transition: transform 0.15s ease;
}
.match-tile:not(.is-up):not(:disabled) { background: var(--accent); border-color: var(--accent); }
.match-tile:not(.is-up):not(:disabled):hover { transform: translateY(-3px); }
.match-tile:focus-visible { outline: 4px solid var(--ink); outline-offset: 2px; }
.match-tile.is-done { border-color: #2F8F4F; opacity: 0.85; }
.match-back { font-size: clamp(2rem, 8vw, 3.4rem); font-weight: 800; color: var(--accent-ink); }
.match-pic { font-size: clamp(2.6rem, 11vw, 4.6rem); line-height: 1; display: grid; place-items: center; }
.match-pic img { width: clamp(2.8rem, 12vw, 4.8rem); height: clamp(2.8rem, 12vw, 4.8rem); object-fit: contain; }
.match-pic .flash-dot { width: clamp(2.6rem, 11vw, 4.2rem); height: clamp(2.6rem, 11vw, 4.2rem); }
.match-pic .flash-text { font-size: clamp(2.6rem, 11vw, 4.4rem); }
.match-word { font-size: clamp(1rem, 4vw, 1.6rem); font-weight: 800; text-align: center; overflow-wrap: anywhere; line-height: 1.1; }
.match-win { margin-top: 20px; padding: 20px; text-align: center; border-radius: var(--radius); background: #C8F0C8; }
.match-win[hidden], .match [hidden] { display: none; }
.match-win-emoji { margin: 0; font-size: 4rem; line-height: 1; }
.match-win h2 { margin: 6px 0 12px; }
@media (max-width: 480px) { .match-choices { grid-template-columns: 1fr; } .match-small { grid-template-columns: repeat(3, 1fr); } .match-grid { gap: 8px; } }
@media (prefers-reduced-motion: reduce) { .match-tile { transition: none; } }

/* ---------- Drag & Drop ---------- */
.dd-ask { margin: 4px 0 12px; text-align: center; font-size: 1.2rem; font-weight: 800; }
.dd-tip { text-align: center; margin: 0; }
.dd-targets { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 18px; }
.dd-target {
    display: grid; justify-items: center; align-content: start; gap: 10px; padding: 14px 10px 12px; font: inherit; color: #1F2328;
    background: var(--surface); border: 4px solid var(--edge); border-radius: 20px; cursor: pointer;
}
.dd-target.is-over { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); transform: scale(1.03); }
.dd-target.is-wrong { border-color: #B3261E; animation: dd-shake 0.45s; }
.dd-target.is-done { border-color: #2F8F4F; cursor: default; }
.dd-pic { font-size: clamp(3rem, 12vw, 4.6rem); line-height: 1; display: grid; place-items: center; }
.dd-pic img { width: clamp(3.2rem, 12vw, 4.8rem); height: clamp(3.2rem, 12vw, 4.8rem); object-fit: contain; }
.dd-pic .flash-dot { width: clamp(3rem, 11vw, 4.4rem); height: clamp(3rem, 11vw, 4.4rem); }
.dd-pic .flash-text { font-size: clamp(3rem, 12vw, 4.6rem); }
.dd-word { font-size: 1.5rem; font-weight: 800; min-height: 4.6rem; display: grid; place-items: center; text-align: center; overflow-wrap: anywhere; }
.dd-slot { min-width: 100%; min-height: 3.2rem; display: grid; place-items: center; padding: 6px 10px; border: 3px dashed var(--edge-strong, #c9c3b6); border-radius: 14px; color: var(--muted); font-weight: 700; font-size: 1.1rem; background: rgba(255, 255, 255, 0.6); }
.dd-slot.is-filled { border-style: solid; border-color: #2F8F4F; background: #C8F0C8; color: #1F2328; font-weight: 800; }
.dd-tray { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; padding: 16px; margin-top: 4px; min-height: 84px; border: 2px dashed var(--edge); border-radius: 20px; background: var(--surface-2); }
.dd-piece {
    display: grid; place-items: center; min-width: 110px; min-height: 64px; padding: 10px 18px; font: inherit; font-size: 1.35rem; font-weight: 800; color: #1F2328;
    background: #fff; border: 3px solid var(--accent); border-radius: 16px; cursor: grab; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12); user-select: none; -webkit-user-select: none;
}
.dd-piece:active { cursor: grabbing; }
.dd-piece.is-dragging { opacity: 0.35; }
.dd-piece.is-selected { background: var(--accent-soft); box-shadow: 0 0 0 5px var(--accent-soft); transform: translateY(-3px); }
.dd-piece .dd-pic { font-size: 3rem; }
.drag-ghost { position: fixed; z-index: 1000; pointer-events: none; margin: 0; opacity: 0.92; transform: scale(1.06) rotate(-2deg); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
@keyframes dd-shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.quiz-feedback.is-bad { color: #B3261E; }
@media (prefers-reduced-motion: reduce) { .dd-target.is-wrong { animation: none; } .dd-target.is-over { transform: none; } }

/* ---------- My Body ---------- */
.mybody { max-width: 760px; margin: 0 auto; }
.mybody-help { text-align: center; margin: 0 0 8px; }
.mybody-stage { display: grid; place-items: center; }
.mybody-svg { width: 100%; max-width: 440px; height: auto; touch-action: manipulation; }
.body-part { cursor: pointer; outline: none; }
.body-part:hover > *, .body-part.is-on > *, .body-part:focus-visible > * { stroke: #F59E0B; stroke-width: 4; }
.body-part:hover > [fill="transparent"], .body-part.is-on > [fill="transparent"], .body-part:focus-visible > [fill="transparent"],
.body-part.is-over > [fill="transparent"] { fill: rgba(245, 158, 11, 0.35); }
.body-part.is-over > * { stroke: var(--accent); stroke-width: 5; }
.body-part.is-wrong > * { stroke: #B3261E; stroke-width: 5; }
.body-part.is-wrong > [fill="transparent"] { fill: rgba(179, 38, 30, 0.3); }
.body-label { cursor: pointer; outline: none; }
.body-name { font-size: 17px; font-weight: 800; fill: #1F2328; }
.body-line { stroke: #94A3B8; stroke-width: 1.6; }
.body-dot { fill: #64748B; }
.body-label:hover .body-name, .body-label:focus-visible .body-name { fill: var(--accent); }
.mybody-svg.names-off .body-label:not(.is-earned) { display: none; }
.body-label.is-earned .body-name { fill: #2F8F4F; }
.mybody .match-bar { justify-content: center; }
.mybody-count { grid-template-columns: repeat(3, 110px); }
.mybody [hidden] { display: none; }
.body-decor { pointer-events: none; }

/* ---------- Pain indicator ---------- */
.pain { display: grid; gap: 16px; margin-top: 8px; }
.pain-step { padding: 14px 16px; border: 1px solid var(--edge); border-radius: var(--radius); background: var(--surface); }
.pain-step h2 { margin: 0 0 4px; font-size: 1.1rem; }
.pain-scale { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.pain-face {
    display: grid; justify-items: center; gap: 2px; padding: 10px 4px; font: inherit; color: #1F2328; text-align: center; cursor: pointer;
    background: #fff; border: 3px solid var(--edge); border-radius: 16px;
}
.pain-face:nth-child(1) { background: #E6F7E6; } .pain-face:nth-child(2) { background: #F0F8DC; } .pain-face:nth-child(3) { background: #FFF6CC; }
.pain-face:nth-child(4) { background: #FFE9C2; } .pain-face:nth-child(5) { background: #FFD3C2; } .pain-face:nth-child(6) { background: #FFB8B8; }
.pain-face:hover { border-color: var(--accent); }
.pain-face.active { border-color: #1F2328; box-shadow: 0 0 0 4px rgba(31, 35, 40, 0.18); transform: translateY(-3px); }
.pain-emoji { font-size: clamp(1.8rem, 6vw, 2.8rem); line-height: 1.1; }
.pain-face strong { font-size: 1.1rem; }
.pain-face .small { font-size: 0.72rem; line-height: 1.15; }
.pain-kinds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pain-kind { padding: 8px 14px; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; background: var(--surface); border: 2px solid var(--edge); border-radius: 999px; }
.pain-kind.active { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pain-card { padding: 16px; text-align: center; border: 3px solid #DC2626; border-radius: var(--radius); background: #FDECEA; }
.pain-card[hidden] { display: none; }
.pain-text { margin: 0 0 10px; font-size: 1.5rem; font-weight: 800; color: #1F2328; }
.body-part.is-hurt > * { stroke: #DC2626; stroke-width: 5; }
.body-part.is-hurt > [fill="transparent"] { fill: rgba(220, 38, 38, 0.38); }
.body-part.is-hurt { filter: drop-shadow(0 0 5px rgba(220, 38, 38, 0.75)); }
@media (max-width: 480px) { .pain-scale { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* The name in the top bar opens Profile and Log out */
.user-menu > summary.topbar-user { margin: 0; padding: 4px 10px 4px 4px; border: 1px solid transparent; border-radius: 999px; cursor: pointer; list-style: none; user-select: none; }
.user-menu > summary.topbar-user:hover, .user-menu[open] > summary.topbar-user { background: var(--surface-2); border-color: var(--edge); }
.user-menu > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.user-caret { font-size: 0.8rem; color: var(--muted); }
.user-menu-body { right: 0; left: auto; min-width: 230px; padding: 8px; display: grid; gap: 2px; }
.user-menu-who { display: grid; gap: 2px; padding: 8px 10px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--edge); overflow-wrap: anywhere; }
.user-menu-who .role { justify-self: start; margin-top: 4px; }
.user-menu-item {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: var(--radius-sm); background: transparent;
    font: inherit; font-weight: 600; color: var(--ink); text-align: left; text-decoration: none; cursor: pointer;
}
.user-menu-item:hover, .user-menu-item:focus-visible { background: var(--accent-soft); color: var(--accent); }
.user-menu-item.is-current { background: var(--accent-soft); color: var(--accent); }
.user-menu form { margin: 0; }
@media (max-width: 720px) { .user-menu > summary .user-caret { display: none; } }
/* My Body settings */
.mybody-settings-bar { display: flex; justify-content: center; margin-bottom: 10px; }
.body-settings { display: grid; gap: 14px; margin-bottom: 14px; }
.body-settings[hidden] { display: none; }
.look-row { display: flex; flex-wrap: wrap; gap: 10px; }
.look-opt { font: inherit; color: var(--ink); cursor: pointer; background: var(--surface); border: 3px solid var(--edge); border-radius: 16px; }
.look-opt:not(.look-swatch) { display: grid; justify-items: center; gap: 2px; min-width: 84px; padding: 8px 12px; }
.look-emoji { font-size: 2rem; line-height: 1.1; }
.look-swatch { width: 44px; height: 44px; border-radius: 50%; padding: 0; }
.look-opt:hover { border-color: var(--accent); }
.look-opt.active { border-color: #1F2328; box-shadow: 0 0 0 4px var(--accent-soft); }
.look-opt:not(.look-swatch).active { background: var(--accent-soft); }
.look-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
/* ---------- Look & Draw ---------- */
.draw { max-width: 1100px; margin: 0 auto; }
.draw-board { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; align-items: start; }
.draw-title { margin: 0 0 10px; font-size: 1.15rem; }
.draw-ref { display: grid; gap: 12px; justify-items: center; text-align: center; }
.draw-ref .draw-title { justify-self: start; }
.draw-pic {
    display: grid; place-items: center; width: 100%; aspect-ratio: 1; border: 4px solid var(--edge); border-radius: 22px;
    font-size: clamp(7rem, 22vw, 12rem); line-height: 1;
}
.draw-pic img { width: 70%; height: 70%; object-fit: contain; }
.draw-pic .flash-dot { width: 60%; height: 60%; }
.draw-pic .flash-text { font-size: clamp(7rem, 22vw, 11rem); }
.draw-word { margin: 0; font-size: 1.8rem; font-weight: 800; min-height: 1.2em; overflow-wrap: anywhere; }
.draw-ref-tools { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.draw-ref-tools [data-prev], .draw-ref-tools [data-next] { min-width: 52px; font-size: 1.4rem; }
.draw-deck { display: grid; gap: 4px; width: 100%; justify-items: center; }
.draw-deck select { max-width: 100%; }

.draw-canvas-wrap { position: relative; width: 100%; aspect-ratio: 1; background: #fff; border: 4px solid var(--edge); border-radius: 22px; overflow: hidden; }
.draw-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
.draw-guide {
    position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; opacity: 0.2; filter: grayscale(1);
    font-size: clamp(7rem, 24vw, 14rem); line-height: 1;
}
.draw-guide[hidden] { display: none; }
.draw-guide img { width: 70%; height: 70%; object-fit: contain; }
.draw-guide .flash-dot { width: 60%; height: 60%; }
.draw-guide .flash-text { font-size: clamp(7rem, 24vw, 13rem); }
.draw-tools { display: grid; gap: 12px; margin-top: 12px; }
.draw-colors { display: flex; flex-wrap: wrap; gap: 8px; }
.draw-color { width: 38px; height: 38px; padding: 0; border: 3px solid var(--edge); border-radius: 50%; cursor: pointer; }
.draw-color.active { border-color: #1F2328; box-shadow: 0 0 0 3px var(--accent-soft); transform: scale(1.12); }
.draw-sizes { display: flex; gap: 8px; }
.draw-size { display: grid; place-items: center; width: 46px; height: 46px; border: 3px solid var(--edge); border-radius: 12px; background: var(--surface); cursor: pointer; }
.draw-size span { display: block; border-radius: 50%; background: #1F2328; }
.draw-size.active { border-color: var(--accent); background: var(--accent-soft); }
.draw-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.draw-print { display: none; }
@media (max-width: 760px) { .draw-board { grid-template-columns: minmax(0, 1fr); } .draw-pic { max-width: 320px; } }
@media print {
    .topbar, .sidebar, .flash, .draw > header, .draw-board { display: none !important; }
    body, .page { background: #fff !important; }
    .draw-print { display: block; text-align: center; }
    .draw-print h1 { margin: 0 0 12pt; font-size: 24pt; }
    .draw-print img { width: 100%; max-width: 7in; border: 2pt solid #333; }
}

/* ---------- Trace It ---------- */
.trace { max-width: 1000px; margin: 0 auto; }
.trace-name { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.trace-name label { flex: 1 1 200px; }
.trace-name input { width: 100%; font-size: 1.2rem; }
.trace-name[hidden] { display: none; }
/* The board on top, centered; the letter, stars and buttons below it. */
.trace-stage { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; justify-items: center; }
.trace-stage .trace-wrap { max-width: 640px; }
.trace-stage .trace-wrap.is-wide { max-width: 760px; }
.trace-wrap { position: relative; width: 100%; aspect-ratio: 1; background: #fff; border: 4px solid var(--edge); border-radius: 22px; overflow: hidden; }
.trace-wrap.is-wide { aspect-ratio: 2 / 1; }
.trace-guide, .trace-ink { position: absolute; inset: 0; width: 100%; height: 100%; }
.trace-ink { cursor: crosshair; touch-action: none; }
.trace-side { display: grid; gap: 12px; justify-items: center; text-align: center; width: 100%; max-width: 640px; }
.trace-big { margin: 0; font-size: 4rem; font-weight: 800; line-height: 1; overflow-wrap: anywhere; }
.trace-stars { font-size: 2rem; min-height: 2.4rem; letter-spacing: 0.1em; }
.trace-msg { margin: 0; font-weight: 700; min-height: 2.6em; }
.trace-buttons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.trace-buttons [data-prev], .trace-buttons [data-next] { min-width: 52px; font-size: 1.4rem; }
.trace-buttons [hidden] { display: none; }
.trace-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.trace-picker[hidden] { display: none; }
.trace-pick {
    display: grid; justify-items: center; align-content: center; min-width: 54px; min-height: 64px; padding: 4px 6px; font: inherit; color: #1F2328;
    background: var(--surface); border: 3px solid var(--edge); border-radius: 14px; cursor: pointer;
}
.trace-pick:hover { border-color: var(--accent); }
.trace-pick.active { border-color: var(--accent); background: var(--accent-soft); }
.trace-pick-glyph { font-size: 1.7rem; font-weight: 800; line-height: 1.1; }
.trace-pick-stars { font-size: 0.65rem; min-height: 0.9rem; line-height: 1; }
@media (max-width: 760px) { .trace-big { font-size: 3rem; } }
@media print {
    .trace > header, .trace-name, .trace-stage, .trace-picker { display: none !important; }
}

.trace-big.is-name { font-size: 1.8rem; line-height: 1.2; }

/* A smaller board, so the buttons below it stay on the screen. */
.trace-stage .trace-wrap { max-width: 500px; }
.trace-stage .trace-wrap.is-wide { max-width: 680px; }
.trace-stage .trace-side { gap: 8px; }
.trace-stage .trace-big { font-size: 2.4rem; }
.trace-stage .trace-big.is-name { font-size: 1.5rem; }
.trace-stage .trace-stars { font-size: 1.6rem; min-height: 2rem; }
.trace-stage .trace-msg { min-height: 1.4em; }

/* ---------- Follow Me ---------- */
.follow-title { margin: 14px 0 8px; font-size: 1.1rem; }
.follow-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.follow-tile {
    position: relative; display: grid; place-items: center; width: clamp(84px, 17vw, 128px); aspect-ratio: 1; padding: 6px; font: inherit; color: #1F2328;
    background: var(--surface); border: 4px solid var(--edge); border-radius: 20px;
}
.follow-tile.is-hidden { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-size: 2.6rem; font-weight: 800; }
.follow-tile.is-now { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); transform: scale(1.08); }
.follow-num { position: absolute; top: -10px; left: -10px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #1F2328; color: #fff; font-size: 0.85rem; font-weight: 800; }
.follow-slot { cursor: pointer; border-style: dashed; background: rgba(255, 255, 255, 0.7); }
.follow-slot.is-filled { border-style: solid; }
.follow-slot.is-over { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); transform: scale(1.05); }
.follow-slot.is-right { border-color: #2F8F4F; border-style: solid; box-shadow: 0 0 0 4px #C8F0C8; cursor: default; }
.follow-slot.is-wrong { border-color: #B3261E; border-style: solid; box-shadow: 0 0 0 4px #FDE2E0; animation: dd-shake 0.45s; }
.follow-hole { font-size: 2rem; font-weight: 800; color: var(--muted); opacity: 0.55; }
.follow-piece { min-width: 0; width: clamp(84px, 17vw, 120px); aspect-ratio: 1; padding: 6px; }
.follow-ask { margin-top: 18px; }
.follow .flash-controls { margin: 12px 0 4px; }
.follow [hidden] { display: none; }
@media (prefers-reduced-motion: reduce) { .follow-tile.is-now, .follow-slot.is-over { transform: none; } .follow-slot.is-wrong { animation: none; } }

/* Custom number (2 to 12) next to the choices */
.match-custom { cursor: text; }
.match-custom input { width: 4.5rem; padding: 4px 6px; text-align: center; font: inherit; font-size: 1.2rem; font-weight: 800; border: 2px solid var(--edge-strong, #c9c3b6); border-radius: 10px; background: var(--surface); }
.match-custom.active input { border-color: var(--accent); }
.match-small { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.match-grid[data-big="1"] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 520px) { .match-grid[data-big="1"] { grid-template-columns: repeat(4, minmax(0, 1fr)); } .match-small { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .match-small { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* ---------- Emotions ---------- */
.emo { max-width: 920px; margin: 0 auto; }
.emo [hidden] { display: none; }
.emo-faces { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; margin-bottom: 14px; }
.emo-options { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.emo-pick {
    display: grid; justify-items: center; gap: 4px; padding: 12px 8px; font: inherit; color: #1F2328; cursor: pointer;
    border: 4px solid var(--edge); border-radius: 20px;
}
.emo-pick:hover { border-color: var(--accent); }
.emo-pick.active { border-color: #1F2328; box-shadow: 0 0 0 4px var(--accent-soft); transform: translateY(-3px); }
.emo-pick.is-right { border-color: #2F8F4F; box-shadow: 0 0 0 4px #C8F0C8; }
.emo-pick.is-wrong { border-color: #B3261E; box-shadow: 0 0 0 4px #FDE2E0; animation: dd-shake 0.45s; }
.emo-pick:disabled { cursor: default; }
.emo-pick strong { font-size: 1.05rem; }
.emo-face { display: grid; place-items: center; font-size: 3.4rem; line-height: 1; }
.emo-face img { width: 3.8rem; height: 3.8rem; object-fit: contain; }
.emo-big { font-size: 5rem; }
.emo-big img { width: 6rem; height: 6rem; }
.emo-card { padding: 18px; border: 4px solid var(--edge); border-radius: 22px; }
.emo-card-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.emo-card h2 { margin: 0; font-size: 1.8rem; }
.emo-card h3 { margin: 16px 0 8px; font-size: 1.1rem; }
.emo-clue { margin: 4px 0 0; font-size: 1.1rem; font-weight: 600; }
.emo-helps, .emo-stories { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.emo-help {
    display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; font: inherit; font-size: 1.1rem; font-weight: 700; color: #1F2328; text-align: left; cursor: pointer;
    background: rgba(255, 255, 255, 0.85); border: 2px solid var(--edge); border-radius: 14px;
}
.emo-help:hover { border-color: var(--accent); }
.emo-help span { font-size: 1.6rem; }
.emo-story { margin: 6px 0; padding: 18px; text-align: center; font-size: 1.5rem; font-weight: 800; background: var(--surface); border: 2px solid var(--edge); border-radius: var(--radius); }
.emo [data-hear] { display: block; margin: 0 auto 8px; }
@media (prefers-reduced-motion: reduce) { .emo-pick.is-wrong { animation: none; } }

/* ---------- Sounds ---------- */
.snd { max-width: 920px; margin: 0 auto; }
.snd [hidden] { display: none; }
.snd-groups { margin: 0 0 14px; padding: 0; border: 0; justify-content: center; }
.snd-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.snd-card {
    display: grid; justify-items: center; gap: 6px; padding: 14px 8px; font: inherit; color: #1F2328; cursor: pointer;
    border: 4px solid var(--edge); border-radius: 20px;
}
.snd-card:hover { border-color: var(--accent); }
.snd-card:active { transform: scale(0.97); }
.snd-pic { font-size: 3.6rem; line-height: 1; display: grid; place-items: center; }
.snd-pic img { width: 4rem; height: 4rem; object-fit: contain; }
.snd-now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 18px; padding: 16px 20px; border: 4px solid #1F2328; border-radius: 22px; }
.snd-now-pic { font-size: 4.4rem; line-height: 1; display: grid; place-items: center; }
.snd-now-pic img { width: 5rem; height: 5rem; object-fit: contain; }
.snd-now > div { flex: 1; min-width: 160px; }
.snd-now-sound { margin: 0; font-size: 2.2rem; text-transform: capitalize; }
.snd-now p { margin: 4px 0 0; font-size: 1.1rem; font-weight: 600; }
.snd-listen {
    display: grid; justify-items: center; gap: 2px; margin: 8px auto 12px; padding: 18px 34px; font: inherit; color: var(--accent-ink); cursor: pointer;
    background: var(--accent); border: 0; border-radius: 28px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18);
}
.snd-listen span { font-size: 3rem; line-height: 1; }
.snd-listen strong { font-size: 1.2rem; }
.snd-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.snd-option { display: grid; place-items: center; min-height: 130px; padding: 10px; font: inherit; cursor: pointer; border: 4px solid var(--edge); border-radius: 20px; }
.snd-option:hover:not(:disabled) { border-color: var(--accent); }
.snd-option:disabled { cursor: default; }
.snd-option.is-right { border-color: #2F8F4F; box-shadow: 0 0 0 4px #C8F0C8; }
.snd-option.is-wrong { border-color: #B3261E; box-shadow: 0 0 0 4px #FDE2E0; animation: dd-shake 0.45s; }
.snd-option .snd-pic { font-size: 4.4rem; }
.snd-option .snd-pic img { width: 5rem; height: 5rem; }
@media (prefers-reduced-motion: reduce) { .snd-option.is-wrong { animation: none; } .snd-card:active { transform: none; } }

/* Emotions: Guess (a big face on the right, all the words on the left) */
.emo-wg { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.emo-wg[hidden] { display: none; }
.emo-wg-words { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.emo-word {
    padding: 14px 8px; font: inherit; font-size: 1.2rem; font-weight: 800; color: #1F2328; cursor: pointer;
    background: var(--surface); border: 3px solid var(--edge); border-radius: 16px;
}
.emo-word:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.emo-word:disabled { cursor: default; }
.emo-word.is-right { background: #C8F0C8; border-color: #2F8F4F; }
.emo-word.is-wrong { background: #FFC4C4; border-color: #B3261E; animation: dd-shake 0.45s; }
.emo-wg-face { display: grid; place-items: center; min-height: 280px; aspect-ratio: 1; border: 4px solid var(--edge); border-radius: 26px; }
.emo-wg-emoji { font-size: clamp(8rem, 24vw, 13rem); line-height: 1; display: grid; place-items: center; }
.emo-wg-emoji img { width: clamp(9rem, 26vw, 14rem); height: clamp(9rem, 26vw, 14rem); object-fit: contain; }
@media (max-width: 640px) {
    .emo-wg { grid-template-columns: minmax(0, 1fr); }
    .emo-wg-face { order: -1; min-height: 220px; aspect-ratio: auto; }
}
@media (prefers-reduced-motion: reduce) { .emo-word.is-wrong { animation: none; } }
/* Guess: the picture on the left, the words to choose from on the right. */
.emo-wg-face { order: -1; }

/* ---------- Letters & Numbers ---------- */
.ln { max-width: 760px; margin: 0 auto; }
.ln [hidden] { display: none; }
.ln-sample { font-size: 2.2rem; font-weight: 800; line-height: 1.1; font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", "Segoe UI", sans-serif; }
.ln-board { display: grid; place-items: center; }
.ln-board .trace-wrap { max-width: 420px; }
.ln .trace-stars { text-align: center; min-height: 2rem; margin: 6px 0; font-size: 1.6rem; }
.ln-slot-row { display: grid; place-items: center; margin: 8px 0 16px; }
.ln-slot {
    display: grid; place-items: center; width: 190px; height: 190px; font: inherit; color: #1F2328; cursor: pointer;
    background: #fff; border: 5px dashed var(--edge-strong, #c9c3b6); border-radius: 26px;
}
.ln-slot.is-over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.04); }
.ln-slot.is-wrong { border-color: #B3261E; animation: dd-shake 0.45s; }
.ln-slot.is-right { border-style: solid; border-color: #2F8F4F; background: #C8F0C8; cursor: default; }
.ln-glyph { font-size: 7rem; font-weight: 800; line-height: 1; font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", "Segoe UI", sans-serif; }
.ln-tray { gap: 16px; }
.ln-piece { min-width: 96px; min-height: 96px; font-size: 3.4rem; font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", "Segoe UI", sans-serif; }
@media (prefers-reduced-motion: reduce) { .ln-slot.is-wrong { animation: none; } .ln-slot.is-over { transform: none; } }

/* Letters & Numbers: the whole set */
.ln-board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; margin: 12px 0 16px; }
.ln-bslot {
    display: grid; place-items: center; aspect-ratio: 1; padding: 0; font: inherit; cursor: pointer;
    background: #fff; border: 3px dashed var(--edge-strong, #c9c3b6); border-radius: 14px;
}
.ln-hint, .ln-cell { font-size: 2rem; font-weight: 800; line-height: 1; font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", "Segoe UI", sans-serif; }
.ln-hint { color: #C9CED6; }
.ln-board-grid.no-hints .ln-hint { visibility: hidden; }
.ln-bslot.is-over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.06); }
.ln-bslot.is-wrong { border-color: #B3261E; animation: dd-shake 0.45s; }
.ln-bslot.is-done { border-style: solid; border-color: #2F8F4F; background: #C8F0C8; cursor: default; }
.ln-cell { color: #1F2328; }
.ln-bslot.is-now { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.12); box-shadow: 0 0 0 4px var(--accent-soft); }
.ln-bslot.is-now .ln-hint { color: var(--accent); }
.ln-piece.ln-small { min-width: 64px; min-height: 64px; padding: 6px 10px; font-size: 2.2rem; }
@media (max-width: 520px) { .ln-board-grid { grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 6px; } .ln-hint, .ln-cell { font-size: 1.6rem; } }
@media (prefers-reduced-motion: reduce) { .ln-bslot.is-wrong { animation: none; } .ln-bslot.is-over { transform: none; } }
/* ---------- Connect Me ---------- */
.cn { max-width: 820px; margin: 0 auto; }
.cn [hidden] { display: none; }
.cn-kinds { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cn-board { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(70px, 22vw, 200px); padding: 8px 16px; user-select: none; -webkit-user-select: none; }
.cn-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 2; }
.cn-col { display: grid; gap: 14px; align-content: start; }
.cn-item {
    position: relative; display: grid; place-items: center; min-height: 96px; padding: 8px 14px; color: #1F2328; cursor: pointer;
    border: 4px solid var(--edge); border-radius: 20px; touch-action: none;
}
.cn-item:focus-visible { outline: 4px solid var(--accent); outline-offset: 2px; }
.cn-item:hover:not(.is-done) { border-color: var(--accent); }
.cn-item.is-picked, .cn-item.is-from { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.cn-item.is-over { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); transform: scale(1.03); }
.cn-item.is-wrong { border-color: #B3261E; animation: dd-shake 0.45s; }
.cn-item.is-done { border-color: #2F8F4F; cursor: default; }
.cn-face { display: grid; place-items: center; }
.cn-pic { font-size: 3.4rem; line-height: 1; }
.cn-pic img { width: 3.8rem; height: 3.8rem; object-fit: contain; }
.cn-pic .flash-dot { width: 3.2rem; height: 3.2rem; }
.cn-pic .flash-text { font-size: 3.4rem; }
.cn-word { font-size: 1.5rem; font-weight: 800; text-align: center; overflow-wrap: anywhere; }
/* The matching picture without colors, or only its shadow, so it is not obvious. */
.cn-pic.is-grey { filter: grayscale(1) contrast(0.9); }
.cn-pic.is-shadow { filter: brightness(0) opacity(0.78); }
.cn-dot { position: absolute; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: #fff; border: 4px solid #64748B; }
.cn-left .cn-dot { right: -12px; }
.cn-right .cn-dot { left: -12px; }
.cn-item.is-from .cn-dot, .cn-item.is-picked .cn-dot { background: var(--accent); border-color: var(--accent); }
.cn-item.is-done .cn-dot { background: #2F8F4F; border-color: #2F8F4F; }
.cn-line { stroke-width: 6; stroke-linecap: round; fill: none; }
.cn-line.is-right { stroke: #2F8F4F; }
.cn-line.is-drawing { stroke: var(--accent); stroke-dasharray: 2 10; }
.cn-line.is-wrong { stroke: #B3261E; }
@media (max-width: 520px) {
    .cn-kinds { grid-template-columns: minmax(0, 1fr); }
    .cn-board { column-gap: 56px; padding: 6px 8px; }
    .cn-item { min-height: 76px; padding: 6px 8px; }
    .cn-pic { font-size: 2.6rem; } .cn-pic img { width: 3rem; height: 3rem; } .cn-word { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) { .cn-item.is-wrong { animation: none; } .cn-item.is-over { transform: none; } }

/* ---------- Rainbow ---------- */
.rb { max-width: 760px; margin: 0 auto; }
.rb [hidden] { display: none; }
.rb-ask { min-height: 1.4em; margin: 4px 0 8px; }
.rb-stage { display: grid; place-items: center; padding: 6px 0 2px; background: linear-gradient(#EAF4FF, #FFFFFF 80%); border: 2px solid var(--edge); border-radius: 24px; }
.rb-svg { width: 100%; max-width: 600px; height: auto; touch-action: manipulation; }
.rb-band { cursor: pointer; outline: none; transition: opacity 0.15s ease; }
.rb-arc { transition: stroke-opacity 0.15s ease; }
.rb-text { font-weight: 800; pointer-events: none; font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", "Segoe UI", sans-serif; }
.rb-band:hover .rb-arc, .rb-band:focus-visible .rb-arc { stroke-width: 29; }
.rb-band.is-on .rb-arc { stroke-width: 31; filter: drop-shadow(0 0 5px rgba(31, 35, 40, 0.45)); }
.rb-band.is-dim { opacity: 0.22; }
.rb-band.is-target .rb-arc { stroke-width: 31; }
.rb-band.is-over .rb-arc { stroke: var(--accent); stroke-opacity: 0.8; stroke-width: 31; }
.rb-band.is-empty .rb-arc { stroke-dasharray: 8 6; }
.rb-band.is-wrong .rb-arc { stroke: #B3261E; stroke-opacity: 1; stroke-width: 31; }
.rb-svg.is-quiz .rb-band { cursor: pointer; }
.rb-now { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 14px 0 4px; }
.rb-now-dot { width: 40px; height: 40px; border-radius: 50%; border: 4px solid rgba(31, 35, 40, 0.35); }
.rb-now-name { font-size: 2.2rem; }
.rb-tray { gap: 10px; }
.rb-chip {
    min-width: 92px; padding: 12px 16px; font: inherit; font-size: 1.15rem; font-weight: 800; cursor: grab; border: 3px solid rgba(31, 35, 40, 0.35); border-radius: 16px;
    box-shadow: 0 3px 0 rgba(0, 0, 0, 0.15); user-select: none; -webkit-user-select: none;
}
.rb-chip.is-dragging { opacity: 0.35; }
.rb-chip.is-selected { box-shadow: 0 0 0 5px var(--accent-soft); transform: translateY(-3px); }
.rb-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-top: 12px; }
.rb-option {
    padding: 16px 10px; font: inherit; font-size: 1.3rem; font-weight: 800; color: #1F2328; cursor: pointer;
    background: var(--surface); border: 3px solid var(--edge); border-radius: 16px;
}
.rb-option:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.rb-option:disabled { cursor: default; }
.rb-option.is-right { background: #C8F0C8; border-color: #2F8F4F; }
.rb-option.is-wrong { background: #FFC4C4; border-color: #B3261E; animation: dd-shake 0.45s; }
@media (prefers-reduced-motion: reduce) { .rb-option.is-wrong { animation: none; } .rb-band, .rb-arc { transition: none; } }
.rb-svg { overflow: visible; }

/* ---------- Animals ---------- */
.an { max-width: 940px; margin: 0 auto; }
.an [hidden] { display: none; }
.an-panels { display: grid; gap: 14px; }
.an-panel { padding: 14px 16px 16px; border: 4px solid rgba(31, 35, 40, 0.12); border-radius: 22px; }
.an-panel h2 { margin: 0; font-size: 1.4rem; }
.an-panel .muted { margin: 2px 0 10px; color: #3d4450; }
.an-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.an-card {
    position: relative; display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; font: inherit; color: #1F2328; cursor: pointer;
    background: rgba(255, 255, 255, 0.85); border: 3px solid transparent; border-radius: 16px;
}
.an-card:hover { border-color: var(--accent); background: #fff; }
.an-pic { font-size: 2.8rem; line-height: 1; display: grid; place-items: center; }
.an-pic img { width: 3.2rem; height: 3.2rem; object-fit: contain; }
.an-name { font-size: 0.95rem; font-weight: 700; text-transform: capitalize; }
.an-badge { position: absolute; top: 3px; right: 4px; font-size: 0.7rem; line-height: 1; letter-spacing: -1px; }
.an-now { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; padding: 14px 18px; background: var(--surface); border: 4px solid #1F2328; border-radius: 22px; }
.an-now-pic { font-size: 4.4rem; line-height: 1; display: grid; place-items: center; }
.an-now-pic img { width: 5rem; height: 5rem; object-fit: contain; }
.an-now > div { flex: 1; min-width: 180px; }
.an-now-name { margin: 0; font-size: 2rem; text-transform: capitalize; }
.an-now p { margin: 4px 0 8px; font-size: 1.1rem; font-weight: 600; }
.an-now-homes { display: flex; flex-wrap: wrap; gap: 6px; }
.an-home-chip { padding: 4px 12px; border-radius: 999px; font-weight: 700; border: 2px solid rgba(31, 35, 40, 0.18); }
.an-question { margin: 4px 0 2px; }
.an-hint { text-align: center; margin: 0 0 10px; }
.an-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.an-choices-homes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.an-ask-pic { grid-column: 1 / -1; display: grid; place-items: center; font-size: 5.4rem; line-height: 1.1; }
.an-ask-pic img { width: 6.4rem; height: 6.4rem; object-fit: contain; }
.an-choice {
    position: relative; display: grid; justify-items: center; align-content: center; gap: 4px; min-height: 112px; padding: 10px 6px; font: inherit; color: #1F2328; cursor: pointer;
    background: var(--surface); border: 4px solid var(--edge); border-radius: 18px;
}
.an-choice strong { font-size: 1.05rem; text-transform: capitalize; }
.an-choices-homes .an-pic { font-size: 3.4rem; }
.an-choice:hover:not(:disabled) { border-color: var(--accent); }
.an-choice.is-picked { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.an-choice.is-picked .an-tick::before { content: "✓"; }
.an-tick { position: absolute; top: 6px; right: 8px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #94A3B8; background: #fff; font-weight: 800; font-size: 0.9rem; color: #fff; }
.an-choice.is-picked .an-tick { background: var(--accent); border-color: var(--accent); }
.an-choice:disabled { cursor: default; }
.an-choice.is-right { border-color: #2F8F4F; background: #C8F0C8; }
.an-choice.is-right .an-tick { background: #2F8F4F; border-color: #2F8F4F; }
.an-choice.is-wrong { border-color: #B3261E; background: #FFC4C4; }
.an-choice.is-wrong .an-tick { background: #B3261E; border-color: #B3261E; }
.an-choice.is-wrong .an-tick::before { content: "✕"; }
.an-choice.is-missed { border-color: #2F8F4F; border-style: dashed; }
@media (max-width: 480px) { .an-choices-homes { grid-template-columns: repeat(3, minmax(0, 1fr)); } .an-choice { min-height: 96px; } }

/* Learn: the card for the tapped animal stays in view at the top while scrolling. */
.an-now { position: sticky; top: 64px; z-index: 5; margin: 0 0 14px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }

/* Animals: pick the sea, the land or the air; big animals; pictures of the places in the quiz */
.an-places { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.an-place {
    display: grid; gap: 8px; padding: 10px 10px 14px; font: inherit; color: #1F2328; text-align: center; cursor: pointer;
    background: var(--surface); border: 4px solid var(--edge); border-radius: 24px;
}
.an-place:hover, .an-place:focus-visible { border-color: var(--accent); transform: translateY(-4px); box-shadow: var(--shadow-pop); }
.an-place strong { font-size: 1.6rem; }
.an-scene { display: block; overflow: hidden; border-radius: 16px; line-height: 0; }
.an-scene svg { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; }
.an-scene-small svg { aspect-ratio: 3 / 2; }
.an-place-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.an-place-title { margin: 0; font-size: 1.8rem; }
.an-big-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.an-big-card {
    position: relative; display: grid; justify-items: center; gap: 4px; padding: 16px 8px 12px; font: inherit; color: #1F2328; cursor: pointer;
    border: 4px solid rgba(31, 35, 40, 0.1); border-radius: 22px;
}
.an-big-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.an-big-pic { font-size: 6rem; line-height: 1; display: grid; place-items: center; }
.an-big-pic img { width: 7rem; height: 7rem; object-fit: contain; }
.an-big-name { font-size: 1.25rem; font-weight: 800; text-transform: capitalize; }
.an-big-card .an-badge { font-size: 0.95rem; top: 8px; right: 10px; }
.an-scene-banner { max-width: 340px; margin: 4px auto 10px; border: 4px solid var(--edge); border-radius: 22px; overflow: hidden; line-height: 0; }
.an-scene-banner[hidden] { display: none; }
.an-scene-banner svg { display: block; width: 100%; height: auto; aspect-ratio: 5 / 3; }
.an-choice-home { padding: 8px; gap: 6px; }
.an-choice-home .an-scene { width: 100%; }
.an-choice-home strong { font-size: 1.15rem; }
.an-choices-homes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.an-choice-home .an-tick { top: 14px; right: 14px; }
@media (max-width: 600px) {
    .an-places { grid-template-columns: minmax(0, 1fr); }
    .an-place { grid-template-columns: 120px 1fr; text-align: left; align-items: center; }
    .an-place .an-scene { grid-row: span 2; }
    .an-big-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
    .an-big-pic { font-size: 4.6rem; } .an-big-pic img { width: 5.4rem; height: 5.4rem; }
}
@media (prefers-reduced-motion: reduce) { .an-place:hover, .an-big-card:hover { transform: none; } }

/* ---------- Routine Steps ---------- */
.rs { max-width: 780px; margin: 0 auto; }
.rs [hidden] { display: none; }
.rs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.rs-card {
    display: grid; justify-items: center; gap: 4px; padding: 18px 8px 14px; font: inherit; color: #1F2328; cursor: pointer;
    border: 4px solid rgba(31, 35, 40, 0.1); border-radius: 22px;
}
.rs-card:hover, .rs-card:focus-visible { border-color: var(--accent); transform: translateY(-3px); }
.rs-card strong { font-size: 1.15rem; text-align: center; }
.rs-card-pic { font-size: 3.6rem; line-height: 1; display: grid; place-items: center; }
.rs-card-pic img { width: 4.2rem; height: 4.2rem; object-fit: contain; }
.rs-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.rs-bar .sched-tabs { margin-left: auto; }
.rs-progress { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.rs-step { display: grid; justify-items: center; gap: 6px; padding: 18px 16px 20px; text-align: center; border: 4px solid rgba(31, 35, 40, 0.12); border-radius: 26px; }
.rs-step-no { margin: 0; font-weight: 800; color: #3d4450; }
.rs-step-pic { font-size: clamp(7rem, 26vw, 11rem); line-height: 1.05; display: grid; place-items: center; }
.rs-step-pic img { width: clamp(8rem, 28vw, 12rem); height: clamp(8rem, 28vw, 12rem); object-fit: contain; }
.rs-step-text { margin: 4px 0 0; font-size: clamp(1.6rem, 5vw, 2.4rem); font-weight: 800; line-height: 1.2; }
.rs-timer { display: grid; justify-items: center; gap: 8px; margin-top: 10px; }
.rs-ring {
    --p: 0; display: grid; place-items: center; width: 130px; height: 130px; border-radius: 50%;
    background: radial-gradient(closest-side, #fff 76%, transparent 78%), conic-gradient(var(--accent) calc(var(--p) * 1%), #DDE3EA 0);
    font-size: 1.7rem; font-weight: 800; color: #1F2328;
}
.rs-ring.is-done { background: radial-gradient(closest-side, #C8F0C8 76%, transparent 78%), conic-gradient(#2F8F4F 100%, #2F8F4F 0); }
.rs .flash-controls { margin: 16px 0 4px; }
.rs-done { min-width: 160px; padding: 14px 24px; font-size: 1.2rem; }
.rs-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rs-row {
    display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: 14px; width: 100%; padding: 10px 16px; font: inherit; color: #1F2328; text-align: left; cursor: pointer;
    border: 4px solid rgba(31, 35, 40, 0.1); border-radius: 18px;
}
.rs-row:hover { border-color: var(--accent); }
.rs-row.is-done { background: #E5F6E8; border-color: #2F8F4F; }
.rs-row.is-done .rs-row-text { text-decoration: line-through; opacity: 0.7; }
.rs-row-no { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(255, 255, 255, 0.8); font-weight: 800; }
.rs-row-pic { font-size: 2.8rem; line-height: 1; display: grid; place-items: center; min-width: 3.4rem; }
.rs-row-pic img { width: 3.4rem; height: 3.4rem; object-fit: contain; }
.rs-row-text { font-size: 1.3rem; font-weight: 700; }
.rs-row-tick { font-size: 1.6rem; min-width: 1.8rem; text-align: center; }
@media (max-width: 520px) { .rs-bar .sched-tabs { margin-left: 0; } .rs-row { gap: 10px; padding: 8px 10px; } .rs-row-text { font-size: 1.1rem; } }
@media (prefers-reduced-motion: reduce) { .rs-card:hover { transform: none; } }

/* Routine Steps: the printed poster */
.rs-print { display: none; }
@media print {
    @page { margin: 0.5in; }
    .topbar, .sidebar, .flash, .rs > header, .rs > section { display: none !important; }
    body, .page { background: #fff !important; }
    .with-sidebar .page, .with-topbar .page { margin: 0 !important; padding: 0 !important; max-width: none !important; }
    .rs-print { display: block; }
    .rs-print-title { margin: 0; text-align: center; font-size: 34pt; }
    .rs-print-sub { margin: 4pt 0 14pt; text-align: center; font-size: 13pt; color: #444; }
    .rs-print-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16pt; }
    .rs-print-grid.is-many { gap: 12pt; }
    .rs-print-grid li {
        position: relative; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 12pt; align-items: center;
        padding: 14pt 14pt; border: 2.5pt solid #333; border-radius: 14pt; break-inside: avoid; -webkit-print-color-adjust: exact; print-color-adjust: exact;
    }
    .rs-print-no { position: absolute; top: -8pt; left: -8pt; display: grid; place-items: center; width: 24pt; height: 24pt; border-radius: 50%; background: #1F2328; color: #fff; font-weight: 800; font-size: 13pt; }
    .rs-print-pic { grid-row: span 2; font-size: 58pt; line-height: 1; display: grid; place-items: center; min-width: 72pt; }
    .rs-print-pic img { width: 72pt; height: 72pt; object-fit: contain; }
    .rs-print-text { font-size: 19pt; font-weight: 800; line-height: 1.15; }
    .rs-print-box { justify-self: start; margin-top: 7pt; width: 24pt; height: 24pt; border: 2.5pt solid #333; border-radius: 6pt; background: #fff; }
}
/* ---------- Baskets ---------- */
.bk { max-width: 920px; margin: 0 auto; }
.bk [hidden] { display: none; }
.bk-own { margin-top: 10px; padding: 10px 12px; border: 1px dashed var(--edge); border-radius: var(--radius-sm); background: var(--surface-2); }
.bk-baskets { display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); gap: 16px; margin: 6px 0 16px; }
.bk-basket {
    position: relative; display: grid; justify-items: center; align-content: end; gap: 2px; min-height: 220px; padding: 6px 6px 12px; font: inherit; color: #1F2328; cursor: pointer;
    background: #FBF7EE; border: 4px dashed var(--edge-strong, #cdbf9f); border-radius: 24px;
}
.bk-basket.is-over { border-style: solid; border-color: var(--accent); background: var(--accent-soft); transform: scale(1.03); }
.bk-basket.is-wrong { border-color: #B3261E; animation: dd-shake 0.45s; }
.bk-contents { display: flex; flex-wrap: wrap; justify-content: center; align-content: flex-end; gap: 2px; width: 90%; min-height: 70px; margin-bottom: -26px; position: relative; z-index: 1; }
.bk-mini { display: grid; place-items: center; width: 40px; height: 40px; font-size: 1.8rem; line-height: 1; }
.bk-mini img { width: 2.3rem; height: 2.3rem; object-fit: contain; }
.bk-mini .flash-dot { width: 1.8rem; height: 1.8rem; }
.bk-mini .flash-text { font-size: 1.6rem; }
.bk-art { display: block; width: min(170px, 80%); line-height: 0; position: relative; z-index: 2; }
.bk-art svg { display: block; width: 100%; height: auto; }
.bk-name { font-size: 1.2rem; text-align: center; margin-top: 4px; }
.bk-count { position: absolute; top: 8px; right: 10px; display: grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 999px; background: #1F2328; color: #fff; font-weight: 800; font-size: 0.9rem; }
.bk-tray { gap: 12px; }
.bk-item {
    display: grid; justify-items: center; gap: 2px; width: clamp(92px, 20vw, 118px); padding: 8px 4px 6px; font: inherit; color: #1F2328; cursor: grab;
    border: 3px solid rgba(31, 35, 40, 0.18); border-radius: 18px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.12); user-select: none; -webkit-user-select: none;
}
.bk-item:active { cursor: grabbing; }
.bk-item.is-dragging { opacity: 0.35; }
.bk-item.is-selected { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); transform: translateY(-3px); }
.bk-pic { font-size: 3rem; line-height: 1; display: grid; place-items: center; }
.bk-pic img { width: 3.4rem; height: 3.4rem; object-fit: contain; }
.bk-pic .flash-dot { width: 3rem; height: 3rem; }
.bk-pic .flash-text { font-size: 2.8rem; }
.bk-label { font-size: 0.95rem; font-weight: 700; text-align: center; overflow-wrap: anywhere; }
@media (max-width: 560px) { .bk-baskets { gap: 8px; } .bk-basket { min-height: 190px; } .bk-name { font-size: 0.95rem; } .bk-mini { width: 32px; height: 32px; font-size: 1.5rem; } .bk-mini img { width: 1.9rem; height: 1.9rem; } }
@media (prefers-reduced-motion: reduce) { .bk-basket.is-wrong { animation: none; } .bk-basket.is-over { transform: none; } }

/* ---------- Puzzle ---------- */
.pz { max-width: 820px; margin: 0 auto; --cell-w: 100px; --cell-h: 100px; }
.pz [hidden] { display: none; }
.pz-board-wrap { display: grid; place-items: center; margin: 4px 0 14px; }
.pz-board {
    display: grid; gap: 3px; width: min(460px, 100%); padding: 6px; background: #E9E4D8; border: 4px solid var(--edge); border-radius: 22px;
    transition: gap 0.3s ease, padding 0.3s ease;
}
.pz-slot {
    position: relative; min-width: 0; min-height: 0; padding: 0; border: 2px dashed rgba(31, 35, 40, 0.3); border-radius: 8px; background-color: #fff; cursor: pointer; overflow: hidden;
}
/* The hint: the same slice, faded. */
.pz-slot:not(.is-done)::after { content: ""; position: absolute; inset: 0; background: rgba(255, 255, 255, 0.84); }
.pz-board.no-hints .pz-slot:not(.is-done)::after { background: #fff; }
.pz-slot.is-over { border-color: var(--accent); border-style: solid; box-shadow: inset 0 0 0 4px var(--accent-soft); }
.pz-slot.is-over::after { background: var(--accent-soft) !important; }
.pz-slot.is-wrong { border-color: #B3261E; border-style: solid; animation: dd-shake 0.45s; }
.pz-slot.is-done { border: 2px solid rgba(31, 35, 40, 0.12); cursor: default; }
.pz-board.is-whole { gap: 0; padding: 6px; }
.pz-board.is-whole .pz-slot { border-color: transparent; border-radius: 0; }
.pz-tray { gap: 10px; justify-content: center; }
.pz-piece {
    flex: none; width: var(--cell-w); height: var(--cell-h); padding: 0; cursor: grab; touch-action: none;
    border: 3px solid #fff; border-radius: 10px; box-shadow: 0 3px 0 rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(31, 35, 40, 0.25); background-color: #fff;
    user-select: none; -webkit-user-select: none;
}
.pz-piece:active { cursor: grabbing; }
.pz-piece.is-dragging { opacity: 0.35; }
.pz-piece.is-selected { outline: 4px solid var(--accent); outline-offset: 2px; transform: translateY(-3px); }
.pz-piece.drag-ghost { background-repeat: no-repeat; }
@media (prefers-reduced-motion: reduce) { .pz-slot.is-wrong { animation: none; } .pz-board { transition: none; } }

.pz-word { margin: 0 0 6px; font-size: clamp(2.4rem, 8vw, 3.6rem); font-weight: 800; line-height: 1.1; text-transform: capitalize; color: var(--accent, #2E6B4A); }

.body-use { max-width: 560px; margin: 0 auto 12px; padding: 12px 16px; text-align: center; background: #fff; border: 2px solid var(--edge); border-radius: 16px; }
.body-use-name { margin: 0; font-size: 1.4rem; font-weight: 800; text-transform: capitalize; }
.body-use-text { margin: 4px 0 0; font-size: 1.1rem; }

/* ---------- Taste ---------- */
.tst { max-width: 920px; margin: 0 auto; }
.tst [hidden] { display: none; }
.tst-tastes { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tst-taste, .tst-option { display: grid; place-items: center; gap: 4px; padding: 14px 8px; font: inherit; cursor: pointer; border: 4px solid var(--edge); border-radius: 20px; }
.tst-taste span, .tst-option span { font-size: 3.4rem; line-height: 1; }
.tst-taste strong, .tst-option strong { font-size: 1.15rem; }
.tst-taste.active, .tst-taste:hover, .tst-option:hover:not(:disabled) { border-color: var(--accent); }
.tst-now { padding: 16px 20px; border: 4px solid #1F2328; border-radius: 22px; }
.tst-now h2 { margin: 0; font-size: 2rem; }
.tst-now p { margin: 4px 0 12px; font-size: 1.15rem; font-weight: 600; }
.tst-foods { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; }
.tst-food { display: grid; place-items: center; gap: 2px; padding: 10px 6px; font: inherit; cursor: pointer; border: 3px solid var(--edge); border-radius: 16px; }
.tst-food span { font-size: 2.8rem; line-height: 1; }
.tst-food strong { font-size: 0.95rem; text-transform: capitalize; text-align: center; }
.tst-food:hover { border-color: var(--accent); }
.tst-food-big { display: grid; place-items: center; gap: 4px; margin: 8px auto 12px; padding: 14px; max-width: 260px; background: #fff; border: 4px solid var(--edge); border-radius: 24px; }
.tst-food-big span { font-size: 6rem; line-height: 1; }
.tst-food-big strong { font-size: 1.5rem; text-transform: capitalize; }
.tst-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.tst-option:disabled { cursor: default; }
.tst-option.is-right { border-color: #2F8F4F; box-shadow: 0 0 0 4px #C8F0C8; }
.tst-option.is-wrong { border-color: #B3261E; box-shadow: 0 0 0 4px #FDE2E0; animation: dd-shake 0.45s; }
.tst-all { margin-bottom: 14px; }
.tst-food.is-like { box-shadow: 0 0 0 4px #C8F0C8; border-color: #2F8F4F; }
.tst-food.is-maybe { box-shadow: 0 0 0 4px #FFF2A8; border-color: #C9A400; }
.tst-food.is-no { box-shadow: 0 0 0 4px #FDE2E0; border-color: #B3261E; opacity: 0.8; }
.tst-ask { margin: 0 0 14px; padding: 14px; text-align: center; background: #fff; border: 4px solid var(--accent); border-radius: 20px; }
.tst-ask-food { margin: 0 0 8px; font-size: 1.6rem; }
.tst-ask-food span { font-size: 2.6rem; }
.tst-summary { display: grid; gap: 8px; margin-bottom: 12px; }
.tst-sum { display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 10px 14px; border-radius: 14px; cursor: pointer; text-transform: capitalize; }
.tst-sum-like { background: #E4F6E4; }
.tst-sum-maybe { background: #FFF7CC; }
.tst-sum-no { background: #FDE9E7; }
@media (prefers-reduced-motion: reduce) { .tst-option.is-wrong { animation: none; } }

/* ---------- Time ---------- */
.tm { max-width: 760px; margin: 0 auto; }
.tm [hidden] { display: none; }
.tm-stage { display: grid; place-items: center; gap: 6px; margin-bottom: 14px; }
.tm-clock { width: min(340px, 86vw); height: auto; }
.tm-digital { font-size: 2.8rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.tm-words { margin: 0; font-size: 1.3rem; font-weight: 600; text-transform: capitalize; }
.tm-move { display: grid; gap: 10px; justify-items: center; margin-bottom: 12px; }
.tm-row { display: flex; align-items: center; gap: 10px; }
.tm-row span { min-width: 72px; font-weight: 800; }
.tm-row .btn { min-width: 56px; font-size: 1.4rem; }
.tm-quick { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.tm-task strong { font-size: 1.3rem; }
.tm-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 10px; }
.tm-option { padding: 16px 8px; font: inherit; font-size: 2rem; font-weight: 800; cursor: pointer; background: #fff; border: 4px solid var(--edge); border-radius: 20px; }
.tm-option:hover:not(:disabled) { border-color: var(--accent); }
.tm-option:disabled { cursor: default; }
.tm-option.is-right { border-color: #2F8F4F; box-shadow: 0 0 0 4px #C8F0C8; }
.tm-option.is-wrong { border-color: #B3261E; box-shadow: 0 0 0 4px #FDE2E0; animation: dd-shake 0.45s; }
.tm-day { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.tm-daybox { display: grid; place-items: center; gap: 4px; padding: 18px 8px; font: inherit; cursor: pointer; border: 4px solid var(--edge); border-radius: 20px; }
.tm-daybox span { font-size: 3.6rem; line-height: 1; }
.tm-daybox strong { font-size: 1.2rem; }
.tm-daybox:hover { border-color: var(--accent); }
.tm-now { padding: 16px 20px; border: 4px solid #1F2328; border-radius: 22px; }
.tm-now h2 { margin: 0; font-size: 1.8rem; }
.tm-now p { margin: 4px 0 0; font-size: 1.2rem; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .tm-option.is-wrong { animation: none; } }

/* ---------- Skills and calm apps (shared) ---------- */
.sk { max-width: 920px; margin: 0 auto; }
.sk [hidden] { display: none !important; }
.sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin-bottom: 14px; }
.sk-grid.sk-big { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.sk-tile { display: grid; place-items: center; align-content: center; gap: 4px; min-height: 120px; padding: 12px 8px; font: inherit; text-align: center; cursor: pointer; background: #fff; border: 4px solid var(--edge); border-radius: 20px; }
.sk-tile:hover { border-color: var(--accent); }
.sk-tile:active { transform: scale(0.97); }
.sk-tile.is-on { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sk-tile-pic { font-size: 3.4rem; line-height: 1; }
.sk-big .sk-tile-pic { font-size: 5.4rem; }
.sk-tile strong { font-size: 1.05rem; }
.sk-big .sk-tile strong { font-size: 1.4rem; }
.sk-panel { margin: 0 0 14px; padding: 16px 20px; background: #fff; border: 4px solid var(--edge); border-radius: 22px; }
.sk-panel h2 { margin: 0 0 6px; font-size: 1.6rem; }
.sk-panel p { margin: 4px 0; font-size: 1.15rem; font-weight: 600; }
.sk-center { text-align: center; }
.sk-bigpic { font-size: 7rem; line-height: 1.1; }
.sk-bigtext { margin: 6px 0 12px; font-size: 1.7rem; font-weight: 800; }
.sk-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 0 0 14px; }
.sk-row > label { font-weight: 800; }
.sk-chip { padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; background: #fff; border: 3px solid var(--edge); border-radius: 999px; }
.sk-chip.active, .sk-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.sk-input { padding: 10px 12px; font: inherit; background: #fff; border: 3px solid var(--edge); border-radius: 12px; }
.sk-input:focus { outline: none; border-color: var(--accent); }
.sk-dots { display: flex; justify-content: center; gap: 6px; margin: 6px 0 12px; }
.sk-dots i { width: 12px; height: 12px; border-radius: 50%; background: rgba(31, 35, 40, 0.18); }
.sk-dots i.on { background: var(--accent); }
.sk-options { display: grid; gap: 10px; margin: 10px 0; }
.sk-option { padding: 14px 16px; font: inherit; font-size: 1.15rem; font-weight: 700; text-align: left; cursor: pointer; background: #fff; border: 4px solid var(--edge); border-radius: 16px; }
.sk-option:hover:not(:disabled) { border-color: var(--accent); }
.sk-option:disabled { cursor: default; }
.sk-option.is-right { border-color: #2F8F4F; box-shadow: 0 0 0 4px #C8F0C8; }
.sk-option.is-wrong { border-color: #B3261E; box-shadow: 0 0 0 4px #FDE2E0; animation: dd-shake 0.45s; }
.sk-printarea { display: none; }
@media print {
    body * { visibility: hidden; }
    .sk-printarea, .sk-printarea * { visibility: visible; }
    .sk-printarea { display: block; position: absolute; left: 0; top: 0; width: 100%; padding: 16px; }
    .sk-printarea h1 { margin: 0 0 12px; }
    .sk-printarea ol { padding-left: 24px; font-size: 1.3rem; }
    .sk-printarea li { margin: 0 0 10px; break-inside: avoid; }
}
@media (prefers-reduced-motion: reduce) { .sk-option.is-wrong { animation: none; } .sk-tile:active { transform: none; } }

/* Choice */
.sk-choice-now { text-align: center; }

/* Timer */
.tmr-face { display: grid; place-items: center; gap: 8px; margin: 6px 0 14px; }
.tmr-svg { width: min(340px, 84vw); height: auto; }
.tmr-time { font-size: 3rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Transitions */
.trn-card { display: grid; place-items: center; gap: 4px; padding: 20px; border: 6px solid var(--edge); border-radius: 26px; text-align: center; transition: background 0.4s; }
.trn-card .sk-bigpic { font-size: 6rem; }
.trn-steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.trn-steps span { padding: 6px 12px; font-weight: 800; border-radius: 999px; background: rgba(31, 35, 40, 0.08); }
.trn-steps span.on { background: #1F2328; color: #fff; }

/* Turns */
.trn2-card { display: grid; place-items: center; gap: 6px; padding: 26px 16px; border: 6px solid var(--edge); border-radius: 28px; text-align: center; }
.trn2-card .sk-bigpic { font-size: 6rem; }
.trn2-name { margin: 0; font-size: 2.4rem; font-weight: 800; }
.trn2-wait { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 10px 0; }
.trn2-wait span { padding: 8px 14px; font-weight: 700; border-radius: 999px; border: 3px dashed var(--edge); }

/* Thermometer */
.thm { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 16px; align-items: stretch; }
.thm-levels { display: flex; flex-direction: column-reverse; gap: 6px; }
.thm-level { display: flex; align-items: center; gap: 10px; padding: 12px; font: inherit; font-weight: 800; text-align: left; cursor: pointer; border: 4px solid var(--edge); border-radius: 16px; flex: 1; }
.thm-level span { font-size: 2.2rem; line-height: 1; }
.thm-level.is-on { border-color: #1F2328; box-shadow: 0 0 0 4px rgba(31, 35, 40, 0.2); }
@media (max-width: 600px) { .thm { grid-template-columns: 1fr; } }

/* Calm */
.clm-stage { display: grid; place-items: center; gap: 8px; min-height: 340px; }
.clm-bubble { width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #A8D8F5 60%, #6FB3E0); box-shadow: 0 0 40px rgba(111, 179, 224, 0.6); transition-property: transform; transition-timing-function: ease-in-out; transform: scale(1); }
.clm-word { margin: 0; font-size: 2rem; font-weight: 800; min-height: 2.4rem; }
.clm-drift { position: relative; height: 340px; overflow: hidden; border-radius: 22px; background: linear-gradient(180deg, #CFE8FF, #E6DCFF); }
.clm-drift i { position: absolute; bottom: -80px; border-radius: 50%; background: rgba(255, 255, 255, 0.55); animation: clm-rise linear infinite; }
@keyframes clm-rise { to { transform: translateY(-460px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .clm-drift i { animation: none; bottom: 40%; } }

/* Sensory */
.sns-ring { width: 180px; height: 180px; margin: 6px auto; border-radius: 50%; display: grid; place-items: center; font-size: 3rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* Plan */
.pln-list { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.pln-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 3px solid var(--edge); border-radius: 14px; font-weight: 700; font-size: 1.1rem; }
.pln-list li > span:first-child { font-size: 2rem; }
.pln-list li > span:nth-child(2) { flex: 1; }

/* Tokens */
.tok-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 10px 0 18px; }
.tok { width: 84px; height: 84px; display: grid; place-items: center; font-size: 3rem; cursor: pointer; background: #fff; border: 4px dashed var(--edge); border-radius: 50%; filter: grayscale(1); opacity: 0.45; transition: transform 0.25s; }
.tok.is-full { filter: none; opacity: 1; border-style: solid; background: #FFF4C2; transform: scale(1.05); }
.tok-goal { display: grid; place-items: center; gap: 4px; padding: 14px 20px; background: #E4F6E4; border: 4px solid #2F8F4F; border-radius: 22px; font-size: 1.4rem; font-weight: 800; text-align: center; }
.tok-goal span { font-size: 4rem; line-height: 1; }

/* About me */
.abm-form { display: grid; gap: 10px; margin-bottom: 14px; }
.abm-form label { display: grid; gap: 4px; font-weight: 800; }
.abm-form textarea, .abm-form input { width: 100%; }
.abm-card h2 { display: flex; gap: 8px; align-items: center; }
.abm-sec { margin: 0 0 10px; padding: 10px 14px; background: #fff; border: 3px solid var(--edge); border-radius: 14px; cursor: pointer; }
.abm-sec strong { display: block; font-size: 1.05rem; }
.abm-sec span { font-size: 1.15rem; white-space: pre-line; }

/* ---------- Shapes ---------- */
.sh [hidden] { display: none !important; }
.sh .trace-wrap { max-width: 420px; }
.sh .trace-wrap.is-wide { max-width: 640px; }
.sh .trace-stars { text-align: center; min-height: 2rem; margin: 6px 0; font-size: 1.6rem; }
.sh svg { display: block; width: 100%; height: 100%; }
.sh-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 12px; }
.sh-chip { width: 64px; height: 64px; padding: 8px; background: #fff; border: 3px solid var(--edge); border-radius: 16px; cursor: pointer; }
.sh-chip.is-line { width: 96px; height: 56px; }
.sh-chip:hover { border-color: var(--accent); }
.sh-chip.active { border-color: var(--accent); background: var(--accent-soft); }
.sh-learn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-bottom: 12px; }
.sh-tile-pic { width: 64px; height: 64px; display: block; }
.sh-tile-pic.is-line { width: 100px; height: 50px; }
.sh-detail { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: center; margin-top: 8px; }
.sh-detail-pic { width: 180px; height: 180px; }
.sh-detail-pic.is-line { width: 260px; height: 130px; }
.sh-detail-text { flex: 1; min-width: 240px; }
.sh-detail-text h2 { margin: 0 0 4px; font-size: 2rem; }
.sh-facts { margin: 0 0 8px; font-weight: 800; color: var(--accent); }
.sh-board { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin: 12px 0 16px; padding: 16px; background: var(--surface-2); border-radius: 20px; }
.sh-hole { width: 120px; height: 120px; padding: 12px; font: inherit; cursor: pointer; background: #fff; border: 4px solid var(--edge); border-radius: 20px; box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.12); }
.sh-hole.is-over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.05); }
.sh-hole.is-wrong { border-color: #B3261E; animation: dd-shake 0.45s; }
.sh-hole.is-done { border-color: #2F8F4F; background: #C8F0C8; cursor: default; box-shadow: none; }
.sh-tray { gap: 16px; }
.sh-piece { width: 100px; height: 100px; min-width: 0; padding: 10px; }
.sh-howmany .btn.active { border-color: var(--accent); background: var(--accent-soft); }
.sh-guess-stage { display: grid; justify-items: center; gap: 8px; margin-bottom: 12px; }
.sh-guess-pic { width: 180px; height: 180px; }
.sh-guess-pic.is-clue { display: grid; place-items: center; font-size: 6rem; line-height: 1; height: 120px; }
.sh-guess-clue { margin: 0; max-width: 460px; text-align: center; font-size: 1.3rem; font-weight: 700; }
.sh-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; max-width: 700px; margin: 0 auto 8px; }
.sh-choice { display: grid; place-items: center; gap: 6px; min-height: 80px; padding: 12px; font: inherit; color: #1F2328; background: #fff; border: 4px solid var(--edge); border-radius: 20px; cursor: pointer; }
.sh-choice strong { font-size: 1.5rem; }
.sh-choice-pic { width: 80px; height: 80px; display: block; }
.sh-choice:hover:not(:disabled) { border-color: var(--accent); }
.sh-choice.is-wrong { border-color: #B3261E; background: #FDE2E0; opacity: 0.7; animation: dd-shake 0.45s; }
.sh-choice.is-right { border-color: #2F8F4F; background: #C8F0C8; opacity: 1; }
@media (max-width: 520px) { .sh-hole { width: 96px; height: 96px; } .sh-piece { width: 84px; height: 84px; } .sh-detail-pic { width: 140px; height: 140px; } }
@media (prefers-reduced-motion: reduce) { .sh-hole.is-wrong, .sh-choice.is-wrong { animation: none; } .sh-hole.is-over { transform: none; } }

/* ---------- Learning apps: Counting, Patterns, Where Is It?, Sight Words, Money, Helpers, Weather (quizkit.js) ---------- */
.qk [hidden], .mu [hidden], .bb [hidden], .st [hidden], .wn [hidden] { display: none !important; }
.qk-stage { display: grid; place-items: center; min-height: 90px; margin: 0 0 14px; }
.qk-stage:empty { display: none; }
.qk-choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; max-width: 760px; margin: 0 auto 8px; }
.qk-choices.is-text { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.qk-choices .sk-tile { min-height: 110px; }
.qk-choices .sk-tile.is-right, .qk-choice.is-right, .qk-text.is-right { border-color: #2F8F4F; background: #C8F0C8; }
.qk-choices .is-wrong { border-color: #B3261E; background: #FDE2E0; opacity: 0.7; animation: dd-shake 0.45s; }
.qk-text { text-align: center; font-size: 1.5rem; }
.qk-choice { display: grid; place-items: center; gap: 4px; min-height: 110px; padding: 10px; font: inherit; color: #1F2328; cursor: pointer; background: #fff; border: 4px solid var(--edge); border-radius: 20px; }
.qk-choice:hover:not(:disabled) { border-color: var(--accent); }
.qk-extra { margin: 0 0 6px; }
.qk-extra:empty { display: none; }
.qk-group { display: block; max-width: 420px; font-size: 2.6rem; line-height: 1.25; letter-spacing: 0.08em; word-break: break-all; text-align: center; }
.qk-choice .qk-group { font-size: 1.7rem; }
.qk-num { font-size: 3.6rem; font-weight: 800; line-height: 1; font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", "Segoe UI", sans-serif; }
.qk-word { font-size: 2.6rem; font-weight: 800; line-height: 1.1; font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", "Segoe UI", sans-serif; }
.sk-tile .qk-word { font-size: 2rem; }
.qk-q { font-size: 4rem; line-height: 1; font-style: normal; }
.qk-bigemoji { font-size: 5.5rem; line-height: 1; }
.qk-seq { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; }
.qk-seq i { font-style: normal; font-size: 2.8rem; line-height: 1; padding: 4px 6px; background: #fff; border: 3px solid var(--edge); border-radius: 14px; }
.sk-tile .qk-seq i { font-size: 1.3rem; padding: 2px 3px; border-width: 2px; }
.qk-seq .qk-q { font-size: 2.8rem; border-style: dashed; }
.qk-scene { position: relative; display: block; width: 190px; height: 120px; background: #EAF3FF; border: 3px solid var(--edge); border-radius: 14px; overflow: hidden; }
.qk-choice .qk-scene { width: 150px; height: 96px; }
.sk-tile .qk-scene { width: 120px; height: 76px; }
.qk-prop { position: absolute; font-style: normal; font-size: 3rem; line-height: 1; }
.qk-choice .qk-prop { font-size: 2.3rem; }
.sk-tile .qk-prop { font-size: 1.9rem; }
.qk-pile { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
.qk-coin { display: grid; place-items: center; min-width: 56px; height: 56px; padding: 0 8px; font-weight: 800; font-size: 1.1rem; color: #5C4300; background: radial-gradient(circle at 35% 30%, #FFE680, #E0B000); border: 3px solid #B38600; border-radius: 50%; }
.qk-coin.is-note { min-width: 92px; height: 52px; border-radius: 8px; color: #14502A; background: linear-gradient(135deg, #DFF5DF, #9ED89E); border-color: #4C9A4C; }
.qk-shop { display: flex; gap: 14px; align-items: center; justify-content: center; font-size: 2rem; }
.qk-shop b { font-size: 2.2rem; }
.qk .sk-panel { max-width: 640px; margin-left: auto; margin-right: auto; }

/* Wants and Needs */
.wn-strip { max-width: 760px; margin-left: auto; margin-right: auto; }
.wn-pics { font-size: 3rem; min-height: 3.4rem; letter-spacing: 0.2em; }

/* Bubble Pop */
.bb-sky { position: relative; height: 440px; overflow: hidden; background: linear-gradient(#DDF1FF, #B7DEFA); border: 4px solid var(--edge); border-radius: 22px; touch-action: manipulation; }
.bb-bubble {
    position: absolute; bottom: 0; padding: 0; border: 0; cursor: pointer; border-radius: 50%;
    background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.95) 0 12%, rgba(255, 255, 255, 0.25) 13% 30%, var(--c) 78%);
    box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.6), 0 2px 6px rgba(0, 0, 0, 0.12); opacity: 0.9;
    transform: translateY(100%); animation: bb-rise var(--dur, 9s) linear forwards;
}
.bb-bubble.is-popping { animation: bb-pop 0.25s ease-out forwards; }
.bb-bubble.is-wobble { animation: dd-shake 0.45s, bb-rise var(--dur, 9s) linear forwards; }
.bb-sky.is-paused .bb-bubble { animation-play-state: paused; }
@keyframes bb-rise { from { transform: translateY(100%); } to { transform: translateY(calc(-1 * var(--rise, 500px))); } }
@keyframes bb-pop { to { transform: scale(1.5); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bb-bubble { animation-duration: 30s; } .bb-bubble.is-wobble { animation: bb-rise var(--dur, 9s) linear forwards; } }

/* Music and Rhythm */
.mu-pads { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; max-width: 640px; margin: 0 auto 14px; }
.mu-pad { display: grid; place-items: center; align-content: center; gap: 4px; aspect-ratio: 1 / 1.1; font: inherit; color: #fff; cursor: pointer; background: var(--c); border: 4px solid rgba(0, 0, 0, 0.18); border-radius: 22px; box-shadow: 0 5px 0 rgba(0, 0, 0, 0.2); touch-action: manipulation; user-select: none; -webkit-user-select: none; }
.mu-pad strong { font-size: 1.6rem; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.mu-key { font-size: 0.85rem; opacity: 0.85; font-weight: 700; }
.mu-pad:active, .mu-pad.is-lit { transform: translateY(4px) scale(0.97); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); filter: brightness(1.2); }
@media (max-width: 480px) { .mu-pads { gap: 8px; } .mu-pad strong { font-size: 1.2rem; } }

/* Sticker Scene */
.st-scene { position: relative; width: 100%; max-width: 760px; aspect-ratio: 4 / 3; margin: 0 auto 12px; overflow: hidden; border: 4px solid var(--edge); border-radius: 22px; touch-action: manipulation; }
.st-stk { position: absolute; transform: translate(-50%, -50%) scale(var(--s, 1)); font-size: clamp(2rem, 8vw, 3.4rem); line-height: 1; cursor: grab; user-select: none; -webkit-user-select: none; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); }
.st-stk[data-size="1"] { --s: 1; } .st-stk[data-size="2"] { --s: 1.5; } .st-stk[data-size="3"] { --s: 2.1; }
.st-stk.is-held { cursor: grabbing; z-index: 5; }
.st-stk.is-leaving { opacity: 0.4; }
.st-tray { gap: 10px; }
.st-pick { min-width: 0; min-height: 0; width: 72px; height: 72px; padding: 6px; font-size: 2.4rem; }
.st-ghost { position: fixed; z-index: 1000; pointer-events: none; transform: translate(-50%, -50%); font-size: 3.2rem; opacity: 0.9; }

/* Counting: put them in the basket */
.qk-put { display: grid; gap: 12px; justify-items: center; width: 100%; max-width: 640px; }
.qk-source, .qk-in { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-content: flex-start; }
.qk-source { width: 100%; min-height: 84px; padding: 12px; background: var(--surface-2); border: 2px dashed var(--edge); border-radius: 18px; }
.qk-home { width: 100%; min-height: 150px; padding: 10px 12px 14px; text-align: center; background: #FFF4DC; border: 4px dashed #C9A15A; border-radius: 22px; }
.qk-home-name { display: block; margin-bottom: 6px; font-weight: 800; font-size: 1.15rem; }
.qk-in { min-height: 64px; }
.qk-item { width: 64px; height: 64px; padding: 0; font-size: 2.4rem; line-height: 1; cursor: grab; background: #fff; border: 3px solid var(--edge); border-radius: 16px; user-select: none; -webkit-user-select: none; }
.qk-item.is-dragging { opacity: 0.35; }
.qk-count { margin: 0; font-size: 1.4rem; font-weight: 800; }

/* Fill Me Up */
.fu-cup { position: relative; display: block; box-sizing: border-box; width: 4.4em; height: 6em; font-size: 1rem; background: rgba(255, 255, 255, 0.7); border: 0.3em solid #6F7F96; border-radius: 0.4em 0.4em 1.2em 1.2em; }
.fu-cup.is-tall { width: 3em; height: 8.4em; border-radius: 0.6em 0.6em 0.9em 0.9em; }
.fu-cup.is-wide { width: 6.4em; height: 5.2em; border-radius: 0.3em 0.3em 1.3em 1.3em; }
.fu-cup.is-bowl { width: 7em; height: 3.8em; border-radius: 0.2em 0.2em 3.5em 3.5em; }
.fu-cup.is-bucket { width: 6em; height: 12em; border-radius: 0.3em 0.3em 1em 1em; }
.fu-cup.is-big { font-size: 1.7rem; }
.fu-cup.is-bucket.is-big { font-size: 1.25rem; }
.fu-fill { position: absolute; left: 0; right: 0; bottom: 0; height: var(--lvl, 0%); background: var(--liq, #4D96FF); border-radius: 0 0 0.9em 0.9em; transition: height 0.06s linear; }
.fu-line { position: absolute; left: -0.6em; right: -0.6em; height: 0; border-top: 0.2em dashed #E11D48; z-index: 2; }
.fu-mark { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid rgba(0, 0, 0, 0.3); z-index: 2; }
.fu-mark b { position: absolute; right: -1.7em; top: -0.75em; font-size: 0.9em; }
.sk-tile .fu-cup { font-size: 0.8rem; }
.qk-choice .fu-cup { font-size: 0.9rem; }
.fu-play { display: flex; flex-wrap: wrap; gap: 22px; align-items: center; justify-content: center; padding: 8px 18px 4px; }
.fu-buttons { display: grid; gap: 10px; justify-items: center; }
.fu-hold { min-width: 190px; min-height: 64px; font-size: 1.3rem; touch-action: none; user-select: none; -webkit-user-select: none; }
.fu-liters { gap: 34px; }
.fu-pitcher { display: grid; place-items: center; gap: 4px; padding: 12px 18px; font: inherit; cursor: pointer; background: #fff; border: 4px solid var(--edge); border-radius: 20px; }
.fu-pitcher:hover { border-color: var(--accent); }
.fu-pitcher:active { transform: scale(0.96); }
.fu-pitcher strong { font-size: 1.2rem; }

/* Scenes */
.sc [hidden] { display: none !important; }
.sc-scene { position: relative; width: 100%; max-width: 860px; aspect-ratio: 16 / 10; margin: 0 auto 12px; overflow: hidden; border: 4px solid var(--edge); border-radius: 22px; touch-action: manipulation; }
.sc-obj { position: absolute; transform: translate(-50%, -50%); padding: 2px 4px; font: inherit; font-size: calc(var(--z, 1.2) * clamp(1.5rem, 5.2vw, 2.7rem)); line-height: 1; cursor: pointer; background: none; border: 3px solid transparent; border-radius: 50%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25)); }
.sc-obj:hover { border-color: rgba(255, 255, 255, 0.85); }
.sc-obj.is-lit { border-color: var(--accent); background: rgba(255, 255, 255, 0.45); z-index: 3; }
.sc-obj.is-found { border-color: #2F8F4F; background: rgba(200, 240, 200, 0.7); }
.sc-obj.is-bounce { animation: sc-bounce 0.5s ease; }
.sc-obj.is-wrong { animation: sc-shake 0.45s; }
@keyframes sc-bounce { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -62%) scale(1.25); } 70% { transform: translate(-50%, -50%) scale(0.95); } }
@keyframes sc-shake { 0%, 100% { transform: translate(-50%, -50%); } 25% { transform: translate(-58%, -50%); } 75% { transform: translate(-42%, -50%); } }
.sc-caption { display: flex; gap: 18px; align-items: center; justify-content: center; max-width: 640px; margin: 0 auto 14px; text-align: left; }
.sc-caption .sk-bigtext { margin: 0 0 4px; font-size: 1.5rem; }
.sc-caption p { margin: 0; }
.sc-cap-pic { font-size: 3.6rem; line-height: 1; }
.sc-obj svg, .sc-cap-pic svg { display: block; width: 1em; height: 1em; }
.sc-cap-pic { display: inline-block; }
.sc-art { position: absolute; inset: 0; pointer-events: none; }
.sc-art svg { display: block; width: 100%; height: 100%; }
.sc-art.is-photo { background-size: cover; background-position: center; }
.sc-scene.is-night .sc-obj { filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.28)); }
@media (prefers-reduced-motion: reduce) { .sc-obj.is-bounce, .sc-obj.is-wrong { animation: none; } }

/* Left and Right */
.lr-row { display: flex; gap: 18px; justify-content: center; }
.lr-slot { display: grid; place-items: center; width: 120px; height: 120px; font-size: 4.2rem; line-height: 1; background: #fff; border: 4px solid var(--edge); border-radius: 22px; }
.lr-put { display: grid; gap: 14px; justify-items: center; width: 100%; max-width: 640px; }
.lr-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; width: 100%; }
.lr-zone { display: grid; place-items: center; align-content: center; gap: 6px; min-height: 160px; padding: 10px; font: inherit; font-size: 4rem; line-height: 1; color: #1F2328; cursor: pointer; background: #fff; border: 5px dashed var(--edge-strong, #c9c3b6); border-radius: 24px; }
.lr-zone.is-over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.03); }
.lr-zone.is-wrong { border-color: #B3261E; animation: dd-shake 0.45s; }
.lr-zone.is-right { border-style: solid; border-color: #2F8F4F; background: #C8F0C8; cursor: default; }
.lr-zone-label { font-size: 1.2rem; font-weight: 800; color: var(--muted); }
.lr-tray { display: grid; place-items: center; }
.lr-piece { min-width: 110px; min-height: 110px; font-size: 4rem; line-height: 1; }
@media (prefers-reduced-motion: reduce) { .lr-zone.is-wrong { animation: none; } .lr-zone.is-over { transform: none; } }
@media (max-width: 480px) { .lr-slot { width: 92px; height: 92px; font-size: 3.2rem; } }

/* World Map */
.wm [hidden] { display: none !important; }
.wm-map { width: 100%; max-width: 980px; margin: 0 auto 12px; overflow: hidden; border: 4px solid var(--edge); border-radius: 18px; line-height: 0; background: #4FB0E6; }
.wm-map { aspect-ratio: 360 / 174; }
.wm-map svg { display: block; width: 100%; height: 100%; touch-action: manipulation; }
.wm-land path { fill: var(--c); stroke: #fff; stroke-width: 0.5; stroke-linejoin: round; cursor: pointer; transition: filter 0.15s; }
.wm-land:hover path { filter: brightness(1.1); }
.wm-land.is-on path { stroke: #1F2328; stroke-width: 0.9; filter: brightness(1.1) drop-shadow(0 0 1.5px rgba(0, 0, 0, 0.5)); }
.wm-land.is-found path { fill: #7ED68A; stroke: #1F6B35; stroke-width: 0.9; }
.wm-land.is-wrong path { fill: #F7A8A0; }
.wm-sea rect { fill: rgba(255, 255, 255, 0); cursor: pointer; transition: fill 0.15s; }
.wm-sea:hover rect { fill: rgba(255, 255, 255, 0.1); }
.wm-sea.is-on rect { fill: rgba(255, 255, 255, 0.3); }
.wm-sea.is-found rect { fill: rgba(126, 214, 138, 0.5); }
.wm-sea.is-wrong rect { fill: rgba(247, 168, 160, 0.5); }
.wm-landlabel, .wm-sealabel { text-anchor: middle; dominant-baseline: middle; paint-order: stroke; stroke-linejoin: round; }
.wm-landlabel { font-size: 6px; font-weight: 800; fill: #1F2328; stroke: #fff; stroke-width: 1.6px; }
.wm-sealabel { font-size: 4.6px; font-style: italic; font-weight: 700; fill: #fff; stroke: rgba(8, 62, 120, 0.55); stroke-width: 1.2px; }
.wm-caption { display: flex; gap: 18px; align-items: center; justify-content: center; max-width: 640px; margin: 0 auto 14px; text-align: left; }
.wm-caption .sk-bigtext { margin: 0 0 4px; font-size: 1.5rem; }
.wm-caption p { margin: 0; }
.wm-cap-pic { font-size: 3.2rem; line-height: 1; }
/* World Map: countries */
.wm-country { fill: var(--c); stroke: #fff; stroke-width: 0.8px; stroke-linejoin: round; vector-effect: non-scaling-stroke; cursor: pointer; transition: filter 0.15s; }
.wm-country:hover { filter: brightness(1.1); }
.wm-country.is-on { stroke: #1F2328; stroke-width: 2px; filter: brightness(1.12); }
.wm-country.is-found { fill: #7ED68A; stroke: #1F6B35; stroke-width: 2px; }
.wm-country.is-wrong { fill: #F7A8A0; }
.wm-clabel { text-anchor: middle; dominant-baseline: middle; font-weight: 800; fill: #1F2328; paint-order: stroke; stroke: #fff; stroke-width: 0.2em; stroke-linejoin: round; }
.wm-choices { max-width: 700px; margin: 0 auto 12px; }.wm.is-countries .wm-map svg { touch-action: none; cursor: grab; }
.wm.is-countries .wm-map svg:active { cursor: grabbing; }
.wm-zoomhelp { margin: -4px 0 8px; text-align: center; }
.wm-zoombtn { background: var(--accent-soft); }
/* Less, Equal, More */
.cm-group { display: block; max-width: 300px; font-size: 2.2rem; line-height: 1.25; letter-spacing: 0.06em; text-align: center; word-break: break-all; }
.qk-choice .cm-group { font-size: 1.9rem; max-width: 250px; }
.sk-tile .cm-group { font-size: 0.95rem; max-width: 130px; }
.cm-pair { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.cm-side { display: grid; justify-items: center; gap: 4px; min-width: 120px; padding: 10px 12px; background: #fff; border: 3px solid var(--edge); border-radius: 16px; }
.cm-side small { font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.sk-tile .cm-side { min-width: 0; padding: 4px 6px; border-width: 2px; }
.sk-tile .cm-side small { display: none; }
.sk-tile .cm-pair { gap: 6px; }
.cm-vs { font-weight: 800; color: var(--muted); }
.cm-eq { display: flex; gap: 22px; align-items: center; justify-content: center; font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", "Segoe UI", sans-serif; }
.cm-eq b { font-size: 4.4rem; line-height: 1; }
.cm-eq i { display: grid; place-items: center; width: 64px; height: 64px; font-style: normal; font-size: 2.6rem; font-weight: 800; color: var(--muted); border: 4px dashed var(--edge-strong, #c9c3b6); border-radius: 16px; }

/* Pizza Cut */
.pz-pizza { width: min(230px, 60vw); aspect-ratio: 1; }
.pz-pizza svg { display: block; width: 100%; height: 100%; }
.pz-pizza.is-cut { width: min(300px, 78vw); cursor: pointer; touch-action: manipulation; }
.sk-tile .qk-extra .pz-pizza, .sk-tile-pic svg { width: 64px; height: 64px; display: block; }
.sk-bigpic svg { width: 150px; height: 150px; display: block; margin: 0 auto; }
.pz-cut { display: grid; gap: 8px; justify-items: center; }
.pz-cut p { margin: 0; }
.pz-share { display: grid; gap: 12px; justify-items: center; width: 100%; max-width: 680px; }
.pz-share p { margin: 0; }
.pz-plates { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; width: 100%; }
.pz-plate { display: grid; justify-items: center; gap: 4px; min-width: 120px; min-height: 130px; padding: 8px 10px; font: inherit; cursor: pointer; background: #fff; border: 4px solid var(--edge); border-radius: 50% 50% 22px 22px / 30% 30% 22px 22px; }
.pz-plate.is-over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.04); }
.pz-friend { font-size: 2.4rem; line-height: 1; }
.pz-on { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; min-height: 52px; }
.pz-tray { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-content: flex-start; width: 100%; min-height: 78px; padding: 10px; background: var(--surface-2); border: 2px dashed var(--edge); border-radius: 18px; }
.pz-tray.is-over { border-color: var(--accent); background: var(--accent-soft); }
.pz-slice { padding: 2px 4px; font-size: 2.6rem; line-height: 1; cursor: grab; background: none; border: 3px solid transparent; border-radius: 14px; user-select: none; -webkit-user-select: none; }
.pz-on .pz-slice { font-size: 2rem; }
.pz-slice.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.pz-slice.is-dragging { opacity: 0.35; }
@media (prefers-reduced-motion: reduce) { .pz-plate.is-over { transform: none; } }
/* Planets */
.pl [hidden] { display: none !important; }
.pl-wrap { max-width: 980px; margin: 0 auto 6px; overflow-x: auto; background: #050818; border: 4px solid var(--edge); border-radius: 18px; }
.pl-space { min-width: 640px; line-height: 0; }
.pl-space svg { display: block; width: 100%; height: auto; }
.pl-body { cursor: pointer; outline: none; transition: filter 0.15s; }
.pl-body:hover { filter: brightness(1.15); }
.pl-ring { fill: none; stroke: #FFD93D; stroke-width: 1.4; opacity: 0; transition: opacity 0.15s; }
.pl-body:focus-visible .pl-ring { opacity: 1; stroke: #fff; }
.pl-body.is-on .pl-ring { opacity: 1; stroke: #FFD93D; }
.pl-body.is-found .pl-ring { opacity: 1; stroke: #7ED68A; }
.pl-body.is-wrong .pl-ring { opacity: 1; stroke: #FF6B6B; }
.pl-name, .pl-num { display: none; text-anchor: middle; pointer-events: none; }
.pl-name { fill: #fff; font-size: 6.2px; font-weight: 800; paint-order: stroke; stroke: rgba(0, 0, 0, 0.75); stroke-width: 1px; stroke-linejoin: round; }
.pl-num { fill: #FFD93D; font-size: 5.4px; font-weight: 800; }
.pl-space.show-names .pl-name { display: block; }
.pl-space.show-numbers .pl-num { display: block; }
.pl-note { text-align: center; margin: 6px 0 12px; }
.pl-caption { display: flex; gap: 18px; align-items: center; justify-content: center; max-width: 660px; margin: 0 auto 14px; text-align: left; }
.pl-caption .sk-bigtext { margin: 0 0 4px; font-size: 1.5rem; }
.pl-caption p { margin: 0; }
.pl-cap-pic { font-size: 3.2rem; line-height: 1; }
.pl-choices { max-width: 700px; margin: 0 auto 12px; }

/* Shopping */
.sp [hidden] { display: none !important; }
.sp > section > .sk-panel { max-width: 760px; margin-left: auto; margin-right: auto; }
.sp-label { display: block; margin-bottom: 4px; font-weight: 800; }
.sp-input { display: inline-flex; align-items: center; gap: 6px; font-size: 1.3rem; font-weight: 800; }
.sp-input .sk-input { width: 150px; font-size: 1.3rem; }
.sp-money { display: flex; gap: 14px; align-items: center; justify-content: center; flex-wrap: wrap; }
.sp-money .sp-label { margin: 0; font-size: 1.2rem; }
.sp-add h2, .sp-list h2 { margin: 0 0 8px; font-size: 1.3rem; }
.sp-items { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.sp-items .sk-tile { min-height: 82px; padding: 8px 4px; }
.sp-items .sk-tile-pic { font-size: 2.2rem; }
.sp-items .sk-tile strong { font-size: 0.85rem; }
.sp-fields { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; justify-content: center; margin: 10px 0 4px; }
.sp-field { display: grid; gap: 2px; }
.sp-field .sk-input[type="text"] { width: 210px; font-size: 1.2rem; }
.sp-qty { display: inline-flex; gap: 6px; align-items: center; }
.sp-qty .sk-input { width: 78px; text-align: center; font-size: 1.3rem; }
.sp-qty .btn { min-width: 46px; font-size: 1.3rem; }
.sp-rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sp-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 8px 12px; background: #fff; border: 3px solid var(--edge); border-radius: 14px; }
.sp-row-pic { font-size: 1.8rem; line-height: 1; }
.sp-row-name { flex: 1; min-width: 90px; font-weight: 800; overflow-wrap: anywhere; }
.sp-row-calc { color: var(--muted); font-weight: 700; }
.sp-row-total { min-width: 72px; text-align: right; }
.sp-del { padding: 4px 10px; }
.sp-sum .sp-line { display: flex; justify-content: space-between; gap: 20px; max-width: 360px; margin: 4px auto; font-size: 1.3rem; }
.sp-verdict { margin: 10px 0; font-size: 1.4rem; font-weight: 800; }
.sp-verdict.is-yes { color: #1F6B35; }
.sp-verdict.is-no { color: #B3261E; }
.sp-story { display: flex; gap: 14px; align-items: center; justify-content: center; max-width: 580px; margin: 0 auto 12px; font-size: 1.3rem; font-weight: 700; }
.sp-story-pic { font-size: 3.4rem; line-height: 1; }
.sp-story-text { margin: 0; }
.sp-answer { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center; margin-bottom: 8px; }
.sp-answer-input { width: 130px; font-size: 1.8rem; text-align: center; }
.sp-sym { font-size: 1.8rem; font-weight: 800; }
/* Date */
.dt-chip { font-size: 2.1rem; font-weight: 800; line-height: 1; font-family: "Comic Sans MS", "Chalkboard SE", "Trebuchet MS", "Segoe UI", sans-serif; }
.sk-bigpic .dt-chip { font-size: 4rem; }
.dt-box { max-width: 520px; margin-left: auto; margin-right: auto; }
.dt-box h2 { margin: 0 0 4px; font-size: 1.3rem; }
.dt-box p { margin: 0 0 6px; }
.dt-view { overflow-x: auto; }
.dt-cal { width: 100%; max-width: 460px; margin: 6px auto; border-collapse: separate; border-spacing: 4px; table-layout: fixed; }
.dt-cal caption { margin-bottom: 4px; font-size: 1.3rem; font-weight: 800; caption-side: top; }
.dt-cal th { padding: 4px 0; font-size: 0.95rem; font-weight: 800; color: var(--muted); }
.dt-cal td { height: 44px; padding: 0; text-align: center; font-size: 1.15rem; font-weight: 700; background: #fff; border: 2px solid var(--edge); border-radius: 10px; cursor: pointer; }
.dt-cal td.dt-empty { background: transparent; border-color: transparent; cursor: default; }
.dt-cal td.is-weekend { background: #FFF3E0; }
.dt-cal td:hover:not(.dt-empty) { border-color: var(--accent); }
.dt-cal td.is-mark, .dt-cal td.is-pick { color: #fff; background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.qk-stage .dt-cal td { cursor: default; }
@media (max-width: 480px) { .dt-cal td { height: 38px; font-size: 1rem; } .dt-cal { border-spacing: 3px; } }
/* Favorites on Home: the star (top right), the filter, and how many people used an app (bottom left) */
.app-star { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; font: inherit; font-size: 1.7rem; line-height: 1; color: #B7B09F; background: transparent; border: 2px solid transparent; border-radius: 50%; cursor: pointer; }
.app-star:hover { color: #E8A100; background: var(--surface-2); }
.app-star:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; }
.app-star[aria-pressed="true"] { color: #F2A900; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.12); }
.app-box.is-favorite { border-color: #F2C94C; box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.28), var(--shadow); }
.app-box-meta { width: 100%; margin: 4px 0 0; text-align: left; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.app-filter { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 16px; }
.app-fav-empty { margin: 0 0 16px; text-align: center; }
/* Scenes: the two groups of buttons share a row */
.sc-part { display: contents; }

/* Tablets held sideways (wide but short): keep the top of every app small, so the picture is on screen without scrolling. */
@media (min-width: 700px) and (max-height: 760px) {
    .page { padding-top: 12px; padding-bottom: 24px; }
    .flash-head { gap: 8px; margin-bottom: 8px; }
    .flash-head h1 { font-size: 1.25rem; }
    .sched-tab { padding: 6px 12px; }
    .mybody-help { display: none; }
    .sk-row { gap: 6px; margin-bottom: 6px; }
    .sk-chip { padding: 5px 12px; font-size: 0.95rem; }
    .match-bar { margin-bottom: 6px; }
    .dd-ask { margin: 2px 0 8px; font-size: 1.1rem; }
    /* the big pictures fit the height that is left under the buttons */
    .sc-scene { width: min(100%, calc((100dvh - 280px) * 1.6)); }
    .wm-map { max-width: min(980px, calc((100dvh - 250px) * 2.07)); }
    .st-scene { max-width: min(760px, calc((100dvh - 330px) * 1.33)); }
    .pl-wrap { max-width: min(980px, calc((100dvh - 300px) * 2.5)); }
    .sc-caption, .wm-caption, .pl-caption { padding: 10px 16px; margin-bottom: 8px; }
    .sc-cap-pic, .wm-cap-pic, .pl-cap-pic { font-size: 2.4rem; }
    .sc-caption .sk-bigtext, .wm-caption .sk-bigtext, .pl-caption .sk-bigtext { font-size: 1.25rem; }
}

/* A finger is not a mouse: on a touch screen the small buttons get a bigger target. */
@media (pointer: coarse) {
    .sk-chip, .sched-tab, .btn { min-height: 44px; }
    .sk-chip { padding-left: 14px; padding-right: 14px; }
}
/* "Who is talking?" on a tablet or bigger: up to six communicators share ONE row, each card taking an equal part of the width.
   (More than six wrap onto a second row as before. Phones keep two cards to a row.) */
@media (min-width: 700px) {
    .picker-grid:not(:has(.picker-card:nth-child(7))) { flex-wrap: nowrap; gap: 12px; }
    .picker-grid:not(:has(.picker-card:nth-child(7))) > .picker-card { flex: 1 1 0; width: auto; min-width: 0; max-width: 200px; padding: 20px 8px; font-size: clamp(1.05rem, 2.1vw, 1.4rem); }
    /* a round picture whose size follows the screen (one size for width and height keeps it a circle) */
    .picker-grid:not(:has(.picker-card:nth-child(7))) .picker-card img,
    .picker-grid:not(:has(.picker-card:nth-child(7))) .picker-initial { --av: clamp(72px, 11vw, 112px); width: var(--av); height: var(--av); flex: none; font-size: calc(var(--av) * 0.55); line-height: 1; }
    .picker-grid:not(:has(.picker-card:nth-child(7))) .picker-voice { font-size: 0.85rem; text-align: center; }
}
