/* WROUGHT's public utility pages share the same room as the product. Their
   local CSS still owns layout and behaviour; this layer owns atmosphere,
   surface depth, touch feedback and the iPhone frame. */
html { color-scheme: dark; }
body.wrought-shell {
  min-height: 100vh;
  background:
    radial-gradient(900px 600px at 92% -8%, rgba(242,100,25,.14), transparent 66%),
    radial-gradient(700px 560px at -10% 38%, rgba(91,144,176,.065), transparent 67%),
    #14110F;
  color: #F7F3EE;
  overflow-x: hidden;
}
body.wrought-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}
body.wrought-shell a { text-underline-offset: 3px; }
body.wrought-shell :focus-visible { outline: 2px solid #F5A623; outline-offset: 3px; }

body.reading-shell {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
body.reading-shell .wrap { max-width: 820px; }
body.reading-shell header { padding-top: calc(48px + env(safe-area-inset-top)); }
body.reading-shell h1 { color: #F7F3EE; letter-spacing: -.035em; }
body.reading-shell h2 { color: #F7F3EE; font-size: clamp(20px, 3vw, 25px); letter-spacing: -.025em; }
body.reading-shell p,
body.reading-shell li { color: #A79A90; }
body.reading-shell .say,
body.reading-shell .box {
  border-color: rgba(255,255,255,.07);
  border-radius: 17px;
  background: linear-gradient(145deg, rgba(45,37,33,.94), rgba(24,20,18,.97));
  box-shadow: 0 22px 44px -38px #000, 0 1px 0 rgba(255,255,255,.055) inset;
}
body.reading-shell .say { border-left: 3px solid #F26419; }
body.reading-shell table { border-collapse: separate; border-spacing: 0; overflow: hidden; }
body.reading-shell footer { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }

body.setup-shell .wrap { max-width: 880px; }
body.setup-shell header { padding-top: calc(48px + env(safe-area-inset-top)); }
body.setup-shell .panel,
body.setup-shell .note {
  border-color: rgba(255,255,255,.075);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(45,37,33,.95), rgba(24,20,18,.98));
  box-shadow: 0 24px 48px -40px #000, 0 1px 0 rgba(255,255,255,.055) inset;
}
body.setup-shell input,
body.setup-shell button,
body.auth-shell input,
body.auth-shell button { min-height: 46px; border-radius: 12px; }
body.setup-shell button:not(.ghost),
body.auth-shell button:not(.oauth) {
  background: linear-gradient(135deg, #F5A623, #F26419);
  box-shadow: 0 15px 28px -20px rgba(242,100,25,.9);
}

body.auth-shell { padding-top: calc(24px + env(safe-area-inset-top)); padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
body.auth-shell .mark img { box-shadow: 0 16px 30px -16px rgba(242,100,25,.9); }
body.auth-shell .card {
  border-color: rgba(255,255,255,.085);
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(46,38,34,.97), rgba(22,18,17,.99));
  box-shadow: 0 38px 72px -42px #000, 0 1px 0 rgba(255,255,255,.07) inset;
}

body.handoff-shell .card {
  border-color: rgba(255,255,255,.08);
  border-radius: 19px;
  background: linear-gradient(145deg, rgba(45,37,33,.96), rgba(23,19,17,.98));
  box-shadow: 0 24px 50px -38px #000, 0 1px 0 rgba(255,255,255,.06) inset;
}
body.handoff-shell { padding-top: calc(26px + env(safe-area-inset-top)); }
body.handoff-shell .go { background: linear-gradient(135deg, #F5A623, #F26419); box-shadow: 0 18px 32px -22px rgba(242,100,25,.95); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
