/* GAMEITUP v0.9.9.24 — Generic player copy stylesheet */
:root {
      --bg-0:#030706; --bg-1:#08140f; --panel:rgba(12,25,18,.90); --panel-strong:rgba(8,17,12,.97);
      --line:rgba(86,167,102,.28); --line-strong:rgba(125,255,134,.70); --text:#effff2; --muted:#9fbba6;
      --green:#8cff93; --green-2:#39d353; --gold:#ffd166; --purple:#c084fc; --red:#ff6b6b; --cyan:#7ddcff;
      --shadow:0 18px 54px rgba(0,0,0,.44); --glow:0 0 30px rgba(57,211,83,.17);
      --theme-accent-rgb:57,211,83; --active-overscroll-bg:#08140f; --active-overscroll-bottom:#030706; --active-overscroll-gradient:linear-gradient(180deg, #08140f, #030706); --active-app-background:radial-gradient(circle at 8% 10%, rgba(var(--theme-accent-rgb),.12), transparent 28%), radial-gradient(circle at 92% 6%, rgba(125,255,134,.10), transparent 20%), radial-gradient(circle at 50% 120%, rgba(var(--theme-accent-rgb),.08), transparent 35%), linear-gradient(180deg, var(--bg-1), var(--bg-0));
      --radius-xl:28px; --radius:18px; --radius-sm:12px;
      --font:Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    }
    [data-theme="gold"] { --theme-accent-rgb:246,198,91; --bg-0:#080704; --bg-1:#151106; --active-overscroll-bg:#151106; --active-overscroll-bottom:#080704; --active-overscroll-gradient:linear-gradient(180deg, #151106, #080704); --green:#ffe189; --green-2:#f6c65b; --line:rgba(246,198,91,.28); --line-strong:rgba(246,198,91,.72); --glow:0 0 30px rgba(246,198,91,.18); }
    [data-theme="void"] { --theme-accent-rgb:168,85,247; --bg-0:#07040d; --bg-1:#130b1d; --active-overscroll-bg:#130b1d; --active-overscroll-bottom:#07040d; --active-overscroll-gradient:linear-gradient(180deg, #130b1d, #07040d); --green:#dcc4ff; --green-2:#a855f7; --line:rgba(168,85,247,.28); --line-strong:rgba(168,85,247,.72); --glow:0 0 30px rgba(168,85,247,.18); }
    [data-theme="pixel"] { --theme-accent-rgb:147,255,123; --bg-0:#030806; --bg-1:#08140f; --active-overscroll-bg:#08140f; --active-overscroll-bottom:#030806; --active-overscroll-gradient:linear-gradient(180deg, #08140f, #030806); --green:#93ff7b; --green-2:#65db5f; --line:rgba(147,255,123,.28); --line-strong:rgba(147,255,123,.72); --glow:0 0 30px rgba(147,255,123,.18); }
    * { box-sizing:border-box; }
    html { scroll-behavior:smooth; background:var(--active-app-background, var(--active-overscroll-gradient, linear-gradient(180deg, var(--bg-1), var(--bg-0)))); background-color:var(--active-overscroll-bg, var(--bg-1)); }
    body {
      margin:0; color:var(--text); font-family:var(--font); min-height:100vh;
      background:var(--active-app-background, linear-gradient(180deg, var(--bg-1), var(--bg-0)));
      overflow-x:hidden;
    }
    body[data-theme="pixel"] { image-rendering: pixelated; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
    body::before {
      content:""; position:fixed; inset:0; pointer-events:none; opacity:.22;
      background-image:
        linear-gradient(rgba(125,255,134,.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(125,255,134,.05) 1px, transparent 1px);
      background-size:40px 40px; mask-image:linear-gradient(180deg, black, transparent 84%);
    }
    .app.hidden, .hidden { display:none !important; }
    .wrap { max-width:1520px; margin:0 auto; padding:20px; position:relative; z-index:1; }
    .overlay {
      position:fixed; inset:0; z-index:70; display:flex; align-items:center; justify-content:center; padding:20px;
      background: radial-gradient(circle at center, rgba(125,255,134,.14), transparent 30%), rgba(0,0,0,.72);
      backdrop-filter:blur(8px);
    }
    .overlay.hidden { display:none; }
    .start-card {
      width:min(760px, 100%); border:1px solid var(--line-strong); border-radius:28px; padding:24px;
      background: linear-gradient(135deg, rgba(255,255,255,.03), transparent 35%), linear-gradient(180deg, rgba(13,27,19,.97), rgba(5,10,8,.98));
      box-shadow:var(--shadow), var(--glow); position:relative; overflow:hidden;
    }
    .start-card::before { content:""; position:absolute; width:260px; height:260px; left:-80px; top:-90px; border-radius:999px; background:radial-gradient(circle, rgba(125,255,134,.18), transparent 65%); filter:blur(16px); }
    h1 { margin:0; font-size:clamp(2.5rem, 4vw, 5rem); line-height:.94; letter-spacing:-1px; }
    h1 span { color:var(--green); text-shadow:0 0 24px rgba(125,255,134,.24); }
    .player-name-cap { display:inline-block; max-width:min(16ch, 72vw); vertical-align:bottom; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
    h2,h3,h4 { margin:0 0 12px; }
    .hero {
      border:1px solid var(--line-strong);
      background: linear-gradient(135deg, rgba(255,255,255,.03), transparent), linear-gradient(180deg, rgba(13,27,19,.95), rgba(4,9,6,.98));
      border-radius:var(--radius-xl); box-shadow:var(--shadow), var(--glow); padding:22px; position:relative; overflow:hidden;
    }
    .hero::before,.hero::after { content:""; position:absolute; border-radius:999px; background:radial-gradient(circle, rgba(125,255,134,.20), transparent 65%); filter:blur(14px); pointer-events:none; }
    .hero::before { width:280px; height:280px; left:-80px; top:-90px; } .hero::after { width:220px; height:220px; right:-90px; top:-60px; }
    .top-bar,.section-head,.calendar-top { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; }
    .hero-actions,.legend,.form-row,.cluster { display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
    .subtitle { color:var(--muted); margin-top:12px; } .motto { margin-top:8px; font-weight:950; color:#ddffe2; letter-spacing:.35px; }
    button,select,input,textarea { font:inherit; }
    .btn,input,select,textarea { border:1px solid var(--line); background:linear-gradient(180deg, rgba(22,52,32,.94), rgba(8,16,11,.98)); color:var(--text); padding:10px 14px; border-radius:var(--radius-sm); outline:none; transition:.18s ease; }
    input::placeholder, textarea::placeholder { color:rgba(239,255,242,.42); }
    textarea { width:100%; min-height:96px; resize:vertical; line-height:1.45; }
    .btn { cursor:pointer; font-weight:850; user-select:none; }
    .btn:hover { transform:translateY(-1px); border-color:var(--line-strong); box-shadow:0 0 0 3px rgba(125,255,134,.08); }
    .btn:active { transform:translateY(0); }
    .btn.gold { border-color:rgba(255,209,102,.48); color:#ffefc0; } .btn.purple { border-color:rgba(192,132,252,.56); color:#ead8ff; } .btn.danger { border-color:rgba(255,107,107,.46); color:#ffd7d7; } .btn.ghost { background:rgba(255,255,255,.03); } .btn.small { padding:8px 10px; font-size:.9rem; } .btn.icon-close { min-width:44px; padding-inline:12px; line-height:1; }
    .tag { display:inline-flex; align-items:center; gap:6px; padding:6px 10px; border-radius:999px; border:1px solid var(--line); background:rgba(57,211,83,.08); color:#def9e2; font-size:.86rem; white-space:nowrap; }
    .tag.gold { border-color:rgba(255,209,102,.45); background:rgba(255,209,102,.08); color:#ffefc0; } .tag.purple { border-color:rgba(192,132,252,.45); background:rgba(192,132,252,.08); color:#ead8ff; } .tag.red { border-color:rgba(255,107,107,.42); background:rgba(255,107,107,.08); color:#ffd8d8; } .tag.cyan { border-color:rgba(125,220,255,.42); background:rgba(125,220,255,.08); color:#d9f7ff; }
    .rarity-common { border-color:rgba(255,255,255,.18)!important; color:#f0f0f0!important; } .rarity-rare { border-color:rgba(125,220,255,.52)!important; color:#d9f7ff!important; } .rarity-epic { border-color:rgba(192,132,252,.56)!important; color:#ead8ff!important; } .rarity-legendary { border-color:rgba(255,209,102,.56)!important; color:#ffefc0!important; }
    .panel { background: linear-gradient(180deg, rgba(255,255,255,.02), transparent), var(--panel); border:1px solid var(--line); border-radius:var(--radius); box-shadow:var(--shadow); padding:18px; backdrop-filter:blur(10px); }
    .hero-grid { display:grid; grid-template-columns:1.3fr .95fr; gap:18px; position:relative; z-index:2; }
    .stats-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-top:18px; }
    .scoreboard { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-top:16px; }
    .grid { display:grid; grid-template-columns:1.18fr .92fr; gap:18px; margin-top:18px; }
    .bottom-grid { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; }
    .info-folder-grid { grid-template-columns:1fr; }
    .triple-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:18px; margin-top:18px; }
    .stat-card,.score-card,.quest,.day-card,.row-item,.rank-card,.achievement,.avatar-stage-card,.inventory-item,.title-card,.perk-card,.boss-card,.history-item { background: linear-gradient(180deg, rgba(255,255,255,.03), transparent), rgba(7,16,11,.98); border:1px solid var(--line); border-radius:var(--radius); }
    .stat-card { padding:13px; position:relative; overflow:hidden; } .stat-top { display:flex; justify-content:space-between; align-items:center; gap:8px; } .stat-name { font-weight:950; letter-spacing:.4px; } .stat-icon { font-size:1.3rem; } .stat-desc { color:var(--muted); font-size:.89rem; min-height:36px; margin-top:7px; }
    .score-card { padding:14px; } .score-label { color:var(--muted); font-size:.85rem; margin-bottom:4px; } .score-value { font-size:clamp(1.18rem, 1.8vw, 1.62rem); font-weight:950; letter-spacing:-.35px; }
    .bar { width:100%; height:10px; border-radius:999px; background:#101c15; border:1px solid rgba(125,255,134,.10); overflow:hidden; margin-top:10px; }
    .fill { height:100%; width:0%; background:linear-gradient(90deg, var(--green-2), var(--green)); box-shadow:0 0 14px rgba(125,255,134,.32); transition:width .28s ease; }
    .profile-progress-line { margin-top:14px; display:flex; align-items:center; justify-content:space-between; gap:10px; color:var(--muted); font-size:.82rem; font-weight:850; letter-spacing:.02em; }
    .profile-progress-line span:first-child { color:var(--text); text-transform:uppercase; font-size:.76rem; }
    .profile-progress-line span:last-child { text-align:right; }
    .progress-shell { margin-top:14px; height:16px; border-radius:999px; border:1px solid var(--line); background:rgba(0,0,0,.18); overflow:hidden; position:relative; }
    .progress-fill { height:100%; width:0%; background:linear-gradient(90deg, var(--green-2), var(--green), var(--gold)); transition:width .3s ease; position:relative; }
    .progress-fill::after { content:""; position:absolute; inset:0; background:linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); animation:shimmer 2.2s linear infinite; }
    .avatar-frame { position:relative; min-height:420px; display:flex; align-items:flex-end; justify-content:center; padding:8px 10px 0; border-radius:20px; border:1px solid var(--line); background: radial-gradient(circle at 50% 20%, rgba(125,255,134,.18), transparent 35%), linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.16)); overflow:hidden; }
    .avatar-frame::before { content:""; position:absolute; inset:auto 10% 4% 10%; height:18px; border-radius:999px; background:radial-gradient(circle, rgba(125,255,134,.35), transparent 70%); filter:blur(8px); }
    .avatar-img { position:relative; z-index:1; max-width:100%; max-height:400px; object-fit:contain; filter:drop-shadow(0 12px 20px rgba(0,0,0,.4)); transform-origin:center bottom; animation:floaty 3.6s ease-in-out infinite; transition:opacity .28s ease, transform .28s ease; }
    .avatar-img.custom-avatar-active { -webkit-mask-image:linear-gradient(to bottom, #000 0%, #000 90%, rgba(0,0,0,.72) 96%, transparent 100%); mask-image:linear-gradient(to bottom, #000 0%, #000 90%, rgba(0,0,0,.72) 96%, transparent 100%); }
    .mobile-status-avatar.custom-avatar-active { -webkit-mask-image:linear-gradient(to bottom, #000 0%, #000 88%, rgba(0,0,0,.68) 96%, transparent 100%); mask-image:linear-gradient(to bottom, #000 0%, #000 88%, rgba(0,0,0,.68) 96%, transparent 100%); }
    .avatar-img.pop { animation:popIn .4s ease, floaty 3.6s ease-in-out .45s infinite; }
    .sparkles { position:absolute; inset:0; overflow:hidden; pointer-events:none; } .sparkles span { position:absolute; width:7px; height:var(--deep-work-volume-track-size); border-radius:50%; background:var(--green); box-shadow:0 0 10px var(--green); opacity:.7; animation:drift 5s linear infinite; } .sparkles span:nth-child(1){ left:18%; top:18%; animation-delay:.1s; } .sparkles span:nth-child(2){ right:20%; top:24%; animation-delay:1.2s; } .sparkles span:nth-child(3){ left:24%; bottom:18%; animation-delay:2.2s; } .sparkles span:nth-child(4){ right:25%; bottom:20%; animation-delay:3.1s; }
    .avatar-stage { margin-top:12px; display:grid; gap:10px; } .avatar-stage-card { padding:12px; } .avatar-stage-title { display:flex; justify-content:space-between; align-items:center; gap:10px; font-weight:950; } .avatar-stage-desc { color:var(--muted); font-size:.9rem; margin-top:6px; }
    .phase-track { display:grid; grid-template-columns:repeat(4,1fr); gap:8px; margin-top:8px; } .phase-node { text-align:center; padding:8px 6px; border-radius:12px; border:1px solid var(--line); background:rgba(255,255,255,.02); font-size:.78rem; color:var(--muted); } .phase-node.active,.phase-node.done { color:var(--text); border-color:var(--line-strong); box-shadow:inset 0 0 18px rgba(57,211,83,.05); }
    .quest-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .quest { padding:14px; cursor:pointer; user-select:none; position:relative; overflow:hidden; transition:.18s ease; } .quest:hover { transform:translateY(-1px); border-color:var(--line-strong); } .quest.completed { border-color:var(--line-strong); box-shadow:0 0 0 1px rgba(125,255,134,.16), inset 0 0 26px rgba(57,211,83,.06); } .quest.complete-pop { animation:questPop .42s ease; }
    .quest.completed::after { content:"✓"; position:absolute; right:8px; top:-16px; font-size:4.6rem; color:rgba(125,255,134,.08); font-weight:950; }
    .quest-head { display:flex; justify-content:space-between; gap:12px; align-items:center; position:relative; z-index:1; } .quest-name { font-weight:850; } .quest-xp { color:var(--green); font-weight:950; white-space:nowrap; } .quest-desc { color:var(--muted); font-size:.9rem; margin-top:6px; position:relative; z-index:1; }
    .rank-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; } .rank-card { padding:14px; background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.14)); transition:.18s ease; } .rank-card.active { transform:scale(1.015); box-shadow:0 0 0 1px rgba(255,255,255,.12), 0 0 25px rgba(125,255,134,.12); }
    .bronze { border-color:rgba(195,141,87,.6); } .silver { border-color:rgba(116,215,255,.55); } .gold-border { border-color:rgba(255,209,102,.68); } .purple-border { border-color:rgba(192,132,252,.7); }
    .achievement-list,.boss-list,.level-list,.save-list,.custom-list,.title-list,.perk-list,.history-list,.inventory-list { display:grid; gap:10px; }
    .achievement { padding:12px; opacity:.56; transition:.2s ease; } .achievement.unlocked { opacity:1; border-color:var(--line-strong); box-shadow:inset 0 0 18px rgba(57,211,83,.05); }
    .calendar-header,.calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:12px; } .calendar-header { margin-top:12px; } .calendar-grid { margin-top:12px; }
    .dayhead { text-align:center; color:var(--muted); font-size:.8rem; letter-spacing:.3px; padding:4px 0; }
    .day-card { padding:10px; min-height:128px; cursor:pointer; transition:.18s ease; position:relative; overflow:hidden; } .day-card:hover { transform:translateY(-1px); border-color:var(--line-strong); } .day-card.active { border-color:var(--line-strong); box-shadow:inset 0 0 0 1px rgba(125,255,134,.18), 0 0 18px rgba(57,211,83,.1); }
    .day-card.elite { border-color:rgba(192,132,252,.62); } .day-card.strong { border-color:rgba(255,209,102,.52); } .day-card.good { border-color:rgba(116,215,255,.46); } .day-card.saved { border-color:rgba(195,141,87,.45); }
    .day-top { display:flex; justify-content:space-between; align-items:center; gap:8px; font-weight:950; margin-bottom:8px; }
    .mini-checks { display:grid; grid-template-columns:repeat(5,1fr); gap:4px; margin-bottom:8px; } .mini-check { height:12px; border-radius:4px; background:#102017; border:1px solid rgba(255,255,255,.06); } .mini-check.on { background:linear-gradient(180deg, var(--green-2), var(--green)); box-shadow:0 0 9px rgba(125,255,134,.18); }
    .abbr { display:flex; gap:6px; flex-wrap:wrap; color:var(--muted); line-height:1.3; font-size:.72rem; } .day-xp { margin-top:8px; font-weight:850; color:#dbffe1; } .day-rank { color:var(--muted); font-size:.82rem; margin-top:2px; }
    .review-marker { display:inline-flex; align-items:center; gap:4px; margin-top:6px; padding:4px 8px; border-radius:999px; border:1px solid rgba(255,209,102,.45); background:rgba(255,209,102,.08); color:#ffefc0; font-size:.72rem; font-weight:850; }
    .perfect-marker { border-color:rgba(192,132,252,.48); background:rgba(192,132,252,.08); color:#ead8ff; margin-left:4px; }
    .day-card.reviewed { box-shadow:inset 0 0 0 1px rgba(255,209,102,.10); }
    .row-item,.title-card,.perk-card,.inventory-item,.boss-card,.history-item { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:10px 12px; border-radius:var(--radius-sm); }
    .row-item.done,.title-card.active,.perk-card.active,.boss-card.done { border-color:var(--line-strong); box-shadow:inset 0 0 18px rgba(57,211,83,.05); } .row-item.manual { border-color:rgba(192,132,252,.42); }
    .row-left { display:flex; gap:10px; align-items:center; flex-wrap:wrap; } .muted { color:var(--muted); } .small { font-size:.88rem; } .micro { font-size:.76rem; color:var(--muted); }
    .reward { color:var(--green); font-weight:900; }
    .save-panel { border-color:rgba(255,107,107,.42); background:linear-gradient(180deg, rgba(45,12,12,.9), rgba(18,7,7,.96)); } .save-title { color:#ffd6d6; } .save-panel .row-item { background:rgba(255,255,255,.03); border-color:rgba(255,107,107,.18); }
    .footer-note { text-align:center; color:var(--green); font-weight:950; margin-top:22px; letter-spacing:.45px; }
    .toast { position:fixed; right:18px; bottom:18px; z-index:60; width:min(360px, calc(100vw - 36px)); display:grid; gap:8px; pointer-events:none; } .toast-item { background:rgba(8,17,12,.96); border:1px solid var(--line-strong); border-radius:14px; padding:10px 12px; box-shadow:var(--shadow), var(--glow); animation:toastIn .25s ease both; font-size:.9rem; line-height:1.28; }
    .xp-float { position:fixed; z-index:65; pointer-events:none; font-weight:950; color:var(--green); text-shadow:0 0 12px rgba(125,255,134,.5); animation:floatUp .9s ease forwards; }
    dialog { width:min(760px, calc(100vw - 28px)); border:1px solid var(--line-strong); background: linear-gradient(180deg, rgba(255,255,255,.026), transparent), rgba(7,17,12,.98); color:var(--text); border-radius:22px; box-shadow:var(--shadow), var(--glow); padding:0; }
    dialog::backdrop { background:rgba(0,0,0,.72); backdrop-filter:blur(4px); }
    dialog:not([open]) { display:none !important; }
    .modal-head,.modal-body,.modal-foot { padding:18px; } .modal-head { border-bottom:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; gap:12px; } .modal-body { display:grid; gap:14px; } .modal-foot { border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; }
    .review-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:12px; } .mini-kpi { padding:12px; border:1px solid var(--line); border-radius:14px; background:rgba(0,0,0,.14); } .mini-kpi strong { display:block; font-size:1.24rem; margin-bottom:2px; }
    @keyframes shimmer { from { transform:translateX(-100%);} to { transform:translateX(100%);} }
    @keyframes floaty { 0%,100% { transform:translateY(0px);} 50% { transform:translateY(-8px);} }
    @keyframes popIn { 0% { opacity:.7; transform:scale(.94);} 100% { opacity:1; transform:scale(1);} }
    @keyframes questPop { 0% { transform:scale(.97);} 60% { transform:scale(1.03);} 100% { transform:scale(1);} }
    @keyframes drift { 0% { transform:translateY(0) scale(.8); opacity:.1;} 40% { opacity:.6;} 100% { transform:translateY(-26px) scale(1.2); opacity:0;} }
    @keyframes toastIn { from { opacity:0; transform:translateY(10px) scale(.98);} to { opacity:1; transform:translateY(0) scale(1);} }
    @keyframes floatUp { from { opacity:0; transform:translateY(0) scale(.95);} 20% { opacity:1;} to { opacity:0; transform:translateY(-34px) scale(1.03);} }
    @media (max-width:1220px) {
      .hero-grid,.grid,.bottom-grid,.triple-grid { grid-template-columns:1fr; }
      .stats-grid { grid-template-columns:repeat(2,1fr); }
      .scoreboard { grid-template-columns:repeat(2,1fr); }
      .calendar-header,.calendar-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
    }


    /* v0.9.3 Mobile Speed Balance Edition — clarity layer */
    .product-note-panel { margin-top:18px; border-color:rgba(125,220,255,.30); }
    .daily-note-grid { display:grid; grid-template-columns:1fr .72fr; gap:14px; align-items:stretch; }
    .daily-note-box { display:grid; gap:10px; }
    .daily-note-box textarea { min-height:116px; }
    .protocol-list { display:grid; gap:8px; }
    .protocol-step { padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.025); display:flex; gap:10px; align-items:flex-start; }
    .protocol-step strong { color:var(--green); }
    .section-divider-title { display:flex; align-items:center; gap:10px; margin:8px 0 12px; color:#ddffe2; font-weight:950; letter-spacing:.2px; }
    .section-divider-title::after { content:""; height:1px; flex:1; background:linear-gradient(90deg, var(--line), transparent); }
    .product-pill-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
    .compact-hint { border:1px solid rgba(125,255,134,.18); border-radius:14px; padding:10px 12px; background:rgba(0,0,0,.14); color:var(--muted); font-size:.88rem; line-height:1.38; }
    .quick-jump-bar { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
    .quick-jump-bar .btn { padding:8px 10px; font-size:.86rem; }

    @media (max-width:760px) {
      .wrap { padding:10px; }
      .hero { padding:14px; border-radius:22px; }
      h1 { font-size:1.9rem; line-height:1; }
      .top-bar { flex-direction:column; align-items:stretch; }
      .hero-actions { gap:8px; }
      .hero-actions .btn { flex:1 1 calc(50% - 8px); padding:9px 10px; font-size:.88rem; }
      .form-row { flex-direction:column; align-items:stretch; }
      .form-row > * { width:100% !important; min-width:0 !important; }
      .stats-grid,.scoreboard { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
      .quest-grid,.rank-list,.review-grid,.triple-grid,.grid,.bottom-grid { grid-template-columns:1fr; }
      .calendar-header { display:none; }
      .calendar-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
      .day-card { min-height:112px; padding:9px; }
      .day-top { font-size:.88rem; }
      .abbr { font-size:.68rem; }
      .score-card,.stat-card,.panel { padding:12px; }
      .score-value { font-size:1.18rem; }
      .avatar-frame { min-height:300px; }
      .avatar-img { max-height:310px; }
      .phase-track { grid-template-columns:repeat(2,1fr); }
      .row-item,.title-card,.perk-card,.inventory-item,.boss-card,.history-item { flex-direction:column; align-items:flex-start; }
      .modal-foot .btn { width:100%; }
    }

      .daily-note-grid { grid-template-columns:1fr; }
      .product-note-panel { margin-top:10px; padding:12px; }
      .protocol-list { gap:7px; }
      .protocol-step { padding:9px 10px; font-size:.88rem; }
      .quick-jump-bar { display:grid; grid-template-columns:1fr 1fr; }
      .quick-jump-bar .btn { width:100%; }
      .day-card .abbr { max-height:38px; overflow:hidden; }
      dialog { max-height:92vh; overflow:auto; }

    @media (max-width:420px) {
      .stats-grid,.scoreboard,.calendar-grid { grid-template-columns:1fr; }
      .hero-actions .btn { flex:1 1 100%; }
      h1 { font-size:1.7rem; }
      .avatar-frame { min-height:260px; }
      .avatar-img { max-height:270px; }
    }


    /* v0.9.3 Mobile Speed Balance First upgrades */
    .mobile-only { display:none; }
    .quick-focus-panel { margin-top:18px; }
    .focus-grid { display:grid; grid-template-columns:1.15fr repeat(3, .75fr); gap:12px; align-items:stretch; }
    .focus-card { border:1px solid var(--line); border-radius:var(--radius); padding:14px; background:linear-gradient(180deg, rgba(255,255,255,.035), rgba(0,0,0,.12)); }
    .focus-card.primary { border-color:var(--line-strong); box-shadow:inset 0 0 28px rgba(57,211,83,.05); }
    .focus-label { color:var(--muted); font-size:.78rem; text-transform:uppercase; letter-spacing:.6px; margin-bottom:4px; }
    .focus-value { font-size:1.35rem; font-weight:950; line-height:1.05; }
    .focus-sub { color:var(--muted); font-size:.84rem; margin-top:6px; }
    .focus-actions { margin-top:12px; display:flex; gap:10px; flex-wrap:wrap; }
    .mobile-bottom-nav { display:none; }
    .mobile-section-title { display:none; }
    .today-ring { width:58px; height:58px; border-radius:999px; display:grid; place-items:center; border:1px solid var(--line-strong); background:radial-gradient(circle, rgba(125,255,134,.14), rgba(0,0,0,.08)); font-weight:950; color:var(--green); box-shadow:var(--glow); }


    /* v0.9.3 Mobile Speed Edition — decision intelligence */
    .clarity-panel { margin-top:16px; border-color:rgba(125,255,134,.34); background:linear-gradient(135deg, rgba(125,255,134,.055), rgba(0,0,0,.08)), var(--panel); }
    .clarity-grid { display:grid; grid-template-columns:1.1fr .9fr .9fr; gap:12px; }
    .clarity-card { border:1px solid var(--line); border-radius:16px; padding:13px; background:rgba(0,0,0,.16); min-height:112px; }
    .clarity-card.primary { border-color:var(--line-strong); box-shadow:inset 0 0 24px rgba(57,211,83,.05); }
    .clarity-label { color:var(--muted); font-size:.76rem; text-transform:uppercase; letter-spacing:.55px; margin-bottom:5px; }
    .clarity-main { font-weight:950; font-size:1.13rem; line-height:1.12; }
    .clarity-sub { color:var(--muted); font-size:.86rem; line-height:1.35; margin-top:7px; }
    .clarity-list { margin:8px 0 0; padding-left:18px; color:#def9e2; font-size:.86rem; line-height:1.38; }
    .clarity-list li { margin:2px 0; }
    .warning-card { margin-top:12px; border:1px solid rgba(255,209,102,.42); background:rgba(255,209,102,.07); color:#ffefc0; border-radius:15px; padding:11px 12px; font-size:.9rem; line-height:1.38; display:none; }
    .warning-card.active { display:block; }
    .save-counter-pill { border-color:rgba(255,107,107,.40); background:rgba(255,107,107,.08); color:#ffd8d8; }
    @media (max-width:760px) { .clarity-grid { grid-template-columns:1fr; } .clarity-panel { margin-top:10px; padding:12px; } .clarity-card { min-height:auto; } }


    /* v0.9.3 Mobile Speed Edition */
    .mobile-speed-panel { margin-top:10px; border-color:rgba(125,220,255,.34); background:linear-gradient(135deg, rgba(125,220,255,.06), rgba(0,0,0,.10)), var(--panel); }
    .speed-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
    .speed-card { border:1px solid var(--line); border-radius:16px; padding:12px; background:rgba(0,0,0,.15); }
    .speed-card.primary { grid-column:1 / -1; border-color:var(--line-strong); }
    .speed-label { color:var(--muted); font-size:.74rem; text-transform:uppercase; letter-spacing:.55px; margin-bottom:5px; }
    .speed-main { font-weight:950; font-size:1.12rem; line-height:1.15; }
    .speed-sub { color:var(--muted); font-size:.82rem; line-height:1.32; margin-top:6px; }
    .speed-core-list { display:grid; gap:8px; margin-top:10px; }
    .speed-task { width:100%; display:flex; justify-content:space-between; align-items:center; gap:10px; text-align:left; border:1px solid var(--line); border-radius:14px; padding:10px 11px; background:rgba(255,255,255,.026); color:var(--text); font-weight:850; }
    .speed-task.done { border-color:var(--line-strong); background:rgba(57,211,83,.08); }
    .speed-task small { display:block; color:var(--muted); font-weight:600; margin-top:2px; }
    .speed-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
    .speed-actions .btn { width:100%; padding:10px 8px; }
    .mobile-collapse-head { display:none; }
    @media (max-width:760px) {
      #mobileSpeedPanel { order:3; }
      #dailyNoteSection { order:4; }
      #questSection { order:5; }
      #calendarSection { order:6; }
      #bossSection { order:7; }
      #levelsSection { order:8; }
      #growthSection { order:9; }
      #titlesSection { order:10; }
      #manageSection { order:11; }
      #historySection { order:12; }
      #saveModeSection { order:13; }
      body.today-only-mode #dashboard,
      body.today-only-mode #calendarSection,
      body.today-only-mode #bossSection,
      body.today-only-mode #levelsSection,
      body.today-only-mode #growthSection,
      body.today-only-mode #titlesSection,
      body.today-only-mode #manageSection,
      body.today-only-mode #historySection,
      body.today-only-mode #saveModeSection { display:none !important; }
      body.today-only-mode #mobileDailyPanel { order:1; }
      body.today-only-mode #mobileSpeedPanel { order:2; }
      body.today-only-mode #dailyNoteSection { order:3; }
      body.today-only-mode #questSection { order:4; }
      .mobile-collapse-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
      .mobile-collapsible.collapsed > *:not(.mobile-collapse-head) { display:none !important; }
      .mobile-collapsible.collapsed { padding:12px; }
      .mobile-collapsible .collapse-toggle { padding:8px 10px; font-size:.82rem; }
      .speed-grid { grid-template-columns:1fr; }
      .speed-actions { grid-template-columns:1fr 1fr; }
      .speed-task { padding:11px; }
    }



    /* v0.9.3 Mobile Speed Balance Edition — clarity layer */
    .product-note-panel { margin-top:18px; border-color:rgba(125,220,255,.30); }
    .daily-note-grid { display:grid; grid-template-columns:1fr .72fr; gap:14px; align-items:stretch; }
    .daily-note-box { display:grid; gap:10px; }
    .daily-note-box textarea { min-height:116px; }
    .protocol-list { display:grid; gap:8px; }
    .protocol-step { padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.025); display:flex; gap:10px; align-items:flex-start; }
    .protocol-step strong { color:var(--green); }
    .section-divider-title { display:flex; align-items:center; gap:10px; margin:8px 0 12px; color:#ddffe2; font-weight:950; letter-spacing:.2px; }
    .section-divider-title::after { content:""; height:1px; flex:1; background:linear-gradient(90deg, var(--line), transparent); }
    .product-pill-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
    .compact-hint { border:1px solid rgba(125,255,134,.18); border-radius:14px; padding:10px 12px; background:rgba(0,0,0,.14); color:var(--muted); font-size:.88rem; line-height:1.38; }
    .quick-jump-bar { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
    .quick-jump-bar .btn { padding:8px 10px; font-size:.86rem; }

    @media (max-width:760px) {
      body { padding-bottom:82px; }
      .desktop-heavy-note { display:none; }
      .mobile-only { display:block; }
      .wrap { display:flex; flex-direction:column; gap:0; }
      #dashboard { order:1; }
      #mobileDailyPanel { order:2; }
      #dailyNoteSection { order:3; }
      #questSection { order:4; }
      #calendarSection { order:5; }
      #bossSection { order:6; }
      #growthSection { order:7; }
      #manageSection { order:8; }
      #historySection { order:9; }
      #saveModeSection { order:10; }
      .mobile-section-title { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
      .mobile-section-title .tag { font-size:.76rem; }
      .quick-focus-panel { margin-top:10px; padding:12px; position:relative; overflow:hidden; }
      .quick-focus-panel::before { content:""; position:absolute; inset:-40% -20% auto auto; width:180px; height:180px; border-radius:999px; background:radial-gradient(circle, rgba(125,255,134,.16), transparent 64%); filter:blur(8px); pointer-events:none; }
      .focus-grid { grid-template-columns:1fr 1fr; gap:10px; position:relative; z-index:1; }
      .focus-card { padding:12px; border-radius:16px; }
      .focus-card.primary { grid-column:1 / -1; display:grid; grid-template-columns:auto 1fr; align-items:center; gap:12px; }
      .focus-value { font-size:1.18rem; }
      .focus-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; position:relative; z-index:1; }
      .focus-actions .btn { width:100%; padding:10px 8px; font-size:.86rem; }
      .hero-grid { gap:12px; }
      .avatar-panel { display:none; }
      .stats-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
      .stat-card { padding:9px; min-height:76px; }
      .stat-desc { display:none; }
      .bar { height:8px; margin-top:8px; }
      .scoreboard { position:sticky; top:0; z-index:12; background:rgba(3,7,6,.86); backdrop-filter:blur(10px); padding:8px; margin:12px -6px 0; border:1px solid var(--line); border-radius:16px; }
      .quest-grid { grid-template-columns:1fr; gap:10px; }
      .quest { padding:13px; border-radius:16px; }
      .quest-head { align-items:flex-start; }
      .quest-name { font-size:.96rem; }
      .quest-desc { font-size:.82rem; }
      .rank-list { grid-template-columns:repeat(2, minmax(0,1fr)); }
      .rank-card { padding:11px; }
      .rank-card .score-value { font-size:1rem; }
      .calendar-top { align-items:center; }
      .calendar-top h2 { font-size:1.15rem; }
      .calendar-grid { grid-template-columns:1fr; }
      .day-card { min-height:104px; border-radius:16px; }
      .mini-checks { grid-template-columns:repeat(10,1fr); }
      .bottom-grid, .triple-grid, .grid { gap:12px; margin-top:12px; }
      .history-list .history-item { padding:12px; }
      .save-panel { margin-bottom:12px; }
      dialog { max-height:92dvh; overflow:auto; }
      .modal-head,.modal-body,.modal-foot { padding:14px; }
      .review-grid { grid-template-columns:1fr 1fr; }
      .mobile-bottom-nav {
        display:grid; grid-template-columns:repeat(5,1fr); gap:6px; position:fixed; left:10px; right:10px; bottom:10px; z-index:80;
        padding:8px; border:1px solid var(--line-strong); border-radius:20px; background:rgba(5,12,8,.94); box-shadow:var(--shadow), var(--glow); backdrop-filter:blur(12px);
      }
      .mobile-bottom-nav button { border:1px solid rgba(125,255,134,.18); background:rgba(255,255,255,.035); color:var(--text); border-radius:14px; padding:8px 4px; font-size:.74rem; font-weight:850; display:grid; gap:2px; place-items:center; }
      .mobile-bottom-nav button:active { transform:scale(.98); }
      .mobile-bottom-nav span { font-size:1.05rem; line-height:1; }
    }


      .daily-note-grid { grid-template-columns:1fr; }
      .product-note-panel { margin-top:10px; padding:12px; }
      .protocol-list { gap:7px; }
      .protocol-step { padding:9px 10px; font-size:.88rem; }
      .quick-jump-bar { display:grid; grid-template-columns:1fr 1fr; }
      .quick-jump-bar .btn { width:100%; }
      .day-card .abbr { max-height:38px; overflow:hidden; }
      dialog { max-height:92vh; overflow:auto; }

    @media (max-width:420px) {
      .stats-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
      .focus-grid { grid-template-columns:1fr; }
      .focus-card.primary { grid-template-columns:auto 1fr; }
      .review-grid { grid-template-columns:1fr; }
      .mobile-bottom-nav { left:6px; right:6px; bottom:6px; padding:6px; border-radius:18px; }
      .mobile-bottom-nav button { font-size:.68rem; }
    }


    /* v0.9.6.6 Clean Cloud UX */
    .cloud-panel { margin-top:14px; border-color:rgba(125,220,255,.38); }
    .cloud-grid { display:grid; grid-template-columns:1fr auto auto; gap:10px; align-items:center; }
    .cloud-status-dot { display:inline-block; width:9px; height:9px; border-radius:999px; margin-right:7px; background:var(--red); box-shadow:0 0 12px rgba(255,107,107,.28); }
    .cloud-status-dot.online { background:var(--green); box-shadow:0 0 12px rgba(125,255,134,.36); }
    .cloud-status-dot.syncing { background:var(--gold); box-shadow:0 0 12px rgba(255,209,102,.36); }
    .cloud-status-dot.conflict { background:var(--red); box-shadow:0 0 14px rgba(255,107,107,.62); }
    .mobile-cloud-chip.conflict { border-color:rgba(255,107,107,.62); color:#ffe0e0; background:rgba(255,107,107,.10); }
    .cloud-mini { font-size:.82rem; color:var(--muted); margin-top:6px; }
    .cloud-danger-text { color:#ffd8d8; }
    .cloud-health-panel { margin-top:14px; border-color:rgba(125,220,255,.34); }
    .cloud-health-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:10px; margin-top:12px; }
    .cloud-health-item { border:1px solid var(--line); background:rgba(255,255,255,.025); border-radius:14px; padding:10px 12px; min-height:74px; }
    .cloud-health-label { color:var(--muted); font-size:.76rem; text-transform:uppercase; letter-spacing:.45px; }
    .cloud-health-value { margin-top:5px; font-weight:950; color:#effff2; line-height:1.2; }
    .cloud-health-note { color:var(--muted); font-size:.82rem; line-height:1.35; margin-top:10px; }
    .cloud-health-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:12px; }
    .cloud-warning { border-color:rgba(255,209,102,.46); background:rgba(255,209,102,.07); color:#ffefc0; border-radius:14px; padding:10px 12px; margin-top:10px; display:none; }
    .cloud-warning.show { display:block; }
    @media (max-width:760px) { .cloud-grid { grid-template-columns:1fr; } .cloud-panel input,.cloud-panel button { width:100%; } .cloud-health-grid { grid-template-columns:1fr 1fr; } .cloud-health-actions .btn { flex:1 1 calc(50% - 8px); } }
    @media (max-width:420px) { .cloud-health-grid { grid-template-columns:1fr; } .cloud-health-actions .btn { flex:1 1 100%; } }

  

    /* v0.9.6.6 Clean Cloud UX — login validation */
    .login-overlay { align-items:center; justify-content:center; }
    .login-card-v096 { width:min(920px, 100%); }
    .login-brand-row { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; position:relative; z-index:1; }
    .login-brand-row h1 { margin-top:8px; }

    /* v0.9.9.68 — app logo branding */
    .app-logo-lockup { display:flex; align-items:center; gap:16px; min-width:0; }
    .app-brand-logo { width:84px; height:84px; object-fit:contain; flex:0 0 auto; filter:drop-shadow(0 16px 24px rgba(0,0,0,.42)) drop-shadow(0 0 18px rgba(57,211,83,.20)); border-radius:22px; }
    .mobile-brand-lockup { display:flex; align-items:flex-start; gap:9px; min-width:0; }
    .mobile-brand-logo { width:28px; height:28px; object-fit:contain; flex:0 0 auto; filter:drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
    @media (max-width:760px) {
      .app-logo-lockup { align-items:flex-start; gap:12px; }
      .app-brand-logo { width:64px; height:64px; border-radius:18px; }
    }
    @media (max-width:420px) {
      .app-logo-lockup { gap:10px; }
      .app-brand-logo { width:56px; height:56px; }
    }

    .login-month-pill { border:1px solid var(--line); border-radius:999px; padding:8px 12px; color:#dfffe5; background:rgba(57,211,83,.07); font-weight:850; white-space:nowrap; }
    .login-main-grid { display:grid; grid-template-columns:1fr; gap:14px; margin-top:18px; position:relative; z-index:1; }
    .login-panel { border:1px solid var(--line); border-radius:20px; padding:16px; background:rgba(0,0,0,.15); }
    .login-panel-primary { border-color:var(--line-strong); box-shadow:inset 0 0 28px rgba(57,211,83,.045); }
    .login-panel h3 { margin-bottom:7px; }
    .login-panel p { color:var(--muted); margin:0 0 12px; line-height:1.4; }
    .login-panel-kicker { color:var(--green); font-size:.78rem; font-weight:950; letter-spacing:.6px; text-transform:uppercase; margin-bottom:6px; }
    .login-status { margin:8px 0 12px; }
    .login-field-stack { display:grid; gap:10px; }
    .login-field-stack input,.login-field-stack select,.login-field-stack button { width:100%; min-width:0; }
    .login-primary-btn { font-size:1rem; padding:12px 14px; }
    .login-help { color:var(--muted); font-size:.82rem; line-height:1.35; margin-top:10px; }
    .login-password-hint { margin-top:-2px; color:var(--muted); font-size:.78rem; line-height:1.25; }

    .saved-session-box { display:grid; gap:10px; border:1px solid rgba(87,211,255,.28); background:rgba(87,211,255,.07); border-radius:16px; padding:12px; margin:8px 0 12px; }
    .saved-session-box.hidden,.saved-session-box[hidden] { display:none !important; }
    .saved-session-box strong { display:block; color:#e9fbff; font-size:.92rem; margin-bottom:3px; }
    .saved-session-box span { display:block; color:var(--muted); font-size:.82rem; line-height:1.35; }
    .saved-session-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
    .cloud-status-dot.standby { background:#57d3ff; box-shadow:0 0 12px rgba(87,211,255,.65); }
    #mobileSpeedPanel,#dailyNoteSection,#questSection,#calendarSection { scroll-margin-top:12px; scroll-margin-bottom:96px; }
    html { scroll-padding-bottom:96px; }
    .login-feature-row { display:flex; gap:8px; flex-wrap:wrap; margin-top:14px; position:relative; z-index:1; }

    .mobile-home-panel { display:none; }
    .mobile-home-topline { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:12px; }
    .mobile-home-brand { font-weight:1000; letter-spacing:.7px; color:var(--green); font-size:1.12rem; }
    .mobile-home-date { color:var(--muted); font-size:.82rem; margin-top:2px; }
    .mobile-cloud-chip { border:1px solid var(--line); border-radius:999px; padding:8px 11px; background:rgba(255,255,255,.035); color:var(--text); display:inline-flex; align-items:center; gap:7px; font-weight:850; }
    .mobile-cloud-chip.online { border-color:var(--line-strong); color:#dfffe5; }
    .mobile-home-hero-card { display:grid; grid-template-columns:auto 1fr; gap:14px; align-items:center; border:1px solid var(--line-strong); border-radius:22px; padding:14px; background:radial-gradient(circle at 20% 15%, rgba(125,255,134,.14), transparent 34%), rgba(0,0,0,.16); box-shadow:var(--glow); }
    .mobile-score-orb { width:76px; height:76px; border-radius:999px; border:1px solid var(--line-strong); display:grid; place-items:center; background:radial-gradient(circle, rgba(125,255,134,.18), rgba(0,0,0,.08)); color:var(--green); font-weight:1000; line-height:.9; }
    .mobile-score-orb span { font-size:1.65rem; }
    .mobile-score-orb small { color:var(--muted); font-size:.74rem; font-weight:850; }
    .mobile-home-rank { font-size:1.18rem; font-weight:1000; line-height:1.05; }
    .mobile-home-summary { color:var(--muted); font-size:.9rem; line-height:1.35; margin-top:6px; }
    .mobile-next-action-card { margin-top:12px; border:1px solid rgba(125,220,255,.34); border-radius:18px; padding:13px; background:rgba(125,220,255,.055); }
    .mobile-next-label { color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.55px; font-weight:900; }
    .mobile-next-title { font-weight:1000; margin-top:5px; font-size:1.05rem; }
    .mobile-next-desc { color:var(--muted); font-size:.86rem; line-height:1.32; margin:5px 0 10px; }
    .mobile-next-action-card .btn { width:100%; }
    .mobile-home-mini-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin-top:10px; }
    .mobile-home-mini-grid > div { border:1px solid var(--line); border-radius:15px; padding:10px; background:rgba(0,0,0,.13); }
    .mobile-home-mini-grid strong { display:block; font-size:1.08rem; color:#eaffed; line-height:1; }
    .mobile-home-mini-grid span { display:block; color:var(--muted); font-size:.73rem; margin-top:4px; }
    .mobile-home-warning { display:none; margin-top:10px; border:1px solid rgba(255,209,102,.35); border-radius:15px; padding:10px 11px; background:rgba(255,209,102,.07); color:#ffefc0; font-size:.86rem; line-height:1.35; }
    .mobile-home-warning.show { display:block; }
    .mobile-home-actions { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:11px; }
    .mobile-home-actions .btn { width:100%; padding:10px 8px; }


    /* v0.9.6.6 Clean Cloud UX */
    .clean-autosave-note { color:var(--muted); font-size:.82rem; }
    .mobile-home-actions { grid-template-columns:repeat(3,1fr); }
    @media (max-width:420px) { .mobile-home-actions { grid-template-columns:1fr; } }


    /* v0.9.7.3 Cloud Safety */
    .profile-chip { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); border-radius:999px; padding:7px 11px; background:rgba(255,255,255,.035); color:#dfffe5; font-weight:900; }
    .profile-chip::before { content:'👤'; }
    .profile-safe-note { color:var(--muted); font-size:.82rem; line-height:1.35; margin-top:8px; }
    .profile-dialog-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
    .profile-box { border:1px solid var(--line); border-radius:14px; padding:12px; background:rgba(255,255,255,.025); }
    .profile-box-label { color:var(--muted); font-size:.76rem; text-transform:uppercase; letter-spacing:.45px; }
    .profile-box-value { margin-top:4px; font-weight:950; color:#effff2; }
    .admin-panel { margin-top:16px; border:1px solid rgba(255,209,102,.32); border-radius:16px; padding:14px; background:rgba(255,209,102,.045); }
    .admin-panel-head { display:flex; justify-content:space-between; gap:10px; align-items:center; flex-wrap:wrap; }
    .admin-status { color:var(--muted); font-size:.84rem; line-height:1.35; }
    .admin-list { display:grid; gap:10px; margin-top:12px; max-height:360px; overflow:auto; padding-right:2px; }
    .admin-card { border:1px solid var(--line); border-radius:14px; padding:12px; background:rgba(0,0,0,.16); }
    .admin-card.disabled { border-color:rgba(255,107,107,.42); background:rgba(255,107,107,.055); }
    .admin-card-title { display:flex; justify-content:space-between; gap:10px; align-items:flex-start; flex-wrap:wrap; font-weight:950; color:#effff2; }
    .admin-meta { color:var(--muted); font-size:.78rem; line-height:1.45; margin-top:6px; }
    .admin-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
    .admin-actions .btn { padding:8px 10px; font-size:.82rem; }
    .admin-new-password { flex:1; min-width:180px; }
    .backup-panel { margin-top:16px; border:1px solid rgba(125,220,255,.30); border-radius:16px; padding:14px; background:rgba(125,220,255,.04); }
    .backup-panel-head { display:flex; justify-content:space-between; gap:10px; align-items:center; flex-wrap:wrap; }
    .backup-list { display:grid; gap:9px; margin-top:12px; max-height:260px; overflow:auto; padding-right:2px; }
    .backup-card { border:1px solid var(--line); border-radius:14px; padding:11px 12px; background:rgba(0,0,0,.14); display:flex; justify-content:space-between; gap:10px; align-items:flex-start; flex-wrap:wrap; }
    .backup-card-title { font-weight:950; color:#effff2; word-break:break-word; }
    .backup-card-meta { color:var(--muted); font-size:.78rem; line-height:1.45; margin-top:4px; }
    .backup-actions { display:flex; gap:8px; flex-wrap:wrap; }
    .backup-actions .btn { padding:8px 10px; font-size:.82rem; }
    @media (max-width:760px) { .profile-dialog-grid { grid-template-columns:1fr; } .mobile-profile-chip { margin-top:4px; font-size:.82rem; padding:6px 9px; } }


    /* v0.9.7.5 Performance Cleanup */
    .hero-main-actions { justify-content:flex-end; }
    .profile-section { border:1px solid var(--line); border-radius:16px; padding:12px 14px; background:rgba(255,255,255,.025); }
    .profile-section + .profile-section { margin-top:4px; }
    .profile-section > summary { cursor:pointer; list-style:none; font-weight:950; color:#ddffe2; display:flex; align-items:center; justify-content:space-between; gap:10px; }
    .profile-section > summary::-webkit-details-marker { display:none; }
    .profile-section > summary::after { content:'Apri'; color:var(--muted); font-size:.78rem; border:1px solid var(--line); border-radius:999px; padding:4px 8px; font-weight:800; }
    .profile-section[open] > summary::after { content:'❌'; }
    .profile-section-body { margin-top:12px; display:grid; gap:12px; }
    .settings-actions { display:flex; flex-wrap:wrap; gap:8px; }
    .settings-actions .btn { padding:9px 11px; }
    .settings-theme-grid { display:flex; flex-wrap:wrap; gap:8px; }
    [data-theme-btn].active { border-color:var(--line-strong); color:#effff2; box-shadow:inset 0 0 18px rgba(57,211,83,.08); }
    .future-lock-note { display:none; margin-top:10px; border:1px solid rgba(125,220,255,.36); border-radius:14px; padding:10px 12px; color:#d9f7ff; background:rgba(125,220,255,.07); font-size:.88rem; line-height:1.35; }
    .future-lock-note.show { display:block; }
    .quest.locked, .boss-card.locked { opacity:.72; cursor:not-allowed; filter:saturate(.72); }
    .quest.locked:hover, .boss-card.locked:hover { transform:none; box-shadow:none; }
    .day-card.future { opacity:.72; border-style:dashed; }
    .day-card.future .mini-check.on { opacity:.35; }
    @media (max-width:760px) {
      .login-overlay { align-items:flex-start; overflow:auto; padding:12px; }
      .login-card-v096 { margin:8px 0 88px; padding:18px; border-radius:24px; width:100%; }
      .login-brand-row { display:block; }
      .login-brand-row h1 { font-size:2.25rem; line-height:.94; }
      .login-month-pill { display:inline-flex; margin-top:12px; font-size:.82rem; }
      .login-main-grid { grid-template-columns:1fr; gap:12px; margin-top:14px; }
      .login-panel { padding:14px; border-radius:18px; }
      .login-panel-secondary p { display:none; }
      .login-feature-row { display:none; }
      .login-help { font-size:.78rem; }
      .saved-session-actions { grid-template-columns:1fr; }
      #dashboard { display:none !important; }
      #mobileHomePanel { display:block; order:1; margin-top:0; padding:13px; border-color:rgba(125,255,134,.38); }
      #mobileDailyPanel { display:none !important; }
      #mobileSpeedPanel { order:2; margin-top:10px; padding:12px; }
      #mobileSpeedPanel .mobile-section-title strong { font-size:0; }
      #mobileSpeedPanel .mobile-section-title strong::after { content:'⚔️ Fondamenta rapide'; font-size:1rem; }
      #mobileSpeedPanel .speed-grid { display:none; }
      #mobileSpeedPanel .speed-actions { grid-template-columns:1fr 1fr; }
      #dailyNoteSection { order:3; }
      #questSection { order:4; }
      #calendarSection { order:5; }
      #questSection > .panel:nth-child(2) { display:none; }
      #dailyNoteSection .section-head .muted,
      #questSection .section-head h2,
      #questSection .legend .tag { display:none; }
      #dailyNoteSection .quick-jump-bar { display:none; }
      #dailyNoteSection .daily-note-grid > div:nth-child(2) { display:none; }
      .product-note-panel textarea { min-height:86px; }
      body.today-only-mode #mobileHomePanel { order:1; }
      body.today-only-mode #mobileSpeedPanel { order:2; }
      body.today-only-mode #dailyNoteSection { order:3; }
      body.today-only-mode #questSection { order:4; }
    }

/* v0.9.7.7 stability */
.mobile-bottom-nav.hidden { display:none !important; }
body:not(.app-started) .mobile-bottom-nav { display:none !important; }
.mobile-bottom-nav { pointer-events:auto; }
.mobile-bottom-nav button { touch-action:manipulation; cursor:pointer; pointer-events:auto; }

/* v0.9.8.2 archive restore + calendar planning */
.archive-details { margin-top:10px; border:1px solid var(--line); border-radius:var(--radius-sm); padding:10px 12px; background:rgba(255,255,255,.025); }
.archive-details summary { cursor:pointer; font-weight:900; color:var(--muted); }
.archive-list { display:grid; gap:10px; margin-top:10px; }
.row-item.archived { opacity:.86; border-style:dashed; }
#calendarSection .form-row { align-items:center; }
@media (max-width:720px){
  #calendarSection .form-row { display:grid; grid-template-columns:1fr 1fr; width:100%; }
  #calendarSection .form-row label, #calendarSection .form-row select { grid-column:1 / -1; width:100%; }
}

/* v0.9.8.2 archive buttons fix */
.is-hidden { display:none !important; }
.archive-summary { width:100%; appearance:none; border:0; background:transparent; color:var(--muted); font-weight:950; cursor:pointer; text-align:left; padding:2px 0; }
.archive-summary:hover { color:var(--text); }
.archive-summary[aria-expanded="true"] { color:var(--green); }

/* v0.9.8.3 archive UI + agenda planning */
.planning-markers { display:flex; flex-wrap:wrap; gap:5px; margin-top:6px; }
.planning-marker { display:inline-flex; align-items:center; gap:4px; padding:3px 7px; border-radius:999px; border:1px solid rgba(116,215,255,.38); background:rgba(116,215,255,.08); color:#d7f4ff; font-size:.7rem; font-weight:900; }
.planning-marker.gold { border-color:rgba(255,209,102,.46); background:rgba(255,209,102,.09); color:#ffefc0; }
.agenda-editor { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.agenda-editor-card { border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px; background:rgba(255,255,255,.025); }
.agenda-list { display:grid; gap:12px; }
.agenda-bucket { border:1px solid rgba(125,220,255,.22); border-radius:var(--radius-sm); background:rgba(255,255,255,.018); overflow:hidden; }
.agenda-bucket.today { border-color:rgba(57,211,83,.32); background:linear-gradient(180deg, rgba(57,211,83,.055), rgba(0,0,0,.04)); }
.agenda-bucket summary { cursor:pointer; list-style:none; display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px; font-weight:900; }
.agenda-bucket summary::-webkit-details-marker { display:none; }
.agenda-bucket summary small { display:block; margin-top:3px; color:var(--muted); font-size:.76rem; font-weight:750; }
.agenda-bucket summary::before { content:'▸'; color:var(--cyan); transition:transform .16s ease; }
.agenda-bucket[open] summary::before { transform:rotate(90deg); }
.agenda-bucket-body { display:grid; gap:10px; padding:0 12px 12px; }
.agenda-empty,.agenda-global-empty { padding:8px 2px; }
.agenda-day-card { border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px; background:linear-gradient(180deg, rgba(255,255,255,.03), transparent), rgba(7,16,11,.96); }
.agenda-day-head,.agenda-line { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; }
.agenda-day-head { margin-bottom:8px; }
.agenda-line { padding:8px 0; border-top:1px solid rgba(255,255,255,.06); }
.agenda-line.note { color:var(--muted); justify-content:flex-start; }
.agenda-line.boss { color:#ffefc0; }
#agendaSection { scroll-margin-top:12px; scroll-margin-bottom:96px; }
.archive-summary { min-height:34px; border-radius:12px; padding:6px 8px; background:rgba(255,255,255,.03); border:1px solid var(--line); }
@media (max-width: 760px){ .agenda-editor { grid-template-columns:1fr; } .agenda-line,.agenda-day-head { align-items:flex-start; } }


/* v0.9.8.4 archive grid + history UI fix */
.archive-toolbar { margin-bottom:10px; background:rgba(255,255,255,.035); border-style:solid; }
.inline-archive-btn { padding:6px 9px; white-space:nowrap; }
.quest-head .cluster { gap:8px; }
@media (max-width: 720px){ .inline-archive-btn { font-size:11px; padding:5px 7px; } }


/* v0.9.9.3 archive catalog stability fix — retained */
.archive-manager-overlay { position:fixed; inset:0; z-index:9999; display:none; align-items:center; justify-content:center; padding:18px; background:rgba(0,0,0,.72); backdrop-filter:blur(6px); }
.archive-manager-overlay.open { display:flex; }
.archive-manager-card { width:min(720px, 96vw); max-height:min(80vh, 760px); overflow:auto; border:1px solid var(--line); border-radius:var(--radius); background:linear-gradient(180deg, var(--panel), var(--panel2)); box-shadow:0 22px 60px rgba(0,0,0,.55); }
.archive-manager-card .modal-body { max-height:62vh; overflow:auto; }
@media (max-width:720px){ .archive-manager-overlay { align-items:flex-end; padding:10px; } .archive-manager-card { width:100%; max-height:86vh; border-radius:22px; } }

/* v0.9.9.21 Frontend Cleanup and Safety */
.auth-split { display:grid; gap:12px; }
.auth-box { border:1px solid var(--line); border-radius:16px; padding:12px; background:rgba(255,255,255,.025); }
.auth-login-box { border-color:rgba(125,255,134,.42); box-shadow:inset 0 0 18px rgba(57,211,83,.035); }
.auth-box-head { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:10px; }
.auth-box-head strong { color:#effff2; font-weight:950; }
.auth-box-head span { color:var(--muted); font-size:.78rem; }
.auth-signup-box > summary { cursor:pointer; list-style:none; display:flex; align-items:center; justify-content:space-between; gap:10px; font-weight:950; color:#ddffe2; }
.auth-signup-box > summary::-webkit-details-marker { display:none; }
.auth-signup-box > summary::after { content:'Apri'; color:var(--muted); font-size:.78rem; border:1px solid var(--line); border-radius:999px; padding:4px 8px; }
.auth-signup-box[open] > summary::after { content:'❌'; }
.auth-signup-box summary span { display:grid; gap:2px; }
.auth-signup-box summary small { color:var(--muted); font-weight:750; }
.auth-signup-body { margin-top:12px; }
.today-recovery-banner { margin:14px 0 0; border:1px solid rgba(125,220,255,.44); background:linear-gradient(180deg, rgba(125,220,255,.10), rgba(57,211,83,.045)); border-radius:18px; padding:12px; display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; box-shadow:inset 0 0 22px rgba(125,220,255,.04); }
.today-recovery-banner strong { color:#d9f7ff; }
.today-recovery-banner .micro { margin-top:2px; }
.today-recovery-banner .btn { white-space:nowrap; }
.archive-manager-card .row-item.archived { align-items:flex-start; }
.archive-manager-card .row-item.archived .cluster, .archive-list .row-item.archived .cluster { justify-content:flex-end; }
.archive-danger-note { border:1px solid rgba(255,107,107,.32); border-radius:12px; padding:8px 10px; background:rgba(255,107,107,.055); color:#ffd8d8; }
@media (max-width:760px) {
  .today-recovery-banner { position:sticky; top:8px; z-index:45; margin:10px 0; align-items:stretch; }
  .today-recovery-banner > div { width:100%; }
  .today-recovery-banner .btn { width:100%; min-height:46px; }
  .btn, input, select, textarea { min-height:44px; }
  .btn.small { min-height:40px; padding:9px 11px; }
  .quest { padding:12px; }
  .quest-head { align-items:flex-start; }
  .quest-head .cluster { width:100%; justify-content:flex-start; margin-top:4px; }
  .boss-card .cluster { align-items:stretch; }
  .boss-card .cluster .cluster { width:100%; display:grid; grid-template-columns:1fr 1fr; }
  .boss-card .cluster .cluster .reward { grid-column:1 / -1; }
  .row-item.archived { display:grid; gap:10px; align-items:stretch; }
  .row-item.archived .cluster { display:grid; grid-template-columns:1fr; width:100%; }
  #manageSection .panel { padding:14px; }
  #manageSection .form-row { gap:8px; }
  .calendar-header,.calendar-grid { gap:6px; }
  .day-card { min-height:104px; padding:8px; }
  .abbr { display:none; }
  .archive-manager-overlay { padding:0; align-items:stretch; }
  .archive-manager-card { border-radius:0; width:100%; max-height:100vh; }
  .archive-manager-card .modal-head { position:sticky; top:0; z-index:2; background:rgba(7,17,12,.98); }
  .archive-manager-card .modal-body { max-height:none; overflow:visible; padding-bottom:96px; }
  #questSection, #manageSection, #calendarSection, #agendaSection { scroll-margin-top:12px; }
}

/* Guided first run, progressive Oggi loop and iPhone/PWA lifecycle hardening. */
.global-ui-state {
  position:fixed;
  z-index:12000;
  top:max(10px, env(safe-area-inset-top, 0px));
  left:50%;
  width:min(560px, calc(100% - 24px));
  transform:translateX(-50%);
  padding:12px 14px;
  border:1px solid rgba(255,107,122,.55);
  border-radius:14px;
  background:rgba(35,9,14,.97);
  color:#fff;
  box-shadow:0 18px 48px rgba(0,0,0,.45);
}
.global-ui-state[data-state="info"] { border-color:rgba(125,220,255,.48); background:rgba(7,23,31,.97); }
.mobile-sync-feedback {
  margin:8px 0 12px;
  padding:8px 10px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:12px;
  color:var(--muted);
  background:rgba(255,255,255,.025);
  font-size:.76rem;
  line-height:1.35;
}
.mobile-sync-feedback[data-state="saving"] { color:var(--cyan); border-color:rgba(125,220,255,.32); }
.mobile-sync-feedback[data-state="saved"] { color:#a8f5b1; border-color:rgba(125,255,134,.24); }
.mobile-sync-feedback[data-state="error"],
.mobile-sync-feedback[data-state="offline"] { color:#ffd0d5; border-color:rgba(255,107,122,.34); }
.mobile-run-loop {
  display:grid;
  gap:12px;
  padding:16px;
  margin:14px 0 10px;
  border:1px solid rgba(var(--theme-accent-rgb,57,211,83),.25);
  border-radius:22px;
  background:linear-gradient(155deg, rgba(var(--theme-accent-rgb,57,211,83),.10), rgba(6,15,10,.92) 56%);
  box-shadow:0 18px 44px rgba(0,0,0,.25);
}
.mobile-run-loop-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.mobile-run-loop-head h2 { margin:3px 0 0; font-size:1.2rem; line-height:1.15; }
.mobile-run-loop-track {
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:5px;
  margin:0;
  padding:0;
  list-style:none;
}
.mobile-run-loop-track li { display:grid; justify-items:center; gap:4px; min-width:0; color:var(--muted); font-size:.67rem; }
.mobile-run-loop-track li span {
  display:grid;
  place-items:center;
  width:27px;
  height:27px;
  border:1px solid rgba(255,255,255,.16);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  font-weight:900;
}
.mobile-run-loop-track li.current { color:#fff; }
.mobile-run-loop-track li.current span { border-color:var(--cyan); box-shadow:0 0 0 4px rgba(125,220,255,.10); }
.mobile-run-loop-track li.done span { color:#071209; border-color:var(--green); background:var(--green); }
.mobile-run-coach { padding:14px; border-radius:16px; border:1px solid rgba(255,255,255,.10); background:rgba(0,0,0,.20); }
.mobile-run-coach .mobile-next-title { margin-top:4px; font-size:1.05rem; font-weight:900; }
.mobile-run-coach .mobile-next-desc { margin-top:5px; color:var(--muted); line-height:1.45; }
.mobile-run-reward { margin-top:10px; padding-top:9px; border-top:1px solid rgba(255,255,255,.08); color:#c9f7d0; font-size:.76rem; line-height:1.4; }
.mobile-run-primary { width:100%; min-height:52px; font-size:1rem; box-shadow:0 10px 30px rgba(var(--theme-accent-rgb,57,211,83),.18); touch-action:manipulation; }
.mobile-run-insights,
.mobile-today-tools { border:1px solid rgba(255,255,255,.08); border-radius:14px; background:rgba(255,255,255,.025); }
.mobile-run-insights summary,
.mobile-today-tools > summary { display:flex; justify-content:space-between; gap:10px; padding:11px 12px; cursor:pointer; color:var(--muted); font-size:.78rem; font-weight:800; }
.mobile-run-insights-grid { display:grid; gap:10px; padding:0 12px 12px; }
.mobile-run-insights-grid > div { display:grid; gap:3px; padding:10px; border-radius:11px; background:rgba(0,0,0,.17); }
.mobile-run-insights-grid span { color:var(--muted); font-size:.76rem; line-height:1.4; }
.mobile-run-insights-grid .btn { justify-self:start; margin-top:6px; }
.mobile-today-tools { margin:8px 0 12px; }
.mobile-today-tools .mobile-home-actions,
.mobile-today-tools .mobile-journey-strip { margin:0 10px 10px; }
.quest-empty-state { grid-column:1 / -1; display:grid; justify-items:start; gap:8px; padding:18px; border:1px dashed rgba(125,220,255,.30); border-radius:16px; color:var(--muted); }
.quest-empty-state strong { color:var(--text); }

.product-onboarding-dialog {
  width:min(680px, calc(100% - 24px));
  max-width:680px;
  max-height:min(780px, calc(var(--app-viewport-height, 100dvh) - 24px));
  padding:0;
  border:1px solid rgba(var(--theme-accent-rgb,57,211,83),.36);
  border-radius:24px;
  color:var(--text);
  background:linear-gradient(160deg, rgba(13,31,20,.99), rgba(4,10,7,.99));
  box-shadow:0 30px 90px rgba(0,0,0,.68);
  overflow:hidden;
}
.product-onboarding-dialog::backdrop { background:rgba(1,5,3,.82); backdrop-filter:blur(8px); }
.product-onboarding-head,
.product-onboarding-foot { padding:max(14px, env(safe-area-inset-top, 0px)) 16px 14px; }
.product-onboarding-head h3 { margin:5px 0 2px; }
.product-onboarding-body { overflow:auto; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; padding:18px 18px 20px; }
.product-onboarding-foot { display:flex; gap:9px; justify-content:flex-end; padding:12px 16px max(14px, env(safe-area-inset-bottom, 0px)); background:rgba(4,10,7,.98); }
.product-onboarding-step { min-height:250px; }
.product-onboarding-step h4 { margin:7px 0; font-size:1.45rem; }
.onboarding-step-kicker { color:var(--cyan); font-size:.76rem; font-weight:900; letter-spacing:.06em; text-transform:uppercase; }
.onboarding-goal-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:16px; }
.onboarding-goal-grid button,
.onboarding-demo-quest {
  display:grid;
  gap:4px;
  min-height:92px;
  padding:13px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:15px;
  color:var(--text);
  background:rgba(255,255,255,.035);
  text-align:left;
  cursor:pointer;
  touch-action:manipulation;
}
.onboarding-goal-grid button.selected,
.onboarding-goal-grid button[aria-pressed="true"],
.onboarding-demo-quest.done { border-color:var(--green); background:rgba(var(--theme-accent-rgb,57,211,83),.13); }
.onboarding-goal-grid button > span { font-size:1.35rem; }
.onboarding-goal-grid small,
.onboarding-demo-quest small { color:var(--muted); }
.onboarding-demo-quest { grid-template-columns:auto 1fr; align-items:center; width:100%; margin:16px 0 10px; }
.onboarding-demo-quest > span:first-child { font-size:1.35rem; }
.onboarding-demo-quest > span:last-child { display:grid; gap:4px; }
.onboarding-inline-state { padding:11px 12px; border-radius:12px; color:var(--muted); background:rgba(125,220,255,.07); }
.onboarding-inline-state.success { color:#b8f6c0; background:rgba(125,255,134,.07); }
.onboarding-progress-demo { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; margin:16px 0; }
.onboarding-progress-demo > div { display:grid; gap:5px; padding:12px; border:1px solid rgba(255,255,255,.09); border-radius:13px; background:rgba(255,255,255,.025); }
.onboarding-progress-demo strong { font-size:1.1rem; }
.onboarding-progress-demo span,
.onboarding-progress-demo small { color:var(--muted); font-size:.72rem; }
.onboarding-save-preview { display:flex; gap:11px; align-items:center; padding:14px; margin:14px 0; border:1px solid rgba(125,255,134,.22); border-radius:14px; background:rgba(125,255,134,.06); }
.onboarding-save-preview > span { font-size:1.6rem; }
.onboarding-save-preview > div { display:grid; gap:3px; }
.onboarding-save-preview small { color:var(--muted); }
.product-events-preference { display:flex; gap:10px; align-items:flex-start; padding:12px; border:1px solid rgba(255,255,255,.08); border-radius:12px; }
.product-events-preference input { margin-top:3px; }
.product-events-preference span { display:grid; gap:3px; }
.admin-totp-field { display:grid; gap:4px; min-width:130px; }
.admin-totp-field > span { color:var(--muted); font-size:.68rem; font-weight:800; }
.admin-totp-field input { width:100%; letter-spacing:.2em; font-variant-numeric:tabular-nums; }

@media (max-width:760px) {
  body.mobile-paged-shell {
    min-height:var(--app-viewport-height, 100dvh);
    padding-left:env(safe-area-inset-left, 0px);
    padding-right:env(safe-area-inset-right, 0px);
  }
  .mobile-home-panel { padding-top:max(12px, env(safe-area-inset-top, 0px)); }
  .mobile-bottom-nav { left:max(6px, env(safe-area-inset-left, 0px)); right:max(6px, env(safe-area-inset-right, 0px)); }
  body.virtual-keyboard-open { padding-bottom:12px !important; }
  body.virtual-keyboard-open .mobile-bottom-nav,
  body.virtual-keyboard-open .mobile-floating-actions { opacity:0; transform:translateY(120%); pointer-events:none; }
  .product-onboarding-dialog { width:calc(100% - 16px); max-height:calc(var(--app-viewport-height, 100dvh) - 12px); border-radius:20px; }
  .product-onboarding-foot { display:grid; grid-template-columns:auto auto 1fr; }
  .product-onboarding-foot .btn { min-height:46px; padding-inline:12px; }
}
@media (max-width:430px) {
  .mobile-run-loop { padding:14px; border-radius:19px; }
  .mobile-run-loop-track li b { font-size:.65rem; }
  .onboarding-progress-demo { grid-template-columns:1fr; }
  .product-onboarding-step { min-height:225px; }
}
@media (max-width:390px) {
  .mobile-run-loop { margin-inline:-2px; padding:12px; }
  .onboarding-goal-grid { gap:8px; }
  .onboarding-goal-grid button { min-height:86px; padding:10px; }
  .product-onboarding-foot { grid-template-columns:1fr 1fr; }
  .product-onboarding-foot #nextProductOnboardingBtn { grid-column:1 / -1; grid-row:1; }
}
@media (max-width:360px) {
  .mobile-run-loop-track { gap:2px; }
  .mobile-run-loop-track li b { font-size:.59rem; }
  .onboarding-goal-grid { grid-template-columns:1fr; }
  .product-onboarding-head { padding-inline:12px; }
  .product-onboarding-body { padding-inline:13px; }
}
@supports (-webkit-touch-callout:none) {
  input, textarea, select { font-size:max(16px, 1em); }
  .product-onboarding-dialog { transform:translateZ(0); }
}
@media (prefers-reduced-motion:reduce) {
  body.virtual-keyboard-open .mobile-bottom-nav,
  body.virtual-keyboard-open .mobile-floating-actions { transition:none !important; }
}
@media (max-width:420px) {
  .boss-card .cluster .cluster { grid-template-columns:1fr; }
  .calendar-grid { font-size:.78rem; }
  .day-card { min-height:96px; }
  .day-xp,.day-rank { font-size:.74rem; }
}


/* v0.9.9.21 Frontend Cleanup and Safety */
.quest-mobile-meta { display:none; }
@media (max-width:760px) {
  /* Due aree mentali: Oggi rapido e Quest gestione. Le card operative diventano compatte. */
  .mobile-bottom-nav button:first-child { border-color:rgba(255,209,102,.42); background:rgba(255,209,102,.06); }
  #mobileSpeedPanel .speed-actions #mobileJumpQuestBtn { font-size:.78rem; }
  #questSection .quest-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  #questSection .quest { min-height:122px; padding:12px 10px 42px; border-radius:18px; display:block; }
  #questSection .quest::before { content:attr(data-abbr); position:absolute; right:10px; top:10px; min-width:30px; height:30px; border-radius:12px; display:grid; place-items:center; border:1px solid rgba(125,255,134,.24); background:rgba(125,255,134,.07); color:#eaffed; font-weight:1000; font-size:.82rem; z-index:1; }
  #questSection .quest.completed::after { right:8px; bottom:3px; top:auto; font-size:2.7rem; color:rgba(125,255,134,.12); }
  #questSection .quest-head { display:block; padding-right:34px; }
  #questSection .quest-name { font-size:.9rem; line-height:1.08; min-height:2.15em; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
  #questSection .quest-xp { margin-top:7px; font-size:1rem; }
  #questSection .quest-desc { display:none; }
  #questSection .quest-mobile-meta { display:block; position:absolute; left:10px; right:10px; bottom:10px; color:var(--muted); font-size:.72rem; line-height:1.15; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  #questSection .inline-archive-btn { position:absolute; right:8px; bottom:8px; z-index:3; font-size:.66rem; min-height:30px; padding:5px 7px; opacity:.88; }
  #questSection .quest-head .cluster { width:auto; margin-top:0; justify-content:flex-start; }

  /* Mese mobile: griglia compatta invece di lista verticale lunghissima. */
  #calendarSection .calendar-header { display:none; }
  #calendarSection .calendar-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
  #calendarSection .day-card { min-height:92px; padding:9px; border-radius:16px; }
  #calendarSection .day-top { margin-bottom:4px; display:grid; gap:2px; }
  #calendarSection .day-label { font-size:.78rem; color:var(--muted); }
  #calendarSection .day-score { font-size:.98rem; color:#effff2; }
  #calendarSection .mini-checks { grid-template-columns:repeat(5,1fr); gap:3px; margin:6px 0; }
  #calendarSection .mini-check { height:8px; border-radius:999px; }
  #calendarSection .abbr, #calendarSection .day-rank, #calendarSection .day-markers { display:none; }
  #calendarSection .day-xp { margin-top:5px; font-size:.70rem; line-height:1.12; color:var(--muted); }
  #calendarSection .planning-markers { margin-top:4px; gap:3px; }
  #calendarSection .planning-marker { font-size:.62rem; padding:2px 5px; }

  .archive-details { margin-top:12px; }
  .archive-summary { min-height:46px; display:flex; align-items:center; justify-content:space-between; }
  .archive-manager-card .row-item.archived .cluster, .archive-list .row-item.archived .cluster { justify-content:stretch; }
}
@media (max-width:380px) {
  #questSection .quest-grid { gap:8px; }
  #questSection .quest { min-height:116px; padding:10px 9px 40px; }
  #questSection .quest-name { font-size:.84rem; }
  #calendarSection .calendar-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  #calendarSection .day-card { min-height:88px; padding:8px 6px; }
}

/* v0.9.9.21 Frontend Cleanup and Safety */
.mobile-status-avatar-wrap { display:none; }
.desktop-day-prefix { display:inline; }
@media (max-width:760px) {
  /* Mobile IA: Status sostituisce Oggi/Fondamenta rapide. */
  #mobileHomePanel { scroll-margin-top:12px; scroll-margin-bottom:96px; order:2; }
  #mobileDailyPanel { order:3; }
  #dailyNoteSection { order:4; }
  #questSection { order:5; }
  #calendarSection { order:6; }
  #bossSection { order:7; }
  #growthSection { order:8; }
  #manageSection { order:9; }
  #historySection { order:10; }
  #saveModeSection { order:11; }
  #mobileSpeedPanel { display:none !important; }
  #mobileSpeedPanel .mobile-section-title strong::after { content:'' !important; }
  .mobile-bottom-nav button:first-child { border-color:rgba(125,220,255,.42); background:rgba(125,220,255,.07); }

  /* Status mobile: avatar + XP mese, non una seconda sezione quest. */
  .mobile-home-brand { color:var(--cyan); letter-spacing:1.2px; }
  .mobile-status-hero-card { grid-template-columns:auto auto 1fr; align-items:center; gap:10px; }
  .mobile-status-avatar-wrap { display:grid; place-items:center; width:58px; height:58px; border-radius:20px; border:1px solid rgba(125,255,134,.22); background:radial-gradient(circle at 50% 20%, rgba(125,255,134,.16), rgba(0,0,0,.22)); overflow:hidden; }
  .mobile-status-avatar { width:68px; height:68px; object-fit:contain; transform:translateY(6px); filter:drop-shadow(0 8px 12px rgba(0,0,0,.4)); }
  .mobile-score-orb { width:64px; height:64px; min-width:64px; }
  .mobile-status-mini-grid { grid-template-columns:repeat(4,minmax(0,1fr)); }
  .mobile-status-mini-grid div { min-height:58px; }
  .mobile-status-mini-grid strong { font-size:1rem; }
  .mobile-home-actions { grid-template-columns:1fr 1fr; }

  /* Quest mobile: titolo pulito e 3 card per riga. */
  #questSection .mobile-section-title strong::after { content:''; }
  #questSection .section-head h2 { display:none; }
  #questSection .quest-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
  #questSection .quest { min-height:94px; padding:9px 7px 30px; border-radius:15px; }
  #questSection .quest::before { right:7px; top:7px; min-width:24px; height:24px; border-radius:9px; font-size:.70rem; }
  #questSection .quest-head { padding-right:28px; }
  #questSection .quest-name { font-size:.76rem; line-height:1.04; min-height:2.1em; -webkit-line-clamp:2; }
  #questSection .quest-xp { margin-top:5px; font-size:.84rem; }
  #questSection .quest-mobile-meta { left:7px; right:7px; bottom:7px; font-size:.64rem; }
  #questSection .inline-archive-btn { font-size:.58rem; min-height:26px; padding:4px 5px; right:5px; bottom:5px; }

  /* Mese mobile: vero calendario compatto a 7 colonne. */
  #calendarSection .calendar-header { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
  #calendarSection .calendar-header .dayhead { font-size:.62rem; padding:0 0 3px; text-align:center; color:var(--muted); }
  #calendarSection .calendar-grid { grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
  #calendarSection .day-card { min-height:54px; padding:5px 3px; border-radius:11px; display:grid; align-content:start; gap:2px; }
  #calendarSection .day-top { display:grid; gap:1px; text-align:center; margin:0; }
  #calendarSection .desktop-day-prefix { display:none; }
  #calendarSection .day-label { font-size:.72rem; line-height:1; color:#effff2; font-weight:950; }
  #calendarSection .day-score { font-size:.62rem; line-height:1; color:var(--muted); font-weight:850; }
  #calendarSection .mini-checks, #calendarSection .abbr, #calendarSection .day-xp, #calendarSection .day-rank, #calendarSection .day-markers { display:none; }
  #calendarSection .planning-markers { justify-content:center; margin-top:2px; gap:1px; min-height:12px; overflow:hidden; }
  #calendarSection .planning-marker { font-size:.50rem; padding:1px 3px; max-width:100%; overflow:hidden; text-overflow:clip; }
}
@media (max-width:380px) {
  #questSection .quest-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  #questSection .quest { min-height:90px; padding:8px 6px 28px; }
  #questSection .quest-name { font-size:.70rem; }
  #questSection .quest-xp { font-size:.78rem; }
  #questSection .quest-mobile-meta { font-size:.58rem; }
  #calendarSection .calendar-grid { grid-template-columns:repeat(7,minmax(0,1fr)); gap:3px; }
  #calendarSection .calendar-header { gap:3px; }
  #calendarSection .day-card { min-height:50px; padding:4px 2px; border-radius:9px; }
  #calendarSection .day-label { font-size:.68rem; }
  #calendarSection .day-score { font-size:.56rem; }
}


/* v0.9.9.21 Frontend Cleanup and Safety
   Obiettivo: mobile = Status -> Quest -> Mese, gestione separata e niente azioni tecniche nello Status. */
@media (max-width:760px) {
  /* La home mobile non deve essere il desktop compresso. */
  #dashboard { display:none !important; }
  #mobileHomePanel { display:block !important; order:1 !important; margin-top:10px; }
  #mobileDailyPanel { display:none !important; }
  #mobileSpeedPanel { display:none !important; }
  #dailyNoteSection { order:2 !important; }
  #questSection { order:3 !important; }
  #calendarSection { display:block !important; order:4 !important; }
  #agendaSection { order:5 !important; }
  #manageSection { order:6 !important; }
  #bossSection { order:7 !important; }
  #growthSection { order:8 !important; }
  #historySection { order:9 !important; }
  #saveModeSection { order:10 !important; }

  /* Status come vera prima schermata: avatar centrato, punteggio più equilibrato, CTA pulite. */
  .mobile-home-panel { padding:14px; }
  .mobile-home-topline { margin-bottom:10px; }
  .mobile-status-hero-card { grid-template-columns:1fr; text-align:center; justify-items:center; gap:8px; padding:16px 12px; }
  .mobile-status-avatar-wrap { width:74px; height:74px; border-radius:24px; }
  .mobile-status-avatar { width:88px; height:88px; transform:translateY(8px); }
  .mobile-score-orb { width:72px; height:72px; min-width:72px; }
  .mobile-score-orb span { font-size:1.38rem; }
  .mobile-home-rank { font-size:1.05rem; }
  .mobile-home-summary { font-size:.84rem; margin-top:4px; }
  .mobile-status-cta-card { margin-top:12px; border:1px solid rgba(125,220,255,.34); border-radius:18px; padding:13px; background:rgba(125,220,255,.055); }
  .mobile-status-cta-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:10px; }
  .mobile-status-cta-grid .btn { width:100%; min-height:46px; }
  .mobile-status-secondary-actions { grid-template-columns:1fr 1fr !important; }
  .mobile-status-secondary-actions .btn { min-height:42px; }

  /* Quest operative: niente archivia/rimuovi dentro le card del gioco quotidiano. */
  #questSection .inline-archive-btn { display:none !important; }
  #questSection .quest { padding-bottom:28px !important; }
  #questSection .quest-mobile-meta { bottom:7px !important; }
  .mobile-quest-manage-entry { display:grid; gap:7px; margin-top:12px; border:1px solid rgba(125,220,255,.28); border-radius:16px; padding:10px; background:rgba(125,220,255,.045); }
  .mobile-quest-manage-entry .btn { width:100%; }

  /* Gestione avanzata accessibile, ma non nel flusso operativo. */
  #manageSection { scroll-margin-top:12px; }
  #manageSection.mobile-collapsible.collapsed { padding:12px; }
  #manageSection .mobile-collapse-head strong { color:#eaffed; }

  /* Mese deve essere una vera sezione raggiungibile dalla bottom nav. */
  #calendarSection { scroll-margin-top:12px; scroll-margin-bottom:104px; }
  #calendarSection .calendar-top { display:grid; gap:10px; }
  #calendarSection .calendar-top h2 { display:none; }
  #calendarSection .form-row { display:grid; grid-template-columns:1fr 1fr 1fr; gap:6px; width:100%; }
  #calendarSection .form-row label, #calendarSection .form-row select { grid-column:1 / -1; }
  #calendarSection .calendar-header { display:grid !important; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
  #calendarSection .calendar-grid { display:grid !important; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
  #calendarSection .day-card { min-height:52px; padding:5px 3px; border-radius:10px; }

  /* Agenda è pianificazione: sta dopo il Mese, non sopra lo Status. */
  #agendaSection { scroll-margin-top:12px; scroll-margin-bottom:104px; }

  /* Review/overlay senza overflow orizzontale. */
  #reviewDialog { width:min(96vw, 760px); max-width:96vw; box-sizing:border-box; }
  #reviewDialog .modal-body, #reviewDialog .modal-foot, #reviewDialog .modal-head { box-sizing:border-box; max-width:100%; }
  #reviewDialog textarea { width:100%; max-width:100%; box-sizing:border-box; }
  #reviewDialog .modal-foot { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
}
@media (max-width:380px) {
  .mobile-status-cta-grid, .mobile-status-secondary-actions { grid-template-columns:1fr !important; }
  #calendarSection .form-row { grid-template-columns:1fr 1fr; }
  #calendarSection .day-card { min-height:48px; padding:4px 2px; }
  #reviewDialog .modal-foot { grid-template-columns:1fr; }
}

/* v0.9.9.24 — Frontend Cleanup and Safety
   Fix chirurgico: Mese mobile reale, Gestione Quest mobile raggiungibile, Review senza tagli verticali. */
@media (max-width:760px) {
  /* Il calendario desktop resta per desktop; su mobile usiamo una sezione dedicata e garantita. */
  #calendarSection { display:none !important; }
  #mobileMonthSection { display:block !important; order:4 !important; scroll-margin-top:12px; scroll-margin-bottom:112px; }
  #agendaSection { order:5 !important; }
  #manageSection { order:6 !important; }
  #bossSection { order:7 !important; }
  #growthSection { order:8 !important; }
  #historySection { order:9 !important; }
  #saveModeSection { order:10 !important; }

  .mobile-month-panel { border-color:rgba(125,220,255,.34); background:linear-gradient(180deg, rgba(125,220,255,.045), rgba(0,0,0,.08)), var(--panel); }
  .mobile-month-top { display:grid; grid-template-columns:52px 1fr 52px; gap:7px; align-items:center; margin-bottom:9px; }
  .mobile-month-top #mobileDaySelect { grid-column:1 / -1; width:100%; min-height:42px; }
  .mobile-calendar-header { display:grid !important; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; margin-bottom:4px; }
  .mobile-calendar-header .dayhead { text-align:center; color:var(--muted); font-size:.60rem; padding:0 0 3px; font-weight:850; }
  .mobile-calendar-grid { display:grid !important; grid-template-columns:repeat(7,minmax(0,1fr)); gap:4px; }
  .mobile-calendar-grid .day-card { min-height:52px; padding:5px 3px; border-radius:10px; display:grid; align-content:start; gap:2px; }
  .mobile-calendar-grid .day-top { text-align:center; margin:0; display:grid; gap:1px; }
  .mobile-calendar-grid .desktop-day-prefix { display:none; }
  .mobile-calendar-grid .day-label { font-size:.72rem; line-height:1; color:#effff2; font-weight:950; }
  .mobile-calendar-grid .day-score { font-size:.60rem; line-height:1; color:var(--muted); font-weight:850; }
  .mobile-calendar-grid .mobile-day-mini { text-align:center; font-size:.54rem; color:rgba(234,255,237,.68); line-height:1; }
  .mobile-calendar-grid .planning-markers { justify-content:center; margin-top:1px; min-height:11px; gap:1px; overflow:hidden; }
  .mobile-calendar-grid .planning-marker { font-size:.48rem; padding:1px 2px; max-width:100%; overflow:hidden; }
  .mobile-month-hint { margin-top:9px; color:var(--muted); font-size:.76rem; line-height:1.3; }

  /* La gestione completa deve essere leggibile quando viene aperta da mobile. */
  #manageSection:not(.collapsed) { padding-top:12px; }
  #manageSection:not(.collapsed) .panel { border-color:rgba(125,255,134,.22); }

  /* Review: niente tagli sopra/sotto, corpo scrollabile e footer sempre raggiungibile. */
  #reviewDialog { width:min(96vw, 760px); max-width:96vw; max-height:calc(100dvh - 18px); margin:auto; overflow:hidden; box-sizing:border-box; }
  #reviewDialog .modal-head { position:sticky; top:0; z-index:2; background:rgba(7,17,12,.98); }
  #reviewDialog .modal-body { max-height:calc(100dvh - 190px); overflow:auto; padding-bottom:12px; }
  #reviewDialog .modal-foot { position:sticky; bottom:0; z-index:2; background:rgba(7,17,12,.98); display:grid; grid-template-columns:1fr 1fr; gap:8px; padding-bottom:calc(10px + env(safe-area-inset-bottom)); }
  #reviewDialog textarea { min-height:92px; width:100%; max-width:100%; box-sizing:border-box; }
}

@media (max-width:380px) {
  .mobile-calendar-grid, .mobile-calendar-header { gap:3px; }
  .mobile-calendar-grid .day-card { min-height:48px; padding:4px 2px; border-radius:9px; }
  .mobile-calendar-grid .day-label { font-size:.68rem; }
  .mobile-calendar-grid .day-score { font-size:.54rem; }
  #reviewDialog .modal-foot { grid-template-columns:1fr; }
}

/* v0.9.9.24 — Refactor controllato
   Feedback più chiaro, conferme custom e copy di sicurezza. */
.login-error-message {
  border:1px solid rgba(255,107,107,.45);
  background:rgba(255,107,107,.10);
  color:#ffd1d1;
  border-radius:12px;
  padding:9px 11px;
  font-size:.86rem;
  line-height:1.25;
  font-weight:750;
}
.login-error-message[hidden] { display:none !important; }
.toast-item.toast-error {
  border-color:rgba(255,107,107,.58);
  background:linear-gradient(180deg, rgba(255,107,107,.22), rgba(70,18,18,.92));
  color:#ffe1e1;
}
.profile-switch-shortcut { border-color:rgba(125,220,255,.28); }
.game-confirm-backdrop {
  position:fixed;
  inset:0;
  z-index:9999;
  display:grid;
  place-items:center;
  padding:18px;
  background:rgba(0,0,0,.62);
  backdrop-filter:blur(10px);
}
.game-confirm-modal {
  width:min(94vw, 460px);
  border:1px solid rgba(125,255,134,.28);
  border-radius:22px;
  background:linear-gradient(180deg, rgba(15,35,24,.98), rgba(5,12,9,.98));
  box-shadow:0 24px 80px rgba(0,0,0,.58), 0 0 34px rgba(77,255,136,.10);
  overflow:hidden;
}
.game-confirm-modal.tone-danger {
  border-color:rgba(255,107,107,.42);
  box-shadow:0 24px 80px rgba(0,0,0,.62), 0 0 34px rgba(255,107,107,.10);
}
.game-confirm-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  padding:17px 18px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.game-confirm-head strong { font-size:1.02rem; color:#effff2; }
.game-confirm-head span { color:var(--muted); font-size:.76rem; white-space:nowrap; }
.game-confirm-body { padding:16px 18px 8px; color:#e9ffee; line-height:1.42; }
.game-confirm-body p { margin:0 0 10px; }
.game-confirm-detail {
  margin-top:10px;
  padding:10px 12px;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  color:var(--muted);
  background:rgba(255,255,255,.035);
}
.game-confirm-actions {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  padding:14px 18px 18px;
}
.game-confirm-actions .btn { min-height:44px; }
@media (max-width:760px) {
  .game-confirm-backdrop { padding:14px; align-items:end; }
  .game-confirm-modal { width:100%; border-radius:20px; margin-bottom:calc(8px + env(safe-area-inset-bottom)); }
  .game-confirm-actions { grid-template-columns:1fr; }
  .profile-switch-shortcut { min-height:44px; }
}

/* v0.9.9.24 — core task rename */
.core-rename-btn {
  display:inline-grid;
  place-items:center;
  width:30px;
  height:30px;
  min-height:30px;
  padding:0;
  border:1px solid rgba(125,220,255,.32);
  border-radius:10px;
  background:rgba(125,220,255,.08);
  color:#dff9ff;
  font-weight:1000;
  cursor:pointer;
  position:relative;
  z-index:4;
}
.core-rename-btn:hover { border-color:rgba(125,220,255,.62); transform:translateY(-1px); }
.core-rename-label { display:block; margin:10px 0 6px; color:var(--muted); font-size:.78rem; font-weight:850; text-transform:uppercase; letter-spacing:.08em; }
.core-rename-input { width:100%; box-sizing:border-box; font-weight:850; }
.core-rename-actions { grid-template-columns:1fr 1fr 1fr; }
@media (max-width:760px){
  .core-rename-btn { width:28px; height:28px; min-height:28px; border-radius:9px; font-size:.76rem; }
  .core-rename-actions { grid-template-columns:1fr; }
  #questSection .quest-head .cluster { gap:5px; }
}
@media (max-width:430px){
  #questSection .core-rename-btn { position:absolute; right:6px; bottom:6px; width:24px; height:24px; min-height:24px; font-size:.66rem; }
  #questSection .quest-mobile-meta { right:35px; }
}

/* v0.9.9.24 — avatar upload manager */
.avatar-upload-panel {
  border:1px solid rgba(125,220,255,.18);
  border-radius:18px;
  padding:14px;
  background:rgba(255,255,255,.035);
}
.avatar-upload-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:12px;
}
.avatar-upload-actions { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.avatar-upload-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:10px;
}
.avatar-upload-slot {
  border:1px solid rgba(255,255,255,.10);
  border-radius:16px;
  background:rgba(0,0,0,.18);
  padding:10px;
  min-width:0;
}
.avatar-upload-slot img {
  display:block;
  width:100%;
  aspect-ratio:4/5;
  object-fit:contain;
  border-radius:13px;
  border:1px solid rgba(255,255,255,.08);
  background:
    linear-gradient(45deg, rgba(255,255,255,.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.08) 75%);
  background-size:18px 18px;
  background-position:0 0, 0 9px, 9px -9px, -9px 0px;
  margin-bottom:8px;
}
.avatar-upload-slot strong { display:block; font-size:.82rem; }
.avatar-upload-slot span { display:block; color:var(--muted); font-size:.72rem; margin-bottom:5px; }
.avatar-upload-slot-state { display:block; margin:0 0 8px; font-style:normal; font-size:.68rem; color:var(--muted); }
.avatar-upload-slot.is-ready .avatar-upload-slot-state { color:var(--green); }
.avatar-upload-slot.is-missing .avatar-upload-slot-state { color:var(--muted); }
.avatar-upload-slot-actions { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
.avatar-upload-slot.is-missing img { opacity:.35; filter:grayscale(.65); }
.avatar-upload-slot.is-ready { border-color:rgba(125,255,134,.32); box-shadow:0 0 18px rgba(125,255,134,.08); }
@media (max-width:760px){
  .avatar-upload-head { flex-direction:column; }
  .avatar-upload-actions { width:100%; justify-content:stretch; }
  .avatar-upload-actions .btn { flex:1; }
  .avatar-upload-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:390px){
  .avatar-upload-grid { grid-template-columns:1fr; }
}

/* v0.9.9.24 — mini bugs / UX cleanup */
.toast-achievement { max-width:320px; }
@media (max-width:760px){
  .toast { left:12px; right:12px; bottom:calc(74px + env(safe-area-inset-bottom)); width:auto; gap:7px; }
  .toast-item { font-size:.82rem; padding:9px 10px; border-radius:12px; }
  .toast-achievement { max-width:none; }
}


/* v0.9.9.24 — mobile UI hotfix */
@media (max-width:760px){
  .agenda-editor-card,
  .agenda-editor-card .form-row,
  .agenda-form-row {
    width:100%;
    max-width:100%;
    min-width:0;
    box-sizing:border-box;
  }
  .agenda-editor-card .form-row,
  .agenda-form-row {
    display:grid !important;
    grid-template-columns:1fr !important;
    gap:10px;
  }
  .agenda-editor-card input,
  .agenda-editor-card select,
  .agenda-editor-card button,
  .agenda-form-row input,
  .agenda-form-row select,
  .agenda-form-row button {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box;
  }
  #agendaAppointmentTime,
  #agendaAppointmentTitle,
  #agendaBossName,
  #agendaBossXp,
  #agendaBossStat {
    width:100% !important;
    min-width:0 !important;
  }
  #manageSection.manage-section-opened {
    display:grid !important;
    scroll-margin-top:12px;
  }
}

.quest .core-rename-btn {
  position:absolute;
  right:10px;
  bottom:10px;
  width:28px;
  height:28px;
  min-height:28px;
  border-radius:10px;
}
.quest .quest-head .cluster .core-rename-btn {
  margin-left:0;
}
#questSection .quest {
  padding-bottom:42px;
}
#questSection .quest-mobile-meta {
  right:44px;
}
@media (max-width:760px){
  #questSection .quest {
    padding-bottom:34px !important;
  }
  #questSection .core-rename-btn {
    right:7px;
    bottom:7px;
    width:24px;
    height:24px;
    min-height:24px;
    font-size:.66rem;
  }
  #questSection .quest-mobile-meta {
    right:36px !important;
  }
}
.history-control {
  display:flex;
  justify-content:center;
  padding-top:4px;
}
.history-control .btn {
  width:100%;
}


/* v0.9.9.24 — UI fix + month navigator */
.agenda-editor-card, .agenda-editor-card * { box-sizing:border-box; max-width:100%; }
.agenda-form-row { display:grid !important; grid-template-columns:1fr !important; gap:10px; width:100%; max-width:100%; min-width:0; }
.agenda-form-row input, .agenda-form-row select, .agenda-form-row button { width:100% !important; max-width:100% !important; min-width:0 !important; box-sizing:border-box; }
.agenda-form-row button { justify-self:stretch; }
.quest .core-rename-btn { position:absolute !important; right:10px !important; bottom:10px !important; top:auto !important; width:28px; height:28px; min-height:28px; border-radius:10px; z-index:6; }
#questSection .quest { padding-bottom:44px !important; }
#questSection .quest-head .cluster { padding-right:0; }
#questSection .quest-mobile-meta { right:48px; }
.month-jump-select { min-width:180px; max-width:100%; }
.history-list { gap:12px; }
.history-year { border:1px solid var(--line); border-radius:16px; padding:8px; background:rgba(255,255,255,.025); }
.history-year summary { cursor:pointer; display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 10px; font-weight:1000; color:#eaffed; }
.history-year-list { display:grid; gap:8px; padding:8px 2px 2px; }
.history-control { display:flex; justify-content:center; padding-top:4px; }
.history-control .btn { width:100%; }
@media (max-width:760px){
  .mobile-month-top { grid-template-columns:52px 1fr 52px; }
  .mobile-month-top .month-jump-select, .mobile-month-top #mobileDaySelect { grid-column:1 / -1; width:100%; min-height:42px; }
  #questSection .quest { padding-bottom:36px !important; }
  #questSection .core-rename-btn { right:7px !important; bottom:7px !important; width:24px; height:24px; min-height:24px; font-size:.66rem; }
  #questSection .quest-mobile-meta { right:38px !important; }
  .history-year summary { padding:9px; }
}

/* v0.9.9.24 — mobile navigation shell */
.mobile-floating-actions { display:none; }
.mobile-shell-header,.mobile-shell-status-card,.mobile-best-action-card,.mobile-shell-detail-body { display:grid; }
@media (max-width:760px) {
  body { padding-bottom:138px; }
  html { scroll-padding-bottom:140px; }
  #mobileHomePanel,#questSection,#mobileMonthSection,#agendaSection,#manageSection,#bossSection,#growthSection,#historySection { scroll-margin-top:12px; scroll-margin-bottom:140px; }
  #mobileHomePanel { display:block !important; order:1 !important; margin-top:8px; }
  #dailyNoteSection { order:2 !important; }
  #questSection { order:3 !important; }
  #mobileMonthSection { order:4 !important; }
  #agendaSection { order:5 !important; }
  #manageSection { order:6 !important; }
  #bossSection { order:7 !important; }
  #growthSection { order:8 !important; }
  #historySection { order:9 !important; }

  .mobile-shell-header { grid-template-columns:1fr auto; align-items:start; gap:10px; margin-bottom:12px; }
  .mobile-shell-header .mobile-home-brand { font-size:.82rem; color:var(--cyan); letter-spacing:1px; }
  .mobile-profile-chip { margin-top:7px; max-width:100%; }
  .mobile-cloud-chip { min-height:38px; border-radius:999px; white-space:nowrap; padding:8px 10px; }
  .mobile-cloud-chip .cloud-status-dot { margin-right:3px; }
  .mobile-cloud-chip.online { border-color:var(--line-strong); background:rgba(57,211,83,.08); }

  .mobile-shell-status-card { grid-template-columns:auto auto 1fr; align-items:center; gap:10px; border:1px solid var(--line-strong); border-radius:20px; padding:12px; background:radial-gradient(circle at 20% 15%, rgba(125,255,134,.12), transparent 34%), rgba(0,0,0,.16); box-shadow:var(--glow); }
  .mobile-shell-status-copy { min-width:0; }
  .mobile-shell-kicker { color:var(--muted); font-size:.68rem; font-weight:950; text-transform:uppercase; letter-spacing:.6px; margin-bottom:4px; }
  .mobile-home-summary { font-size:.82rem; }

  .mobile-best-action-card { gap:7px; margin-top:12px; border:1px solid rgba(125,220,255,.34); border-radius:18px; padding:12px; background:rgba(125,220,255,.055); }
  .mobile-best-action-card .btn { width:100%; min-height:44px; margin-top:3px; }
  .mobile-today-agenda-card { width:100%; display:grid; grid-template-columns:auto 1fr auto; align-items:center; gap:10px; margin-top:10px; border:1px solid rgba(57,211,83,.34); border-radius:18px; padding:11px 12px; background:linear-gradient(180deg, rgba(57,211,83,.075), rgba(0,0,0,.05)); color:var(--text); text-align:left; box-shadow:0 0 18px rgba(57,211,83,.055); }
  .mobile-today-agenda-card.hidden { display:none !important; }
  .mobile-today-agenda-card:active { transform:scale(.99); }
  .mobile-today-agenda-icon { display:grid; place-items:center; width:36px; height:36px; border-radius:13px; background:rgba(57,211,83,.12); border:1px solid rgba(57,211,83,.26); }
  .mobile-today-agenda-copy { min-width:0; display:grid; gap:2px; }
  .mobile-today-agenda-copy strong { font-size:.92rem; line-height:1.12; }
  .mobile-today-agenda-copy small { color:var(--muted); line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

  .mobile-run-balance-details { margin-top:10px; border:1px solid rgba(125,255,134,.22); border-radius:16px; background:rgba(255,255,255,.025); padding:10px; }
  .mobile-shell-detail-body { gap:10px; }
  #mobileRunBalanceDetails .clarity-card { min-height:auto; padding:11px; }
  #mobileRunBalanceDetails .clarity-list { margin-top:6px; }

  .mobile-floating-actions {
    display:flex; gap:6px; position:fixed; right:12px; bottom:84px; z-index:79;
    padding:6px; border:1px solid rgba(125,220,255,.32); border-radius:999px;
    background:rgba(5,12,8,.92); box-shadow:var(--shadow); backdrop-filter:blur(12px);
  }
  body:not(.app-started) .mobile-floating-actions { display:none !important; }
  .mobile-floating-actions button { border:1px solid var(--line); border-radius:999px; min-height:36px; padding:7px 10px; background:rgba(255,255,255,.035); color:var(--text); font-weight:900; font-size:.72rem; }
  .mobile-floating-actions button:last-child { border-color:rgba(255,209,102,.42); color:#ffefc0; }

  .mobile-bottom-nav { grid-template-columns:repeat(5,minmax(0,1fr)); gap:5px; }
  .mobile-bottom-nav button { min-width:0; min-height:48px; padding:7px 2px; font-size:.66rem; line-height:1.05; }
  .mobile-bottom-nav span { font-size:1rem; }

  /* Secondary content becomes reachable but not dominant. */
  #dailyNoteSection .daily-note-grid > #protocolSection { display:block !important; }
  #protocolSection.mobile-collapsible,
  #rankExplainerSection.mobile-collapsible,
  #mobileRunBalanceDetails.mobile-collapsible { border:1px solid rgba(125,255,134,.22); border-radius:16px; background:rgba(255,255,255,.025); padding:10px; }
  #rankExplainerSection { display:block !important; }
  #rankExplainerSection.mobile-collapsible.collapsed { margin-top:0; }
  #rankExplainerSection .rank-list { grid-template-columns:1fr 1fr; }
  #rankExplainerSection .legend { display:grid; grid-template-columns:1fr 1fr; gap:6px; }
  #rankExplainerSection .legend .tag { display:inline-flex !important; white-space:normal; justify-content:center; text-align:center; }
  #growthSection.mobile-collapsible.collapsed,
  #titlesSection.mobile-collapsible.collapsed,
  #historySection.mobile-collapsible.collapsed,
  #bossSection.mobile-collapsible.collapsed,
  #levelsSection.mobile-collapsible.collapsed,
  #manageSection.mobile-collapsible.collapsed { margin-top:12px; }

  .agenda-editor { grid-template-columns:1fr !important; }
  .agenda-form-row { display:grid; grid-template-columns:1fr; gap:8px; }
  .agenda-form-row > * { width:100%; min-width:0; }
}
@media (max-width:390px) {
  .mobile-shell-status-card { grid-template-columns:auto 1fr; }
  .mobile-status-avatar-wrap { display:none !important; }
  .mobile-score-orb { width:62px; height:62px; min-width:62px; }
  .mobile-bottom-nav button { font-size:.60rem; }
  .mobile-floating-actions { right:8px; bottom:78px; }
  .mobile-floating-actions button { font-size:.68rem; padding:7px 8px; }
}
@media (max-width:760px) {
  .mobile-secondary-actions { display:grid; grid-template-columns:1fr; gap:8px; }
  .mobile-secondary-actions .btn { width:100%; }
}

/* v0.9.9.24 — mobile paged shell
   Mobile becomes a small app shell: bottom nav changes view instead of scrolling one long document. */
.mobile-profile-page,
.mobile-manage-drawer-head { display:none; }
@keyframes mobilePageSlideIn {
  from { opacity:.72; transform:translateY(6px); }
  to { opacity:1; transform:translateY(0); }
}
@media (max-width:760px) {
  body.mobile-paged-shell { padding-bottom:calc(86px + env(safe-area-inset-bottom)); }
  body.mobile-paged-shell .mobile-floating-actions { display:none !important; }
  body.mobile-paged-shell .wrap { display:block; padding:10px; }

  body.mobile-paged-shell #mobileHomePanel.mobile-page-hidden,
  body.mobile-paged-shell #mobileDailyPanel.mobile-page-hidden,
  body.mobile-paged-shell #mobileSpeedPanel.mobile-page-hidden,
  body.mobile-paged-shell #dailyNoteSection.mobile-page-hidden,
  body.mobile-paged-shell #questSection.mobile-page-hidden,
  body.mobile-paged-shell #mobileMonthSection.mobile-page-hidden,
  body.mobile-paged-shell #agendaSection.mobile-page-hidden,
  body.mobile-paged-shell #mobileProfilePage.mobile-page-hidden,
  body.mobile-paged-shell #bossSection.mobile-page-hidden,
  body.mobile-paged-shell #levelsSection.mobile-page-hidden,
  body.mobile-paged-shell #growthSection.mobile-page-hidden,
  body.mobile-paged-shell #titlesSection.mobile-page-hidden,
  body.mobile-paged-shell #historySection.mobile-page-hidden { display:none !important; }

  body.mobile-paged-shell #mobileHomePanel.mobile-page-active,
  body.mobile-paged-shell #dailyNoteSection.mobile-page-active,
  body.mobile-paged-shell #mobileMonthSection.mobile-page-active,
  body.mobile-paged-shell #agendaSection.mobile-page-active,
  body.mobile-paged-shell #mobileProfilePage.mobile-page-active,
  body.mobile-paged-shell #historySection.mobile-page-active { display:block !important; }

  body.mobile-paged-shell #questSection.mobile-page-active,
  body.mobile-paged-shell #bossSection.mobile-page-active,
  body.mobile-paged-shell #levelsSection.mobile-page-active,
  body.mobile-paged-shell #growthSection.mobile-page-active,
  body.mobile-paged-shell #titlesSection.mobile-page-active { display:grid !important; }

  body.mobile-paged-shell .mobile-page-enter { animation:mobilePageSlideIn .22s ease both; }
  body.mobile-paged-shell .mobile-page-active { margin-top:10px; scroll-margin-bottom:112px; }
  body.mobile-paged-shell #mobileHomePanel.mobile-page-active { margin-top:8px; }

  body.mobile-paged-shell .mobile-bottom-nav button.active,
  body.mobile-paged-shell .mobile-bottom-nav button[aria-current="page"] {
    border-color:var(--line-strong);
    background:linear-gradient(180deg, rgba(125,255,134,.14), rgba(57,211,83,.065));
    color:#effff2;
    box-shadow:0 0 0 1px rgba(125,255,134,.08), 0 0 18px rgba(57,211,83,.08);
  }

  body.mobile-paged-shell .mobile-profile-page {
    border-color:rgba(192,132,252,.34);
    background:linear-gradient(180deg, rgba(192,132,252,.055), rgba(0,0,0,.08)), var(--panel);
  }
  body.mobile-paged-shell .mobile-profile-page-grid { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-bottom:10px; }
  body.mobile-paged-shell .mobile-profile-page-grid .btn { width:100%; min-height:46px; }

  /* Quest management becomes a dedicated mobile drawer, not another scroll destination. */
  body.mobile-paged-shell #manageSection[data-mobile-drawer="quest-manage"] {
    display:none !important;
  }
  body.mobile-paged-shell.mobile-manage-open { overflow:hidden; }
  body.mobile-paged-shell.mobile-manage-open #manageSection[data-mobile-drawer="quest-manage"] {
    display:grid !important;
    position:fixed;
    inset:0;
    z-index:120;
    width:100vw;
    height:100dvh;
    max-height:100dvh;
    overflow:auto;
    grid-template-columns:1fr;
    align-content:start;
    gap:12px;
    margin:0 !important;
    padding:10px 10px calc(94px + env(safe-area-inset-bottom));
    border:0;
    border-radius:0;
    background:
      radial-gradient(circle at 20% 0%, rgba(125,255,134,.13), transparent 34%),
      linear-gradient(180deg, rgba(8,17,12,.99), rgba(3,7,6,.995));
    box-shadow:none;
  }
  body.mobile-paged-shell.mobile-manage-open #manageSection .mobile-manage-drawer-head {
    display:grid !important;
    grid-template-columns:auto 1fr auto;
    align-items:center;
    gap:8px;
    position:sticky;
    top:0;
    z-index:3;
    padding:8px;
    border:1px solid rgba(125,255,134,.22);
    border-radius:16px;
    background:rgba(7,17,12,.98);
    backdrop-filter:blur(12px);
  }
  body.mobile-paged-shell.mobile-manage-open #manageSection .mobile-manage-drawer-head strong {
    text-align:center;
    color:#eaffed;
    font-weight:1000;
  }
  body.mobile-paged-shell.mobile-manage-open #manageSection > .panel {
    padding:14px;
    border-color:rgba(125,255,134,.24);
  }
}
@media (max-width:390px) {
  body.mobile-paged-shell .mobile-profile-page-grid { grid-template-columns:1fr; }
  body.mobile-paged-shell.mobile-manage-open #manageSection[data-mobile-drawer="quest-manage"] { padding-inline:8px; }
  body.mobile-paged-shell.mobile-manage-open #manageSection .mobile-manage-drawer-head { grid-template-columns:1fr; }
  body.mobile-paged-shell.mobile-manage-open #manageSection .mobile-manage-drawer-head .btn { width:100%; }
}

/* v0.9.9.24 — mobile agenda/info refinement */
@media (max-width:760px) {
  .mobile-weekly-review-card {
    margin-top:12px;
    padding:10px;
    border:1px solid rgba(192,132,252,.38);
    border-radius:18px;
    background:linear-gradient(180deg, rgba(192,132,252,.07), rgba(0,0,0,.10));
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }
  .mobile-weekly-review-card-compact { padding:9px; }
  .mobile-weekly-review-cta {
    width:100%; min-height:52px; display:flex; justify-content:space-between; align-items:center; gap:10px;
  }
  .mobile-weekly-review-cta .tag { pointer-events:none; }
  .mobile-weekly-review-actions {
    display:grid;
    grid-template-columns:auto 1fr;
    gap:8px;
    align-items:center;
  }
  .mobile-weekly-review-actions .btn { width:100%; min-height:44px; }
  .review-dialog-intro {
    display:grid; gap:6px; padding:12px; border:1px solid rgba(192,132,252,.34); border-radius:16px;
    background:linear-gradient(180deg, rgba(192,132,252,.08), rgba(0,0,0,.10)); color:var(--muted);
  }
  .review-dialog-intro strong { color:var(--text); font-size:1.02rem; }
  .agenda-top-actions { display:none !important; }
  .agenda-selected-date-card {
    border:1px solid rgba(125,220,255,.26);
    border-radius:16px;
    padding:12px;
    background:rgba(125,220,255,.045);
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
  }
  .agenda-selected-label {
    color:var(--muted);
    font-size:.72rem;
    font-weight:850;
    text-transform:uppercase;
    letter-spacing:.06em;
    margin-bottom:3px;
  }
}
@media (max-width:380px) {
  .mobile-weekly-review-actions { grid-template-columns:1fr; }
}

/* v0.9.9.24 — mobile polish and login safety */
html {
  min-height:100%;
  background:var(--active-app-background, var(--active-overscroll-gradient, linear-gradient(180deg, var(--bg-1), var(--bg-0))));
  background-color:var(--active-overscroll-bg, var(--bg-1));
}
body {
  background-color:var(--active-overscroll-bg, var(--bg-1));
}
@supports (-webkit-touch-callout:none) {
  html {
    min-height:100%;
    background:var(--active-app-background, var(--active-overscroll-gradient, linear-gradient(180deg, var(--bg-1), var(--bg-0)))) fixed;
    background-color:var(--active-overscroll-bg, var(--bg-1));
  }
  body {
    min-height:100dvh;
    background-color:var(--active-overscroll-bg, var(--bg-1));
    background-attachment:fixed;
    overscroll-behavior-y:none;
  }
  #appRoot, .app, .wrap, .login-overlay {
    background-color:transparent;
  }
}
@media (max-width:760px) {
  body.mobile-paged-shell .mobile-shell-status-card {
    grid-template-columns:auto auto 1fr;
    gap:11px;
  }
  body.mobile-paged-shell .mobile-status-avatar-wrap {
    display:grid !important;
    width:88px;
    height:88px;
    min-width:88px;
    border-radius:28px;
    border-color:rgba(125,255,134,.38);
    background:radial-gradient(circle at 50% 18%, rgba(125,255,134,.24), rgba(0,0,0,.20));
  }
  body.mobile-paged-shell .mobile-status-avatar {
    width:106px;
    height:106px;
    transform:translateY(10px);
  }
  body.mobile-paged-shell .mobile-info-actions-only {
    grid-template-columns:1fr;
    margin:0;
  }
  body.mobile-paged-shell .mobile-info-actions-only .btn {
    min-height:54px;
    font-size:.98rem;
  }
  body.mobile-paged-shell #growthSection.mobile-collapsible.collapsed,
  body.mobile-paged-shell #titlesSection.mobile-collapsible.collapsed,
  body.mobile-paged-shell #bossSection.mobile-collapsible.collapsed,
  body.mobile-paged-shell #levelsSection.mobile-collapsible.collapsed,
  body.mobile-paged-shell #historySection.mobile-collapsible.collapsed {
    border:0;
    background:transparent;
    box-shadow:none;
    padding:0;
    margin-top:14px;
  }
  body.mobile-paged-shell #growthSection.mobile-collapsible.collapsed > .mobile-collapse-head,
  body.mobile-paged-shell #titlesSection.mobile-collapsible.collapsed > .mobile-collapse-head,
  body.mobile-paged-shell #bossSection.mobile-collapsible.collapsed > .mobile-collapse-head,
  body.mobile-paged-shell #levelsSection.mobile-collapsible.collapsed > .mobile-collapse-head,
  body.mobile-paged-shell #historySection.mobile-collapsible.collapsed > .mobile-collapse-head {
    margin:0;
    min-height:76px;
    padding:14px 14px;
    border:1px solid var(--line);
    border-radius:20px;
    background:linear-gradient(180deg, rgba(255,255,255,.03), transparent), rgba(7,16,11,.98);
    box-shadow:var(--shadow);
  }
  body.mobile-paged-shell #growthSection.mobile-collapsible.collapsed > .mobile-collapse-head strong,
  body.mobile-paged-shell #titlesSection.mobile-collapsible.collapsed > .mobile-collapse-head strong,
  body.mobile-paged-shell #bossSection.mobile-collapsible.collapsed > .mobile-collapse-head strong,
  body.mobile-paged-shell #levelsSection.mobile-collapsible.collapsed > .mobile-collapse-head strong,
  body.mobile-paged-shell #historySection.mobile-collapsible.collapsed > .mobile-collapse-head strong {
    font-size:1.12rem;
    color:#effff2;
  }
  body.mobile-paged-shell #growthSection.mobile-collapsible.collapsed > .mobile-collapse-head .collapse-toggle,
  body.mobile-paged-shell #titlesSection.mobile-collapsible.collapsed > .mobile-collapse-head .collapse-toggle,
  body.mobile-paged-shell #bossSection.mobile-collapsible.collapsed > .mobile-collapse-head .collapse-toggle,
  body.mobile-paged-shell #levelsSection.mobile-collapsible.collapsed > .mobile-collapse-head .collapse-toggle,
  body.mobile-paged-shell #historySection.mobile-collapsible.collapsed > .mobile-collapse-head .collapse-toggle {
    min-width:74px;
    min-height:48px;
    border-radius:16px;
  }

  .login-overlay.saved-session-compact {
    align-items:center;
    padding:16px;
  }
  .login-overlay.saved-session-compact .login-card-v096 {
    margin:0;
    padding:16px;
    width:min(430px, 100%);
    border-radius:22px;
  }
  .login-overlay.saved-session-compact .login-brand-row,
  .login-overlay.saved-session-compact .login-panel-kicker,
  .login-overlay.saved-session-compact .login-panel-primary > h3,
  .login-overlay.saved-session-compact .login-panel-primary > p,
  .login-overlay.saved-session-compact .login-status,
  .login-overlay.saved-session-compact .auth-split,
  .login-overlay.saved-session-compact .login-help,
  .login-overlay.saved-session-compact .login-feature-row {
    display:none !important;
  }
  .login-overlay.saved-session-compact .login-main-grid {
    margin:0;
  }
  .login-overlay.saved-session-compact .login-panel {
    padding:0;
    border:0;
    background:transparent;
    box-shadow:none;
  }
  .login-overlay.saved-session-compact .saved-session-box {
    display:grid;
    margin:0;
    padding:14px;
  }
  .login-overlay.saved-session-compact .saved-session-actions {
    grid-template-columns:1fr;
  }
  .login-overlay.saved-session-compact .saved-session-actions .btn {
    min-height:48px;
  }
}
@media (max-width:390px) {
  body.mobile-paged-shell .mobile-shell-status-card {
    grid-template-columns:auto auto 1fr;
    gap:8px;
  }
  body.mobile-paged-shell .mobile-status-avatar-wrap {
    display:grid !important;
    width:68px;
    height:68px;
    min-width:68px;
    border-radius:22px;
  }
  body.mobile-paged-shell .mobile-status-avatar {
    width:84px;
    height:84px;
    transform:translateY(8px);
  }
}


/* v0.9.9.30 — boot/audio/title hotfix */
html.saved-session-preboot .login-overlay {
  align-items:center;
  padding:16px;
}
html.saved-session-preboot .login-card-v096 {
  margin:0;
  padding:16px;
  width:min(430px, 100%);
  border-radius:22px;
}
html.saved-session-preboot .login-brand-row,
html.saved-session-preboot .login-panel-kicker,
html.saved-session-preboot .login-panel-primary > h3,
html.saved-session-preboot .login-panel-primary > p,
html.saved-session-preboot .login-status,
html.saved-session-preboot .auth-split,
html.saved-session-preboot .login-help,
html.saved-session-preboot .login-feature-row {
  display:none !important;
}
html.saved-session-preboot #cloudSavedSessionBox,
html.saved-session-preboot #cloudSavedSessionBox[hidden] {
  display:grid !important;
  margin:0;
  padding:14px;
}
html.saved-session-preboot .login-main-grid { margin:0; }
html.saved-session-preboot .login-panel { padding:0; border:0; background:transparent; box-shadow:none; }
.mobile-avatar-preview-trigger {
  appearance:none;
  -webkit-appearance:none;
  padding:0;
  color:inherit;
  cursor:pointer;
}
.mobile-avatar-preview-trigger:focus-visible {
  outline:2px solid var(--green);
  outline-offset:3px;
}
.avatar-preview-dialog { width:min(560px, calc(100vw - 24px)); }
.avatar-preview-body { align-items:center; text-align:center; }
.avatar-preview-frame {
  width:min(86vw, 380px);
  min-height:min(78vh, 460px);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  margin:0 auto;
  border-radius:28px;
  border:1px solid var(--line-strong);
  background:radial-gradient(circle at 50% 20%, rgba(125,255,134,.22), transparent 38%), linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.18));
  overflow:hidden;
  box-shadow:var(--shadow), var(--glow);
}
.avatar-preview-img {
  width:100%;
  max-height:min(72vh, 450px);
  object-fit:contain;
  filter:drop-shadow(0 18px 28px rgba(0,0,0,.46));
  transform-origin:center bottom;
  animation:floaty 3.6s ease-in-out infinite;
}
.avatar-preview-img.custom-avatar-active {
  -webkit-mask-image:linear-gradient(to bottom, #000 0%, #000 90%, rgba(0,0,0,.72) 96%, transparent 100%);
  mask-image:linear-gradient(to bottom, #000 0%, #000 90%, rgba(0,0,0,.72) 96%, transparent 100%);
}
.avatar-preview-meta { display:grid; gap:4px; color:var(--muted); line-height:1.35; }
.avatar-preview-meta strong { color:#effff2; font-size:1.05rem; }
@media (max-width:760px) {
  .avatar-preview-dialog { max-height:calc(100dvh - 18px); overflow:hidden; }
  .avatar-preview-dialog .modal-body { max-height:calc(100dvh - 96px); overflow:auto; }
  .avatar-preview-frame { min-height:min(68vh, 420px); }
}


/* v0.9.9.30 — boot/audio/title hotfix */
html.login-preboot-loading .login-overlay {
  align-items:center;
  padding:16px;
}
html.login-preboot-loading .login-card-v096 {
  margin:0;
  padding:16px;
  width:min(430px, 100%);
  border-radius:22px;
}
html.login-preboot-loading .login-brand-row,
html.login-preboot-loading .login-panel-kicker,
html.login-preboot-loading .login-panel-primary > h3,
html.login-preboot-loading .login-panel-primary > p,
html.login-preboot-loading .login-status,
html.login-preboot-loading .auth-split,
html.login-preboot-loading .login-help,
html.login-preboot-loading .login-feature-row {
  display:none !important;
}
html.login-preboot-loading #loginBootLoading,
html.login-preboot-loading #loginBootLoading[hidden] {
  display:grid !important;
  margin:0;
  padding:14px;
}
html.saved-session-preboot #loginBootLoading,
html.saved-session-preboot #loginBootLoading[hidden] {
  display:none !important;
}
html.login-preboot-loading .login-main-grid { margin:0; }
html.login-preboot-loading .login-panel { padding:0; border:0; background:transparent; box-shadow:none; }

.player-name-cap {
  display:inline-block;
  vertical-align:baseline;
  line-height:1.04;
  padding-bottom:.055em;
  margin-bottom:-.055em;
  overflow:visible;
  text-overflow:clip;
  transform:translateY(.015em);
}

.quest-divider {
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  margin:2px 0 -2px;
}
.quest-divider::before,
.quest-divider::after {
  content:"";
  height:1px;
  flex:1;
  background:linear-gradient(90deg, transparent, var(--line), transparent);
}
.quest-divider small {
  letter-spacing:0;
  text-transform:none;
  font-weight:700;
  opacity:.82;
}
@media (max-width:760px) {
  .quest-divider { font-size:.70rem; margin:0; }
  .quest-divider small { display:none; }
}

.mobile-calendar-hint {
  margin-top:9px;
  color:var(--muted);
  font-size:.76rem;
  line-height:1.32;
  text-align:center;
  border:1px solid var(--line);
  border-radius:999px;
  padding:7px 10px;
  background:rgba(255,255,255,.025);
}

@media (max-width:760px) {
  .avatar-preview-dialog {
    margin:auto;
    width:min(94vw, 430px);
    max-height:calc(100dvh - 18px);
  }
  .avatar-preview-body {
    display:grid;
    place-items:center;
    text-align:center;
  }
  .avatar-preview-frame {
    width:min(82vw, 330px);
    min-height:min(56vh, 350px);
    align-items:center;
    justify-content:center;
  }
  .avatar-preview-img {
    max-height:min(52vh, 330px);
    object-position:center center;
  }
}

html,
body,
#appRoot,
.app {
  background-color:var(--active-overscroll-bg, var(--bg-1));
}
@supports (-webkit-touch-callout:none) {
  html,
  body {
    background:var(--active-app-background, var(--active-overscroll-gradient, linear-gradient(180deg, var(--bg-1), var(--bg-0)))) fixed;
    background-color:var(--active-overscroll-bg, var(--bg-1));
  }
  body::after {
    content:"";
    position:fixed;
    inset:-64px 0;
    z-index:-1;
    pointer-events:none;
    background:var(--active-app-background, var(--active-overscroll-gradient, linear-gradient(180deg, var(--bg-1), var(--bg-0))));
    background-color:var(--active-overscroll-bg, var(--bg-1));
  }
}
/* compat test marker: background:var(--active-overscroll-gradient — superseded by --active-app-background in v0.9.9.27 */

/* v0.9.9.30 — music button state and run title alignment */

.music-audio-probe { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.btn.music-starting { opacity:.86; }
.btn.music-active { box-shadow:0 0 0 1px rgba(var(--theme-accent-rgb,125,255,134),.28), 0 0 18px rgba(var(--theme-accent-rgb,125,255,134),.14); }


/* v0.9.9.30 — auth transition gate hotfix */
html.auth-transition-loading .login-overlay {
  align-items:center;
  padding:16px;
}
html.auth-transition-loading .login-card-v096 {
  margin:0;
  padding:16px;
  width:min(430px, 100%);
  border-radius:22px;
}
html.auth-transition-loading .login-brand-row,
html.auth-transition-loading .login-panel-kicker,
html.auth-transition-loading .login-panel-primary > h3,
html.auth-transition-loading .login-panel-primary > p,
html.auth-transition-loading .login-status,
html.auth-transition-loading .auth-split,
html.auth-transition-loading .login-help,
html.auth-transition-loading .login-feature-row {
  display:none !important;
}
html.auth-transition-loading #loginBootLoading,
html.auth-transition-loading #loginBootLoading[hidden] {
  display:grid !important;
  margin:0;
  padding:14px;
}
html.auth-transition-loading #cloudSavedSessionBox,
html.auth-transition-loading #cloudSavedSessionBox[hidden] {
  display:none !important;
}
html.auth-transition-loading .login-main-grid { margin:0; }
html.auth-transition-loading .login-panel { padding:0; border:0; background:transparent; box-shadow:none; }
body.auth-transition-loading #appRoot { pointer-events:none; }


/* v0.9.9.31 — mobile static polish and app icon cleanup */
@media (max-width:760px) {
  html { -webkit-text-size-adjust:100%; }
  button,
  .btn,
  [role="button"],
  a,
  input,
  select,
  textarea {
    -webkit-tap-highlight-color:rgba(var(--theme-accent-rgb,125,255,134),.18);
    touch-action:manipulation;
  }
  input,
  select,
  textarea {
    font-size:16px;
  }
  .wrap {
    padding-left:max(14px, env(safe-area-inset-left, 0px));
    padding-right:max(14px, env(safe-area-inset-right, 0px));
    padding-bottom:calc(104px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-bottom-nav {
    bottom:max(6px, env(safe-area-inset-bottom, 0px));
    padding-bottom:max(6px, env(safe-area-inset-bottom, 0px));
  }
  .login-overlay,
  .archive-manager-overlay {
    padding:max(14px, env(safe-area-inset-top, 0px)) max(14px, env(safe-area-inset-right, 0px)) max(14px, env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
  }
  .panel,
  .quest,
  .boss-card,
  .row-item,
  .form-row,
  .cluster,
  .mobile-section-title,
  .mobile-shell-status-copy,
  .mobile-profile-page-grid {
    min-width:0;
  }
  .btn,
  .tag,
  .profile-chip,
  .mobile-cloud-chip,
  .mobile-bottom-nav button {
    overflow-wrap:anywhere;
  }
}
@media (hover:none) and (pointer:coarse) {
  .btn:hover {
    transform:none;
  }
}

    /* v0.9.9.35 Admin dashboard + backup visibility */
    .admin-overview { border:1px solid rgba(255,209,102,.26); border-radius:16px; padding:12px; background:rgba(255,209,102,.045); display:grid; gap:10px; }
    .admin-overview-title { font-weight:950; color:#fff6cf; letter-spacing:.2px; }
    .admin-metric-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
    .admin-metric-card { border:1px solid var(--line); border-radius:13px; padding:9px 10px; background:rgba(0,0,0,.16); min-width:0; }
    .admin-metric-label { color:var(--muted); font-size:.72rem; text-transform:uppercase; letter-spacing:.42px; }
    .admin-metric-value { margin-top:4px; color:#effff2; font-weight:950; font-size:.9rem; overflow-wrap:anywhere; }
    .admin-card-details { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:7px; margin-top:10px; }
    .admin-detail-chip { border:1px solid rgba(255,255,255,.10); border-radius:12px; padding:8px 9px; background:rgba(255,255,255,.028); min-width:0; }
    .admin-detail-chip span { display:block; color:var(--muted); font-size:.7rem; text-transform:uppercase; letter-spacing:.38px; }
    .admin-detail-chip strong { display:block; margin-top:3px; color:#eefdf2; font-size:.82rem; line-height:1.25; overflow-wrap:anywhere; }
    .backup-visibility-note { border:1px solid rgba(125,220,255,.24); border-radius:13px; padding:10px 11px; background:rgba(125,220,255,.055); color:#dff7ff; font-size:.82rem; line-height:1.35; }
    @media (max-width:760px){ .admin-metric-grid, .admin-card-details { grid-template-columns:1fr; } }

/* v0.9.9.36 — admin avatar upload */
.admin-avatar-manager {
  border:1px solid rgba(125,220,255,.16);
  border-radius:16px;
  padding:12px;
  background:rgba(125,220,255,.035);
  margin:10px 0 12px;
}
.admin-avatar-head {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  margin-bottom:10px;
}
.admin-avatar-head strong { display:block; color:#effff2; font-weight:950; }
.admin-avatar-head span { display:block; color:var(--muted); font-size:.78rem; margin-top:2px; }
.admin-avatar-grid {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
}
.admin-avatar-slot {
  min-width:0;
  border:1px solid rgba(255,255,255,.10);
  border-radius:14px;
  padding:8px;
  background:rgba(0,0,0,.16);
}
.admin-avatar-preview {
  display:grid;
  place-items:center;
  width:100%;
  aspect-ratio:4/5;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background:rgba(0,0,0,.22);
  color:var(--muted);
  font-weight:950;
  margin-bottom:7px;
  overflow:hidden;
}
.admin-avatar-preview img {
  width:100%;
  height:100%;
  object-fit:contain;
  display:block;
}
.admin-avatar-slot strong { display:block; font-size:.78rem; }
.admin-avatar-slot span { display:block; color:var(--muted); font-size:.72rem; }
.admin-avatar-slot small { display:block; color:var(--muted); font-size:.68rem; margin:5px 0 8px; min-height:1.9em; }
.admin-avatar-slot.is-ready { border-color:rgba(125,255,134,.30); }
.admin-avatar-slot.is-missing .admin-avatar-preview { opacity:.48; filter:grayscale(.65); }
.admin-avatar-actions { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
.admin-avatar-note { margin-top:10px; }
@media (max-width:760px){
  .admin-avatar-head { flex-direction:column; }
  .admin-avatar-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:390px){
  .admin-avatar-grid { grid-template-columns:1fr; }
}

/* v0.9.9.37 performance/rendering hardening */
.history-year:not([open]) .history-year-list,
.agenda-bucket:not([open]) .agenda-bucket-body {
  content-visibility: auto;
  contain-intrinsic-size: 1px 96px;
}
.history-year-list,
.agenda-bucket-body,
.admin-profile-card,
.profile-card,
.mobile-page-panel {
  content-visibility: auto;
  contain-intrinsic-size: 1px 420px;
}
.avatar-img,
#avatarImg {
  image-rendering: auto;
  contain: paint;
}
@media (max-width: 760px){
  .history-year-list,
  .agenda-bucket-body,
  .admin-profile-card,
  .profile-card {
    contain-intrinsic-size: 1px 320px;
  }
}

/* v0.9.9.41 — avatar scale hotfix
   PATCH 19 added stable image dimensions for performance, but 320px intrinsic sizing
   made the desktop hero avatar feel smaller. Keep lazy/async hints while restoring
   the stronger visual scale of the avatar panel. */
.avatar-panel .avatar-frame {
  min-height: clamp(430px, 42vw, 500px);
}
.avatar-panel #avatarImg.avatar-img {
  width: auto;
  height: clamp(400px, 36vw, 455px);
  max-width: min(100%, 560px);
  max-height: none;
  object-fit: contain;
  object-position: center bottom;
}
@media (max-width: 760px){
  .avatar-panel .avatar-frame {
    min-height: 300px;
  }
  .avatar-panel #avatarImg.avatar-img {
    height: 310px;
    max-width: 100%;
  }
}
@media (max-width: 420px){
  .avatar-panel .avatar-frame {
    min-height: 260px;
  }
  .avatar-panel #avatarImg.avatar-img {
    height: 270px;
  }
}

/* v0.9.9.41 — beta test matrix + observability */
.beta-debug-panel {
  margin-top:12px;
  border:1px solid rgba(125,220,255,.30);
  border-radius:16px;
  padding:12px;
  background:rgba(125,220,255,.045);
  display:grid;
  gap:10px;
}
.beta-debug-panel.hidden,
.beta-debug-panel[hidden] { display:none !important; }
.beta-debug-head {
  display:flex;
  justify-content:space-between;
  gap:10px;
  align-items:flex-start;
  flex-wrap:wrap;
}
.beta-debug-subtitle {
  color:var(--muted);
  font-size:.78rem;
  line-height:1.35;
}
.beta-debug-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}
.beta-debug-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
}
.beta-debug-card {
  border:1px solid var(--line);
  border-radius:13px;
  padding:9px 10px;
  background:rgba(0,0,0,.16);
  min-width:0;
}
.beta-debug-card span {
  display:block;
  color:var(--muted);
  font-size:.69rem;
  letter-spacing:.38px;
  text-transform:uppercase;
  font-weight:900;
}
.beta-debug-card strong {
  display:block;
  margin-top:4px;
  color:#effff2;
  font-size:.86rem;
  line-height:1.25;
  overflow-wrap:anywhere;
}
.beta-debug-report {
  max-height:180px;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  border:1px solid rgba(255,255,255,.10);
  border-radius:13px;
  margin:0;
  padding:10px;
  background:rgba(0,0,0,.20);
  color:#dfffe5;
  font-size:.76rem;
  line-height:1.45;
}
@media (max-width:760px){
  .beta-debug-grid { grid-template-columns:1fr; }
  .beta-debug-actions, .beta-debug-actions .btn { width:100%; }
}

/* v0.9.9.46 — beta UX polish: note autosave status */
.daily-note-actions {
  align-items:center;
}
.note-autosave-status {
  cursor:default;
  user-select:none;
}
@media (max-width:520px){
  .daily-note-actions {
    width:100%;
    align-items:stretch;
  }
  .daily-note-actions .note-autosave-status,
  .daily-note-actions .btn {
    width:100%;
    justify-content:center;
    text-align:center;
  }
}

/* v0.9.9.57.2 — feedback beta + agenda polish */
/* v0.9.9.68 — feedback beta + agenda polish */
.feedback-entry-card {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  border:1px solid rgba(125,220,255,.22);
  border-radius:16px;
  padding:12px;
  background:linear-gradient(180deg, rgba(125,220,255,.055), rgba(0,0,0,.06));
}
.feedback-dialog { width:min(94vw, 560px); }
.feedback-dialog-body { display:grid; gap:12px; }
.feedback-intro {
  display:grid;
  gap:4px;
  border:1px solid rgba(125,220,255,.24);
  border-radius:16px;
  padding:12px;
  background:rgba(125,220,255,.055);
  color:var(--muted);
}
.feedback-intro strong { color:var(--text); }
.feedback-field { display:grid; gap:6px; color:var(--muted); font-size:.82rem; font-weight:850; }
.feedback-field textarea { min-height:130px; resize:vertical; }
.feedback-meta-note {
  border:1px dashed rgba(255,255,255,.16);
  border-radius:14px;
  padding:10px 11px;
  color:var(--muted);
  background:rgba(255,255,255,.025);
  font-size:.76rem;
  line-height:1.35;
}
.feedback-foot { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.agenda-editor-card {
  background:linear-gradient(180deg, rgba(255,255,255,.04), rgba(0,0,0,.05));
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035);
}
.agenda-editor-head {
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  margin-bottom:10px;
}
.agenda-field {
  display:grid;
  gap:5px;
  min-width:0;
  color:var(--muted);
  font-size:.72rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.055em;
}
.agenda-field input,
.agenda-field select { text-transform:none; letter-spacing:normal; }
.agenda-field-title { grid-column:1 / -1; }
.agenda-helper-copy { margin-top:8px; line-height:1.35; }
.agenda-selected-date-card {
  box-shadow:inset 0 1px 0 rgba(255,255,255,.035), 0 0 18px rgba(125,220,255,.035);
}
.agenda-day-card { box-shadow:0 12px 28px rgba(0,0,0,.16); }
.agenda-line span { min-width:0; overflow-wrap:anywhere; }
@media (min-width: 980px) {
  .agenda-form-row.agenda-form-row-appointment {
    grid-template-columns:150px 120px minmax(220px,1fr) auto !important;
    align-items:end;
  }
  .agenda-form-row.agenda-form-row-appointment .agenda-field-title { grid-column:auto; }
  .agenda-form-row.agenda-form-row-boss {
    grid-template-columns:150px 120px minmax(220px,1fr) 90px 135px auto !important;
    align-items:end;
  }
  .agenda-form-row.agenda-form-row-boss .agenda-field-title { grid-column:auto; }
  .agenda-form-row.agenda-form-row-appointment button,
  .agenda-form-row.agenda-form-row-boss button { min-height:42px; white-space:nowrap; }
}
@media (max-width:760px){
  .feedback-entry-card { display:grid; }
  .feedback-foot { grid-template-columns:1fr; }
  .feedback-dialog { width:min(96vw, 560px); max-height:calc(100dvh - 18px); }
  .feedback-field textarea { min-height:150px; }
  .agenda-editor-head { align-items:center; }
}

/* v0.9.9.68 — customization foundation */
/* v0.9.9.57.2 — customization foundation */
.customization-panel { position:relative; overflow:hidden; }
.customization-grid { display:grid; grid-template-columns:minmax(240px, .9fr) minmax(280px, 1.25fr); gap:14px; align-items:stretch; }
.customization-preview-card {
  display:grid; grid-template-columns:96px 1fr; gap:14px; align-items:center;
  padding:14px; border:1px solid var(--line); border-radius:18px;
  background:rgba(255,255,255,.035); box-shadow:inset 0 0 24px rgba(var(--theme-accent-rgb,57,211,83),.06);
}
.customization-preview-card img {
  width:96px; height:96px; object-fit:contain; border-radius:22px;
  background:radial-gradient(circle at 50% 20%, rgba(var(--theme-accent-rgb,57,211,83),.18), transparent 64%);
  filter:drop-shadow(0 10px 22px rgba(0,0,0,.32));
}
.customization-preview-tags { display:flex; flex-wrap:wrap; gap:8px; margin-top:10px; }
.customization-controls { display:grid; gap:12px; }
.customization-theme-grid [data-customization-theme-btn].active { border-color:var(--line-strong); color:#effff2; box-shadow:inset 0 0 18px rgba(var(--theme-accent-rgb,57,211,83),.09); }
.customization-field { display:grid; gap:7px; color:var(--muted); font-size:.82rem; font-weight:850; }
.customization-field select { width:100%; }
.customization-label-preview { display:grid; grid-template-columns:repeat(4, minmax(0, 1fr)); gap:8px; }
.customization-label-pill { padding:9px 8px; border:1px solid var(--line); border-radius:13px; color:var(--muted); font-size:.78rem; font-weight:900; text-align:center; background:rgba(255,255,255,.028); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customization-label-pill.active { color:var(--text); border-color:var(--line-strong); background:rgba(var(--theme-accent-rgb,57,211,83),.1); }
/* v0.9.9.68 — monthly category progress engine */
/* v0.9.9.57.2 — monthly category progress engine */
.customization-label-editor { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; }
.customization-label-field input { width:100%; min-width:0; }
.customization-label-field small { color:var(--muted); font-size:.72rem; font-weight:800; justify-self:end; margin-top:-3px; }
.customization-actions { justify-content:flex-start; }
.customization-entry-card { border-color:rgba(var(--theme-accent-rgb,57,211,83),.22); }
[data-hud-style="minimal"] .card,
[data-hud-style="minimal"] .panel,
[data-hud-style="minimal"] .stat-card,
[data-hud-style="minimal"] .score-card { box-shadow:none !important; }
[data-hud-style="minimal"] .tag { border-radius:999px; }
[data-hud-style="soft"] .panel,
[data-hud-style="soft"] .card,
[data-hud-style="soft"] .stat-card,
[data-hud-style="soft"] .score-card { border-radius:24px; }
[data-hud-style="soft"] .btn { border-radius:16px; }
@media (max-width: 760px){
  .customization-grid { grid-template-columns:1fr; }
  .customization-preview-card { grid-template-columns:84px 1fr; }
  .customization-preview-card img { width:84px; height:84px; }
  .customization-label-preview { grid-template-columns:repeat(2, minmax(0, 1fr)); }
  .customization-label-editor { grid-template-columns:1fr; }
}

/* v0.9.9.57.2 — monthly category progress UI */
.monthly-aware-stats .stat-card { display:grid; gap:8px; }
.stat-monthly-line {
  display:flex; justify-content:space-between; gap:10px; align-items:center;
  margin-top:2px; color:var(--muted); font-size:.76rem; font-weight:850;
}
.stat-monthly-line span:last-child { color:#dfffe5; text-align:right; }
.monthly-stat-bar { height:var(--deep-work-volume-track-size); margin-top:0; opacity:.92; }
.monthly-stat-fill { background:linear-gradient(90deg, rgba(125,220,255,.9), var(--green)); box-shadow:0 0 12px rgba(125,220,255,.22); }
.stat-card.monthly-maxed { border-color:rgba(255,209,102,.46); box-shadow:inset 0 0 22px rgba(255,209,102,.045); }
.stat-card[data-monthly-status="close"] { border-color:rgba(192,132,252,.34); }
.stat-card[data-monthly-status="weak"] { border-color:rgba(255,107,107,.24); }
.monthly-progress-panel { border-color:rgba(125,220,255,.28); }
.monthly-progress-summary {
  display:grid; grid-template-columns:minmax(240px, 1fr) minmax(190px, .48fr); gap:12px; margin-top:14px;
}
.monthly-progress-kpi {
  padding:14px; border:1px solid var(--line); border-radius:var(--radius-sm);
  background:linear-gradient(180deg, rgba(255,255,255,.026), transparent), rgba(7,16,11,.82);
}
.monthly-progress-kpi.primary { border-color:rgba(125,220,255,.32); }
.monthly-overall-bar { height:10px; margin-top:10px; }
.monthly-category-list { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:10px; margin-top:14px; }
.monthly-category-row {
  display:grid; gap:8px; padding:12px; border:1px solid var(--line); border-radius:var(--radius-sm);
  background:linear-gradient(180deg, rgba(255,255,255,.025), transparent), rgba(7,16,11,.92);
}
.monthly-category-row[data-monthly-row-status="maxed"] { border-color:rgba(255,209,102,.5); box-shadow:inset 0 0 18px rgba(255,209,102,.04); }
.monthly-category-row[data-monthly-row-status="close"] { border-color:rgba(192,132,252,.42); }
.monthly-category-row[data-monthly-row-status="weak"] { border-color:rgba(255,107,107,.28); }
.monthly-category-head,.monthly-category-meta { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.monthly-category-meta { color:var(--muted); font-size:.8rem; font-weight:850; }
.monthly-category-bar { height:8px; margin-top:0; }
@media (max-width:760px){
  .monthly-progress-summary,.monthly-category-list { grid-template-columns:1fr; }
  .stat-monthly-line { align-items:flex-start; }
}

/* v0.9.9.57.2 — monthly achievements foundation */
.monthly-achievement-foundation {
  margin-top:14px;
  padding:12px;
  border:1px solid rgba(125,220,255,.18);
  border-radius:var(--radius-sm);
  background:linear-gradient(180deg, rgba(125,220,255,.035), transparent), rgba(7,16,11,.68);
}
.monthly-achievement-foundation-list {
  display:grid;
  grid-template-columns:repeat(4, minmax(0, 1fr));
  gap:8px;
  margin-top:10px;
}
.monthly-achievement-chip {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:54px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(4,11,7,.64);
  opacity:.72;
}
.monthly-achievement-chip.unlocked {
  opacity:1;
  border-color:rgba(255,209,102,.55);
  box-shadow:inset 0 0 16px rgba(255,209,102,.045);
}
.monthly-achievement-chip strong { display:block; font-size:.78rem; line-height:1.1; }
.monthly-achievement-chip small { display:block; color:var(--muted); font-size:.68rem; margin-top:2px; }
@media (max-width:1100px){ .monthly-achievement-foundation-list { grid-template-columns:repeat(2, minmax(0, 1fr)); } }
@media (max-width:760px){ .monthly-achievement-foundation-list { grid-template-columns:1fr; } }

/* v0.9.9.57.2 — monthly achievements live-state hotfix */
.monthly-achievement-chip.in-race {
  opacity:1;
  border-color:rgba(125,220,255,.48);
  box-shadow:inset 0 0 16px rgba(125,220,255,.04);
}
.monthly-achievement-chip.confirmed {
  opacity:1;
  border-color:rgba(255,209,102,.62);
  box-shadow:inset 0 0 18px rgba(255,209,102,.055);
}
.monthly-achievement-chip[data-rarity="legendary"] strong { color:#ffe6a3; }
.monthly-achievement-chip[data-rarity="epic"] strong { color:#d8c1ff; }
.monthly-achievement-chip[data-rarity="rare"] strong { color:#b9e7ff; }
.monthly-achievement-chip .rarity-line {
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:.58rem;
  opacity:.72;
}

/* v0.9.9.57.2 — monthly achievements history */
.monthly-achievement-history {
  margin-top:12px;
  padding:12px;
  border:1px solid rgba(255,209,102,.16);
  border-radius:var(--radius-sm);
  background:linear-gradient(180deg, rgba(255,209,102,.028), transparent), rgba(7,16,11,.62);
}
.monthly-achievement-history-list {
  display:grid;
  gap:8px;
  margin-top:10px;
}
.monthly-achievement-history-row {
  display:grid;
  grid-template-columns:minmax(150px,.35fr) 1fr;
  gap:10px;
  align-items:center;
  padding:10px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(4,11,7,.56);
}
.monthly-achievement-history-row strong { display:block; font-size:.82rem; }
.monthly-achievement-history-row small { display:block; color:var(--muted); font-size:.68rem; margin-top:2px; }
.monthly-history-chip-list { display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.monthly-history-chip {
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:5px 7px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  font-size:.66rem;
  font-weight:850;
  background:rgba(255,255,255,.025);
}
.monthly-history-chip[data-rarity="legendary"] { color:#ffe6a3; border-color:rgba(255,209,102,.42); }
.monthly-history-chip[data-rarity="epic"] { color:#d8c1ff; border-color:rgba(192,132,252,.36); }
.monthly-history-chip[data-rarity="rare"] { color:#b9e7ff; border-color:rgba(125,220,255,.34); }
.monthly-achievement-history-empty {
  padding:10px;
  color:var(--muted);
  border:1px dashed var(--line);
  border-radius:14px;
  font-size:.78rem;
  font-weight:850;
}
@media (max-width:760px){
  .monthly-achievement-history-row { grid-template-columns:1fr; }
  .monthly-history-chip-list { justify-content:flex-start; }
}

/* v0.9.9.57.2 — unlockable cosmetics foundation */
.customization-unlock-panel{margin-top:14px;padding:12px;border:1px solid rgba(255,255,255,.08);border-radius:16px;background:rgba(255,255,255,.035)}
.cosmetic-unlock-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px;margin-top:10px}
.cosmetic-unlock-card{display:flex;gap:10px;align-items:flex-start;padding:11px;border:1px solid rgba(255,255,255,.08);border-radius:14px;background:rgba(0,0,0,.16)}
.cosmetic-unlock-card.unlocked{border-color:rgba(88,211,83,.34);box-shadow:0 0 0 1px rgba(88,211,83,.08) inset}
.cosmetic-unlock-card.locked{opacity:.78;filter:saturate(.86)}
.cosmetic-unlock-icon{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:12px;background:rgba(255,255,255,.07);font-size:1.15rem;flex:0 0 auto}
.cosmetic-unlock-body{min-width:0;display:flex;flex-direction:column;gap:4px}
.cosmetic-unlock-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.cosmetic-unlock-head strong{line-height:1.15}
.cosmetic-unlock-card[data-rarity="legendary"] .cosmetic-unlock-icon{background:rgba(246,198,91,.14)}
.cosmetic-unlock-card[data-rarity="epic"] .cosmetic-unlock-icon{background:rgba(168,85,247,.16)}
.cosmetic-unlock-card[data-rarity="rare"] .cosmetic-unlock-icon{background:rgba(96,165,250,.14)}
.cosmetic-unlock-empty{padding:10px;border:1px dashed rgba(255,255,255,.14);border-radius:12px;color:var(--muted)}
@media(max-width:560px){.cosmetic-unlock-list{grid-template-columns:1fr}.cosmetic-unlock-head{align-items:flex-start;flex-direction:column}}

/* v0.9.9.57.2 — unlockable cosmetics apply safe */
.cosmetic-equipped-summary{
  margin-top:10px;
  padding:9px 10px;
  border:1px solid rgba(125,220,255,.20);
  border-radius:13px;
  background:rgba(125,220,255,.055);
  color:#dff7ff;
  font-size:.78rem;
  font-weight:800;
}
.cosmetic-unlock-card.active{
  border-color:rgba(125,220,255,.42);
  box-shadow:0 0 0 1px rgba(125,220,255,.12) inset,0 12px 30px rgba(0,0,0,.16);
}
.cosmetic-unlock-actions{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:6px;
}
#customizationPreviewCosmetics,
#avatarCosmeticTag{
  overflow-wrap:anywhere;
}
@media(max-width:560px){
  .cosmetic-unlock-actions .btn{width:100%;justify-content:center;}
}

/* v0.9.9.57.2 — visual system isolation
   Safe visual contract: avatar image/container are never animated; decorative layers are isolated. */
.avatar-stage-visual {
  isolation:isolate;
  position:relative;
  overflow:hidden;
  --avatar-stage-accent:var(--green);
}
.avatar-stage-visual .avatar-visual-bg,
.avatar-stage-visual .avatar-visual-particles,
.avatar-stage-visual .avatar-visual-fade,
.avatar-stage-visual .avatar-visual-badges {
  position:absolute;
  inset:0;
  pointer-events:none;
  user-select:none;
}
.avatar-stage-visual .avatar-visual-bg {
  z-index:0;
  background:radial-gradient(circle at 50% 22%, rgba(125,255,134,.10), transparent 48%);
}
.avatar-stage-visual .avatar-visual-particles {
  z-index:1;
  display:none;
}
.avatar-stage-visual .avatar-visual-particles i {
  position:absolute;
  width:6px;
  height:6px;
  border-radius:999px;
  background:var(--avatar-stage-accent);
  opacity:.45;
  box-shadow:0 0 10px rgba(125,255,134,.28);
}
.avatar-stage-visual .avatar-visual-fade {
  z-index:2;
  top:auto;
  height:24%;
  background:linear-gradient(to top, rgba(4,11,7,.88), rgba(4,11,7,.30) 48%, transparent 100%);
}
.avatar-stage-visual .avatar-visual-badges {
  z-index:4;
}
.avatar-stage-visual .avatar-visual-image {
  position:relative;
  z-index:3;
  animation:none !important;
  transform:none !important;
  transition:opacity .28s ease !important;
  will-change:auto !important;
}
.avatar-stage-visual .avatar-visual-image.pop {
  animation:none !important;
}
.avatar-img,
.avatar-img.pop,
.avatar-preview-img {
  animation:none !important;
}
.avatar-img.pop {
  transform:none !important;
}
.sparkles { display:none !important; }
.customization-preview-avatar {
  width:96px;
  height:96px;
  border-radius:22px;
  border:1px solid rgba(125,255,134,.12);
  background:radial-gradient(circle at 50% 20%, rgba(var(--theme-accent-rgb,57,211,83),.18), transparent 64%);
  display:grid;
  place-items:center;
}
.customization-preview-avatar img {
  width:96px;
  height:96px;
  object-fit:contain;
  background:transparent;
}
.mobile-status-avatar-wrap.avatar-stage-visual {
  overflow:hidden;
}
.mobile-status-avatar-wrap.avatar-stage-visual .avatar-visual-fade {
  height:32%;
  background:linear-gradient(to top, rgba(4,11,7,.76), transparent 100%);
}
.avatar-preview-frame.avatar-stage-visual .avatar-visual-fade,
.avatar-frame.avatar-stage-visual .avatar-visual-fade {
  height:22%;
}
@media (max-width:760px){
  .customization-preview-avatar { width:84px; height:84px; }
  .customization-preview-avatar img { width:84px; height:84px; }
}

/* v0.9.9.68 — avatar static polish */
/* v0.9.9.57.2 — avatar static polish
   Static-only layer polish: halo/fade/badge markers without moving avatar image or visual container. */
.avatar-stage-visual {
  --avatar-stage-accent-rgb:57,211,83;
  --avatar-static-halo-alpha:.16;
  --avatar-static-core-alpha:.12;
  --avatar-static-rim-alpha:.10;
}
.avatar-stage-visual[data-avatar-stage="1"] {
  --avatar-stage-accent-rgb:57,211,83;
  --avatar-static-halo-alpha:.12;
  --avatar-static-core-alpha:.08;
  --avatar-static-rim-alpha:.07;
}
.avatar-stage-visual[data-avatar-stage="2"] {
  --avatar-stage-accent-rgb:102,224,255;
  --avatar-static-halo-alpha:.15;
  --avatar-static-core-alpha:.10;
  --avatar-static-rim-alpha:.09;
}
.avatar-stage-visual[data-avatar-stage="3"] {
  --avatar-stage-accent-rgb:184,132,255;
  --avatar-static-halo-alpha:.18;
  --avatar-static-core-alpha:.12;
  --avatar-static-rim-alpha:.12;
}
.avatar-stage-visual[data-avatar-stage="4"] {
  --avatar-stage-accent-rgb:255,209,102;
  --avatar-static-halo-alpha:.22;
  --avatar-static-core-alpha:.14;
  --avatar-static-rim-alpha:.16;
}
.avatar-stage-visual .avatar-visual-bg {
  background:
    radial-gradient(circle at 50% 18%, rgba(var(--avatar-stage-accent-rgb), var(--avatar-static-halo-alpha)), transparent 44%),
    radial-gradient(ellipse at 50% 72%, rgba(var(--avatar-stage-accent-rgb), var(--avatar-static-core-alpha)), transparent 46%),
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.035), transparent 64%);
  box-shadow:inset 0 0 0 1px rgba(var(--avatar-stage-accent-rgb), var(--avatar-static-rim-alpha));
}
.avatar-stage-visual .avatar-visual-fade {
  height:21%;
  background:linear-gradient(to top, rgba(4,11,7,.82), rgba(4,11,7,.24) 45%, transparent 100%);
}
.mobile-status-avatar-wrap.avatar-stage-visual .avatar-visual-fade {
  height:26%;
  background:linear-gradient(to top, rgba(4,11,7,.72), rgba(4,11,7,.18) 48%, transparent 100%);
}
.avatar-preview-frame.avatar-stage-visual .avatar-visual-fade,
.avatar-frame.avatar-stage-visual .avatar-visual-fade {
  height:20%;
}
.avatar-stage-visual[data-active-badge]:not([data-active-badge="none"]) .avatar-visual-badges::after {
  content:"◆";
  position:absolute;
  right:10px;
  bottom:10px;
  width:20px;
  height:20px;
  border-radius:999px;
  display:grid;
  place-items:center;
  font-size:10px;
  color:rgba(255,255,255,.92);
  background:rgba(var(--avatar-stage-accent-rgb),.20);
  border:1px solid rgba(var(--avatar-stage-accent-rgb),.34);
  box-shadow:0 0 14px rgba(var(--avatar-stage-accent-rgb),.18);
}
.avatar-stage-visual .avatar-visual-particles {
  display:none;
}
.avatar-stage-visual[data-visual-fx="off"] .avatar-visual-particles {
  display:none;
}
.avatar-stage-visual,
.avatar-stage-visual .avatar-visual-bg,
.avatar-stage-visual .avatar-visual-fade,
.avatar-stage-visual .avatar-visual-badges {
  animation:none;
}
.avatar-stage-visual .avatar-visual-image,
.avatar-stage-visual .avatar-visual-image.pop {
  animation:none !important;
  transform:none !important;
}


/* v0.9.9.68 — avatar decorative fx minimal */
/* v0.9.9.57.2 — avatar decorative fx minimal
   Minimal decorative motion: only particle dots move; avatar image and shell remain static. */
.avatar-stage-visual[data-visual-fx="minimal"] .avatar-visual-particles {
  display:block;
  overflow:hidden;
  opacity:.72;
}
.avatar-stage-visual[data-visual-fx="minimal"] .avatar-visual-particles i {
  display:block;
  width:5px;
  height:5px;
  border-radius:999px;
  background:rgba(var(--avatar-stage-accent-rgb),.80);
  box-shadow:0 0 12px rgba(var(--avatar-stage-accent-rgb),.34);
  animation:avatarDecorativeParticleDrift 7.8s ease-in-out infinite;
  transform:translate3d(0,0,0) scale(.82);
  will-change:transform,opacity;
}
.avatar-stage-visual[data-visual-fx="minimal"] .avatar-visual-particles i:nth-child(1){ left:18%; top:68%; animation-delay:-1.1s; animation-duration:8.6s; }
.avatar-stage-visual[data-visual-fx="minimal"] .avatar-visual-particles i:nth-child(2){ left:76%; top:62%; animation-delay:-3.2s; animation-duration:9.4s; }
.avatar-stage-visual[data-visual-fx="minimal"] .avatar-visual-particles i:nth-child(3){ left:30%; top:24%; animation-delay:-5.4s; animation-duration:10.2s; opacity:.52; }
.avatar-stage-visual[data-visual-fx="minimal"] .avatar-visual-particles i:nth-child(4){ left:66%; top:30%; animation-delay:-2.5s; animation-duration:8.9s; opacity:.58; }
.avatar-stage-visual[data-avatar-stage="1"][data-visual-fx="minimal"] .avatar-visual-particles{ opacity:.46; }
.avatar-stage-visual[data-avatar-stage="2"][data-visual-fx="minimal"] .avatar-visual-particles{ opacity:.58; }
.avatar-stage-visual[data-avatar-stage="3"][data-visual-fx="minimal"] .avatar-visual-particles{ opacity:.68; }
.avatar-stage-visual[data-avatar-stage="4"][data-visual-fx="minimal"] .avatar-visual-particles{ opacity:.78; }
@keyframes avatarDecorativeParticleDrift {
  0%,100% { opacity:.18; transform:translate3d(0,0,0) scale(.72); }
  35% { opacity:.74; transform:translate3d(8px,-12px,0) scale(1); }
  68% { opacity:.38; transform:translate3d(-6px,-22px,0) scale(.86); }
}


/* v0.9.9.68 — visual FX accessibility control */
/* v0.9.9.57.2 — visual FX accessibility control
   Runtime modes: off/static/minimal. Minimal animates only particle dots; reduced-motion falls back to static. */
.visual-fx-control select {
  width:100%;
}
.visual-fx-note {
  display:block;
  margin-top:6px;
  color:var(--muted);
  line-height:1.35;
}
.avatar-stage-visual[data-visual-fx="static"] .avatar-visual-particles {
  display:block;
  overflow:hidden;
  opacity:.52;
}
.avatar-stage-visual[data-visual-fx="static"] .avatar-visual-particles i {
  display:block;
  width:5px;
  height:5px;
  border-radius:999px;
  background:rgba(var(--avatar-stage-accent-rgb),.66);
  box-shadow:0 0 10px rgba(var(--avatar-stage-accent-rgb),.25);
  animation:none !important;
  transform:none !important;
  will-change:auto;
}
.avatar-stage-visual[data-visual-fx="static"] .avatar-visual-particles i:nth-child(1){ left:18%; top:68%; opacity:.36; }
.avatar-stage-visual[data-visual-fx="static"] .avatar-visual-particles i:nth-child(2){ left:76%; top:62%; opacity:.42; }
.avatar-stage-visual[data-visual-fx="static"] .avatar-visual-particles i:nth-child(3){ left:30%; top:24%; opacity:.30; }
.avatar-stage-visual[data-visual-fx="static"] .avatar-visual-particles i:nth-child(4){ left:66%; top:30%; opacity:.34; }
.avatar-stage-visual[data-reduced-motion="1"] .avatar-visual-particles {
  opacity:.50;
}

@media (prefers-reduced-motion: reduce){
  .avatar-stage-visual[data-visual-fx="minimal"] .avatar-visual-particles i{
    animation:none !important;
    opacity:.24;
    transform:none;
    will-change:auto;
  }
}

/* v0.9.9.57.2 — Deep Work audio foundation */
.deep-work-audio-panel {
  border:1px solid rgba(var(--theme-accent-rgb,125,255,134),.22);
  border-radius:18px;
  padding:14px;
  background:rgba(6,18,12,.58);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.025);
}
.deep-work-audio-actions {
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-top:12px;
}
.deep-work-audio-controls {
  display:grid;
  grid-template-columns:minmax(150px,.75fr) minmax(190px,1fr);
  gap:12px;
  margin-top:12px;
}
.deep-work-audio-field input[type="range"] {
  --deep-work-volume-percent:16%;
  --deep-work-volume-ratio:.16;
  --deep-work-volume-thumb-size:18px;
  --deep-work-volume-track-size:7px;
  --deep-work-volume-track-inset:calc(var(--deep-work-volume-thumb-size) / 2);
  --deep-work-volume-fill-width:calc((100% - var(--deep-work-volume-thumb-size)) * var(--deep-work-volume-ratio));
  width:100%;
  min-height:28px;
  appearance:none;
  -webkit-appearance:none;
  border:0;
  border-radius:999px;
  background:
    linear-gradient(90deg, rgba(var(--theme-accent-rgb,125,255,134),.95), rgba(var(--theme-accent-rgb,125,255,134),.95)) var(--deep-work-volume-track-inset) 50% / var(--deep-work-volume-fill-width) var(--deep-work-volume-track-size) no-repeat,
    linear-gradient(90deg, rgba(255,255,255,.30), rgba(255,255,255,.18)) var(--deep-work-volume-track-inset) 50% / calc(100% - var(--deep-work-volume-thumb-size)) var(--deep-work-volume-track-size) no-repeat;
  cursor:pointer;
  touch-action:pan-y;
}
.deep-work-audio-field input[type="range"]::-webkit-slider-runnable-track {
  height:var(--deep-work-volume-track-size);
  border-radius:999px;
  background:transparent;
}
.deep-work-audio-field input[type="range"]::-webkit-slider-thumb {
  width:var(--deep-work-volume-thumb-size);
  height:var(--deep-work-volume-thumb-size);
  border:0;
  border-radius:999px;
  background:rgb(var(--theme-accent-rgb,125,255,134));
  box-shadow:0 0 0 2px rgba(6,18,12,.86), 0 0 14px rgba(var(--theme-accent-rgb,125,255,134),.34);
  -webkit-appearance:none;
  appearance:none;
  margin-top:-5.5px;
}
.deep-work-audio-field input[type="range"]::-moz-range-track {
  height:var(--deep-work-volume-track-size);
  border-radius:999px;
  background:transparent;
}
.deep-work-audio-field input[type="range"]::-moz-range-progress {
  height:var(--deep-work-volume-track-size);
  border-radius:999px;
  background:transparent;
}
.deep-work-audio-field input[type="range"]::-moz-range-thumb {
  width:var(--deep-work-volume-thumb-size);
  height:var(--deep-work-volume-thumb-size);
  border:0;
  border-radius:999px;
  background:rgb(var(--theme-accent-rgb,125,255,134));
  box-shadow:0 0 0 2px rgba(6,18,12,.86), 0 0 14px rgba(var(--theme-accent-rgb,125,255,134),.34);
}
.deep-work-audio-field input[type="range"]:focus-visible {
  outline:2px solid rgba(var(--theme-cyan-rgb,125,224,255),.86);
  outline-offset:3px;
}

#deepWorkMusicMoodDescription { margin-top:10px; }
@media (max-width: 720px){
  .deep-work-audio-controls { grid-template-columns:1fr; }
  .deep-work-audio-panel { padding:12px; }
}

/* v0.9.9.57.2 — tutorial overlay/routing/perf hotfix */
.tutorial-entry-card { border-color:rgba(var(--theme-purple-rgb,192,132,252),.24); }
.tutorial-dialog {
  width:min(96vw, 860px);
  max-height:calc(100dvh - 24px);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  contain:layout paint style;
}
.tutorial-dialog:not([open]) { display:none !important; }
.tutorial-head {
  position:relative;
  flex:0 0 auto;
  background:linear-gradient(180deg, rgba(7,17,12,.98), rgba(7,17,12,.94));
}
.tutorial-head h3 { margin:0 0 4px; }
.tutorial-head span { display:block; color:var(--muted); line-height:1.35; font-size:.9rem; }
.tutorial-body {
  gap:12px;
  overflow:auto;
  max-height:calc(100dvh - 176px);
  padding-bottom:14px;
}
.tutorial-intro {
  display:grid;
  gap:6px;
  padding:13px 14px;
  border:1px solid rgba(var(--theme-accent-rgb,125,255,134),.26);
  border-radius:18px;
  background:linear-gradient(135deg, rgba(var(--theme-accent-rgb,125,255,134),.10), rgba(var(--theme-purple-rgb,192,132,252),.045));
}
.tutorial-intro strong { color:var(--text); font-size:1rem; }
.tutorial-intro span { color:var(--muted); line-height:1.45; }
.tutorial-path {
  display:grid;
  grid-template-columns:repeat(5, minmax(0, 1fr));
  gap:8px;
}
.tutorial-path div {
  display:grid;
  gap:4px;
  justify-items:center;
  padding:10px 8px;
  border:1px solid rgba(255,255,255,.09);
  border-radius:14px;
  background:rgba(0,0,0,.12);
  text-align:center;
}
.tutorial-path b {
  width:26px;
  height:26px;
  display:grid;
  place-items:center;
  border-radius:999px;
  border:1px solid rgba(var(--theme-accent-rgb,125,255,134),.32);
  color:var(--text);
  background:rgba(var(--theme-accent-rgb,125,255,134),.09);
  font-size:.82rem;
}
.tutorial-path span { color:var(--muted); font-size:.82rem; line-height:1.2; }
.tutorial-grid {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
}
.tutorial-card {
  position:relative;
  display:grid;
  grid-template-rows:auto auto auto 1fr auto;
  gap:7px;
  align-content:start;
  padding:13px;
  min-height:164px;
  border:1px solid var(--line);
  border-radius:18px;
  background:rgba(255,255,255,.026);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.016);
}
.tutorial-card.primary { border-color:rgba(var(--theme-accent-rgb,125,255,134),.32); background:rgba(var(--theme-accent-rgb,125,255,134),.055); }
.tutorial-card.safe { border-color:rgba(var(--theme-cyan-rgb,125,224,255),.24); }
.tutorial-step {
  position:absolute;
  top:10px;
  right:10px;
  padding:3px 7px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  color:var(--muted);
  font-size:.72rem;
  line-height:1.1;
  background:rgba(0,0,0,.16);
}
.tutorial-icon { font-size:1.25rem; line-height:1; padding-right:38px; }
.tutorial-card strong { color:var(--text); line-height:1.2; }
.tutorial-card p { margin:0; color:var(--muted); line-height:1.38; font-size:.88rem; }
.tutorial-card .btn { justify-self:start; margin-top:auto; }
.tutorial-flow { display:none; }
.tutorial-foot {
  flex:0 0 auto;
  align-items:center;
  background:linear-gradient(180deg, rgba(7,17,12,.94), rgba(7,17,12,.99));
}
@media (max-width:860px){
  .tutorial-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); }
}
@media (max-width:720px){
  .tutorial-dialog { width:min(96vw, 620px); max-height:calc(100dvh - 18px); }
  .tutorial-body { max-height:calc(100dvh - 150px); }
  .tutorial-path { grid-template-columns:repeat(5, minmax(46px, 1fr)); overflow-x:auto; padding-bottom:2px; }
  .tutorial-path div { min-width:66px; }
  .tutorial-grid { grid-template-columns:1fr; }
  .tutorial-card { min-height:auto; grid-template-rows:auto auto auto auto; }
  .tutorial-card .btn { width:100%; justify-self:stretch; }
  .tutorial-foot { display:grid; grid-template-columns:1fr; }
  .tutorial-foot .btn { width:100%; }
}

/* v0.9.9.68 — hard-close tutorial overlay guard */
#tutorialDialog[hidden],
#tutorialDialog:not([open]) {
  display:none !important;
  visibility:hidden !important;
  opacity:0 !important;
  pointer-events:none !important;
  position:fixed !important;
  inset:auto !important;
  width:0 !important;
  height:0 !important;
  max-width:0 !important;
  max-height:0 !important;
  overflow:hidden !important;
}
#tutorialDialog[open]:not([hidden]) {
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
}
#tutorialDialog::backdrop {
  background:rgba(0,0,0,.66);
  backdrop-filter:none;
}
#miniBossRepeatableSection {
  scroll-margin-top:16px;
}
@media (max-width:760px){
  #miniBossRepeatableSection { scroll-margin-top:12px; }
}

/* v0.9.9.68 — performance render containment
   Scope: CSS-only paint/layout cost reduction for the dense beta dashboard.
   Does not touch login/bootstrap/cloud/state.theme/avatar/audio engine logic. */
:root {
  --shadow:0 12px 34px rgba(0,0,0,.36);
  --glow:0 0 18px rgba(var(--theme-accent-rgb,57,211,83),.10);
}

/* The fixed scan/grid layer is subtle but costly during scroll on some GPUs. */
body::before {
  opacity:.10;
  will-change:auto;
}

/* Avoid expensive backdrop sampling across the many dashboard cards. */
.panel,
.scoreboard,
.mobile-bottom-nav,
.mobile-shell-bottom-sheet,
.overlay,
dialog::backdrop {
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

/* Keep offscreen sections cheap without changing DOM/state/render logic. */
@supports (content-visibility: auto) {
  #protocolSection,
  #rankExplainerSection,
  #calendarSection,
  #mobileMonthSection,
  #agendaSection,
  #bossSection,
  #levelsSection,
  #monthlyProgressSection,
  #growthSection,
  #titlesSection,
  #customizationSection,
  #manageSection,
  #historySection,
  #adminPanel,
  #dailyNoteSection,
  #deepWorkAudioPanel {
    content-visibility:auto;
    contain-intrinsic-size:1px 560px;
  }
  #calendarSection,
  #mobileMonthSection,
  #historySection,
  #customizationSection,
  #adminPanel {
    contain-intrinsic-size:1px 760px;
  }
}

/* Isolate repaint work inside dense repeated cards. */
.stat-card,
.score-card,
.quest,
.day-card,
.row-item,
.title-card,
.perk-card,
.inventory-item,
.boss-card,
.history-item,
.agenda-day-card,
.monthly-category-row,
.cosmetic-unlock-card,
.tutorial-card,
.avatar-stage-card,
.customization-preview-card,
.deep-work-audio-panel {
  contain:layout paint style;
}

/* Reduce always-on animated/paint-heavy decoration cost while keeping feedback readable. */
.progress-fill::after {
  animation:none !important;
  opacity:.12;
  transform:none !important;
}
.btn,
.quest,
.day-card,
.rank-card,
.achievement,
.row-item,
.title-card,
.perk-card,
.boss-card {
  transition:border-color .14s ease, background-color .14s ease, opacity .14s ease, box-shadow .14s ease, transform .14s ease;
}

@media (max-width: 760px) {
  body::before { display:none !important; }
  :root {
    --shadow:0 8px 22px rgba(0,0,0,.32);
    --glow:0 0 12px rgba(var(--theme-accent-rgb,57,211,83),.08);
  }
  .progress-fill::after { display:none !important; }
  @supports (content-visibility: auto) {
    #protocolSection,
    #rankExplainerSection,
    #calendarSection,
    #mobileMonthSection,
    #agendaSection,
    #bossSection,
    #levelsSection,
    #monthlyProgressSection,
    #growthSection,
    #titlesSection,
    #customizationSection,
    #manageSection,
    #historySection,
    #adminPanel,
    #dailyNoteSection,
    #deepWorkAudioPanel {
      contain-intrinsic-size:1px 460px;
    }
  }
}

/* v0.9.9.68 — admin diagnostics panel */
.admin-diagnostics-panel {
  margin-top:12px;
  border:1px solid rgba(91,255,166,.28);
  border-radius:16px;
  padding:12px;
  background:rgba(91,255,166,.045);
  display:grid;
  gap:10px;
}
.admin-diagnostics-panel.hidden,
.admin-diagnostics-panel[hidden] { display:none !important; }
.admin-diagnostics-grid .beta-debug-card strong { color:#eafff0; }
.admin-diagnostics-report { max-height:220px; }

/* v0.9.9.68 — admin audit filters and security summary */
.admin-audit-filter-row {
  display:grid;
  grid-template-columns:repeat(3, minmax(120px, 1fr)) minmax(220px, 1.5fr);
  gap:8px;
  align-items:end;
}
.admin-audit-filter-row label {
  display:grid;
  gap:5px;
  font-size:.78rem;
  color:var(--muted);
}
.admin-audit-filter-row select,
.admin-audit-filter-row input {
  width:100%;
  min-height:38px;
  border:1px solid rgba(255,255,255,.14);
  border-radius:12px;
  background:rgba(0,0,0,.24);
  color:var(--text);
  padding:8px 10px;
}
.admin-audit-filter-row input::placeholder { color:rgba(255,255,255,.38); }
@media (max-width:720px){
  .admin-audit-filter-row { grid-template-columns:1fr; }
}

/* v0.9.9.68 — admin feedback inbox */
.admin-feedback-panel {
  border-color:rgba(102,217,255,.28);
  background:rgba(102,217,255,.04);
}
.admin-feedback-report { max-height:260px; }
.admin-feedback-filter-row select,
.admin-feedback-filter-row input {
  border-color:rgba(102,217,255,.18);
}

/* v0.9.9.68 — UI density and brand polish
   Visual-only pass: dashboard hierarchy, login saved session branding, softer card rhythm. */
.hero {
  border-color: rgba(192,132,252,.52);
}
.ui66-dashboard-top-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  align-items: start;
  gap: 18px;
  margin-bottom: 6px;
}
.hero-title-block h1 {
  margin-bottom: 5px;
  letter-spacing: -.035em;
}
.hero-title-block .subtitle {
  color: rgba(223,255,230,.72);
}
.hero-title-block .motto {
  margin-top: 5px;
  font-size: .92rem;
  color: #eaffd8;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.hero-meta-strip {
  margin-top: 10px;
  gap: 7px;
}
.hero-meta-strip .tag,
.hero-meta-strip .profile-chip {
  padding: 6px 10px;
  font-size: .76rem;
  background: rgba(0,0,0,.18);
  border-color: rgba(125,255,134,.24);
}
.hero-action-zone {
  display: grid;
  justify-items: end;
  align-content: start;
  min-width: 0;
}
.hero-main-actions {
  width: 100%;
  justify-content: flex-end;
  gap: 8px;
}
.hero-primary-actions,
.hero-secondary-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}
.hero-primary-actions {
  width: 100%;
}
.hero-primary-actions .btn {
  min-width: 124px;
}
.hero-secondary-actions .btn {
  padding: 8px 11px;
  font-size: .86rem;
  opacity: .88;
}
.dashboard-primary-action {
  border-color: rgba(125,255,134,.78);
  background:
    linear-gradient(180deg, rgba(57,211,83,.26), rgba(8,16,11,.98)),
    rgba(14,35,21,.96);
  box-shadow: 0 0 0 1px rgba(125,255,134,.08), 0 0 22px rgba(57,211,83,.12);
}
.dashboard-secondary-action {
  background: linear-gradient(180deg, rgba(192,132,252,.14), rgba(8,16,11,.98));
}
.monthly-aware-stats {
  margin-top: 14px;
}
.stat-card,
.score-card,
.clarity-card,
.panel {
  border-color: rgba(125,255,134,.20);
}
.stat-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.026), rgba(0,0,0,.10)),
    rgba(8,18,13,.84);
}
.stat-card:hover {
  border-color: rgba(125,255,134,.40);
}
.scoreboard {
  gap: 11px;
}
.score-card {
  background: rgba(0,0,0,.14);
}
.clarity-panel {
  border-color: rgba(125,255,134,.28);
}
.clarity-panel .section-head h3 {
  font-size: 1.02rem;
}
.clarity-card.primary {
  border-color: rgba(125,255,134,.48);
}
.avatar-panel {
  border-color: rgba(192,132,252,.42);
}
.avatar-frame {
  border-color: rgba(125,255,134,.22);
}
.login-card-v096 {
  width: min(860px, 100%);
}
.login-brand-row {
  align-items: center;
}
.login-month-pill {
  opacity: .78;
  font-size: .86rem;
  background: rgba(255,255,255,.035);
}
.login-panel {
  padding: 18px;
}
.login-panel-primary {
  border-color: rgba(125,255,134,.48);
}
.auth-box {
  border-color: rgba(125,255,134,.18);
}
.login-primary-btn,
.saved-session-primary {
  border-color: rgba(125,255,134,.76);
  background:
    linear-gradient(180deg, rgba(57,211,83,.26), rgba(8,16,11,.98)),
    rgba(14,35,21,.96);
  color: #f3fff5;
}
.saved-session-polished {
  border-color: rgba(125,220,255,.36);
  background:
    radial-gradient(circle at 14% 8%, rgba(125,255,134,.12), transparent 36%),
    rgba(87,211,255,.06);
}
.saved-session-brand {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
}
.saved-session-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0,0,0,.45)) drop-shadow(0 0 14px rgba(57,211,83,.18));
}
.saved-session-actions .btn:first-child {
  font-weight: 950;
}
.login-feature-row .tag {
  opacity: .86;
}
@media (max-width:1220px) {
  .ui66-dashboard-top-bar {
    grid-template-columns: 1fr;
  }
  .hero-action-zone,
  .hero-primary-actions,
  .hero-secondary-actions {
    justify-items: start;
    justify-content: flex-start;
  }
}
@media (max-width:760px) {
  .ui66-dashboard-top-bar {
    gap: 12px;
  }
  .hero-meta-strip .tag,
  .hero-meta-strip .profile-chip {
    flex: 1 1 calc(50% - 8px);
    justify-content: center;
    text-align: center;
  }
  .hero-primary-actions,
  .hero-secondary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .hero-primary-actions .btn,
  .hero-secondary-actions .btn {
    width: 100%;
    min-width: 0;
  }
  .login-card-v096 {
    width: min(560px, 100%);
  }
  .login-brand-row {
    align-items: flex-start;
  }
  .login-month-pill {
    font-size: .78rem;
    padding: 6px 9px;
  }
  .saved-session-actions {
    grid-template-columns: 1fr;
  }
}
@media (max-width:420px) {
  .hero-primary-actions,
  .hero-secondary-actions,
  .hero-meta-strip {
    grid-template-columns: 1fr;
  }
  .hero-secondary-actions .btn,
  .hero-primary-actions .btn {
    flex: 1 1 100%;
  }
}


/* v0.9.9.68 — beta UI clarity layer
   Orientation-only UI pass: clearer next steps for beta users on desktop and mobile.
   No gameplay, cloud, login, avatar, audio, or data-model logic changed. */
.run-flow-guide {
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:10px;
  margin-top:12px;
  padding:10px;
  border:1px solid rgba(125,220,255,.24);
  border-radius:18px;
  background:linear-gradient(180deg, rgba(125,220,255,.055), rgba(0,0,0,.08));
}
.run-flow-step {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:9px;
  min-width:0;
  padding:10px;
  border:1px solid rgba(125,255,134,.18);
  border-radius:15px;
  background:rgba(255,255,255,.025);
}
.run-flow-step b {
  display:grid;
  place-items:center;
  width:28px;
  height:28px;
  border-radius:999px;
  border:1px solid rgba(125,255,134,.30);
  background:rgba(125,255,134,.08);
  color:var(--green);
  font-weight:1000;
}
.run-flow-step span { display:grid; gap:2px; min-width:0; }
.run-flow-step strong { color:#effff2; font-size:.90rem; line-height:1.1; }
.run-flow-step small { color:var(--muted); font-size:.74rem; line-height:1.18; overflow-wrap:anywhere; }
.run-flow-actions {
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
}
.run-flow-actions .btn { min-height:38px; }
.mobile-journey-strip { display:none; }
.mobile-page-intro { display:none; }

@media (max-width: 760px) {
  .run-flow-guide { grid-template-columns:1fr; padding:9px; }
  .run-flow-actions { display:grid; grid-template-columns:1fr; }

  .mobile-journey-strip {
    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:7px;
    margin-top:10px;
  }
  .mobile-journey-strip button {
    min-width:0;
    min-height:66px;
    border:1px solid rgba(125,255,134,.18);
    border-radius:16px;
    background:rgba(255,255,255,.028);
    color:var(--text);
    padding:8px 6px;
    display:grid;
    place-items:center;
    gap:2px;
    text-align:center;
    font:inherit;
    cursor:pointer;
  }
  .mobile-journey-strip button:active { transform:scale(.985); }
  .mobile-journey-strip b {
    width:22px;
    height:22px;
    display:grid;
    place-items:center;
    border-radius:999px;
    border:1px solid rgba(125,220,255,.30);
    color:var(--cyan);
    font-size:.72rem;
  }
  .mobile-journey-strip span { font-weight:950; font-size:.78rem; line-height:1.05; }
  .mobile-journey-strip small { color:var(--muted); font-size:.62rem; line-height:1.08; }

  .mobile-page-intro {
    display:grid;
    gap:3px;
    margin:0 0 10px;
    padding:10px 11px;
    border:1px solid rgba(125,220,255,.24);
    border-radius:16px;
    background:rgba(125,220,255,.045);
    color:var(--muted);
    line-height:1.28;
  }
  .mobile-page-intro strong { color:#effff2; font-size:.88rem; }
  .mobile-page-intro span { font-size:.78rem; }
  .mobile-bottom-nav button { min-height:52px; }
}

@media (max-width:390px) {
  .mobile-journey-strip { grid-template-columns:1fr; }
  .mobile-journey-strip button { min-height:52px; grid-template-columns:auto 1fr; justify-items:start; text-align:left; padding:8px 10px; }
  .mobile-journey-strip small { grid-column:2; }
}

/* v0.9.9.68 — desktop Today polish
   Visual/copy-only pass for the desktop Oggi page. Quest completion remains card-click based. */
.desktop-section-jump {
  position: sticky;
  top: 8px;
  z-index: 18;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 12px 0 18px;
  padding: 9px 10px;
  border: 1px solid rgba(125,220,255,.18);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(7,16,11,.90), rgba(4,9,6,.78));
  box-shadow: 0 10px 28px rgba(0,0,0,.24);
  backdrop-filter: blur(12px);
}
.jump-chip {
  border: 1px solid rgba(125,255,134,.18);
  border-radius: 999px;
  background: rgba(255,255,255,.028);
  color: rgba(239,255,242,.86);
  padding: 7px 11px;
  font: inherit;
  font-size: .82rem;
  font-weight: 850;
  cursor: pointer;
  transition: border-color .14s ease, background-color .14s ease, color .14s ease, transform .14s ease;
}
.jump-chip:hover {
  color: #effff2;
  border-color: rgba(125,255,134,.42);
  background: rgba(125,255,134,.075);
  transform: translateY(-1px);
}
.hero-secondary-actions {
  margin-top: 4px;
  padding-top: 7px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.hero-secondary-actions .btn {
  min-height: 34px;
  padding: 7px 10px;
  font-size: .78rem;
  border-radius: 999px;
  background: rgba(255,255,255,.025);
  opacity: .76;
}
.hero-secondary-actions .btn:hover { opacity: 1; }
.run-flow-actions { align-items:center; }
.run-flow-actions [data-tutorial-action="review"] {
  border-color: rgba(192,132,252,.30);
  color: #ead8ff;
}
.desktop-quest-click-hint { margin-top: -5px; }
.quest {
  padding-bottom: 38px;
}
.quest::before {
  content:"";
  position:absolute;
  inset:auto 11px 10px auto;
  width:26px;
  height:26px;
  border-radius:999px;
  border:1px solid rgba(125,220,255,.28);
  background:rgba(125,220,255,.055);
  pointer-events:none;
}
.quest::after {
  content:"↙";
  position:absolute;
  right:18px;
  bottom:14px;
  font-size:.82rem;
  color:rgba(125,220,255,.76);
  font-weight:950;
  pointer-events:none;
}
.quest.completed::before {
  border-color: rgba(125,255,134,.44);
  background: rgba(125,255,134,.09);
}
.quest.completed::after {
  content:"✓";
  right:17px;
  bottom:8px;
  top:auto;
  font-size:1.05rem;
  color:rgba(125,255,134,.86);
  width:auto;
  height:auto;
}
.quest.completed .quest-interaction-hint { color: rgba(221,255,226,.84); }
.quest-interaction-hint {
  position:absolute;
  left:14px;
  right:48px;
  bottom:12px;
  color:rgba(159,187,166,.76);
  font-size:.72rem;
  line-height:1.1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  pointer-events:none;
}
.rank-next-card {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin: 2px 0 13px;
  padding: 13px 14px;
  border:1px solid rgba(125,220,255,.30);
  border-radius:16px;
  background: linear-gradient(135deg, rgba(125,220,255,.07), rgba(0,0,0,.10));
}
.rank-next-card.complete {
  border-color: rgba(192,132,252,.42);
  background: linear-gradient(135deg, rgba(192,132,252,.08), rgba(0,0,0,.10));
}
.rank-next-card .score-value { font-size:1.12rem; }
#calendarSection .calendar-top {
  align-items:center;
  row-gap:10px;
}
#calendarSection .form-row {
  justify-content:flex-end;
  gap:8px;
}
#calendarSection .day-card.future {
  opacity:.64;
  background: linear-gradient(180deg, rgba(255,255,255,.018), transparent), rgba(7,16,11,.78);
}
#calendarSection .day-card.future .mini-checks,
#calendarSection .day-card.future .abbr {
  opacity:.42;
}
#calendarSection .day-card.future .day-xp,
#calendarSection .day-card.future .day-rank {
  font-size:.78rem;
}
#calendarSection .day-card.future .review-marker {
  opacity:.82;
}
.agenda-selected-date-card .tag {
  align-self:center;
}
@media (min-width: 980px) {
  .agenda-form-row.agenda-form-row-appointment,
  .agenda-form-row.agenda-form-row-boss {
    display:grid !important;
    grid-template-columns: minmax(130px, .75fr) minmax(110px, .6fr) minmax(0, 1fr) !important;
    gap:10px !important;
    align-items:end !important;
  }
  .agenda-form-row.agenda-form-row-appointment .agenda-field-title,
  .agenda-form-row.agenda-form-row-boss .agenda-field-title {
    grid-column: 1 / -1 !important;
  }
  .agenda-form-row.agenda-form-row-boss .agenda-field:nth-of-type(4),
  .agenda-form-row.agenda-form-row-boss .agenda-field:nth-of-type(5) {
    grid-column:auto !important;
  }
  .agenda-form-row.agenda-form-row-appointment button,
  .agenda-form-row.agenda-form-row-boss button {
    grid-column: 1 / -1 !important;
    width:100% !important;
    justify-self:stretch !important;
    min-height:42px;
    white-space:normal !important;
  }
}
.customization-grid {
  grid-template-columns:minmax(320px, .72fr) minmax(360px, 1.28fr);
  align-items:start;
}
.customization-preview-card {
  align-self:start;
  min-height:0;
  grid-template-columns:112px 1fr;
  position:sticky;
  top:72px;
}
.customization-preview-card img {
  width:112px;
  height:112px;
}
.customization-preview-tags .tag { white-space:normal; }
.profile-safe-note { line-height:1.35; }
@media (max-width: 760px) {
  .desktop-section-jump { display:none !important; }
  .quest { padding-bottom:14px; }
  .quest::before,
  .quest::after,
  .quest-interaction-hint,
  .desktop-quest-click-hint { display:none !important; }
  .customization-preview-card { position:relative; top:auto; }
}


/* v0.9.9.68.2 — desktop polish corrections
   User feedback pass: left rail navigation, cleaner customization spacing, restored elegant quest done overlay. */
@media (min-width: 1320px) {
  .desktop-section-jump.desktop-side-rail {
    position: fixed;
    top: 116px;
    left: max(14px, calc((100vw - 1520px) / 2 + 16px));
    z-index: 28;
    width: 146px;
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 10px;
    border-radius: 22px;
    border-color: rgba(125,220,255,.16);
    background: linear-gradient(180deg, rgba(7,16,11,.78), rgba(4,9,6,.62));
    box-shadow: 0 16px 38px rgba(0,0,0,.26), inset 0 0 0 1px rgba(255,255,255,.025);
    backdrop-filter: blur(14px);
  }
  .desktop-section-jump.desktop-side-rail .jump-chip {
    width: 100%;
    justify-content: flex-start;
  }
}
.desktop-section-jump.desktop-side-rail .jump-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  position: relative;
  overflow: hidden;
  transform-origin: left center;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}
.desktop-section-jump.desktop-side-rail .jump-chip::after {
  content:"";
  position:absolute;
  inset:0;
  background: radial-gradient(circle at 20% 50%, rgba(var(--theme-accent-rgb,57,211,83),.16), transparent 48%);
  opacity:0;
  transform: translateX(-12px);
  transition: opacity .18s ease, transform .18s ease;
  pointer-events:none;
}
.desktop-section-jump.desktop-side-rail .jump-chip:hover {
  transform: translateX(4px) scale(1.015);
  box-shadow: 0 0 0 3px rgba(var(--theme-accent-rgb,57,211,83),.055);
}
.desktop-section-jump.desktop-side-rail .jump-chip:hover::after {
  opacity:1;
  transform: translateX(0);
}
.desktop-section-jump.desktop-side-rail .jump-emoji {
  width: 20px;
  text-align:center;
  filter: saturate(1.12);
  transition: transform .18s ease;
}
.desktop-section-jump.desktop-side-rail .jump-chip:hover .jump-emoji {
  transform: scale(1.18) rotate(-4deg);
}
@media (min-width: 1320px) and (max-width: 1690px) {
  .desktop-section-jump.desktop-side-rail {
    width: 46px;
    padding: 8px 6px;
  }
  .desktop-section-jump.desktop-side-rail .jump-chip {
    min-width: 0;
    justify-content: center;
    padding-inline: 7px;
  }
  .desktop-section-jump.desktop-side-rail .jump-chip span:not(.jump-emoji) {
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    opacity: 0;
    pointer-events:none;
    white-space: nowrap;
    padding: 7px 10px;
    border: 1px solid rgba(125,255,134,.22);
    border-radius: 999px;
    background: rgba(5,12,8,.94);
    box-shadow: 0 10px 24px rgba(0,0,0,.28);
    transition: opacity .16s ease, transform .16s ease;
  }
  .desktop-section-jump.desktop-side-rail .jump-chip:hover span:not(.jump-emoji) {
    opacity:1;
    transform: translateY(-50%) translateX(0);
  }
}
@media (max-width: 1319px) {
  .desktop-section-jump.desktop-side-rail {
    position: sticky;
    top: 8px;
    display: flex;
  }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-section-jump.desktop-side-rail .jump-chip,
  .desktop-section-jump.desktop-side-rail .jump-chip::after,
  .desktop-section-jump.desktop-side-rail .jump-emoji { transition: none !important; }
  .desktop-section-jump.desktop-side-rail .jump-chip:hover,
  .desktop-section-jump.desktop-side-rail .jump-chip:hover .jump-emoji { transform: none !important; }
}
.quest {
  padding-bottom: 30px;
}
.quest::before {
  width: 22px;
  height: 22px;
  right: 12px;
  bottom: 12px;
  border-color: rgba(125,220,255,.26);
  background: rgba(125,220,255,.045);
}
.quest::after {
  content:"";
  right: 12px;
  bottom: 12px;
  width: 22px;
  height: 22px;
}
.quest.completed::before {
  opacity: 0;
}
.quest.completed::after {
  content:"✅";
  top: 50%;
  right: 18px;
  bottom: auto;
  width: auto;
  height: auto;
  transform: translateY(-50%) rotate(-6deg);
  font-size: clamp(3.25rem, 5.2vw, 5.6rem);
  line-height: 1;
  color: rgba(125,255,134,.20);
  opacity: .32;
  filter: drop-shadow(0 0 18px rgba(125,255,134,.14));
}
.quest.completed .quest-interaction-hint {
  color: rgba(221,255,226,.72);
}
.customization-grid {
  grid-template-columns: 1fr;
  gap: 14px;
}
.customization-preview-card {
  position: relative;
  top: auto;
  grid-template-columns: 88px minmax(0,1fr);
  min-height: 0;
  width: 100%;
  max-width: none;
  align-self: stretch;
}
.customization-preview-card img {
  width: 88px;
  height: 88px;
}
.customization-controls {
  display: grid;
  grid-template-columns: minmax(260px,.82fr) minmax(360px,1.18fr);
  align-items: start;
  column-gap: 14px;
  row-gap: 12px;
}
.customization-controls > :nth-child(1),
.customization-controls > .customization-field:nth-of-type(1),
.customization-controls > .visual-fx-control,
.customization-controls > :nth-child(4),
.customization-controls > .customization-label-preview,
.customization-controls > .customization-label-editor,
.customization-controls > .customization-actions {
  grid-column: 1;
}
.customization-unlock-panel,
.profile-safe-note {
  grid-column: 2;
}
.customization-unlock-panel {
  margin-top: 0;
  align-self: start;
}
.cosmetic-unlock-list {
  grid-template-columns: repeat(2, minmax(0,1fr));
}
.cosmetic-unlock-card {
  min-height: 88px;
}
@media (min-width: 1180px) {
  .customization-unlock-panel {
    grid-row: 1 / span 7;
  }
}

@media (max-width: 980px) {
  .customization-controls { grid-template-columns: 1fr; }
  .customization-controls > *,
  .customization-unlock-panel,
  .profile-safe-note { grid-column: auto !important; grid-row: auto !important; }
  .cosmetic-unlock-list { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .quest { padding-bottom:14px; }
  .quest.completed::after { display:none !important; }
  .customization-preview-card { grid-template-columns:84px 1fr; }
  .customization-preview-card img { width:84px; height:84px; }
}

/* v0.9.9.68.2 — sticky edge alignment
   Micro-polish: keep the desktop jump rail attached to the viewport edge, not to the page container. */
@media (min-width: 1320px) {
  .desktop-section-jump.desktop-side-rail {
    position: fixed;
    left: calc(env(safe-area-inset-left, 0px) + 10px);
    top: clamp(108px, 13vh, 136px);
    z-index: 42;
  }
}
@media (min-width: 1320px) and (max-width: 1690px) {
  .desktop-section-jump.desktop-side-rail {
    left: calc(env(safe-area-inset-left, 0px) + 8px);
  }
}

/* v0.9.9.69 — quest/rank section polish
   Desktop-only UI pass for the Oggi Quest + Rank area.
   Quest logic remains card-click based; scoring/cloud/login/avatar/audio are untouched. */
@media (min-width: 761px) {
  #questSection.quest-rank-grid {
    align-items: start;
    grid-template-columns: minmax(0, 1.12fr) minmax(340px, .78fr);
  }
  #questSection.quest-rank-grid > .panel {
    min-width: 0;
  }
  #questSection .section-head {
    align-items: flex-start;
    gap: 14px;
  }
  #questSection .section-head h2 {
    margin-bottom: 4px;
  }
  #questSection .legend {
    align-items: center;
    gap: 8px;
  }
  #questSection .desktop-quest-click-hint {
    margin-top: 0;
    max-width: 640px;
    line-height: 1.35;
    color: rgba(185,211,191,.78);
  }
  #questSection .quest-grid {
    gap: 10px;
  }
  #questSection .quest-divider {
    margin: 0 2px -2px;
    padding: 0 2px;
    color: rgba(219,255,225,.84);
  }
  #questSection .quest-divider span {
    letter-spacing: .14em;
    font-size: .70rem;
  }
  #questSection .quest-divider small {
    opacity: .72;
  }
  #questSection .quest {
    min-height: 108px;
    padding: 12px 14px 32px;
    border-color: rgba(125,255,134,.17);
    background:
      radial-gradient(circle at 92% 12%, rgba(192,132,252,.055), transparent 34%),
      linear-gradient(180deg, rgba(255,255,255,.028), rgba(0,0,0,.08)),
      rgba(7,16,11,.98);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.012);
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background-color .16s ease, opacity .16s ease;
  }
  #questSection .quest:hover {
    transform: translateY(-2px);
    border-color: rgba(125,255,134,.44);
    box-shadow: 0 10px 24px rgba(0,0,0,.20), 0 0 0 3px rgba(125,255,134,.045);
  }
  #questSection .quest::before,
  #questSection .quest::after {
    display: none;
  }
  #questSection .quest.completed {
    border-color: rgba(125,255,134,.48);
    background:
      radial-gradient(circle at 88% 50%, rgba(125,255,134,.10), transparent 38%),
      linear-gradient(180deg, rgba(125,255,134,.055), rgba(0,0,0,.10)),
      rgba(7,16,11,.96);
    box-shadow: inset 0 0 28px rgba(57,211,83,.07), 0 0 0 1px rgba(125,255,134,.12);
  }
  #questSection .quest.completed::after {
    display: block;
    content: "✅";
    position: absolute;
    top: 50%;
    right: 20px;
    bottom: auto;
    width: auto;
    height: auto;
    transform: translateY(-50%) rotate(-7deg);
    font-size: clamp(3.1rem, 4.7vw, 5.2rem);
    line-height: 1;
    opacity: .30;
    filter: drop-shadow(0 0 18px rgba(125,255,134,.16));
    pointer-events: none;
    z-index: 0;
  }
  #questSection .quest.completed .quest-name,
  #questSection .quest.completed .quest-desc,
  #questSection .quest.completed .quest-meta-line,
  #questSection .quest.completed .quest-card-foot {
    position: relative;
    z-index: 1;
  }
  #questSection .quest-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 10px;
    padding-right: 0;
  }
  #questSection .quest-name {
    font-size: .94rem;
    line-height: 1.12;
    font-weight: 950;
    letter-spacing: .01em;
  }
  #questSection .quest-xp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid rgba(192,132,252,.30);
    border-radius: 999px;
    background: rgba(192,132,252,.055);
    color: #ead8ff;
    font-size: .78rem;
    line-height: 1;
  }
  #questSection .quest-desc {
    margin-top: 7px;
    font-size: .82rem;
    line-height: 1.28;
    color: rgba(204,226,209,.82);
  }
  #questSection .quest-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 8px;
    position: relative;
    z-index: 1;
  }
  #questSection .quest-meta-line span {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 2px 7px;
    border: 1px solid rgba(125,220,255,.18);
    border-radius: 999px;
    background: rgba(125,220,255,.035);
    color: rgba(204,226,209,.72);
    font-size: .68rem;
    font-weight: 850;
    letter-spacing: .02em;
  }
  #questSection .quest-card-foot {
    position: absolute;
    left: 14px;
    right: 14px;
    bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    pointer-events: none;
    color: rgba(159,187,166,.72);
    font-size: .70rem;
    font-weight: 800;
  }
  #questSection .quest-card-foot span::before {
    content: "↳ ";
    color: rgba(125,220,255,.70);
  }
  #questSection .quest.completed .quest-card-foot span::before {
    content: "✓ ";
    color: rgba(125,255,134,.84);
  }
  #questSection .quest-interaction-hint {
    display: none !important;
  }

  #rankExplainerSection.rank-daily-panel {
    align-self: start;
    display: grid;
    gap: 12px;
    padding: 16px;
  }
  #rankExplainerSection.rank-daily-panel h2 {
    margin: 0;
  }
  #rankExplainerSection .rank-next-card {
    margin: 0;
    padding: 14px;
    align-items: center;
    border-color: rgba(125,220,255,.32);
    background:
      radial-gradient(circle at 92% 18%, rgba(125,255,134,.09), transparent 34%),
      linear-gradient(135deg, rgba(125,220,255,.07), rgba(0,0,0,.10));
  }
  #rankExplainerSection .rank-next-card .score-value {
    font-size: 1.22rem;
    letter-spacing: -.02em;
  }
  #rankExplainerSection .rank-next-card .micro {
    max-width: 420px;
    line-height: 1.28;
  }
  #rankExplainerSection .rank-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #rankExplainerSection .rank-step {
    display: grid;
    grid-template-columns: auto minmax(0,1fr);
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid rgba(125,255,134,.16);
    border-radius: 14px;
    background: rgba(255,255,255,.022);
    transition: border-color .16s ease, background-color .16s ease, transform .16s ease;
  }
  #rankExplainerSection .rank-step.reached {
    border-color: rgba(125,255,134,.34);
    background: rgba(125,255,134,.045);
  }
  #rankExplainerSection .rank-step.next {
    border-color: rgba(255,209,102,.44);
    background: rgba(255,209,102,.045);
  }
  #rankExplainerSection .rank-step.active {
    transform: translateX(2px);
    box-shadow: inset 0 0 18px rgba(57,211,83,.06);
  }
  #rankExplainerSection .rank-step-dot {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid rgba(125,220,255,.26);
    background: rgba(125,220,255,.045);
    color: rgba(221,255,226,.86);
    font-size: .76rem;
    font-weight: 950;
  }
  #rankExplainerSection .rank-step.reached .rank-step-dot {
    border-color: rgba(125,255,134,.46);
    background: rgba(125,255,134,.10);
    color: #effff2;
  }
  #rankExplainerSection .rank-step-name {
    font-weight: 950;
    line-height: 1.1;
  }
  #rankExplainerSection .rank-step-label {
    margin-top: 2px;
    color: rgba(159,187,166,.82);
    font-size: .75rem;
    line-height: 1.15;
  }
  #rankExplainerSection .rank-threshold-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: -2px;
  }
  #rankExplainerSection .rank-threshold-legend span {
    padding: 5px 8px;
    border: 1px solid rgba(125,255,134,.16);
    border-radius: 999px;
    background: rgba(125,255,134,.035);
    color: rgba(221,255,226,.78);
    font-size: .72rem;
    font-weight: 850;
  }
  #rankExplainerSection .perfect-days-mini {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 0;
    padding: 11px 12px;
    border: 1px solid rgba(255,209,102,.24);
    border-radius: 16px;
    background: rgba(255,209,102,.035);
  }
  #rankExplainerSection .perfect-days-title {
    font-weight: 950;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  #questSection.quest-rank-grid {
    grid-template-columns: 1fr;
  }
}

