/* Muchiround design system objects that Doro's prototype styles didn't have: tape, notes, the win sticker,
   confetti, Visa sign-in and the link notice. Tinted from Doro's palette (lager amber, cap red, warm paper). */

/* tape: anything "stuck on" the table */
.taped::before,.code-card::before,.cele-card::before,.unlock::before,.note::before{content:"";position:absolute;top:-9px;left:50%;width:72px;height:18px;
  transform:translateX(-50%) rotate(-2.5deg);background:var(--tape);box-shadow:0 1px 1px rgba(0,0,0,.06);pointer-events:none}
.unlock::before{left:28px;transform:rotate(-4deg)}

/* a cream note: welcome, link notice, application status */
.note{position:relative;background:repeating-linear-gradient(180deg,transparent 0 27px,rgba(90,55,25,.06) 27px 28px),var(--note);color:var(--marker);
  border-radius:6px;padding:26px 18px 18px;rotate:-.5deg;box-shadow:0 1px 0 rgba(0,0,0,.06),0 18px 30px -14px rgba(80,40,10,.5)}
.note .kicker{font-family:var(--hand);font-size:1.12rem;line-height:1.2;color:#6B5443;margin:0 0 4px}
.note h2,.note h3{font-family:var(--display);font-weight:800;letter-spacing:-.03em;line-height:1.08;margin:0 0 8px;color:var(--marker)}
.note p{margin:0 0 10px;color:#4A3628}
.note a{color:#8A4E05;font-weight:700;text-underline-offset:3px}
.note .fine{color:#6B5443;text-align:left}
.kicker{font-family:var(--hand);font-size:1.1rem;line-height:1.2;color:var(--muted);margin:0 0 2px}
.hand{font-family:var(--hand)}

/* full-page notes (Visa welcome / link notice) scroll on short screens */
.gate.scroll-gate{overflow-y:auto;justify-content:flex-start;gap:22px;padding-top:40px}
.gate.scroll-gate .gate-mark{font-size:76px;margin:2vh 0 6px}
.code-card .kicker{color:#6B5443;margin-bottom:6px}

/* Muchiround Visa: the primary way in */
.visa-mark{display:inline-grid;place-items:center;width:26px;height:26px;border-radius:7px;background:var(--lager-ink);color:var(--lager);flex:none}
.visa-mark .ico{width:18px;height:18px}
.or{display:flex;align-items:center;gap:10px;margin:16px 0 4px;color:var(--muted);font-size:13px;font-weight:600}
.or::before,.or::after{content:"";flex:1;border-top:1px solid var(--line-strong)}
.visa-note{font-size:12.5px;color:var(--muted);margin:8px 0 0;line-height:1.4;text-align:center}
.linked{display:flex;align-items:center;gap:8px;font-weight:700;color:var(--lager);margin:0 0 6px}
.linked .ico{width:20px;height:20px}
.alt-signin summary{min-height:44px;display:flex;align-items:center;justify-content:center;font-weight:700;color:var(--muted);cursor:pointer;list-style:none}
.alt-signin summary::-webkit-details-marker{display:none}
.alt-signin[open] summary{color:var(--ink)}
.notice-list{list-style:none;margin:6px 0 12px;padding:0;display:grid;gap:8px}
.notice-list li{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.4}
.notice-list .ico{width:20px;height:20px;color:#A5620A;margin-top:1px}
.actions{display:grid;gap:10px;margin-top:16px}
.actions form{display:block}

/* the win: a round sticker slapped onto the celebration note */
.sticker{width:96px;height:96px;margin:-8px auto 14px;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;
  background:radial-gradient(circle at 35% 30%,#FFF1CC,#F5C25A 60%,#DE9A2C);border:4px solid #fff;color:#3A2208;
  box-shadow:0 0 0 1px rgba(120,70,15,.25),0 8px 16px -6px rgba(70,35,10,.55);transform:rotate(-9deg)}
.sticker .ico{width:34px;height:34px}
.sticker b{font-family:var(--hand);font-weight:700;font-size:15px;line-height:1}
.celebrate:not([hidden]) .sticker{animation:slap .7s cubic-bezier(.2,1.4,.4,1) both}
@keyframes slap{0%{transform:translateY(-40px) rotate(-40deg) scale(2.2);opacity:0}60%{transform:translateY(0) rotate(-6deg) scale(.92);opacity:1}100%{transform:rotate(-9deg) scale(1)}}
#confetti{position:fixed;inset:0;z-index:70;pointer-events:none;width:100%;height:100%}

/* sound on/off (Settings) */
.sound-toggle .ico{width:20px;height:20px}
.sound-toggle[aria-pressed="false"] .on,.sound-toggle[aria-pressed="true"] .off{display:none}

/* small controls keep their size but get a ~44px hit area */
.rx::after,.rx-add::after{content:"";position:absolute;inset:-6px -3px}
.more,.board-kind a,.period a,.toggle-row .toggle,.rsvp,.av-link,.week-nav a{position:relative}
.more::after,.toggle-row .toggle::after,.av-link::after{content:"";position:absolute;inset:-7px}
.board-kind a::after,.period a::after,.week-nav a::after{content:"";position:absolute;inset:-6px -2px}
.rsvp::after{content:"";position:absolute;inset:-4px}
.reset{min-height:44px;display:inline-flex;align-items:center;justify-content:center}
a.reset{display:flex}
/* amber text on the soft amber tint needs a touch more ink for AA */
.rname em,.board-kind a.on,.city-menu a.on{color:color-mix(in srgb,var(--lager) 85%,var(--ink))}

@media (prefers-reduced-motion:reduce){.note,.code-card,.sticker,.gate-mark,.wordmark,.sh-title,.rname em{rotate:none;transform:none}}

/* ---------- the Doro logo (script/brand/build_logo.py) ---------- */
.logo{display:block;height:1em;width:auto;overflow:visible}
.gate-mark{rotate:none}
.gate-mark .logo{height:96px;margin-left:-4px}
.gate.scroll-gate .gate-mark .logo{height:62px}
.wordmark{rotate:none;display:inline-flex;align-items:center;min-height:44px}
.wordmark .logo{height:30px}
.adm-brand{display:inline-flex;align-items:center;gap:6px;color:#A5620A}
.adm-brand .logo{height:22px}
@media (prefers-reduced-motion:no-preference){
  .gate-mark .logo .cap{transform-box:fill-box;transform-origin:center;animation:capPop .9s .35s var(--spring) both}
}
@keyframes capPop{0%{transform:translateY(-40%) rotate(-120deg);opacity:0}60%{opacity:1}100%{transform:none}}

/* ---------- a sheet step opened as its own page (invite link, /apply, /session/new) ---------- */
.page-brand{display:none}
.page-brand:has(+ turbo-frame#sheet){display:flex;justify-content:center;align-items:center;flex:none;min-height:44px;color:var(--lager);
  padding:max(26px,env(safe-area-inset-top)) 24px 4px}
.page-brand .logo{height:46px}
#app > turbo-frame#sheet{display:block;flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:none;
  width:100%;max-width:460px;margin:0 auto;padding:18px 24px calc(36px + env(safe-area-inset-bottom,0px))}
#app > turbo-frame#sheet > .step{background:var(--paper);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);padding:22px 20px 24px;position:relative}
#app > turbo-frame#sheet > .step::before{content:"";position:absolute;top:-9px;left:50%;width:72px;height:18px;transform:translateX(-50%) rotate(-2.5deg);background:var(--tape)}

/* Sign-in code (sessions/sent): big, spaced digits; the link below stays a 44px target. */
.code-form{width:100%;text-align:left}
.code-field input{font:800 24px var(--ui);letter-spacing:.3em;text-align:center;font-variant-numeric:tabular-nums}
.code-form + a.fine{display:inline-flex;align-items:center;min-height:44px;margin-top:6px;color:var(--muted)}

/* ---------- install Doro (install_controller.js, PWA brief R4/R5) ---------- */
/* The card sits above the tab bar, under any sheet (scrim is z 20), and steps aside when one opens. */
.install-card{position:absolute;left:12px;right:12px;bottom:80px;z-index:8;padding:22px 18px 6px;border-radius:var(--r-lg);
  background:repeating-linear-gradient(180deg,transparent 0 27px,var(--rule) 27px 28px),var(--paper);box-shadow:var(--shadow);
  animation:installIn .45s var(--spring)}
.install-card::before{content:"";position:absolute;top:-9px;left:50%;width:72px;height:18px;transform:translateX(-50%) rotate(-2.5deg);background:var(--tape)}
.install-card h3{font-family:var(--display);font-weight:800;font-size:19px;letter-spacing:-.02em;line-height:1.15;margin:0 0 4px}
.install-card>p{margin:0 0 12px;color:var(--muted);font-size:14px}
.install-card .not-now{margin:2px auto 0;text-decoration:none;font-size:14px}
@keyframes installIn{from{transform:translateY(24px);opacity:0}}
.install-guide .btn{margin-top:2px}
.install-line{margin:0 0 10px;font-size:14.5px}
.install-steps{list-style:none;margin:0 0 4px;padding:0;display:grid;gap:8px}
.install-steps li{display:flex;align-items:center;gap:12px;font-size:14.5px;line-height:1.3}
.step-ico{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;background:var(--lager-soft);color:color-mix(in srgb,var(--lager) 85%,var(--ink));flex:none}
.step-ico .ico{width:22px;height:22px}
.install-row .link-row{margin-bottom:0}
.install-row .link-row[aria-expanded="true"]{border-radius:var(--r-lg) var(--r-lg) 0 0}
.install-row .panel{border-radius:0 0 var(--r-lg) var(--r-lg);margin-bottom:14px;padding-top:4px}
.install-row:not(:has(.panel:not([hidden]))){margin-bottom:14px}

/* ---------- notifications (push_controller.js, push brief P5) ---------- */
.push-state{margin:6px 0 10px}
.push-line{margin:0 0 10px;font-size:14.5px;line-height:1.35}
.push-on,.push-off{display:flex;align-items:flex-start;gap:10px}
.push-on .ico,.push-off .ico{width:22px;height:22px;flex:none;margin-top:-1px}
.push-on .ico{color:color-mix(in srgb,var(--lager) 85%,var(--ink))}
.push-off .ico{color:var(--muted)}
.push-hint{margin:8px 0 0;font-size:13px;line-height:1.4;color:var(--muted)}
.push-state + .push-state{margin-top:0}
.push-panel .toggle-row:last-of-type{padding-bottom:0}
.btn[aria-busy="true"]{opacity:.6}
.install-card .not-now{min-height:44px}

/* Installed app (black-translucent status bar): :root pads both safe areas, so the strip under the
   status bar shows the page colour and the strip under the home indicator should match the tab bar. */
html:has(.tabbar){background:linear-gradient(var(--bg) 50%,var(--paper) 50%)}
html:has(.sheet.show){background:var(--bg)}

/* Doro Wrapped banner on the thread (promoted 1 Dec - 15 Jan). Objects on the table, like the rest. */
.wrapped-banner{display:flex;align-items:center;gap:12px;margin:12px 16px;padding:12px 14px;border:1px solid var(--line);border-radius:var(--r-md);background:linear-gradient(120deg,var(--note),var(--surface));box-shadow:var(--shadow-sm);color:var(--ink);text-decoration:none;transform:rotate(-.4deg)}
.wrapped-banner .wb-cap svg{width:34px;height:34px;display:block}
.wrapped-banner .wb-text{flex:1;display:flex;flex-direction:column;font-size:13px;line-height:1.25}
.wrapped-banner .wb-text b{font-size:15px}
.wrapped-banner .wb-text span{color:var(--muted)}
.wrapped-banner .wb-go{font-family:var(--hand);font-weight:700;color:var(--lager);font-size:16px;white-space:nowrap}

/* Doro Wrapped popup: the edition as a collector card floating up over the app (wrapped/_popup).
   Same fixed keepsake palette as the story (wrapped.css): stout ground, drifting bar light, grain, foil spine. */
.wrapped-pop{--foam:#FFF3DE;--foam-2:rgba(255,243,222,.74);--foam-3:rgba(255,243,222,.52);--gold:#FFD58A;--amber:#F2A93B;--stout:#140C07;
  --foil:linear-gradient(170deg,#FFE7B0 0%,#E9A63F 22%,#FFF3DE 38%,#C9782A 55%,#FFD58A 72%,#B8612A 88%,#FFE7B0 100%);
  color-scheme:dark;width:min(360px,calc(100% - 36px));max-width:none;max-height:none;margin:auto;padding:0;border:0;background:none;overflow:visible;color:var(--foam)}
.wrapped-pop::backdrop{background:rgba(20,12,7,.6);backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.wrapped-pop:focus-visible,.wpop-card:focus{outline:none}
.wpop-card{position:relative;display:flex;isolation:isolate;border-radius:22px;overflow:hidden;background:radial-gradient(120% 70% at 30% 0%,rgba(255,213,138,.14),transparent 60%),linear-gradient(180deg,#24170E,var(--stout));
  box-shadow:0 0 0 1px rgba(255,243,222,.12) inset,0 40px 80px -30px rgba(0,0,0,.9),0 12px 24px -10px rgba(0,0,0,.6);transform:rotate(-1.2deg)}
.wpop-card::after{content:"";position:absolute;inset:0;z-index:2;pointer-events:none;opacity:.34;mix-blend-mode:overlay;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E")}
.wpop-sky{position:absolute;inset:0;z-index:-1;overflow:hidden;pointer-events:none}
.wpop-sky i{position:absolute;width:90%;aspect-ratio:1;border-radius:50%;filter:blur(60px);opacity:.55}
.wpop-sky i:nth-child(1){background:#F2A93B;left:-40%;top:-42%}
.wpop-sky i:nth-child(2){background:#C8392D;right:-50%;top:34%;opacity:.45}
.wpop-sky i:nth-child(3){background:#8F530B;left:-15%;bottom:-45%}
.wpop-rows{position:absolute;inset:-20%;z-index:-1;display:flex;flex-direction:column;justify-content:center;gap:2px;opacity:.05;pointer-events:none;transform:rotate(-8deg)}
.wpop-rows span{white-space:nowrap;font-size:64px;font-weight:800;letter-spacing:-.04em;line-height:.9}
.wpop-rows span:nth-child(even){translate:-30% 0}
.wpop-main{position:relative;z-index:3;flex:1;min-width:0;padding:22px 18px 10px 22px}
.wrapped-pop .wpop-x{position:absolute;top:8px;right:6px;width:44px;height:44px;margin:0;display:grid;place-items:center;color:var(--foam-2);text-decoration:none}
.wpop-x .ico{width:22px;height:22px}
.wpop-tag{display:inline-block;padding:3px 9px;border:1px solid rgba(242,169,59,.7);border-radius:4px;font-size:10.5px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--amber);background:rgba(20,12,7,.3)}
.wpop-year{margin:10px 0 0 -6px;font-family:var(--display);font-size:118px;font-weight:800;letter-spacing:-.075em;line-height:.8;
  background:linear-gradient(180deg,var(--foam) 10%,var(--gold) 55%,var(--amber) 100%);-webkit-background-clip:text;background-clip:text;color:transparent;filter:drop-shadow(0 10px 22px rgba(0,0,0,.45))}
.wrapped-pop h2{margin:14px 0 6px;font-family:var(--display);font-size:25px;font-weight:800;letter-spacing:-.03em;line-height:1.05;text-wrap:balance;color:var(--foam)}
.wrapped-pop p{margin:0;font-size:14.5px;line-height:1.4;color:var(--foam-2);text-wrap:pretty;text-shadow:0 1px 12px rgba(20,12,7,.6)}
.wpop-go{margin-top:18px;display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px;border-radius:999px;background:var(--foam);color:var(--stout);
  font-weight:800;font-size:16px;text-decoration:none;box-shadow:0 12px 28px -12px rgba(0,0,0,.7),0 0 0 1px rgba(255,213,138,.5);transition:transform .15s var(--out)}
.wpop-go span{transition:transform .2s var(--out)}
.wpop-go:active{transform:scale(.97)}
@media (hover:hover){.wpop-go:hover span{transform:translateX(3px)}}
.wpop-go:focus-visible,.wpop-later:focus-visible,.wpop-x:focus-visible{outline:2px solid var(--foam);outline-offset:3px}
.wrapped-pop .wpop-later{display:flex;width:100%;margin:4px 0 0;color:var(--foam-3);font-size:14px;font-weight:600;text-decoration:none}
.wpop-spine{position:relative;z-index:3;flex:0 0 30px;display:flex;flex-direction:column;align-items:center;justify-content:space-between;padding:16px 0 12px;
  background:var(--foil);background-size:100% 220%;color:#3B2415}
.wpop-spine span,.wpop-spine b{writing-mode:vertical-rl;transform:rotate(180deg);font-weight:800;text-transform:uppercase;white-space:nowrap}
.wpop-spine span{font-size:11px;letter-spacing:.14em}
.wpop-spine b{font-size:10px;letter-spacing:.08em}
@media (prefers-reduced-motion:no-preference){
  .wrapped-pop[open] .wpop-card{animation:wpopIn .7s var(--spring) both}
  .wrapped-pop[open]::backdrop{animation:wpopFade .3s ease-out both}
  .wrapped-pop.leaving .wpop-card{animation:wpopOut .22s ease-in both}
  .wrapped-pop.leaving::backdrop{animation:wpopFade .22s ease-in reverse both}
  .wpop-sky i{animation:wpopDrift 16s ease-in-out infinite alternate}
  .wpop-sky i:nth-child(2){animation-duration:20s;animation-delay:-5s}
  .wpop-sky i:nth-child(3){animation-duration:24s;animation-delay:-9s}
  .wpop-spine{animation:wpopFoil 6s ease-in-out infinite alternate}
  .wpop-year{animation:wpopYear .9s .15s var(--spring) both}
}
@keyframes wpopIn{from{opacity:0;transform:translateY(60px) rotate(6deg) scale(.9)}}
@keyframes wpopOut{to{opacity:0;transform:translateY(30px) rotate(2deg) scale(.94)}}
@keyframes wpopFade{from{opacity:0}}
@keyframes wpopYear{from{opacity:0;transform:translateY(24px) scale(.92)}}
@keyframes wpopDrift{to{transform:translate(14%,10%) scale(1.15)}}
@keyframes wpopFoil{to{background-position:0 100%}}
