/* Arc Tracker — ported from prototype/arc-tracker.html. Everything is scoped to .arc-root so the
   tracker keeps its own look (Space Grotesk + Inter, its own palette) without touching the rest of the site. */
.arc-root{
  --bg:#121826; --bg-elev:#18202F; --surface:#1D2638; --surface-2:#263149;
    --border:rgba(255,255,255,0.13); --text:#F4F7FB; --text-dim:#B4BED0; --text-faint:#808AA0;
    --accent:#2BDCFF; --accent-soft:rgba(43,220,255,0.16); --gold:#FFC857; --gold-soft:rgba(255,200,87,0.16);
    --danger:#FF8A80; --success:#6BF09A; --radius:8px;
    --font-display:'Space Grotesk', sans-serif; --font-body:'Inter', sans-serif;
  background:var(--bg); color:var(--text); font-family:var(--font-body);
  -webkit-font-smoothing:antialiased; min-height:100vh; min-height:100dvh; line-height:normal;
}
/* the prototype's light palette, kept for when light mode is switched on */
.arc-root[data-theme="light"]{
  --bg:#F3F5F8; --bg-elev:#FFFFFF; --surface:#FFFFFF; --surface-2:#EDF0F5;
    --border:rgba(15,20,30,0.10); --text:#12151C; --text-dim:#55606F; --text-faint:#8A93A3;
    --accent:#0091AD; --accent-soft:rgba(0,145,173,0.12); --gold:#9A6B00; --gold-soft:rgba(154,107,0,0.12);
    --danger:#C4433B; --success:#2E8B57; --radius:8px;
    --font-display:'Space Grotesk', sans-serif; --font-body:'Inter', sans-serif;
}
/* undo site-wide styles that would otherwise leak into the tracker */
.arc-root *{box-sizing:border-box;}
.arc-root section{padding:0;}
.arc-root h2, .arc-root h3{letter-spacing:normal; line-height:1.3;}
.arc-root p{margin:1em 0;}
.arc-root input[type=checkbox]{margin:3px 3px 3px 4px;}
.arc-root button{font-family:var(--font-body);}
.arc-root .btn{display:inline-block; white-space:normal; letter-spacing:normal; gap:0;}
.arc-root .brand{font-size:inherit; letter-spacing:normal; line-height:normal;}
.arc-root .chip{letter-spacing:normal;}
.arc-root .empty{text-align:left;}
.arc-root img{max-width:none;}
.arc-root svg{display:inline-block;}

  .arc-root #arc-app{max-width:760px;margin:0 auto;padding:0 max(16px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));}
  .arc-root a{color:var(--accent);}

  .arc-root header.top{
    display:flex;align-items:center;justify-content:space-between;
    padding:calc(14px + env(safe-area-inset-top)) 0 14px; border-bottom:1px solid var(--border); gap:12px; flex-wrap:wrap;
  }
  .arc-root header.top .kbolt{height:20px;}
  .arc-root .brand{display:flex;align-items:center;gap:9px;}
  .arc-root .brand .word{font-family:var(--font-display);font-weight:700;font-size:19px;letter-spacing:0.5px;}
  .arc-root .headline-badge{
    display:flex;align-items:center;gap:8px;font-size:13px;color:var(--text-dim);
    background:var(--surface); border:1px solid var(--border); padding:6px 12px;
    clip-path:polygon(8px 0,100% 0,100% 100%,0 100%,0 8px);
  }
  .arc-root .headline-badge b{color:var(--text);font-weight:600;}
  .arc-root .flame{color:var(--gold);}

  /* bottom tab bar, like a phone app; sits above the home indicator on iPhone */
  .arc-root nav.tabs{
    position:fixed; left:0; right:0; bottom:0; z-index:100; display:flex; justify-content:center;
    background:rgba(18,24,38,0.94); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
    border-top:1px solid var(--border); padding:0 max(6px, env(safe-area-inset-left)) env(safe-area-inset-bottom) max(6px, env(safe-area-inset-right));
  }
  .arc-root[data-theme="light"] nav.tabs{background:rgba(255,255,255,0.94);}
  .arc-root nav.tabs button{
    appearance:none; border:none; background:none; color:var(--text-faint); cursor:pointer;
    flex:1 1 0; max-width:120px; min-width:0; padding:8px 2px 7px;
    display:flex; flex-direction:column; align-items:center; gap:3px;
    font-family:var(--font-body); font-weight:600; font-size:10.5px; letter-spacing:0.1px; white-space:nowrap;
    -webkit-tap-highlight-color:transparent; transition:color .15s ease;
  }
  .arc-root nav.tabs button svg{display:block;}
  .arc-root nav.tabs button:hover{color:var(--text-dim);}
  .arc-root nav.tabs button.active{color:var(--accent);}

  .arc-root .arc-main{padding-top:20px;}
  .arc-root .tab{display:none;}
  .arc-root .tab.active{display:block; animation:fadein .25s ease;}
  @keyframes fadein{from{opacity:0;transform:translateY(4px);}to{opacity:1;transform:none;}}

  .arc-root h2.section-title{
    font-family:var(--font-display); font-weight:600; font-size:20px; margin:0 0 4px;
  }
  .arc-root p.section-sub{color:var(--text-dim); font-size:13.5px; margin:0 0 18px; max-width:56ch;}

  .arc-root .card{
    background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
    padding:18px; margin-bottom:14px;
  }
  .arc-root .card.cut{clip-path:polygon(16px 0,100% 0,100% 100%,0 100%,0 16px);}
  .arc-root .card.accent{border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent-soft);}

  .arc-root .row{display:flex;gap:10px;flex-wrap:wrap;}
  .arc-root .stat{
    flex:1 1 120px; background:var(--surface-2); border-radius:6px; padding:12px 14px;
  }
  .arc-root .stat .num{font-family:var(--font-display);font-weight:700;font-size:24px;line-height:1.1;}
  .arc-root .stat .lbl{color:var(--text-dim);font-size:12px;margin-top:2px;}

  .arc-root label{display:block;font-size:12.5px;color:var(--text-dim);margin-bottom:5px;font-weight:600;}
  .arc-root input[type=text], .arc-root input[type=time], .arc-root textarea{
    width:100%; background:var(--surface-2); border:1px solid var(--border); border-radius:6px;
    color:var(--text); font-family:var(--font-body); font-size:14px; padding:10px 11px; margin-bottom:12px;
  }
  .arc-root input:focus, .arc-root textarea:focus, .arc-root button:focus-visible{
    outline:2px solid var(--accent); outline-offset:1px;
  }
  .arc-root textarea{resize:vertical;min-height:56px;}

  .arc-root button.btn{
    appearance:none; border:1px solid var(--accent); background:var(--accent-soft); color:var(--accent);
    font-family:var(--font-body); font-weight:600; font-size:13.5px; padding:10px 16px;
    border-radius:6px; cursor:pointer; transition:transform .1s ease, background .15s ease;
  }
  .arc-root button.btn:hover{background:var(--accent);color:var(--bg-elev);}
  .arc-root button.btn:active{transform:scale(0.98);}
  .arc-root button.btn.ghost{background:transparent;border-color:var(--border);color:var(--text-dim);}
  .arc-root button.btn.ghost:hover{border-color:var(--text-dim);color:var(--text);background:transparent;}
  .arc-root button.btn.danger{border-color:var(--danger);color:var(--danger);background:transparent;}
  .arc-root button.btn.danger:hover{background:var(--danger);color:#fff;}
  .arc-root button.btn:disabled{opacity:0.45;cursor:not-allowed;background:transparent;color:var(--text-faint);border-color:var(--border);}

  .arc-root .checkline{
    display:flex;align-items:flex-start;gap:11px; padding:11px 0; border-bottom:1px solid var(--border);
  }
  .arc-root .checkline:last-child{border-bottom:none;}
  .arc-root .checkline input[type=checkbox]{
    width:20px;height:20px;margin-top:1px;accent-color:var(--accent);flex-shrink:0;cursor:pointer;
  }
  .arc-root .checkline .txt b{display:block;font-size:14.5px;}
  .arc-root .checkline .txt span{display:block;font-size:12px;color:var(--text-faint);margin-top:1px;}
  .arc-root .checkline.nonneg .txt b{color:var(--gold);}

  .arc-root .xpbar-outer{background:var(--surface-2);border-radius:5px;height:9px;overflow:hidden;margin:8px 0 4px;}
  .arc-root .xpbar-inner{background:linear-gradient(90deg,var(--accent),var(--gold));height:100%;border-radius:5px;transition:width .4s ease;}

  .arc-root .badgechips{display:flex;flex-wrap:wrap;gap:7px;margin-top:10px;}
  .arc-root .chip{
    font-size:12px; padding:4px 10px; border-radius:20px; background:var(--gold-soft); color:var(--gold);
    border:1px solid var(--gold); font-weight:600;
  }

  .arc-root .heatgrid{display:grid;grid-template-columns:repeat(15,1fr);gap:4px;margin-top:10px;}
  .arc-root .heatgrid .cell{aspect-ratio:1;border-radius:2px;background:var(--surface-2);}
  .arc-root .heatgrid .cell[data-lvl="1"]{background:var(--accent-soft);}
  .arc-root .heatgrid .cell[data-lvl="2"]{background:var(--accent);opacity:0.55;}
  .arc-root .heatgrid .cell[data-lvl="3"]{background:var(--accent);}

  .arc-root details.arche{
    background:var(--surface); border:1px solid var(--border); border-radius:var(--radius);
    margin-bottom:10px; overflow:hidden;
  }
  .arc-root details.arche[open]{border-color:var(--accent);}
  .arc-root details.arche summary{
    list-style:none; cursor:pointer; padding:14px 16px; display:flex; align-items:center; gap:11px;
    font-family:var(--font-display); font-weight:600; font-size:15px;
  }
  .arc-root details.arche summary::-webkit-details-marker{display:none;}
  .arc-root details.arche summary .em{font-size:20px;}
  .arc-root details.arche summary .sub{font-weight:400;font-family:var(--font-body);color:var(--text-faint);font-size:12.5px;margin-left:auto;}
  .arc-root details.arche .body{padding:0 16px 16px;}
  .arc-root details.arche .quote{font-style:italic;color:var(--text-dim);margin:0 0 12px;font-size:13.5px;}
  .arc-root details.arche .fieldrow{margin-bottom:9px;font-size:13.5px;line-height:1.5;}
  .arc-root details.arche .fieldrow b{color:var(--text);}
  .arc-root table.ranks{width:100%;border-collapse:collapse;margin-top:10px;font-size:13px;}
  .arc-root table.ranks th, .arc-root table.ranks td{text-align:left;padding:6px 4px;border-bottom:1px solid var(--border);}
  .arc-root table.ranks th{color:var(--text-faint);font-weight:600;font-size:11.5px;text-transform:uppercase;letter-spacing:0.5px;}
  .arc-root table.ranks tr.current td{color:var(--accent);font-weight:700;}

  .arc-root .board-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border);}
  .arc-root .board-row:last-child{border-bottom:none;}
  .arc-root .board-row .rank-no{width:22px;color:var(--text-faint);font-size:12.5px;text-align:right;}
  .arc-root .board-row .em{font-size:18px;}
  .arc-root .board-row .info{flex:1;min-width:0;}
  .arc-root .board-row .info .nm{font-weight:600;font-size:14px;}
  .arc-root .board-row .info .sub2{font-size:12px;color:var(--text-faint);}
  .arc-root .board-row.you{background:var(--accent-soft);margin:0 -10px;padding:10px;border-radius:6px;border-bottom:none;}
  .arc-root .board-row .streaknum{font-family:var(--font-display);font-weight:700;color:var(--gold);}

  .arc-root .banner{
    display:flex;gap:10px;align-items:flex-start;padding:12px 14px;border-radius:6px;font-size:13.5px;
    margin-bottom:16px;
  }
  .arc-root .banner.warn{background:rgba(196,67,59,0.1);border:1px solid var(--danger);color:var(--text);}
  .arc-root .banner.info{background:var(--accent-soft);border:1px solid var(--accent);color:var(--text);}

  .arc-root .modal-back{
    position:fixed;inset:0;background:rgba(0,0,0,0.55);display:flex;align-items:center;justify-content:center;
    z-index:200;padding:20px;
  }
  .arc-root .modal{
    background:var(--surface);border:1px solid var(--accent);border-radius:10px;padding:28px;
    text-align:center;max-width:340px;box-shadow:0 0 40px var(--accent-soft);
    animation:pop .3s ease;
  }
  @keyframes pop{from{transform:scale(0.85);opacity:0;}to{transform:scale(1);opacity:1;}}
  .arc-root .modal .em{font-size:40px;}
  .arc-root .modal h3{font-family:var(--font-display);margin:8px 0 4px;font-size:19px;}
  .arc-root .modal p{color:var(--text-dim);font-size:13.5px;margin:0 0 18px;}


  /* Painted avatars */


  .arc-root .avatar{border-radius:50%;object-fit:cover;display:inline-block;vertical-align:middle;flex-shrink:0;}
  .arc-root .emblem .icon .avatar{width:40px !important;height:40px !important;}

  /* Celebration overlays */

  .arc-root .celebrate-back{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:20px;
    background:radial-gradient(circle at 50% 42%, hsla(var(--hue),70%,16%,.95), rgba(4,6,10,.97) 70%);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);animation:celFade .35s ease both;cursor:pointer;}
  .arc-root .celebrate-back.out{animation:celFadeOut .4s ease forwards;}
  @keyframes celFade{from{opacity:0}to{opacity:1}}
  @keyframes celFadeOut{to{opacity:0}}
  .arc-root .celebrate{position:relative;text-align:center;max-width:360px;width:100%;cursor:default;}
  .arc-root .celebrate.shake{animation:celShake .5s ease .55s both;}
  @keyframes celShake{0%,100%{transform:none}20%{transform:translate(-6px,3px)}40%{transform:translate(5px,-4px)}60%{transform:translate(-4px,2px)}80%{transform:translate(3px,-1px)}}
  .arc-root .cel-stage{position:relative;width:210px;height:210px;margin:0 auto;}
  .arc-root .cel-rays{position:absolute;inset:-80px;border-radius:50%;
    background:repeating-conic-gradient(from 0deg, hsla(var(--hue),95%,68%,.38) 0deg 7deg, transparent 7deg 20deg);
    -webkit-mask:radial-gradient(circle, #000 22%, transparent 66%);mask:radial-gradient(circle, #000 22%, transparent 66%);
    animation:raysSpin 10s linear infinite, celFade .8s ease .2s both;}
  .arc-root .cel-glow{position:absolute;inset:-26px;border-radius:50%;background:radial-gradient(circle, hsla(var(--hue),95%,65%,.75), transparent 66%);animation:glowPulse 1.5s ease-in-out infinite;}
  .arc-root .cel-ring{position:absolute;inset:4px;border-radius:50%;border:3px solid hsl(var(--hue) 95% 68%);box-shadow:0 0 26px hsl(var(--hue) 90% 60%), inset 0 0 18px hsla(var(--hue),90%,60%,.6);animation:ringPop .9s cubic-bezier(.2,1.6,.4,1) both;}
  .arc-root .cel-ring.r2{inset:-18px;border-width:2px;animation:ringExpand 1.8s ease-out .25s infinite;}
  .arc-root .cel-ring.r3{inset:-18px;border-width:2px;animation:ringExpand 1.8s ease-out 1.15s infinite;}
  .arc-root .cel-avatar{position:absolute;inset:16px;border-radius:50%;overflow:hidden;animation:avatarIn 1s cubic-bezier(.2,1.5,.4,1) both;}
  .arc-root .cel-avatar img{width:100%;height:100%;object-fit:cover;display:block;}
  .arc-root .cel-avatar::after{content:'';position:absolute;inset:0;background:linear-gradient(115deg,transparent 30%,rgba(255,255,255,.75) 50%,transparent 70%);transform:translateX(-130%);animation:shine 1.2s ease 1s;}
  @keyframes avatarIn{0%{transform:scale(.15) rotate(-35deg);opacity:0;filter:brightness(4) saturate(0)}55%{opacity:1}100%{transform:scale(1) rotate(0);filter:brightness(1) saturate(1)}}
  @keyframes shine{to{transform:translateX(130%)}}
  @keyframes raysSpin{to{transform:rotate(360deg)}}
  @keyframes glowPulse{0%,100%{opacity:.75;transform:scale(1)}50%{opacity:1;transform:scale(1.1)}}
  @keyframes ringPop{0%{transform:scale(.3);opacity:0}100%{transform:scale(1);opacity:1}}
  @keyframes ringExpand{0%{transform:scale(.7);opacity:.9}100%{transform:scale(1.55);opacity:0}}
  .arc-root .cel-check{position:absolute;right:-6px;bottom:0;width:74px;height:74px;animation:stampIn .55s cubic-bezier(.2,1.8,.4,1) .75s both;filter:drop-shadow(0 4px 14px rgba(0,0,0,.5));}
  .arc-root .cel-check circle{fill:hsl(var(--hue) 80% 44%);stroke:#fff;stroke-width:3.5;}
  .arc-root .cel-check path{fill:none;stroke:#fff;stroke-width:7;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:60;stroke-dashoffset:60;animation:drawCheck .45s ease 1.15s forwards;}
  @keyframes stampIn{0%{transform:scale(2.6) rotate(-30deg);opacity:0}100%{transform:scale(1) rotate(0);opacity:1}}
  @keyframes drawCheck{to{stroke-dashoffset:0}}
  .arc-root .cel-kicker{margin-top:26px;font-size:11.5px;font-weight:800;letter-spacing:3.5px;color:hsl(var(--hue) 95% 72%);animation:riseIn .5s ease .65s both;}
  .arc-root .cel-title{font-family:var(--font-display);font-size:30px;font-weight:700;color:#fff;margin:4px 0 2px;line-height:1.1;animation:riseIn .55s ease .8s both;text-shadow:0 0 22px hsla(var(--hue),95%,60%,.85);}
  .arc-root .cel-path{display:flex;align-items:center;justify-content:center;gap:10px;margin-top:6px;font-size:14px;animation:riseIn .5s ease .95s both;}
  .arc-root .cel-path .old{color:rgba(255,255,255,.45);text-decoration:line-through;}
  .arc-root .cel-path .arrow{color:hsl(var(--hue) 95% 70%);}
  .arc-root .cel-path .new{color:#fff;font-weight:700;}
  .arc-root .cel-list{list-style:none;padding:0;margin:14px auto 0;display:inline-flex;flex-direction:column;gap:6px;text-align:left;}
  .arc-root .cel-list li{color:rgba(255,255,255,.9);font-size:13.5px;display:flex;align-items:center;gap:8px;opacity:0;animation:riseIn .4s ease forwards;}
  .arc-root .cel-list li b{color:hsl(var(--hue) 95% 72%);}
  .arc-root .cel-sub{color:rgba(255,255,255,.72);font-size:13.5px;margin:12px 0 18px;line-height:1.5;animation:riseIn .5s ease 1.2s both;}
  .arc-root .cel-streak{display:inline-block;margin-top:12px;padding:6px 14px;border-radius:20px;background:rgba(255,255,255,.08);border:1px solid hsla(var(--hue),90%,65%,.5);color:#fff;font-weight:700;font-size:14px;animation:riseIn .5s ease 1.3s both;}
  .arc-root .celebrate .btn{animation:riseIn .5s ease 1.5s both;background:hsla(var(--hue),90%,60%,.15);border-color:hsl(var(--hue) 90% 65%);color:#fff;}
  .arc-root .celebrate .btn:hover{background:hsl(var(--hue) 90% 55%);color:#0A0D13;}
  @keyframes riseIn{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
  #confettiCanvas{position:fixed;inset:0;width:100%;height:100%;pointer-events:none;z-index:210;}
  .arc-root .preview-picker{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px;}
  .arc-root .preview-picker button{appearance:none;border:2px solid transparent;background:none;padding:0;border-radius:50%;cursor:pointer;line-height:0;transition:transform .15s ease;}
  .arc-root .preview-picker button:hover{transform:scale(1.08);}
  .arc-root .preview-picker button.on{border-color:var(--accent);}
  @media (prefers-reduced-motion: reduce){ .arc-root .cel-rays, .arc-root .cel-glow, .arc-root .cel-ring.r2, .arc-root .cel-ring.r3{animation:none;} }

  .arc-root .confetti-piece{
    position:fixed;top:-20px;width:8px;height:14px;z-index:60;pointer-events:none;
    animation:fall 1.6s ease-in forwards;
  }
  @keyframes fall{to{transform:translateY(100vh) rotate(400deg);opacity:0.2;}}

  /* Evolving rank emblem */

  .arc-root .emblem-row{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:6px;align-items:end;margin-top:16px;max-width:440px;}
  .arc-root .emblem-wrap{display:flex;flex-direction:column;align-items:center;gap:7px;min-width:0;}
  .arc-root .emblem{position:relative;width:min(58px,100%);aspect-ratio:1;}
  .arc-root .emblem .ring{position:absolute;inset:0;border-radius:50%;border:2px solid hsl(var(--hue,192) 85% 58%);}
  .arc-root .emblem .ring-mid{inset:9px;}
  .arc-root .emblem .glow{position:absolute;inset:-7px;border-radius:50%;background:radial-gradient(circle, hsla(var(--hue,192),90%,60%,var(--glow-a,0)) 0%, transparent 72%);}
  .arc-root .emblem .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:21px;filter:grayscale(var(--gray,1)) opacity(var(--icon-op,.35));}
  .arc-root .emblem[data-tier="0"] .ring{opacity:.22;border-style:dashed;}
  .arc-root .emblem[data-tier="0"]{--glow-a:0;--gray:1;--icon-op:.35;}
  .arc-root .emblem[data-tier="1"] .ring{opacity:.42;}
  .arc-root .emblem[data-tier="1"]{--glow-a:.10;--gray:.7;--icon-op:.55;}
  .arc-root .emblem[data-tier="2"] .ring{opacity:.62;}
  .arc-root .emblem[data-tier="2"]{--glow-a:.20;--gray:.35;--icon-op:.75;}
  .arc-root .emblem[data-tier="3"] .ring{opacity:.85;border-width:2.5px;}
  .arc-root .emblem[data-tier="3"]{--glow-a:.34;--gray:0;--icon-op:.92;}
  .arc-root .emblem[data-tier="4"] .ring{opacity:1;border-width:3px;}
  .arc-root .emblem[data-tier="4"]{--glow-a:.55;--gray:0;--icon-op:1;}
  .arc-root .emblem[data-tier="4"] .ring-outer{animation:emblemspin 7s linear infinite;}
  .arc-root .emblem[data-tier="4"] .glow{animation:emblempulse 2.1s ease-in-out infinite;}
  @keyframes emblemspin{to{transform:rotate(360deg);}}
  @keyframes emblempulse{0%,100%{opacity:1;}50%{opacity:.65;}}
  .arc-root .emblem-name{font-size:10px;font-weight:600;color:var(--text-dim);text-align:center;line-height:1.25;}
  .arc-root .emblem-name.reached{color:var(--text);}
  .arc-root .emblem-name.top{color:var(--gold);}

  .arc-root .empty{color:var(--text-faint);font-size:13.5px;padding:18px 0;}
  .arc-root .grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
  @media (max-width:520px){.arc-root .grid2{grid-template-columns:1fr;}}
  .arc-root .helptext{font-size:12px;color:var(--text-faint);margin-top:-6px;margin-bottom:14px;}

/* Unlock screen (shown until a licence key checks out) */
.arc-root [hidden]{display:none !important;}
.arc-root .arc-gate{display:flex;align-items:center;justify-content:center;min-height:70vh;padding:48px 16px;}
.arc-root .arc-gate-card{background:var(--surface);border:1px solid var(--accent);border-radius:10px;padding:32px 28px;max-width:400px;width:100%;text-align:center;box-shadow:0 0 40px var(--accent-soft);}
.arc-root .arc-gate-icon{line-height:1;margin-bottom:10px;}
.arc-root .arc-gate-icon img{height:38px;width:auto;display:inline-block;filter:drop-shadow(0 0 8px var(--accent-soft));}
.arc-root img.kbolt{height:1em;width:auto;display:inline-block;vertical-align:-0.12em;}
.arc-root .daily-quote{display:block;width:100%;text-align:left;font:inherit;color:inherit;cursor:pointer;border:0;border-left:3px solid var(--accent);background:var(--surface);border-radius:0 8px 8px 0;padding:14px 16px;margin:0 0 22px;}
.arc-root .daily-quote:hover{background:var(--surface-2, var(--surface));filter:brightness(1.12);}
/* quote reveal: smoke covers the quote, then drifts apart and fades */
.arc-root .quote-reveal{position:fixed;inset:0;z-index:9999;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--bg);overflow:hidden;animation:qrIn .25s ease-out;transition:opacity .35s;}
.arc-root .quote-reveal.out{opacity:0;}
.arc-root .qr-card{position:relative;max-width:560px;text-align:center;animation:qrClear 2.1s ease-in-out .6s both;}
.arc-root .qr-kicker{font-family:var(--font-display);font-weight:700;font-size:13px;letter-spacing:2px;text-transform:uppercase;color:var(--accent);margin-bottom:16px;}
.arc-root .qr-quote{font-family:var(--font-display);font-weight:700;font-size:clamp(22px,5.2vw,32px);line-height:1.3;color:var(--text);margin:0 0 14px;}
.arc-root .qr-by{font-size:14px;color:var(--text-dim);margin-bottom:26px;}
.arc-root .qr-smoke{position:absolute;inset:0;pointer-events:none;}
/* three sheets of smoke texture, thick at first, then blown off to the right as they thin */
.arc-root .qr-smoke b{position:absolute;inset:-35%;background-size:800px 800px;filter:blur(2px);will-change:transform,opacity;-webkit-mask-image:radial-gradient(ellipse min(430px,56vw) 250px at 50% 50%,#000 40%,rgba(0,0,0,.22) 78%,rgba(0,0,0,.06) 115%,transparent 150%);mask-image:radial-gradient(ellipse min(430px,56vw) 250px at 50% 50%,#000 40%,rgba(0,0,0,.22) 78%,rgba(0,0,0,.06) 115%,transparent 150%);}
.arc-root .qr-smoke b.s1{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'800'%20height%3D'800'%3E%3Cfilter%20id%3D's'%20x%3D'0'%20y%3D'0'%20width%3D'100%25'%20height%3D'100%25'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.006'%20numOctaves%3D'5'%20seed%3D'4'%20stitchTiles%3D'stitch'%2F%3E%3CfeColorMatrix%20values%3D'0%200%200%200%200.66%20%200%200%200%200%200.71%20%200%200%200%200%200.78%20%203.4%200%200%200%20-1.25'%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D'url(%23s)'%2F%3E%3C%2Fsvg%3E");animation:qrSheet1 3.6s ease-in-out both;}
.arc-root .qr-smoke b.s2{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'800'%20height%3D'800'%3E%3Cfilter%20id%3D's'%20x%3D'0'%20y%3D'0'%20width%3D'100%25'%20height%3D'100%25'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.006'%20numOctaves%3D'5'%20seed%3D'11'%20stitchTiles%3D'stitch'%2F%3E%3CfeColorMatrix%20values%3D'0%200%200%200%200.66%20%200%200%200%200%200.71%20%200%200%200%200%200.78%20%203.4%200%200%200%20-1.25'%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D'url(%23s)'%2F%3E%3C%2Fsvg%3E");animation:qrSheet2 4.4s ease-in-out both;}
.arc-root .qr-smoke b.s3{background-image:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'800'%20height%3D'800'%3E%3Cfilter%20id%3D's'%20x%3D'0'%20y%3D'0'%20width%3D'100%25'%20height%3D'100%25'%3E%3CfeTurbulence%20type%3D'fractalNoise'%20baseFrequency%3D'0.006'%20numOctaves%3D'5'%20seed%3D'23'%20stitchTiles%3D'stitch'%2F%3E%3CfeColorMatrix%20values%3D'0%200%200%200%200.66%20%200%200%200%200%200.71%20%200%200%200%200%200.78%20%203.4%200%200%200%20-1.25'%2F%3E%3C%2Ffilter%3E%3Crect%20width%3D'100%25'%20height%3D'100%25'%20filter%3D'url(%23s)'%2F%3E%3C%2Fsvg%3E");animation:qrSheet3 3.1s ease-in-out both;}
/* soft billows that give the smoke body in the middle, then roll outward */
.arc-root .qr-smoke i{position:absolute;left:var(--x);top:var(--y);width:var(--s);height:var(--s);margin:calc(var(--s) / -2) 0 0 calc(var(--s) / -2);border-radius:50%;background:radial-gradient(circle,rgba(176,188,204,0.42) 0%,rgba(140,158,182,0.22) 40%,rgba(120,140,165,0) 70%);filter:blur(22px);animation:qrPuff 3.1s cubic-bezier(.4,.1,.5,1) var(--d) both;}
@keyframes qrIn{from{opacity:0;}to{opacity:1;}}
@keyframes qrClear{0%{opacity:0;filter:blur(18px);}45%{opacity:.75;filter:blur(7px);}100%{opacity:1;filter:blur(0);}}
@keyframes qrSheet1{0%{opacity:0;transform:translate(-4%,2%) scale(1);}10%{opacity:.72;}32%{opacity:.72;transform:translate(0,0) scale(1.05);}100%{opacity:0;transform:translate(38%,-5%) scale(1.3);}}
@keyframes qrSheet2{0%{opacity:0;transform:translate(-5%,4%) scale(1.1) rotate(180deg);}12%{opacity:.6;}28%{opacity:.6;transform:translate(0,2%) scale(1.15) rotate(180deg);}100%{opacity:0;transform:translate(30%,-8%) scale(1.4) rotate(176deg);}}
@keyframes qrSheet3{0%{opacity:0;transform:translate(-3%,0) scale(1.2);}8%{opacity:.55;}26%{opacity:.55;transform:translate(1%,0) scale(1.22);}100%{opacity:0;transform:translate(46%,-3%) scale(1.45);}}
@keyframes qrPuff{0%{opacity:0;transform:scale(.6);}10%{opacity:.7;transform:scale(1.1);}30%{opacity:.7;transform:translate(3vw,0) scale(1.3);}100%{opacity:0;transform:translate(calc(55vw + var(--dx) * .3),calc(var(--dy) * .3 - 4vh)) scale(2.4);}}
@media (prefers-reduced-motion: reduce){ .arc-root .qr-smoke{display:none;} .arc-root .qr-card{animation:qrIn .4s ease-out both;} }
.arc-root .daily-quote .q{font-size:15.5px;line-height:1.5;color:var(--text);margin:0;}
.arc-root .daily-quote .by{font-size:12.5px;color:var(--text-dim);margin-top:6px;}
.arc-root .arc-gate-card h1{font-family:var(--font-display);font-weight:700;font-size:23px;letter-spacing:normal;line-height:1.2;margin:0 0 6px;}
.arc-root .arc-gate-card p{color:var(--text-dim);font-size:13.5px;margin:0 0 20px;}
.arc-root .arc-gate-card label{text-align:left;}
.arc-root .arc-gate-card input{text-align:center;letter-spacing:0.5px;margin-bottom:6px;}
.arc-root .arc-gate-msg{min-height:20px;font-size:12.5px;color:var(--danger);margin-bottom:10px;}
.arc-root .arc-gate-card .btn{width:100%;}
.arc-root .arc-gate-card .arc-gate-foot{font-size:12.5px;color:var(--text-faint);margin:16px 0 0;}

/* links that should look like the tracker's buttons */
.arc-root a.btn{border:1px solid var(--accent);background:var(--accent-soft);color:var(--accent);font-family:var(--font-body);font-weight:600;font-size:13.5px;padding:10px 16px;border-radius:6px;cursor:pointer;transition:transform .1s ease, background .15s ease;}
.arc-root a.btn:hover{background:var(--accent);color:var(--bg-elev);}

/* Proof upload on each habit */
.arc-root .proof-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:9px;}
.arc-root .checkline .txt .proof-row span{display:inline;margin:0;}
.arc-root .proof-ok{font-size:12.5px;font-weight:600;color:var(--success);}
.arc-root .proof-thumb{width:46px;height:46px;border-radius:6px;object-fit:cover;border:1px solid var(--border);display:block;background:var(--surface-2);}
.arc-root .proof-link{appearance:none;background:none;border:none;padding:0;margin:0;font-family:var(--font-body);font-size:12.5px;font-weight:600;color:var(--text-dim);text-decoration:underline;cursor:pointer;display:inline;}
.arc-root .proof-link:hover{color:var(--text);}
.arc-root .proof-error{margin-top:10px;font-size:12.5px;color:var(--danger);}

/* Start Here guide */
.arc-root .guide h2.section-title{margin:26px 0 10px;}
.arc-root .guide h2.section-title:first-of-type{margin-top:18px;}
.arc-root .guide ol, .arc-root .guide ul{margin:0;padding-left:20px;font-size:13.5px;line-height:1.6;color:var(--text-dim);}
.arc-root .guide ol li{margin-bottom:9px;}
.arc-root .guide ol li:last-child{margin-bottom:0;}
.arc-root .guide li b, .arc-root .guide .guide-p b{color:var(--text);}
.arc-root .guide ul{margin-top:5px;}
.arc-root .guide .guide-p{font-size:13.5px;line-height:1.6;color:var(--text-dim);margin:0 0 14px;}
.arc-root .banner.note{background:var(--surface-2);border:1px solid var(--border);color:var(--text);}
.arc-root .guide .banner{line-height:1.6;}

/* the tracker page has no site header or footer, so the whole page is the app */
body.app{background:#121826;}
body.app main{display:block;}

/* small labels and notes inside cards */
.arc-root .card-kicker{font-size:11px;font-weight:700;letter-spacing:0.6px;text-transform:uppercase;color:var(--accent);line-height:1.3;}
.arc-root .card-kicker.gold, .arc-root .card.accent > .card-kicker:first-child{color:var(--gold);}
.arc-root .rank-card > .rank-head .card-kicker{color:var(--accent);}
.arc-root .card-note{font-size:12.5px;color:var(--text-faint);line-height:1.5;margin:6px 0 0;}
.arc-root .card.accent > .card-note{margin:4px 0 6px;}
.arc-root .xp-tag{font-weight:600;color:var(--gold);margin-left:4px;}
.arc-root .linkbtn{appearance:none;background:none;border:none;padding:0;font:inherit;font-weight:600;color:var(--accent);text-decoration:underline;cursor:pointer;}

/* Today: pick which day you're logging */
.arc-root .day-switch{display:flex;gap:4px;background:var(--surface);border:1px solid var(--border);border-radius:8px;padding:4px;margin:0 0 10px;}
.arc-root .day-switch button{flex:1;appearance:none;border:none;background:none;border-radius:5px;padding:9px 8px;font-family:var(--font-display);font-weight:600;font-size:14px;color:var(--text-dim);cursor:pointer;display:flex;align-items:center;justify-content:center;gap:6px;}
.arc-root .day-switch button.on{background:var(--accent-soft);color:var(--accent);}
.arc-root .day-switch .dot{width:7px;height:7px;border-radius:50%;background:var(--gold);display:inline-block;}

/* Today: a habit is a big tap target; proof sits under it */
.arc-root .checkline .txt{flex:1;min-width:0;}
.arc-root .checkline .txt label{margin:0;font-size:14.5px;font-weight:400;color:inherit;cursor:pointer;}
.arc-root .checkline input[type=checkbox]{width:24px;height:24px;margin:0;}
.arc-root .proof-add{display:inline-block;margin:0;font-size:12.5px;font-weight:600;color:var(--accent);cursor:pointer;}
.arc-root .proof-add span{color:var(--text-faint);font-weight:500;}
.arc-root .proof-row{margin-top:7px;}
.arc-root .note-foot{display:flex;align-items:center;gap:12px;}
.arc-root .note-foot .helptext{margin:0;color:var(--success);}

/* Progress: rank first, then a short row of numbers */
.arc-root .rank-head{display:flex;align-items:center;gap:14px;margin-bottom:12px;}
.arc-root .rank-name{font-family:var(--font-display);font-weight:700;font-size:26px;line-height:1.1;margin-top:2px;}
.arc-root .rank-card .recap{font-size:13px;color:var(--text-dim);font-style:italic;line-height:1.55;margin:14px 0 0;padding-top:12px;border-top:1px solid var(--border);}
.arc-root .stat-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px;}
.arc-root .stat-row.inset{grid-template-columns:repeat(2,minmax(0,1fr));margin:10px 0 0;}
.arc-root .stat-row .stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:12px;}
.arc-root .stat-row.inset .stat{background:var(--surface-2);border:none;}
.arc-root .stat-row .stat .num{font-size:22px;}
.arc-root .level-head{display:flex;justify-content:space-between;font-size:13px;color:var(--text-dim);}

/* Start Here: setup steps that tick themselves off */
.arc-root .guide ol.steps{list-style:none;padding:0;margin:0 0 16px;}
.arc-root .guide ol.steps li{display:flex;gap:12px;padding:14px;margin:0 0 8px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);}
.arc-root .guide ol.steps li p{margin:3px 0 0;}
.arc-root .guide ol.steps li.done{opacity:0.6;}
.arc-root .guide ol.steps li.done b{text-decoration:line-through;text-decoration-color:var(--text-faint);}
.arc-root .step-mark{flex-shrink:0;width:22px;height:22px;border-radius:50%;border:1.5px solid var(--text-faint);display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;color:var(--bg);margin-top:1px;}
.arc-root li.done .step-mark{background:var(--success);border-color:var(--success);}
.arc-root .guide .btn.go{margin-top:10px;padding:7px 12px;font-size:12.5px;}

/* Arc gallery on Progress: every proof of the non-negotiable */
.arc-root .gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;}
@media (min-width:560px){.arc-root .gallery{grid-template-columns:repeat(4,minmax(0,1fr));}}
.arc-root .gal-item{position:relative;appearance:none;border:none;padding:0;margin:0;aspect-ratio:1;border-radius:6px;overflow:hidden;background:var(--surface-2);cursor:pointer;}
.arc-root .gal-item img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .2s ease;}
.arc-root .gal-item:hover img{transform:scale(1.04);}
.arc-root .gal-date{position:absolute;left:0;right:0;bottom:0;padding:14px 6px 5px;font-size:10.5px;font-weight:600;color:#fff;text-align:left;background:linear-gradient(transparent,rgba(0,0,0,.7));}
.arc-root .gal-play{position:absolute;top:6px;right:6px;width:20px;height:20px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;font-size:9px;display:flex;align-items:center;justify-content:center;}
.arc-root .gallery-empty p{font-size:13.5px;color:var(--text-dim);line-height:1.55;margin:0;}
.arc-root .gallery-empty .go{margin-top:12px;padding:7px 12px;font-size:12.5px;}

/* full-screen viewer for one day's proof */
.arc-root .proof-viewer{position:fixed;inset:0;z-index:300;background:rgba(5,7,10,.97);display:flex;flex-direction:column;padding:calc(12px + env(safe-area-inset-top)) 16px calc(16px + env(safe-area-inset-bottom));animation:fadein .2s ease;}
.arc-root .pv-close{position:absolute;top:calc(8px + env(safe-area-inset-top));right:12px;z-index:1;appearance:none;border:none;background:rgba(255,255,255,.08);color:#fff;width:38px;height:38px;border-radius:50%;font-size:24px;line-height:1;cursor:pointer;}
.arc-root .pv-media{flex:1;min-height:0;display:flex;align-items:center;justify-content:center;padding-top:40px;}
.arc-root .pv-media img, .arc-root .pv-media video{max-width:100%;max-height:100%;border-radius:8px;object-fit:contain;}
.arc-root .pv-info{max-width:560px;width:100%;margin:14px auto 0;text-align:center;}
.arc-root .pv-date{font-family:var(--font-display);font-weight:600;font-size:16px;color:var(--text);}
.arc-root .pv-habit{font-size:13px;color:var(--gold);font-weight:600;margin-top:3px;}
.arc-root .pv-note{font-size:14px;color:var(--text-dim);font-style:italic;line-height:1.5;margin:10px 0 0;}
.arc-root .pv-nav{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:14px;font-size:12.5px;color:var(--text-faint);}
.arc-root .pv-nav .btn{padding:8px 12px;font-size:12.5px;}

/* Rank Up: a strip of the proof that earned it */
.arc-root .cel-proof{margin:-6px 0 18px;animation:riseIn .5s ease 1.2s both;}
.arc-root .cel-proof-label{font-size:10.5px;font-weight:800;letter-spacing:2.5px;text-transform:uppercase;color:hsl(var(--hue) 95% 72%);margin-bottom:8px;}
.arc-root .cel-proof-row{display:flex;justify-content:center;gap:6px;}
.arc-root .cel-proof-row img{width:44px;height:44px;border-radius:6px;object-fit:cover;border:1px solid hsla(var(--hue),90%,65%,.5);opacity:0;animation:riseIn .4s ease forwards;}

/* Second Wind: repair yesterday with XP */
.arc-root .card.second-wind{border-color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold-soft);background:linear-gradient(180deg,var(--gold-soft),transparent 70%),var(--surface);}
.arc-root .card.second-wind .card-kicker{color:var(--gold);}
.arc-root .second-wind-lead{font-size:14.5px;line-height:1.5;margin:6px 0 0;}
.arc-root .second-wind-lead b{color:var(--gold);}
.arc-root button.btn.second-wind-btn{margin-top:12px;width:100%;border-color:var(--gold);background:var(--gold-soft);color:var(--gold);}
.arc-root button.btn.second-wind-btn:hover{background:var(--gold);color:var(--bg);}
.arc-root .wallet{display:flex;justify-content:space-between;align-items:center;margin-top:12px;padding:10px 12px;border-radius:6px;background:var(--surface-2);font-size:13px;color:var(--text-dim);}
.arc-root .wallet b{color:var(--gold);font-family:var(--font-display);font-size:15px;}
.arc-root .heatgrid .cell[data-lvl="r"]{background:transparent;box-shadow:inset 0 0 0 1.5px var(--gold);}
.arc-root .cel-hint{display:inline-block;margin-top:8px;color:hsl(var(--hue) 95% 75%);font-weight:600;}

/* Backup card in Setup */
.arc-root .sync-line{font-size:13.5px;color:var(--text-dim);margin-bottom:12px;}
.arc-root .sync-line.good{color:var(--success);}
.arc-root .sync-line.photos{margin-top:-6px;}
/* a short message at the bottom of the screen, above the tab bar */
.arc-root .arc-toast{position:fixed;left:0;right:0;margin:0 auto;width:fit-content;bottom:calc(80px + env(safe-area-inset-bottom));z-index:250;max-width:calc(100% - 32px);text-align:center;background:var(--surface-2);border:1px solid var(--accent);color:var(--text);font-size:13.5px;font-weight:600;padding:10px 16px;border-radius:8px;box-shadow:0 8px 30px rgba(0,0,0,.4);animation:riseIn .3s ease both;transition:opacity .4s;}
.arc-root .arc-toast.out{opacity:0;}

/* Look back: monthly recaps and the 30-day reveal */
.arc-root .lookback{margin:0 0 14px;}
.arc-root .lookback-row{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;margin-top:8px;padding-bottom:2px;}
.arc-root .lookback-row::-webkit-scrollbar{display:none;}
.arc-root .chip-btn{appearance:none;flex-shrink:0;border:1px solid var(--border);background:var(--surface);color:var(--text);font-family:var(--font-body);font-weight:600;font-size:12.5px;padding:7px 12px;border-radius:20px;cursor:pointer;}
.arc-root .chip-btn:hover{border-color:var(--accent);}
.arc-root .chip-btn.gold{border-color:var(--gold);color:var(--gold);background:var(--gold-soft);}
.arc-root .celebrate:has(.month-recap){max-height:100%;overflow-y:auto;scrollbar-width:none;}
.arc-root .month-recap{padding:10px 0;}
.arc-root .month-recap .cel-kicker{margin-top:0;}
.arc-root .recap-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;margin:16px 0 4px;}
.arc-root .recap-grid.dense{grid-template-columns:repeat(6,1fr);gap:4px;}
.arc-root .recap-grid img{width:100%;aspect-ratio:1;object-fit:cover;border-radius:5px;border:1px solid hsla(var(--hue),90%,65%,.35);opacity:0;animation:riseIn .4s ease forwards;}
.arc-root .recap-more{display:flex;align-items:center;justify-content:center;aspect-ratio:1;border-radius:5px;background:rgba(255,255,255,.08);color:#fff;font-weight:700;font-size:13px;}
.arc-root .recap-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:14px 0;animation:riseIn .5s ease 1.1s both;}
.arc-root .recap-stat{background:rgba(255,255,255,.06);border:1px solid hsla(var(--hue),90%,65%,.25);border-radius:8px;padding:10px 4px;}
.arc-root .recap-stat b{display:block;font-family:var(--font-display);font-size:20px;color:#fff;}
.arc-root .recap-stat span{font-size:11px;color:rgba(255,255,255,.65);}
.arc-root .recap-win{font-size:14px;font-style:italic;color:rgba(255,255,255,.88);line-height:1.5;margin:0 0 18px;animation:riseIn .5s ease 1.3s both;}
.arc-root .recap-win span{display:block;font-style:normal;font-size:11px;letter-spacing:1px;text-transform:uppercase;color:hsl(var(--hue) 95% 72%);margin-top:5px;}

/* Ring meter: one value filling a circle (rank progress, level) */
.arc-root .ring-meter{position:relative;flex-shrink:0;}
.arc-root .ring-meter svg{display:block;}
.arc-root .rm-track{fill:none;stroke:var(--surface-2);}
.arc-root .rm-fill{fill:none;stroke:hsl(var(--hue) 85% 60%);stroke-linecap:round;animation:rmFill 1.1s cubic-bezier(.3,.7,.3,1) both;}
@keyframes rmFill{from{stroke-dashoffset:var(--c);}}
@media (prefers-reduced-motion: reduce){ .arc-root .rm-fill{animation:none;} }
.arc-root .rm-inner{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;}
.arc-root .rank-card .rank-head{gap:16px;margin-bottom:4px;}
.arc-root .rank-line{font-size:14px;color:var(--text);margin-top:6px;}
.arc-root .rank-sub{font-size:12.5px;color:var(--text-dim);margin-top:2px;line-height:1.4;}
.arc-root .rank-card .banner{margin:14px 0 0;}

/* Level: a small ring, the next-level line, and XP to spend, all on one row */
.arc-root .level-card{display:flex;align-items:center;gap:14px;}
.arc-root .lv-num{font-family:var(--font-display);font-weight:700;font-size:20px;}
.arc-root .lv-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.arc-root .lv-txt b{font-family:var(--font-display);font-size:17px;}
.arc-root .lv-txt span, .arc-root .lv-wallet span{font-size:12.5px;color:var(--text-dim);}
.arc-root .lv-wallet{text-align:right;display:flex;flex-direction:column;gap:2px;padding-left:14px;border-left:1px solid var(--border);}
.arc-root .lv-wallet b{font-family:var(--font-display);font-size:17px;color:var(--gold);}

/* Character profile */
.arc-root .trait{padding:10px 0;border-top:1px solid var(--border);}
.arc-root .trait:first-of-type{border-top:none;}
.arc-root .trait-top{display:flex;justify-content:space-between;align-items:baseline;}
.arc-root .trait-top b{font-size:14.5px;}
.arc-root .trait-top span{font-family:var(--font-display);font-weight:700;font-size:14px;}
.arc-root .trait-bar{height:6px;border-radius:4px;background:var(--surface-2);margin:7px 0 5px;overflow:hidden;}
.arc-root .trait-bar i{display:block;height:100%;border-radius:4px;background:hsl(var(--hue) 85% 60%);}
.arc-root .trait-sub{display:flex;justify-content:space-between;gap:10px;font-size:11.5px;color:var(--text-faint);}
.arc-root .trait-sub .up{color:var(--success);font-weight:600;white-space:nowrap;}

/* Weekly Arc Review */
.arc-root .wr-head{display:flex;justify-content:space-between;align-items:center;gap:10px;}
.arc-root .wr-switch{display:flex;background:var(--surface-2);border-radius:6px;padding:2px;}
.arc-root .wr-switch button{appearance:none;border:none;background:none;color:var(--text-dim);font:600 12px var(--font-body);padding:5px 9px;border-radius:5px;cursor:pointer;}
.arc-root .wr-switch button.on{background:var(--accent-soft);color:var(--accent);}
.arc-root .wr-range{font-size:12px;color:var(--text-faint);margin:4px 0 10px;}
.arc-root .wr-range.light{color:rgba(255,255,255,.6);margin:4px 0 14px;}
.arc-root .wr-lines{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:7px;font-size:14px;line-height:1.45;}
.arc-root .wr-lines b{color:var(--text);}
.arc-root .month-recap .wr-lines{text-align:left;color:rgba(255,255,255,.88);margin:0 auto 6px;max-width:320px;}
.arc-root .month-recap .wr-lines b{color:#fff;}

/* Character challenges */
.arc-root .card.challenge{border-color:var(--gold);box-shadow:inset 0 0 0 1px var(--gold-soft);}
.arc-root .card.challenge .card-kicker{color:var(--gold);}
.arc-root .card.challenge.suggest{border-color:var(--border);box-shadow:none;}
.arc-root .ch-name{font-family:var(--font-display);font-weight:700;font-size:17px;margin-top:4px;}
.arc-root .ch-task{font-size:14px;color:var(--text-dim);margin:3px 0 10px;line-height:1.45;}
.arc-root .ch-progress{display:flex;align-items:center;gap:10px;font-size:12.5px;color:var(--text-dim);margin-bottom:10px;}
.arc-root .ch-dots{display:flex;gap:5px;}
.arc-root .ch-dot{width:14px;height:14px;border-radius:50%;border:1.5px solid var(--gold);}
.arc-root .ch-dot.on{background:var(--gold);}
.arc-root .ch-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
.arc-root .card-note.good{color:var(--success);}
.arc-root .ch-list{padding:4px 16px;}
.arc-root .ch-row{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--border);}
.arc-root .ch-list .ch-row:first-child{border-top:none;}
.arc-root .ch-row-txt{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px;}
.arc-root .ch-row-txt b{font-size:14px;}
.arc-root .ch-row-txt span{font-size:12.5px;color:var(--text-dim);line-height:1.4;}
.arc-root .ch-take{padding:7px 11px;font-size:12.5px;flex-shrink:0;}
.arc-root .ch-tag{font-size:11.5px;font-weight:700;color:var(--gold);flex-shrink:0;}
.arc-root .ch-more summary{font-family:var(--font-body);font-size:14px;}
.arc-root .ch-more .body{padding:0 16px 4px;}
.arc-root .ch-mini{margin:5px 0 0;padding-left:18px;}
.arc-root .ch-mini li{margin-bottom:4px;}

/* ---------- opening screens: first-visit question, archetype picker, welcome back ---------- */
html.arc-intro-lock,html.arc-intro-lock body{overflow:hidden;}
.arc-root .arc-intro{position:fixed;top:0;left:0;right:0;height:100vh;height:100dvh;z-index:9990;background:var(--bg);display:flex;align-items:center;justify-content:center;padding:24px 18px calc(24px + env(safe-area-inset-bottom));text-align:center;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;cursor:pointer;animation:qrIn .35s ease-out;transition:opacity .38s;}
.arc-root .arc-intro.out{opacity:0;}
.arc-root .arc-intro.instant{animation:none;}
.arc-root .intro-box{max-width:520px;animation:introRise .7s ease-out both;}
.arc-root .intro-kicker{font-family:var(--font-display);font-weight:700;font-size:13px;letter-spacing:2.5px;text-transform:uppercase;color:var(--accent);margin-bottom:12px;}
.arc-root .intro-title{font-family:var(--font-display);font-weight:700;font-size:clamp(24px,6vw,34px);line-height:1.2;color:var(--text);}
.arc-root .intro-title.big{font-size:clamp(30px,8vw,46px);}
.arc-root .intro-quote{font-size:16px;line-height:1.5;color:var(--text-dim);font-style:italic;margin:12px 0 0;}
.arc-root .intro-skip{margin-top:34px;font-size:12px;letter-spacing:.5px;color:var(--text-faint);}
.arc-root .intro-avatar{margin-bottom:18px;}
.arc-root .intro-avatar img,.arc-root .intro-avatar svg{width:132px !important;height:132px !important;border-radius:50%;filter:drop-shadow(0 0 26px hsla(var(--hue),90%,60%,.55));}
.arc-root .arc-intro.picker{align-items:flex-start;cursor:default;}
.arc-root .pick-wrap{max-width:720px;width:100%;margin:auto;padding:10px 0 48px;animation:introRise .6s ease-out both;}
.arc-root .pick-sub{color:var(--text-dim);font-size:14px;margin:8px 0 18px;}
.arc-root .pick-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;}
.arc-root .pick-card{display:flex;flex-direction:column;align-items:center;gap:6px;padding:14px 8px 12px;background:var(--surface);border:1px solid var(--border);border-radius:12px;color:var(--text);font:inherit;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .15s;}
.arc-root .pick-card:hover,.arc-root .pick-card:focus-visible{border-color:hsl(var(--hue) 80% 60%);box-shadow:0 0 22px hsla(var(--hue),90%,55%,.35);transform:translateY(-2px);}
.arc-root .pick-card img,.arc-root .pick-card svg{width:min(84px,100%) !important;height:auto !important;aspect-ratio:1;border-radius:50%;}
.arc-root .pick-card img,.arc-root .pick-card svg{flex-shrink:0;}
.arc-root .pick-text{display:flex;flex-direction:column;gap:5px;min-width:0;}
.arc-root .pick-card b{font-size:15px;line-height:1.2;}
.arc-root .pick-line{font-size:12.5px;line-height:1.4;color:var(--text-dim);}
.arc-root .pick-quiz{display:inline-block;margin-top:20px;color:var(--accent);font-size:14.5px;font-weight:600;text-decoration:underline;text-underline-offset:3px;}
.arc-root .pick-later{display:block;margin:14px auto 0;background:none;border:0;color:var(--text-faint);font:inherit;font-size:13px;text-decoration:underline;cursor:pointer;}
@keyframes introRise{from{opacity:0;transform:translateY(10px);}to{opacity:1;transform:none;}}
/* phones: two archetypes side by side, avatar on top with its name and quote underneath */
@media (max-width:640px){
  .arc-root .pick-grid{grid-template-columns:repeat(2,1fr);gap:8px;}
  .arc-root .pick-card{padding:12px 8px 11px;gap:7px;}
  .arc-root .pick-card img,.arc-root .pick-card svg{width:64px !important;}
  .arc-root .pick-card b{font-size:14px;}
  .arc-root .pick-line{font-size:12px;line-height:1.35;}
  /* nine cards leave one over: centre it under the rest */
  .arc-root .pick-card:last-child:nth-child(odd){grid-column:1 / -1;width:calc(50% - 4px);justify-self:center;}
}
@media (prefers-reduced-motion: reduce){ .arc-root .intro-box,.arc-root .pick-wrap{animation:none;} }
/* ---------- weekly report title, import card ---------- */
.arc-root .wr-title{font-family:var(--font-display);font-weight:700;font-size:19px;text-transform:uppercase;letter-spacing:.5px;color:var(--text);margin-top:6px;}
.arc-root select,.arc-root input[type=number]{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:6px;color:var(--text);font-family:var(--font-body);font-size:14px;padding:10px 11px;}
.arc-root input[type=file]{width:100%;color:var(--text-dim);font-family:var(--font-body);font-size:13.5px;}
.arc-root input[type=file]::file-selector-button{margin-right:10px;padding:8px 12px;border-radius:6px;border:1px solid var(--accent);background:var(--accent-soft);color:var(--accent);font:600 13px var(--font-body);cursor:pointer;}
.arc-root .imp-sum{margin-top:12px;font-size:13.5px;line-height:1.5;color:var(--text-dim);}
.arc-root .imp-sum b{color:var(--text);}
.arc-root .imp-manual{margin-top:18px;padding-top:16px;border-top:1px solid var(--border);}
/* ---------- Your year: month tiles and a month's calendar ---------- */
.arc-root .yr-nav{display:flex;align-items:center;gap:8px;font-size:14px;}
.arc-root .yr-nav button{appearance:none;width:30px;height:30px;border-radius:6px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);font-size:18px;line-height:1;cursor:pointer;}
.arc-root .yr-nav button:disabled{opacity:.3;cursor:default;}
.arc-root .yr-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px;}
.arc-root .yr-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;}
.arc-root .yr-m{appearance:none;display:flex;flex-direction:column;gap:3px;align-items:flex-start;text-align:left;padding:9px 9px 8px;border-radius:8px;border:1px solid var(--border);background:var(--surface-2);color:var(--text);font:inherit;cursor:pointer;min-width:0;}
.arc-root .yr-m b{font-size:13.5px;}
.arc-root .yr-m span{font-size:11px;color:var(--text-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;}
.arc-root .yr-m i{display:block;width:100%;height:4px;border-radius:2px;background:var(--border);margin-top:3px;overflow:hidden;}
.arc-root .yr-m u{display:block;height:100%;background:var(--accent);border-radius:2px;}
.arc-root .yr-m.on{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent);}
.arc-root .yr-m.empty b,.arc-root .yr-m.empty span{color:var(--text-faint);}
.arc-root .yr-m:disabled{opacity:.4;cursor:default;}
.arc-root .yr-detail{margin-top:14px;padding-top:14px;border-top:1px solid var(--border);}
.arc-root .yr-detail-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:10px;font-size:15px;}
.arc-root .yr-detail-head span{font-size:12px;color:var(--text-dim);}
.arc-root .yr-detail-head span.up{color:var(--success);}
.arc-root .yr-detail-head span.down{color:var(--danger);}
.arc-root .cal,.arc-root .cal-dow{display:grid;grid-template-columns:repeat(7,1fr);gap:4px;max-width:340px;}
.arc-root .cal-dow i{font-style:normal;font-size:10.5px;text-align:center;color:var(--text-faint);margin-bottom:2px;}
.arc-root .cal i{font-style:normal;aspect-ratio:1;display:flex;align-items:center;justify-content:center;border-radius:6px;font-size:11.5px;font-weight:600;}
.arc-root .cal i.full,.arc-root .cal-key i.full{background:var(--accent);color:#04121A;}
.arc-root .cal i.part,.arc-root .cal-key i.part{background:var(--accent-soft);color:var(--accent);}
.arc-root .cal i.miss,.arc-root .cal-key i.miss{background:var(--surface-2);color:var(--text-faint);}
.arc-root .cal i.future{color:var(--text-faint);opacity:.4;}
.arc-root .cal-key{display:flex;gap:14px;flex-wrap:wrap;margin-top:10px;font-size:11.5px;color:var(--text-dim);}
.arc-root .cal-key span{display:flex;align-items:center;gap:5px;}
.arc-root .cal-key i{display:inline-block;width:11px;height:11px;border-radius:3px;}

/* Notes on Progress: folder chips, a list of notes, and a full-screen editor */
.arc-root .notes{margin-top:30px;}
.arc-root .notes-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;}
.arc-root .notes-head .section-title{margin:0;}
.arc-root .notes-new{padding:8px 14px;}
.arc-root .nf-row{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding-bottom:2px;margin-bottom:10px;}
.arc-root .nf-row::-webkit-scrollbar{display:none;}
.arc-root .nf-chip{appearance:none;flex-shrink:0;border:1px solid var(--border);background:var(--surface);color:var(--text);font:600 12.5px var(--font-body);padding:7px 12px;border-radius:20px;cursor:pointer;}
.arc-root .nf-chip span{color:var(--text-faint);font-weight:500;margin-left:3px;}
.arc-root .nf-chip.on{border-color:var(--gold);color:var(--gold);background:var(--gold-soft);}
.arc-root .nf-chip.on span{color:var(--gold);}
.arc-root .nf-chip.add{color:var(--text-dim);border-style:dashed;}
.arc-root .nf-tools{display:flex;gap:16px;margin:-2px 0 10px;font-size:12.5px;}
.arc-root .linkbtn.danger{color:var(--danger);}
.arc-root .nf-form{display:flex;align-items:center;gap:10px;margin-bottom:12px;}
.arc-root .nf-form input{margin:0;flex:1;min-width:0;}
.arc-root .notes-search{width:100%;background:var(--surface-2);border:1px solid var(--border);border-radius:8px;color:var(--text);font:14px var(--font-body);padding:9px 12px;margin-bottom:10px;}
.arc-root .notes-empty p{margin:0;font-size:13.5px;color:var(--text-dim);line-height:1.55;}
.arc-root .notes-list{padding:0 16px;}
.arc-root .note-row{appearance:none;display:flex;flex-direction:column;gap:3px;width:100%;text-align:left;background:none;border:none;border-top:1px solid var(--border);padding:12px 0;color:var(--text);cursor:pointer;font-family:var(--font-body);}
.arc-root .note-row:first-child{border-top:none;}
.arc-root .note-row b{font-size:15px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.arc-root .note-row span{font-size:13px;color:var(--text-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.arc-root .note-row time{color:var(--text);font-weight:500;margin-right:6px;}

.arc-root .note-editor{position:fixed;inset:0;z-index:300;background:var(--bg);display:flex;flex-direction:column;animation:fadein .2s ease;}
.arc-root .ne-bar{display:flex;align-items:center;gap:10px;padding:calc(10px + env(safe-area-inset-top)) 16px 10px;border-bottom:1px solid var(--border);}
.arc-root .ne-bar button{appearance:none;background:none;border:none;font:600 15px var(--font-body);cursor:pointer;padding:6px 2px;}
.arc-root .ne-back{color:var(--gold);}
.arc-root .ne-done{color:var(--gold);margin-left:4px;}
.arc-root .ne-delete{color:var(--danger);margin-left:auto;font-weight:500 !important;}
.arc-root .ne-folder{background:var(--surface-2);color:var(--text);border:1px solid var(--border);border-radius:6px;font:500 13px var(--font-body);padding:5px 8px;max-width:40%;}
.arc-root .ne-tools{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;padding:8px 16px;border-bottom:1px solid var(--border);background:var(--bg-elev);}
.arc-root .ne-tools::-webkit-scrollbar{display:none;}
.arc-root .ne-tools button{appearance:none;flex-shrink:0;border:1px solid var(--border);background:var(--surface);color:var(--text);font:600 12.5px var(--font-body);padding:7px 11px;border-radius:6px;cursor:pointer;}
.arc-root .ne-tools button:active{background:var(--gold-soft);border-color:var(--gold);}
.arc-root .ne-body{flex:1;overflow-y:auto;padding:18px max(18px, env(safe-area-inset-left)) calc(40px + env(safe-area-inset-bottom));outline:none;font-size:16px;line-height:1.55;color:var(--text);-webkit-user-select:text;user-select:text;}
.arc-root .ne-body h1{font-family:var(--font-display);font-size:26px;font-weight:700;line-height:1.2;margin:0 0 12px;}
.arc-root .ne-body h2{font-family:var(--font-display);font-size:20px;font-weight:700;margin:18px 0 8px;}
.arc-root .ne-body h3{font-size:16.5px;font-weight:700;color:var(--text-dim);margin:14px 0 6px;}
.arc-root .ne-body p, .arc-root .ne-body div{margin:0 0 8px;}
.arc-root .ne-body ul, .arc-root .ne-body ol{margin:0 0 10px;padding-left:24px;}
.arc-root .ne-body li{margin-bottom:4px;}
.arc-root .ne-body ul.checklist{list-style:none;padding-left:0;}
.arc-root .ne-body ul.checklist li{position:relative;padding-left:30px;min-height:22px;}
.arc-root .ne-body ul.checklist li::before{content:'';position:absolute;left:0;top:2px;width:18px;height:18px;border-radius:50%;border:1.5px solid var(--text-faint);cursor:pointer;}
.arc-root .ne-body ul.checklist li.done::before{background:var(--gold);border-color:var(--gold);}
.arc-root .ne-body ul.checklist li.done::after{content:'';position:absolute;left:6px;top:5px;width:5px;height:9px;border:solid var(--bg);border-width:0 2px 2px 0;transform:rotate(45deg);}
.arc-root .ne-body ul.checklist li.done{color:var(--text-faint);text-decoration:line-through;}

/* Your reminders (Setup) */
.arc-root .rem-list{padding:0 16px;}
.arc-root .rem-row{display:flex;align-items:center;gap:12px;border-top:1px solid var(--border);}
.arc-root .rem-list > .rem-row:first-child, .arc-root .rem-list > .rem-form:first-child{border-top:none;}
.arc-root .rem-row.off .rem-main{opacity:.45;}
.arc-root .rem-main{appearance:none;flex:1;min-width:0;display:flex;align-items:center;gap:14px;background:none;border:none;padding:12px 0;color:var(--text);text-align:left;cursor:pointer;font-family:var(--font-body);}
.arc-root .rem-time{font-family:var(--font-display);font-weight:700;font-size:16px;min-width:74px;font-variant-numeric:tabular-nums;}
.arc-root .rem-txt{display:flex;flex-direction:column;gap:2px;min-width:0;}
.arc-root .rem-txt b{font-size:14.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.arc-root .rem-txt span{font-size:12.5px;color:var(--text-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.arc-root .rem-switch{position:relative;flex-shrink:0;width:44px;height:26px;margin:0;cursor:pointer;}
.arc-root .rem-switch input{position:absolute;opacity:0;width:100%;height:100%;margin:0;cursor:pointer;}
.arc-root .rem-switch i{position:absolute;inset:0;border-radius:13px;background:var(--surface-2);border:1px solid var(--border);transition:background .15s ease;pointer-events:none;}
.arc-root .rem-switch i::after{content:'';position:absolute;top:2px;left:2px;width:20px;height:20px;border-radius:50%;background:var(--text-dim);transition:transform .15s ease, background .15s ease;}
.arc-root .rem-switch input:checked + i{background:var(--gold-soft);border-color:var(--gold);}
.arc-root .rem-switch input:checked + i::after{transform:translateX(18px);background:var(--gold);}
.arc-root .rem-switch input:focus-visible + i{outline:2px solid var(--accent);outline-offset:2px;}
.arc-root .rem-form{padding:12px 0;border-top:1px solid var(--border);}
.arc-root .card > .rem-form{border-top:none;padding:0;}
.arc-root .rem-days{display:flex;gap:6px;margin-bottom:14px;}
.arc-root .rem-day{appearance:none;width:36px;height:36px;border-radius:50%;border:1px solid var(--border);background:var(--surface-2);color:var(--text-dim);font:700 13px var(--font-body);cursor:pointer;}
.arc-root .rem-day.on{background:var(--gold-soft);border-color:var(--gold);color:var(--gold);}
.arc-root .rem-actions{display:flex;align-items:center;gap:16px;}
.arc-root .rem-actions .danger{margin-left:auto;}
/* native date and time pickers drawn for the dark background (their clock icon was black) */
.arc-root input[type=time], .arc-root input[type=date], .arc-root select{color-scheme:dark;}
.arc-root[data-theme="light"] input[type=time], .arc-root[data-theme="light"] input[type=date], .arc-root[data-theme="light"] select{color-scheme:light;}

/* extra photos under the habits */
.arc-root .extras-row{display:flex;align-items:center;flex-wrap:wrap;gap:4px 12px;margin-top:10px;}
.arc-root .extra-add{display:inline-flex;align-items:center;gap:8px;margin:0;min-height:40px;padding:0 2px;color:var(--text-dim);font-size:13px;font-weight:600;cursor:pointer;}
.arc-root .extra-add:hover{color:var(--text);}
.arc-root .extra-icon{position:relative;display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;border-radius:50%;border:1px solid var(--border);background:var(--surface-2);}
.arc-root .extra-icon svg{display:block;width:16px;height:16px;}
.arc-root .extra-icon b{position:absolute;right:-4px;bottom:-4px;width:15px;height:15px;border-radius:50%;background:var(--accent);color:#0B0E14;font-size:12px;line-height:15px;text-align:center;font-weight:800;}
.arc-root .extra-count{font-size:12px;color:var(--text-faint);}
.arc-root .pv-remove{display:block;margin:14px auto 0;}
.arc-root .gal-extra{position:absolute;top:5px;right:5px;width:22px;height:22px;border-radius:50%;background:rgba(0,0,0,.55);color:#fff;display:flex;align-items:center;justify-content:center;}
.arc-root .gal-extra svg{width:13px;height:13px;}

/* tapping the non-negotiable without proof points at the proof link */
@keyframes proofNudge{0%,100%{transform:translateX(0);}20%,60%{transform:translateX(-4px);}40%,80%{transform:translateX(4px);}}
.arc-root .proof-add.nudge{animation:proofNudge .4s ease;}

/* habit schedules: groups and tags on Today, schedule picker in Setup */
.arc-root .hab-tag{font-size:12px;color:var(--text-dim);margin-top:4px;}
.arc-root .checkline .txt .hab-tag b,.arc-root .checkline .txt .hab-tag span{display:inline;font-size:inherit;margin:0;}
.arc-root .checkline .txt .hab-tag b{color:var(--text);}
.arc-root .checkline .txt .hab-due{color:var(--gold);font-weight:600;}
.arc-root .hab-group{font-size:11.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--text-dim);margin:14px 0 2px;}
.arc-root .hab-group span{font-weight:500;letter-spacing:0;text-transform:none;color:var(--text-faint);}
.arc-root .hab-off{font-size:12px;color:var(--text-faint);margin:12px 0 0;}
.arc-root .sched{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:10px;}
.arc-root .sched > label{width:100%;margin:0;}
.arc-root .sched select{width:auto;}
.arc-root .sched-days{display:inline-flex;gap:5px;flex-wrap:wrap;}
.arc-root .sched-n[hidden],.arc-root .sched-days[hidden]{display:none;}
.arc-root .more-head{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.arc-root .more-head label{margin:0;}
.arc-root .more-head .linkbtn{font-size:13px;}

/* Main Quests on Today */
.arc-root .quest-empty{appearance:none;display:block;width:100%;text-align:left;cursor:pointer;margin:0 0 14px;padding:16px 18px;border-radius:var(--radius);border:1.5px dashed var(--gold);background:var(--gold-soft);color:var(--text);font-family:var(--font-body);}
.arc-root .quest-empty b{display:block;font-family:var(--font-display);font-size:16px;margin-bottom:3px;color:var(--gold);}
.arc-root .quest-empty span{font-size:13px;color:var(--text-dim);}
.arc-root .card.quest{border-color:var(--gold);background:linear-gradient(180deg,var(--gold-soft),transparent 70%),var(--surface);margin-bottom:14px;}
.arc-root .quest-head{appearance:none;display:block;width:100%;text-align:left;background:none;border:none;padding:0;color:inherit;cursor:pointer;font-family:var(--font-body);}
.arc-root .quest-head > span{display:block;}
.arc-root .quest-kicker{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--gold);}
.arc-root .quest-title{font-family:var(--font-display);font-size:19px;font-weight:700;margin:3px 0 2px;color:var(--text);}
.arc-root .quest-why{font-size:13px;color:var(--text-dim);font-style:italic;}
.arc-root .quest-bar{height:8px;border-radius:99px;background:var(--surface-2);overflow:hidden;margin:12px 0 7px;}
.arc-root .quest-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--gold),#FFE08A);transition:width .4s ease;}
.arc-root .quest-meta{font-size:12.5px;color:var(--text-dim);margin-top:6px;}
.arc-root .quest-ms{margin:12px 0 4px;display:flex;flex-direction:column;gap:2px;}
.arc-root .quest-m{display:flex;align-items:center;gap:10px;margin:0;padding:7px 0;font-size:14px;font-weight:500;color:var(--text);cursor:pointer;}
.arc-root .quest-m input{width:20px;height:20px;margin:0;accent-color:var(--gold);flex:none;}
.arc-root .quest-m.done span{color:var(--text-dim);text-decoration:line-through;}
.arc-root .quest-fed{font-size:12.5px;color:var(--text-dim);margin:10px 0;}
.arc-root .quest-fed b{color:var(--text);}
.arc-root .quest-more{display:block;margin:-4px 0 14px;font-size:13px;}
.arc-root .quest-form label{margin-top:10px;}
.arc-root .quest-form textarea{min-height:96px;}
.arc-root .quest-habits{display:flex;flex-direction:column;gap:4px;}
.arc-root .quest-h{display:flex;align-items:center;gap:8px;font-weight:500;font-size:14px;margin:0;color:var(--text);}
.arc-root .quest-done-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--border);}
.arc-root .quest-done-row:last-child{border-bottom:none;}
.arc-root .quest-done-row b{display:block;font-size:14.5px;}
.arc-root .quest-done-row span{font-size:12px;color:var(--text-dim);}
/* the Main Quest pulses with a gold glow, and a shine runs along its bar, so it catches the eye */
@keyframes questGlow{0%,100%{box-shadow:0 0 0 0 rgba(255,200,87,0);border-color:var(--gold);}50%{box-shadow:0 0 22px 2px rgba(255,200,87,.45);border-color:#FFE08A;}}
@keyframes questShine{0%{transform:translateX(-120%);}60%,100%{transform:translateX(320%);}}
.arc-root .card.quest,.arc-root .quest-empty{animation:questGlow 2.4s ease-in-out infinite;}
.arc-root .quest-bar{position:relative;}
.arc-root .quest-bar::after{content:'';position:absolute;top:0;bottom:0;left:0;width:30%;background:linear-gradient(90deg,transparent,rgba(255,255,255,.55),transparent);animation:questShine 2.8s ease-in-out infinite;}
@media (prefers-reduced-motion: reduce){ .arc-root .card.quest,.arc-root .quest-empty,.arc-root .quest-bar::after{animation:none;} }
/* Setup: compact habit cards, folded groups */
.arc-root .hab-card{padding:14px 16px;margin-bottom:10px;}
.arc-root .hab-card > label{font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--text-dim);margin:0 0 6px;}
.arc-root .hab-opts{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;margin-top:8px;}
.arc-root .hab-opts .sched{margin-top:0;flex:1 1 0;min-width:0;}
.arc-root .hab-opts .sched > select{width:100%;}
.arc-root .hab-opts .sched-n select{width:auto;}
.arc-root .hab-remind{display:inline-flex;align-items:center;gap:6px;flex:none;}
.arc-root .hab-remind input[type=time]{width:auto;min-width:108px;padding-top:8px;padding-bottom:8px;}
.arc-root .time-box{position:relative;display:block;}
.arc-root .time-box input[type=time]{display:block;margin:0;}
/* an empty reminder shows a faint outlined digital 00:00, so it reads as a time box */
.arc-root .time-ph{position:absolute;left:14px;top:50%;transform:translateY(-50%);display:none;pointer-events:none;
  font:400 20px 'Share Tech Mono', ui-monospace, 'SF Mono', Menlo, monospace;letter-spacing:.06em;color:transparent;-webkit-text-stroke:1px var(--text-faint);}
.arc-root .time-box.is-empty .time-ph{display:block;}
.arc-root .time-box.is-empty input{color:transparent;}
.arc-root .time-box.is-empty input::-webkit-datetime-edit{color:transparent;}
.arc-root .time-box.is-empty input:focus{color:var(--text);}
.arc-root .time-box.is-empty input:focus::-webkit-datetime-edit{color:var(--text);}
.arc-root .time-box.is-empty input:focus + .time-ph{display:none;}
.arc-root .hab-remind .linkbtn{font-size:12.5px;}
.arc-root .hab-remind .linkbtn[hidden]{display:none;}
.arc-root .sched select{padding-top:8px;padding-bottom:8px;}
.arc-root details.ideas{margin:0 0 10px;}
.arc-root details.ideas summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--accent);list-style:none;}
.arc-root details.ideas summary::-webkit-details-marker{display:none;}
.arc-root .ideas-body{margin-top:8px;font-size:12.5px;color:var(--text-dim);}
.arc-root details.set-group{margin:10px 0;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);}
.arc-root details.set-group > summary{display:flex;align-items:center;gap:12px;padding:14px 16px;cursor:pointer;list-style:none;}
.arc-root details.set-group > summary::-webkit-details-marker{display:none;}
.arc-root details.set-group > summary::after{content:'›';margin-left:auto;font-size:22px;color:var(--text-dim);transition:transform .2s ease;}
.arc-root details.set-group[open] > summary::after{transform:rotate(90deg);}
.arc-root .sg-icon{font-size:20px;}
.arc-root .sg-title{font-weight:700;font-size:15px;color:var(--text);}
.arc-root .sg-title small{display:block;font-weight:400;font-size:12px;color:var(--text-dim);margin-top:2px;}
.arc-root .sg-body{padding:0 16px 16px;}
/* Motion: the Today power card (progress ring + XP bar) */
.arc-root .card.power{display:flex;align-items:center;gap:16px;padding:14px 16px;margin-bottom:14px;}
.arc-root .pw-ring{position:relative;width:72px;height:72px;flex:none;}
.arc-root .pw-ring svg{width:100%;height:100%;transform:rotate(-90deg);}
.arc-root .pw-ring circle{fill:none;stroke-width:7;}
.arc-root .pw-ring .trk{stroke:var(--surface-2);}
.arc-root .pw-ring .fil{stroke:var(--accent);stroke-linecap:round;transition:stroke-dashoffset 1s cubic-bezier(.2,.8,.2,1);filter:drop-shadow(0 0 4px rgba(43,220,255,.5));}
.arc-root .pw-num{position:absolute;inset:0;display:flex;align-items:baseline;justify-content:center;padding-top:22px;font:600 13px var(--font-body);color:var(--text-dim);}
.arc-root .pw-num b{font:700 21px var(--font-display);color:var(--text);margin-right:1px;}
.arc-root .pw-side{flex:1;min-width:0;position:relative;}
.arc-root .pw-top{display:flex;justify-content:space-between;gap:10px;font-size:13px;color:var(--text-dim);margin-bottom:7px;}
.arc-root .pw-top b{color:var(--text);font-family:var(--font-display);}
.arc-root .pw-bar{height:10px;border-radius:99px;background:var(--surface-2);overflow:hidden;}
.arc-root .pw-bar i{display:block;height:100%;border-radius:99px;background:linear-gradient(90deg,var(--accent),#9AF0FF);transition:width .75s ease;}
.arc-root .power.leveling .pw-bar i{background:linear-gradient(90deg,var(--gold),#FFE7A8);box-shadow:0 0 12px var(--gold);}
.arc-root .pw-xp{font-size:12px;color:var(--text-dim);margin-top:5px;}
.arc-root .pw-xp b{color:var(--text);}
.arc-root .pw-lvup{position:absolute;right:0;bottom:-2px;font:700 14px var(--font-display);letter-spacing:.08em;color:var(--gold);opacity:0;pointer-events:none;text-shadow:0 0 14px rgba(255,200,87,.7);}
.arc-root .pw-lvup.go{animation:lvUp 1.8s ease-out;}
@keyframes lvUp{0%{opacity:0;transform:scale(.5)}20%{opacity:1;transform:scale(1.25)}70%{opacity:1;transform:scale(1)}100%{opacity:0}}

/* Motion: the burst on a ticked habit */
.arc-root .checkline{position:relative;}
.arc-root .checkline.burst input[type=checkbox]{animation:boxPop .4s cubic-bezier(.3,1.7,.5,1);}
@keyframes boxPop{0%{transform:scale(.55)}100%{transform:scale(1)}}
.arc-root .burst-fx{position:absolute;left:0;top:0;width:44px;height:100%;pointer-events:none;}
.arc-root .burst-fx i{position:absolute;left:14px;top:50%;width:8px;height:8px;border-radius:2px;box-shadow:0 0 6px currentColor;animation:sparkOut .65s ease-out forwards;}
.arc-root .burst-xp{position:absolute;right:4px;top:calc(50% - 12px);font:700 16px var(--font-display);color:var(--gold);white-space:nowrap;text-shadow:0 0 10px rgba(255,200,87,.6);animation:xpUp 1s ease-out forwards;}
@keyframes sparkOut{0%{opacity:1;transform:translate(0,0) rotate(0)}100%{opacity:0;transform:translate(var(--x),var(--y)) rotate(180deg)}}
@keyframes xpUp{0%{opacity:0;transform:translateY(6px)}20%{opacity:1}100%{opacity:0;transform:translateY(-22px)}}

/* Motion: weekly segments on times-a-week habits */
.arc-root .checkline .txt .hab-tag .wk-segs{display:inline-flex;gap:3px;margin-right:7px;vertical-align:middle;}
.arc-root .wk-segs i{display:block;width:16px;height:7px;border-radius:3px;background:var(--surface-2);}
.arc-root .wk-segs i.on{background:var(--success);}
.arc-root .wk-segs i.lit{animation:segPop .55s ease-out;}
.arc-root .wk-segs.all i{box-shadow:0 0 8px var(--success);}
@keyframes segPop{0%{transform:scaleY(1)}40%{transform:scaleY(1.9);box-shadow:0 0 12px var(--success)}100%{transform:none}}

/* Motion: lightning strike before Day Cleared */
.arc-root .strike{position:fixed;inset:0;z-index:220;pointer-events:none;display:grid;place-items:center;}
.arc-root .strike-flash{position:absolute;inset:0;background:#E9F8FF;opacity:0;animation:strikeFlash .65s ease-out;}
.arc-root .strike-bolt{position:relative;width:90px;height:190px;opacity:0;overflow:visible;filter:drop-shadow(0 0 12px #2BDCFF);animation:strikeBolt .8s ease-out;}
.arc-root .strike-bolt path{fill:#B8F5FF;}
@keyframes strikeFlash{0%{opacity:0}10%{opacity:.85}25%{opacity:.08}35%{opacity:.55}100%{opacity:0}}
@keyframes strikeBolt{0%{opacity:0;transform:translateY(-40px) scaleY(.6)}15%{opacity:1;transform:none}70%{opacity:1}100%{opacity:0}}
.arc-root .cel-kicker.cel-strike{animation:chargeIn 1.2s .2s ease-out both;text-shadow:0 0 16px rgba(43,220,255,.7);}
@keyframes chargeIn{0%{opacity:0;letter-spacing:.5em;transform:scale(1.3)}45%{opacity:1;letter-spacing:.18em;transform:scale(1)}100%{opacity:1}}
@media (prefers-reduced-motion: reduce){
  .arc-root .pw-ring .fil,.arc-root .pw-bar i{transition:none;}
  .arc-root .checkline.burst input[type=checkbox],.arc-root .wk-segs i.lit,.arc-root .cel-kicker.cel-strike,.arc-root .pw-lvup.go{animation:none;}
}

/* Start Here: short lead, then folded detail */
.arc-root .guide-lead{font-size:15px;color:var(--text-dim);margin:4px 0 18px;max-width:60ch;}
.arc-root .guide-list{display:flex;flex-direction:column;gap:8px;}
.arc-root details.guide-more{border:1px solid var(--border);border-radius:var(--radius);background:var(--surface);}
.arc-root details.guide-more > summary{display:flex;align-items:center;padding:13px 16px;cursor:pointer;list-style:none;font-weight:600;font-size:14.5px;color:var(--text);}
.arc-root details.guide-more > summary::-webkit-details-marker{display:none;}
.arc-root details.guide-more > summary::after{content:'›';margin-left:auto;font-size:20px;color:var(--text-dim);transition:transform .2s ease;}
.arc-root details.guide-more[open] > summary::after{transform:rotate(90deg);}
.arc-root .gm-body{padding:0 16px 12px;font-size:14px;color:var(--text-dim);}
.arc-root .gm-body p{margin:0 0 8px;}
.arc-root .gm-body b{color:var(--text);}

/* Feature tour: a spotlight on one feature, with a card that explains it */
.arc-root .tour{position:fixed;inset:0;z-index:250;}
.arc-root .tour-block{position:absolute;inset:0;}
.arc-root .tour-spot{position:fixed;border-radius:12px;box-shadow:0 0 0 9999px rgba(5,8,15,.74);outline:2px solid var(--gold);outline-offset:2px;pointer-events:none;transition:left .3s ease,top .3s ease,width .3s ease,height .3s ease;}
.arc-root .tour-card{position:fixed;left:max(14px, env(safe-area-inset-left));right:max(14px, env(safe-area-inset-right));max-width:460px;margin:0 auto;background:var(--surface);border:1px solid var(--gold);border-radius:14px;padding:16px 16px 12px;box-shadow:0 18px 40px rgba(0,0,0,.5);transition:top .3s ease;}
.arc-root .tour-card.in{animation:tourIn .3s ease-out;}
@keyframes tourIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
.arc-root .tour-kicker{font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--gold);}
.arc-root .tour-card h3{font-family:var(--font-display);font-size:18px;margin:4px 0 4px;color:var(--text);}
.arc-root .tour-card p{margin:0 0 12px;font-size:14px;line-height:1.45;color:var(--text-dim);}
.arc-root .tour-btns{display:flex;align-items:center;gap:8px;}
.arc-root .tour-btns > span{flex:1;}
.arc-root .tour-btns .btn{padding:8px 16px;}
.arc-root .tour-skip{font-size:13px;color:var(--text-dim);}
.arc-root .tour-offer{display:flex;flex-direction:column;gap:10px;margin:0 0 14px;padding:14px 16px;border-radius:var(--radius);border:1px solid var(--accent);background:var(--accent-soft);font-size:14px;color:var(--text);}
.arc-root .tour-offer-btns{display:flex;align-items:center;gap:14px;}
.arc-root .tour-btn{margin:0 0 18px;}
@media (prefers-reduced-motion: reduce){ .arc-root .tour-spot,.arc-root .tour-card{transition:none;} .arc-root .tour-card.in{animation:none;} }

/* Start a new arc: the pop-up for picking the archetype that Week 1 starts as */
.arc-root .newarc-back{position:fixed;inset:0;z-index:200;display:flex;align-items:center;justify-content:center;padding:16px;
  background:rgba(4,6,10,.72);-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);animation:celFade .25s ease both;}
.arc-root .newarc{background:var(--bg-elev);border:1px solid var(--border);border-radius:14px;padding:22px 20px 18px;max-width:460px;width:100%;
  max-height:100%;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,.45);}
.arc-root .newarc h2{font-family:var(--font-display);font-size:21px;margin:0 0 6px;color:var(--text);}
.arc-root .newarc p{margin:0 0 14px;color:var(--text-dim);font-size:14px;line-height:1.5;}
.arc-root .newarc .na-label{font-size:12px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--text-faint);margin-bottom:8px;}
.arc-root .na-picker{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:16px;}
.arc-root .na-picker button{appearance:none;display:flex;flex-direction:column;align-items:center;gap:6px;padding:10px 4px 8px;border-radius:10px;
  border:1.5px solid var(--border);background:var(--surface);color:var(--text);font:600 12px/1.2 var(--font-body);cursor:pointer;transition:border-color .15s ease, background .15s ease;}
.arc-root .na-picker button small{display:block;font-weight:500;font-size:10.5px;color:var(--text-faint);margin-top:2px;}
.arc-root .na-picker button:hover{border-color:var(--text-faint);}
.arc-root .na-picker button.on{border-color:hsl(var(--hue) 85% 62%);background:hsla(var(--hue),80%,60%,.14);}
.arc-root .na-what{display:grid;gap:8px;margin-bottom:12px;}
.arc-root .na-what div{background:var(--surface-2);border-radius:8px;padding:9px 12px;font-size:13px;line-height:1.45;color:var(--text-dim);}
.arc-root .na-what b{display:block;color:var(--text);font-size:12.5px;margin-bottom:1px;}
.arc-root .newarc .na-note{font-size:12.5px;color:var(--text-faint);margin-bottom:14px;}
.arc-root .newarc .btn{display:block;width:100%;margin-top:8px;text-align:center;}
.arc-root .newarc button.btn.na-go{background:var(--accent);color:var(--bg-elev);}
.arc-root .newarc button.btn.na-go:disabled{background:transparent;color:var(--text-faint);}