/* v0.9.9.70 — mobile information architecture
   Mobile becomes an app shell: Oggi is short, Quest is readable, Mese owns month progress, Info becomes a hub. */
@media (max-width:760px) {
  body.mobile-paged-shell .wrap { padding:10px 10px calc(96px + env(safe-area-inset-bottom)); }

  /* Oggi: keep the operational dashboard tight. */
  body.mobile-paged-shell #mobileHomePanel.mobile-page-active { display:block !important; }
  body.mobile-paged-shell #mobileDailyPanel,
  body.mobile-paged-shell #mobileSpeedPanel { display:none !important; }
  body.mobile-paged-shell[data-mobile-page="today"] #dailyNoteSection.mobile-page-active { display:block !important; }
  body.mobile-paged-shell[data-mobile-page="today"] #dailyNoteSection { margin-top:10px; padding:12px; }
  body.mobile-paged-shell[data-mobile-page="today"] #protocolSection { display:none !important; }
  body.mobile-paged-shell[data-mobile-page="today"] #dailyNoteSection .quick-jump-bar { display:none !important; }
  body.mobile-paged-shell[data-mobile-page="today"] #dailyNoteSection .section-head h2 { display:none; }
  body.mobile-paged-shell[data-mobile-page="today"] #dailyNoteSection .section-head .muted.small { font-size:.78rem; line-height:1.3; }
  body.mobile-paged-shell[data-mobile-page="today"] .deep-work-audio-panel { margin-top:10px; }
  body.mobile-paged-shell .mobile-run-balance-details { margin-top:10px; }
  body.mobile-paged-shell #mobileRunBalanceDetails .clarity-card:not(.primary) { display:none; }

  /* Quest: one clear tappable card per row, not a compressed desktop grid. */
  body.mobile-paged-shell #questSection.mobile-page-active { display:grid !important; grid-template-columns:1fr; gap:10px; }
  body.mobile-paged-shell #questSection > .panel { padding:13px; }
  body.mobile-paged-shell #questSection .section-head { display:grid; gap:8px; }
  body.mobile-paged-shell #questSection .section-head h2 { display:none; }
  body.mobile-paged-shell #questSection .legend { display:grid; grid-template-columns:1fr auto; gap:8px; align-items:center; }
  body.mobile-paged-shell #questSection .legend .tag { justify-content:center; min-height:36px; }
  body.mobile-paged-shell #questSection .legend .btn { min-height:36px; padding:8px 10px; }
  body.mobile-paged-shell #questSection .mobile-page-intro { margin-bottom:10px; }
  body.mobile-paged-shell #questSection .quest-grid { grid-template-columns:1fr !important; gap:9px !important; }
  body.mobile-paged-shell #questSection .quest-divider { margin:2px 0 0; font-size:.72rem; letter-spacing:.12em; }
  body.mobile-paged-shell #questSection .quest { min-height:0 !important; padding:12px 12px 34px !important; border-radius:16px !important; }
  body.mobile-paged-shell #questSection .quest-head { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; padding-right:0 !important; }
  body.mobile-paged-shell #questSection .quest-name { font-size:.94rem !important; line-height:1.14 !important; min-height:0 !important; }
  body.mobile-paged-shell #questSection .quest-xp { font-size:.78rem !important; margin:0 !important; }
  body.mobile-paged-shell #questSection .quest-desc { display:block; margin-top:7px; font-size:.80rem; line-height:1.28; color:rgba(204,226,209,.82); }
  body.mobile-paged-shell #questSection .quest-meta-line { display:flex; flex-wrap:wrap; gap:5px; margin-top:7px; }
  body.mobile-paged-shell #questSection .quest-meta-line span { font-size:.64rem; padding:2px 6px; }
  body.mobile-paged-shell #questSection .quest-mobile-meta { display:none !important; }
  body.mobile-paged-shell #questSection .quest-card-foot { left:12px; right:12px; bottom:9px; font-size:.68rem; }
  body.mobile-paged-shell #questSection .quest-card-foot span::before { content:"↳ "; }
  body.mobile-paged-shell #questSection .quest.completed::after { display:block !important; content:"✅"; position:absolute; top:50%; right:14px; transform:translateY(-50%) rotate(-7deg); font-size:3.6rem; opacity:.28; filter:drop-shadow(0 0 16px rgba(125,255,134,.15)); pointer-events:none; }
  body.mobile-paged-shell #questSection .quest.completed .quest-card-foot span::before { content:"✓ "; }

  /* Rank: detail is available but not allowed to dominate the Quest screen. */
  body.mobile-paged-shell #rankExplainerSection.rank-daily-panel { padding:12px; align-self:start; }
  body.mobile-paged-shell #rankExplainerSection.mobile-collapsible.collapsed > .mobile-collapse-head { margin:0; }
  body.mobile-paged-shell #rankExplainerSection .rank-next-card { display:grid; grid-template-columns:1fr; gap:8px; padding:11px; }
  body.mobile-paged-shell #rankExplainerSection .rank-list { grid-template-columns:1fr; gap:7px; }
  body.mobile-paged-shell #rankExplainerSection .rank-threshold-legend { display:grid; grid-template-columns:1fr 1fr; gap:5px; }
  body.mobile-paged-shell #rankExplainerSection .perfect-days-mini { padding:10px; }

  /* Mese: calendar first, progress immediately below. History/personalization stay out. */
  body.mobile-paged-shell #monthlyProgressSection.mobile-page-hidden { display:none !important; }
  body.mobile-paged-shell #monthlyProgressSection.mobile-page-active { display:grid !important; margin-top:10px; }
  body.mobile-paged-shell #monthlyProgressSection .panel { padding:13px; }
  body.mobile-paged-shell[data-mobile-page="calendar"] #monthlyProgressSection .section-head { display:grid; gap:6px; }
  body.mobile-paged-shell[data-mobile-page="calendar"] #monthlyProgressSection .section-head h3::before { content:"📈 "; }
  body.mobile-paged-shell[data-mobile-page="calendar"] #monthlyProgressSection .monthly-progress-summary { grid-template-columns:1fr; gap:9px; }
  body.mobile-paged-shell[data-mobile-page="calendar"] #monthlyProgressSection .monthly-achievement-history { display:none !important; }
  body.mobile-paged-shell[data-mobile-page="calendar"] #monthlyProgressSection .monthly-achievement-foundation { margin-top:10px; }
  body.mobile-paged-shell[data-mobile-page="calendar"] #monthlyProgressSection .monthly-category-list { margin-top:10px; }

  /* Agenda: forms are closed by default and opened from two clear actions. */
  .mobile-agenda-create-actions { display:grid !important; grid-template-columns:1fr 1fr; gap:8px; margin:12px 0 0; }
  .mobile-agenda-create-actions .btn { width:100%; min-height:44px; }
  body.mobile-paged-shell #agendaEditor { display:none !important; }
  body.mobile-paged-shell #agendaEditor.mobile-appointment-open,
  body.mobile-paged-shell #agendaEditor.mobile-boss-open { display:grid !important; grid-template-columns:1fr !important; gap:10px; }
  body.mobile-paged-shell #agendaEditor.mobile-appointment-open .agenda-editor-card:nth-child(2) { display:none !important; }
  body.mobile-paged-shell #agendaEditor.mobile-boss-open .agenda-editor-card:nth-child(1) { display:none !important; }
  body.mobile-paged-shell #agendaSection .section-head h2 { display:none; }
  body.mobile-paged-shell #agendaSection .section-head { display:grid; gap:8px; }
  body.mobile-paged-shell #agendaSection .agenda-selected-date-card { margin-top:10px; }

  /* Info: hub first; advanced panels only appear after a hub tap. */
  body.mobile-paged-shell #mobileProfilePage.mobile-page-active { display:block !important; }
  .mobile-info-hub { display:grid; grid-template-columns:1fr; gap:9px; }
  .mobile-info-hub-card { width:100%; min-height:68px; display:grid; grid-template-columns:auto 1fr; align-items:center; column-gap:11px; row-gap:3px; padding:12px; border:1px solid var(--line); border-radius:18px; background:linear-gradient(180deg, rgba(255,255,255,.03), rgba(0,0,0,.05)), rgba(7,16,11,.98); color:var(--text); text-align:left; box-shadow:var(--shadow); }
  .mobile-info-hub-card.primary { border-color:rgba(125,220,255,.38); background:linear-gradient(180deg, rgba(125,220,255,.075), rgba(0,0,0,.06)), rgba(7,16,11,.98); }
  .mobile-info-hub-card.ghost { opacity:.88; }
  .mobile-info-hub-card > span { grid-row:1 / span 2; width:38px; height:38px; display:grid; place-items:center; border:1px solid rgba(125,255,134,.18); border-radius:14px; background:rgba(255,255,255,.035); font-size:1.12rem; }
  .mobile-info-hub-card strong { font-size:.98rem; line-height:1.1; }
  .mobile-info-hub-card small { color:var(--muted); line-height:1.25; }
  .mobile-info-hub-card:active { transform:scale(.99); }
  body.mobile-paged-shell[data-mobile-page="profile"] .mobile-info-advanced-section.mobile-page-active { display:none !important; }
  body.mobile-paged-shell[data-mobile-page="profile"] .mobile-info-advanced-section.mobile-info-section-open { display:grid !important; margin-top:10px; }
  body.mobile-paged-shell[data-mobile-page="profile"] #historySection.mobile-info-section-open { display:block !important; }
  body.mobile-paged-shell[data-mobile-page="profile"] .mobile-info-section-open > .mobile-collapse-head { margin-bottom:10px; }
  body.mobile-paged-shell[data-mobile-page="profile"] .mobile-info-section-open .panel { padding:13px; }
  body.mobile-paged-shell[data-mobile-page="profile"] #customizationSection.mobile-info-section-open .customization-controls { grid-template-columns:1fr; }
  body.mobile-paged-shell[data-mobile-page="profile"] #customizationSection.mobile-info-section-open .customization-preview-card { grid-template-columns:72px 1fr; }
  body.mobile-paged-shell[data-mobile-page="profile"] #customizationSection.mobile-info-section-open .customization-preview-card img { width:72px; height:72px; }
}

@media (min-width:761px) {
  .mobile-agenda-create-actions { display:none !important; }
}


/* v0.9.9.70.1 — mobile tab content scope
   Personalizza lives only inside Info; Progressione mese lives only inside Mese. */
@media (max-width:760px) {
  body.mobile-paged-shell #monthlyProgressSection.mobile-page-hidden,
  body.mobile-paged-shell:not([data-mobile-page="calendar"]) #monthlyProgressSection {
    display:none !important;
  }
  body.mobile-paged-shell[data-mobile-page="calendar"] #monthlyProgressSection.mobile-page-active {
    display:grid !important;
  }

  body.mobile-paged-shell #customizationSection.mobile-page-hidden,
  body.mobile-paged-shell:not([data-mobile-page="profile"]) #customizationSection {
    display:none !important;
  }
  body.mobile-paged-shell[data-mobile-page="profile"] #customizationSection.mobile-page-active:not(.mobile-info-section-open) {
    display:none !important;
  }
  body.mobile-paged-shell[data-mobile-page="profile"] #customizationSection.mobile-info-section-open {
    display:grid !important;
  }
}

/* v0.9.9.70.2 — mobile Today + Rank polish
   Oggi keeps only primary actions. Utilities are icon buttons; detailed settings live in Info. */
@media (max-width:760px) {
  body.mobile-paged-shell .mobile-shell-header {
    grid-template-columns:1fr auto;
    gap:8px;
  }
  .mobile-header-actions {
    display:grid;
    grid-template-columns:34px 34px 34px auto;
    gap:5px;
    align-items:start;
    justify-content:end;
    max-width:210px;
  }
  .mobile-icon-action {
    width:34px;
    height:34px;
    min-width:34px;
    min-height:34px;
    display:grid;
    place-items:center;
    border:1px solid rgba(125,220,255,.26);
    border-radius:13px;
    background:rgba(255,255,255,.035);
    color:var(--text);
    font-weight:950;
    font-size:.92rem;
    box-shadow:0 0 14px rgba(0,0,0,.13);
  }
  .mobile-icon-action:active { transform:scale(.96); }
  .mobile-icon-action.music-active,
  .mobile-icon-action.active {
    border-color:rgba(125,255,134,.42);
    background:rgba(125,255,134,.10);
    box-shadow:0 0 16px rgba(125,255,134,.08);
  }
  .mobile-header-actions .mobile-cloud-chip {
    min-height:34px;
    padding:7px 9px;
    font-size:.70rem;
  }
  .mobile-best-action-hint {
    margin-top:4px;
    padding:9px 10px;
    border:1px solid rgba(125,255,134,.16);
    border-radius:14px;
    background:rgba(0,0,0,.10);
    color:rgba(204,226,209,.84);
    font-size:.78rem;
    line-height:1.3;
  }
  .mobile-best-action-hint strong { color:var(--text); }
  .mobile-retired-review-card,
  body.mobile-paged-shell .mobile-retired-review-card,
  body.mobile-paged-shell #mobileRunBalanceDetails {
    display:none !important;
  }

  /* Rank: compact explainer instead of raw threshold text. */
  body.mobile-paged-shell #rankExplainerSection.rank-daily-panel {
    gap:10px;
    padding:12px;
  }
  body.mobile-paged-shell #rankExplainerSection.rank-daily-panel h2 {
    font-size:1.2rem;
    margin:0;
  }
  body.mobile-paged-shell #rankExplainerSection .mobile-rank-summary {
    display:block !important;
    color:rgba(204,226,209,.78);
    font-size:.78rem;
    line-height:1.32;
  }
  body.mobile-paged-shell #rankExplainerSection .rank-next-card {
    border-radius:17px;
    padding:12px;
    gap:8px;
  }
  body.mobile-paged-shell #rankExplainerSection .rank-next-card .score-value {
    font-size:1.08rem;
  }
  body.mobile-paged-shell #rankExplainerSection .rank-next-card .tag {
    justify-self:start;
    width:100%;
    justify-content:center;
  }
  body.mobile-paged-shell #rankExplainerSection .rank-list {
    display:grid;
    grid-template-columns:1fr;
    gap:7px;
  }
  body.mobile-paged-shell #rankExplainerSection .rank-step {
    display:grid !important;
    grid-template-columns:42px minmax(0,1fr);
    align-items:center;
    gap:10px;
    min-height:54px;
    padding:8px 10px;
    border:1px solid rgba(125,255,134,.16);
    border-radius:15px;
    background:rgba(255,255,255,.026);
  }
  body.mobile-paged-shell #rankExplainerSection .rank-step-dot {
    width:34px;
    height:34px;
    display:grid;
    place-items:center;
    border-radius:999px;
    border:1px solid rgba(125,220,255,.28);
    background:rgba(125,220,255,.045);
    font-size:.74rem;
    font-weight:950;
    line-height:1;
  }
  body.mobile-paged-shell #rankExplainerSection .rank-step-name {
    font-size:.92rem;
    font-weight:950;
    line-height:1.05;
  }
  body.mobile-paged-shell #rankExplainerSection .rank-step-label {
    margin-top:3px;
    color:rgba(204,226,209,.72);
    font-size:.72rem;
    line-height:1.2;
  }
  body.mobile-paged-shell #rankExplainerSection .rank-step.next {
    border-color:rgba(255,209,102,.42);
    background:rgba(255,209,102,.045);
  }
  body.mobile-paged-shell #rankExplainerSection .rank-step.reached {
    border-color:rgba(125,255,134,.38);
    background:rgba(125,255,134,.055);
  }
  body.mobile-paged-shell #rankExplainerSection .rank-threshold-legend {
    display:none !important;
  }
  body.mobile-paged-shell #rankExplainerSection .perfect-days-mini {
    border-radius:15px;
    align-items:center;
  }
}

@media (max-width:390px) {
  .mobile-header-actions { grid-template-columns:32px 32px 32px; max-width:112px; }
  .mobile-header-actions .mobile-cloud-chip { grid-column:1 / -1; justify-self:end; }
  .mobile-icon-action { width:32px; height:32px; min-width:32px; min-height:32px; }
}

/* v0.9.9.72 — keyboard, touch-target and long-name readiness */
.skip-link {
  position:fixed;
  left:14px;
  top:10px;
  z-index:120;
  transform:translateY(-180%);
  padding:10px 14px;
  border:1px solid var(--line-strong);
  border-radius:12px;
  background:#07100b;
  color:var(--text);
  font-weight:900;
}
.skip-link:focus { transform:translateY(0); }
.login-field-label {
  margin:1px 2px -5px;
  color:rgba(223,255,230,.82);
  font-size:.78rem;
  font-weight:850;
}
.quest[role="button"]:focus-visible {
  outline:3px solid var(--cyan);
  outline-offset:3px;
  border-color:var(--line-strong);
  box-shadow:0 0 0 6px rgba(125,220,255,.12);
}
.quest[aria-disabled="true"] { cursor:not-allowed; }
.hero-title-block { min-width:0; }
.hero-title-block h1 { max-width:100%; font-size:clamp(2.25rem, 4vw, 4.6rem); }
.hero-title-block .player-name-cap {
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
  word-break:normal;
}
.hero-title-block h1.player-name-long { font-size:clamp(1.7rem, 2.55vw, 2.8rem); line-height:1; }
.hero-title-block h1.player-name-very-long { font-size:clamp(1.35rem, 1.55vw, 1.7rem); line-height:1.05; }
.hero-title-block h1.player-name-very-long .player-name-cap { word-break:break-all; }
.avatar-panel .avatar-frame { min-height:clamp(380px, 36vw, 430px); }
.avatar-panel #avatarImg.avatar-img { height:clamp(355px, 33vw, 405px); }

@media (max-width:760px) {
  .mobile-header-actions {
    grid-template-columns:44px 44px 44px auto;
    max-width:260px;
  }
  .mobile-icon-action {
    width:44px;
    height:44px;
    min-width:44px;
    min-height:44px;
  }
  .mobile-header-actions .mobile-cloud-chip { min-height:44px; }
  .avatar-panel .avatar-frame { min-height:300px; }
  .avatar-panel #avatarImg.avatar-img { height:310px; }
}
@media (max-width:520px) {
  .mobile-header-actions { grid-template-columns:44px 44px 44px; max-width:142px; }
  .mobile-header-actions .mobile-cloud-chip { grid-column:1 / -1; justify-self:end; }
}
@media (max-width:420px) {
  .avatar-panel .avatar-frame { min-height:260px; }
  .avatar-panel #avatarImg.avatar-img { height:270px; }
}

@media (max-width:760px) {
  body.mobile-paged-shell .mobile-page-active,
  body.mobile-paged-shell #dailyNoteSection .daily-note-grid,
  body.mobile-paged-shell #dailyNoteSection .daily-note-box,
  body.mobile-paged-shell #dailyNoteSection textarea,
  body.mobile-paged-shell #dailyNoteSection .daily-note-actions {
    min-width:0;
    max-width:100%;
  }
  body.mobile-paged-shell #dailyNoteSection .daily-note-grid {
    width:100%;
    grid-template-columns:minmax(0,1fr);
  }
}

/* v0.9.9.78 calendar core correction: real weekday placement + persistent today layer */
.day-card.today,
#calendarSection .day-card.today,
.mobile-calendar-grid .day-card.today {
  border-color: rgba(57,211,83,.92) !important;
  box-shadow: inset 0 0 0 2px rgba(57,211,83,.48), 0 0 0 1px rgba(220,255,225,.18), 0 0 24px rgba(57,211,83,.18) !important;
  background: linear-gradient(180deg, rgba(57,211,83,.12), rgba(255,255,255,.025)), rgba(7,16,11,.98) !important;
}
.day-card.today .day-label,
#calendarSection .day-card.today .day-label,
.mobile-calendar-grid .day-card.today .day-label {
  color:#f3fff5 !important;
  text-shadow:0 0 10px rgba(57,211,83,.34);
}
.day-card .today-marker {
  border-color:rgba(57,211,83,.66);
  background:rgba(57,211,83,.14);
  color:#e5ffe8;
}


/* v0.9.9.79 calendar selected day clarity: visible selected-day layer without logic changes */
.day-card.active,
#calendarSection .day-card.active,
.mobile-calendar-grid .day-card.active {
  border-style:dashed !important;
  border-color:rgba(234,255,237,.88) !important;
  box-shadow:inset 0 0 0 2px rgba(234,255,237,.20), 0 0 0 1px rgba(125,255,134,.18), 0 0 20px rgba(125,255,134,.12) !important;
}
.day-card.active::after,
#calendarSection .day-card.active::after,
.mobile-calendar-grid .day-card.active::after {
  content:"";
  position:absolute;
  inset:5px;
  z-index:3;
  pointer-events:none;
  border:2px dashed rgba(234,255,237,.92);
  border-radius:calc(var(--radius-sm) - 2px);
  box-shadow:0 0 16px rgba(125,255,134,.12);
  opacity:.96;
  animation:selectedDayDashBreath 2.8s ease-in-out infinite;
}
.day-card.active > *,
#calendarSection .day-card.active > *,
.mobile-calendar-grid .day-card.active > * {
  position:relative;
  z-index:2;
}
.day-card.today.active,
#calendarSection .day-card.today.active,
.mobile-calendar-grid .day-card.today.active {
  border-style:solid !important;
  border-color:rgba(57,211,83,.94) !important;
  box-shadow:inset 0 0 0 2px rgba(57,211,83,.50), 0 0 0 1px rgba(220,255,225,.20), 0 0 26px rgba(57,211,83,.20) !important;
}
.day-card.today.active::after,
#calendarSection .day-card.today.active::after,
.mobile-calendar-grid .day-card.today.active::after {
  inset:7px;
  border-width:1px;
  border-color:rgba(234,255,237,.56);
  opacity:.72;
  box-shadow:none;
  animation:none;
}
@keyframes selectedDayDashBreath {
  0%,100% { opacity:.78; box-shadow:0 0 12px rgba(125,255,134,.08); }
  50% { opacity:1; box-shadow:0 0 22px rgba(125,255,134,.18); }
}
@media (prefers-reduced-motion: reduce) {
  .day-card.active::after,
  #calendarSection .day-card.active::after,
  .mobile-calendar-grid .day-card.active::after {
    animation:none !important;
  }
}
@media (max-width:760px) {
  #calendarSection .day-card.active::after,
  .mobile-calendar-grid .day-card.active::after {
    inset:3px;
    border-width:1px;
    border-radius:8px;
  }
  #calendarSection .day-card.today.active::after,
  .mobile-calendar-grid .day-card.today.active::after {
    inset:5px;
  }
}

/* v0.9.9.79 calendar UI polish: readable native dropdowns */
select {
  color:#effff2;
  background-color:#0b160f;
  border-color:rgba(125,255,134,.22);
  color-scheme:dark;
}
select:hover,
select:focus,
select:focus-visible {
  color:#ffffff;
  background-color:#102017;
  border-color:rgba(125,255,134,.48);
}
select:disabled {
  color:rgba(239,255,242,.48);
  background-color:rgba(8,16,11,.72);
}
select option,
select optgroup {
  color:#07110c;
  background-color:#f4fff6;
}
select option:hover,
select option:focus,
select option:checked {
  color:#07110c;
  background-color:#cfeedd;
}


/* v0.9.9.79 — desktop nav premium polish
   Visual/navigation-shell only. Mobile bottom nav and functional systems remain unchanged. */
@media (min-width: 1320px) {
  .desktop-section-jump.desktop-side-rail {
    width: 178px;
    padding: 13px 12px;
    gap: 9px;
    border-radius: 26px;
    border: 1px solid rgba(var(--theme-accent-rgb,57,211,83),.24);
    background:
      radial-gradient(circle at 30% 0%, rgba(var(--theme-accent-rgb,57,211,83),.18), transparent 44%),
      linear-gradient(180deg, rgba(9,22,15,.86), rgba(3,8,6,.74));
    box-shadow:
      0 24px 70px rgba(0,0,0,.38),
      0 0 0 1px rgba(255,255,255,.035) inset,
      0 0 34px rgba(var(--theme-accent-rgb,57,211,83),.08);
    backdrop-filter: blur(18px) saturate(1.08);
  }
}
.desktop-section-jump.desktop-side-rail {
  isolation:isolate;
}
.desktop-section-jump.desktop-side-rail::before {
  content:"";
  position:absolute;
  inset:9px;
  border-radius:22px;
  background:linear-gradient(180deg, rgba(255,255,255,.045), transparent 34%);
  opacity:.56;
  pointer-events:none;
  z-index:-1;
}
.desktop-nav-title {
  display:grid;
  gap:1px;
  padding: 4px 4px 7px;
  color:#f3fff5;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:950;
  font-size:.66rem;
}
.desktop-nav-title small {
  color:rgba(159,187,166,.78);
  letter-spacing:.12em;
  font-size:.55rem;
  font-weight:900;
}
.desktop-nav-group {
  display:grid;
  gap:7px;
}
.desktop-nav-separator {
  height:1px;
  margin:2px 4px;
  background:linear-gradient(90deg, transparent, rgba(125,220,255,.22), rgba(var(--theme-accent-rgb,57,211,83),.26), transparent);
}
.desktop-section-jump.desktop-side-rail .jump-chip {
  min-height:39px;
  padding: 8px 10px;
  border-radius:15px;
  border-color:rgba(255,255,255,.08);
  background:
    linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.018)),
    rgba(3,8,6,.36);
  color:rgba(239,255,242,.76);
  box-shadow:0 0 0 1px rgba(255,255,255,.018) inset;
  transition:
    transform .18s ease,
    border-color .18s ease,
    background-color .18s ease,
    box-shadow .18s ease,
    color .18s ease,
    opacity .18s ease;
}
.desktop-section-jump.desktop-side-rail .jump-chip.utility {
  min-height:34px;
  font-size:.76rem;
  opacity:.82;
}
.desktop-section-jump.desktop-side-rail .jump-chip::before {
  content:"";
  position:absolute;
  left:5px;
  top:50%;
  width:3px;
  height:46%;
  border-radius:999px;
  background:linear-gradient(180deg, var(--green), var(--cyan));
  box-shadow:0 0 14px rgba(var(--theme-accent-rgb,57,211,83),.52);
  opacity:0;
  transform:translateY(-50%) scaleY(.35);
  transition:opacity .18s ease, transform .18s ease;
  pointer-events:none;
}
.desktop-section-jump.desktop-side-rail .jump-chip::after {
  inset:0;
  border-radius:inherit;
  background:
    radial-gradient(circle at 18% 50%, rgba(var(--theme-accent-rgb,57,211,83),.22), transparent 48%),
    linear-gradient(90deg, rgba(var(--theme-accent-rgb,57,211,83),.10), transparent 70%);
  opacity:0;
  transform:translateX(-8px);
  transition:opacity .20s ease, transform .20s ease;
}
.desktop-section-jump.desktop-side-rail .jump-chip:hover,
.desktop-section-jump.desktop-side-rail .jump-chip:focus-visible {
  color:#f3fff5;
  border-color:rgba(var(--theme-accent-rgb,57,211,83),.36);
  background:
    linear-gradient(180deg, rgba(255,255,255,.060), rgba(255,255,255,.025)),
    rgba(var(--theme-accent-rgb,57,211,83),.065);
  transform:translateX(4px);
  box-shadow:
    0 12px 26px rgba(0,0,0,.24),
    0 0 0 3px rgba(var(--theme-accent-rgb,57,211,83),.075),
    0 0 0 1px rgba(255,255,255,.030) inset;
}
.desktop-section-jump.desktop-side-rail .jump-chip:hover::after,
.desktop-section-jump.desktop-side-rail .jump-chip:focus-visible::after {
  opacity:1;
  transform:translateX(0);
}
.desktop-section-jump.desktop-side-rail .jump-chip:focus-visible {
  outline:2px solid rgba(125,220,255,.76);
  outline-offset:3px;
}
.desktop-section-jump.desktop-side-rail .jump-chip.active,
.desktop-section-jump.desktop-side-rail .jump-chip[aria-current="true"] {
  color:#ffffff;
  opacity:1;
  border-color:rgba(var(--theme-accent-rgb,57,211,83),.62);
  background:
    linear-gradient(135deg, rgba(var(--theme-accent-rgb,57,211,83),.22), rgba(125,220,255,.075)),
    rgba(9,22,15,.88);
  box-shadow:
    0 14px 34px rgba(0,0,0,.30),
    0 0 0 1px rgba(var(--theme-accent-rgb,57,211,83),.26) inset,
    0 0 24px rgba(var(--theme-accent-rgb,57,211,83),.18);
  transform:translateX(5px);
}
.desktop-section-jump.desktop-side-rail .jump-chip.active::before,
.desktop-section-jump.desktop-side-rail .jump-chip[aria-current="true"]::before {
  opacity:1;
  transform:translateY(-50%) scaleY(1);
}
.desktop-section-jump.desktop-side-rail .jump-chip.active::after,
.desktop-section-jump.desktop-side-rail .jump-chip[aria-current="true"]::after {
  opacity:.95;
  transform:translateX(0);
}
.desktop-section-jump.desktop-side-rail .jump-chip.active .jump-emoji,
.desktop-section-jump.desktop-side-rail .jump-chip[aria-current="true"] .jump-emoji {
  filter:saturate(1.35) drop-shadow(0 0 9px rgba(var(--theme-accent-rgb,57,211,83),.34));
  transform:scale(1.12);
}
@media (min-width: 1320px) and (max-width: 1690px) {
  .desktop-section-jump.desktop-side-rail {
    width:58px;
    padding:10px 7px;
    border-radius:24px;
  }
  .desktop-nav-title,
  .desktop-nav-separator { display:none; }
  .desktop-nav-group { gap:7px; }
  .desktop-section-jump.desktop-side-rail .jump-chip {
    min-height:40px;
    border-radius:16px;
    justify-content:center;
    padding-inline:8px;
  }
  .desktop-section-jump.desktop-side-rail .jump-chip span:not(.jump-emoji) {
    left:calc(100% + 10px);
    z-index:8;
    border-color:rgba(var(--theme-accent-rgb,57,211,83),.28);
    background:rgba(4,10,7,.96);
    color:#effff2;
  }
}
@media (max-width: 1319px) and (min-width: 761px) {
  .desktop-section-jump.desktop-side-rail {
    gap:8px;
    padding:10px;
    border-radius:20px;
  }
  .desktop-nav-title,
  .desktop-nav-separator { display:none; }
  .desktop-nav-group { display:flex; flex-wrap:wrap; gap:8px; }
}
@media (max-width: 760px) {
  .desktop-nav-title,
  .desktop-nav-separator,
  .desktop-nav-group { display:none !important; }
}
@media (prefers-reduced-motion: reduce) {
  .desktop-section-jump.desktop-side-rail,
  .desktop-section-jump.desktop-side-rail::before,
  .desktop-section-jump.desktop-side-rail .jump-chip,
  .desktop-section-jump.desktop-side-rail .jump-chip::before,
  .desktop-section-jump.desktop-side-rail .jump-chip::after,
  .desktop-section-jump.desktop-side-rail .jump-emoji {
    transition:none !important;
    animation:none !important;
  }
  .desktop-section-jump.desktop-side-rail .jump-chip:hover,
  .desktop-section-jump.desktop-side-rail .jump-chip:focus-visible,
  .desktop-section-jump.desktop-side-rail .jump-chip.active,
  .desktop-section-jump.desktop-side-rail .jump-chip[aria-current="true"],
  .desktop-section-jump.desktop-side-rail .jump-chip:hover .jump-emoji,
  .desktop-section-jump.desktop-side-rail .jump-chip.active .jump-emoji,
  .desktop-section-jump.desktop-side-rail .jump-chip[aria-current="true"] .jump-emoji {
    transform:none !important;
  }
}

/* v0.9.9.80 — release hardening: keyboard focus, native confirmations and mobile run controls */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
  outline:3px solid var(--cyan);
  outline-offset:3px;
}

dialog.game-confirm-dialog.game-confirm-backdrop {
  width:100vw;
  max-width:none;
  height:100vh;
  height:100dvh;
  max-height:none;
  margin:0;
  box-sizing:border-box;
  border:0;
  border-radius:0;
  color:inherit;
}
dialog.game-confirm-dialog.game-confirm-backdrop:not([open]) { display:none !important; }
dialog.game-confirm-dialog::backdrop { background:transparent; }

.hero-title-block h1.player-name-long {
  font-size:clamp(1.5rem, 2.1vw, 2.35rem);
  line-height:1.05;
}

@media (max-width:760px) {
  .mobile-primary-run-actions {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
    margin-top:12px;
  }
  .mobile-primary-run-actions .btn { min-height:46px; }
  .mobile-primary-run-actions .mobile-save-run-action {
    grid-column:1 / -1;
    min-height:50px;
  }
}

/* Short mobile viewports: keep the primary Run CTA above the fixed nav.
   The profile label is redundant with the adjacent profile switch action;
   cloud state remains visible as a tappable status dot and in the live region. */
@media (max-width:390px) and (max-height:820px) {
  body.mobile-paged-shell .mobile-shell-header { margin-bottom:8px; }
  body.mobile-paged-shell .mobile-profile-chip { display:none; }
  body.mobile-paged-shell .mobile-brand-lockup > div { min-width:0; }
  body.mobile-paged-shell .mobile-home-date {
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
  body.mobile-paged-shell .mobile-header-actions {
    grid-template-columns:repeat(4,44px);
    gap:3px;
    max-width:185px;
  }
  body.mobile-paged-shell .mobile-header-actions .mobile-cloud-chip {
    grid-column:auto;
    justify-self:stretch;
    justify-content:center;
    width:44px;
    min-width:44px;
    padding:0;
  }
  body.mobile-paged-shell .mobile-header-actions .mobile-cloud-chip .cloud-status-dot { margin:0; }
  body.mobile-paged-shell #mobileHomeCloudText { display:none; }
  body.mobile-paged-shell #mobileSyncFeedback {
    margin:4px 0 8px;
    padding:6px 8px;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }
}
