/* RoomCast iOS 26 — immersive interpretation
   Content owns the canvas. Glass is reserved for controls and navigation. */

:root {
  --canvas: #f6f8fc;
  --canvas-deep: #e4ecfa;
  --surface: #ffffff;
  --surface-raised: rgba(255,255,255,.9);
  --surface-soft: #edf2f8;
  --label: #10141c;
  --label-2: #596273;
  --label-3: #8690a1;
  --separator: rgba(51,65,88,.12);
  --blue: #0878f9;
  --blue-deep: #065fd2;
  --blue-soft: #e5f1ff;
  --indigo: #6557ec;
  --indigo-soft: #eeebff;
  --mint: #16a982;
  --mint-soft: #def7ee;
  --green: #168b50;
  --green-soft: #e2f6e9;
  --orange: #c76c0a;
  --orange-soft: #fff0d9;
  --red: #dd3549;
  --red-soft: #ffe8ed;
  --control-glass: rgba(248,251,255,.58);
  --glass-border: rgba(255,255,255,.72);
  --shadow: 0 24px 70px rgba(32,49,80,.13), 0 3px 12px rgba(32,49,80,.05);
}

html[data-theme="dark"] {
  --canvas: #05070b;
  --canvas-deep: #0a1322;
  --surface: #141921;
  --surface-raised: rgba(23,29,39,.9);
  --surface-soft: #1b2330;
  --label: #f7f9fd;
  --label-2: #adb7c7;
  --label-3: #778397;
  --separator: rgba(223,234,252,.13);
  --blue: #51a2ff;
  --blue-deep: #187ee9;
  --blue-soft: #102f52;
  --indigo: #968dff;
  --indigo-soft: #28234d;
  --mint: #4bd7ae;
  --mint-soft: #113a2f;
  --green: #4bd17c;
  --green-soft: #113621;
  --orange: #ffb44a;
  --orange-soft: #3d2a13;
  --red: #ff6573;
  --red-soft: #421920;
  --control-glass: rgba(23,29,39,.64);
  --glass-border: rgba(255,255,255,.15);
  --shadow: 0 28px 78px rgba(0,0,0,.5), 0 3px 14px rgba(0,0,0,.26);
}

body {
  background:
    radial-gradient(circle at 20% 88%, color-mix(in srgb, var(--blue) 22%, transparent), transparent 34%),
    radial-gradient(circle at 78% 92%, color-mix(in srgb, var(--indigo) 18%, transparent), transparent 32%),
    #d8dee9;
}

.device {
  background:
    radial-gradient(145% 70% at 84% -8%, color-mix(in srgb, var(--indigo) 13%, transparent), transparent 52%),
    radial-gradient(120% 60% at -10% 18%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 50%),
    var(--canvas);
}

.ambient {
  inset: -110px -80px auto;
  width: auto;
  height: 520px;
  background:
    radial-gradient(circle at 30% 22%, color-mix(in srgb, var(--blue) 28%, transparent), transparent 36%),
    radial-gradient(circle at 76% 38%, color-mix(in srgb, var(--indigo) 21%, transparent), transparent 38%),
    radial-gradient(circle at 55% 70%, color-mix(in srgb, var(--mint) 10%, transparent), transparent 38%);
  filter: blur(48px);
  opacity: .58;
}

.topbar {
  height: 98px;
  padding: 43px 18px 9px;
}

.topbar-title {
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -.018em;
  transition: opacity 160ms ease, transform 220ms cubic-bezier(.2,.8,.2,1);
}

body:has(.page[data-page="materials"].active) .topbar-title,
body:has(.page[data-page="rooms"].active) .topbar-title {
  opacity: 0;
  transform: translateY(-4px);
}

.icon-button {
  width: 42px;
  height: 42px;
  background: var(--control-glass);
  border: .5px solid var(--glass-border);
  box-shadow:
    0 9px 24px rgba(32,48,75,.1),
    inset 0 1px rgba(255,255,255,.38);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
}

.page {
  padding: 110px 16px 126px;
}

.page[data-page="home"] > .eyebrow,
.page[data-page="home"] > h2,
.page[data-page="home"] > .subcopy {
  margin-left: 4px;
  margin-right: 4px;
}

.eyebrow {
  margin-bottom: 9px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .045em;
}

h2 {
  max-width: 350px;
  font-size: 39px;
  line-height: 1.06;
  font-weight: 780;
  letter-spacing: -.055em;
}

.subcopy {
  color: var(--label-2);
  font-size: 15px;
  line-height: 1.48;
}

.hero {
  min-height: 248px;
  margin-top: 26px;
  padding: 24px;
  border-radius: 34px;
  border: .5px solid color-mix(in srgb, var(--blue) 12%, var(--separator));
  background:
    radial-gradient(110% 90% at 106% 108%, color-mix(in srgb, var(--blue) 28%, transparent), transparent 55%),
    radial-gradient(90% 70% at 0% 0%, color-mix(in srgb, var(--indigo) 12%, transparent), transparent 54%),
    color-mix(in srgb, var(--surface) 94%, var(--blue-soft));
  box-shadow:
    0 1px 0 rgba(255,255,255,.62) inset,
    0 20px 55px rgba(32,49,79,.1);
}

html.dark .hero {
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 1px 0 rgba(255,255,255,.08) inset, 0 22px 58px rgba(0,0,0,.3);
}

.hero::after {
  width: 250px;
  height: 250px;
  right: -94px;
  bottom: -112px;
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--blue) 34%, transparent), transparent 63%);
  filter: blur(2px);
}

.hero .status-row,
.hero p { position: relative; z-index: 2; }

.hero-label {
  font-size: 13px;
  font-weight: 760;
  letter-spacing: .02em;
}

.hero-count {
  margin-top: 16px;
  font-size: 62px;
  font-weight: 790;
  letter-spacing: -.068em;
}

.hero-count small {
  font-size: 16px;
  font-weight: 650;
}

.status-mark {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
  border-radius: 24px;
  border: .5px solid color-mix(in srgb, currentColor 17%, transparent);
  background: color-mix(in srgb, currentColor 11%, var(--control-glass));
  box-shadow: inset 0 1px rgba(255,255,255,.38), 0 8px 22px rgba(33,47,73,.08);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.hero p {
  max-width: 252px;
  margin-top: 15px;
  font-size: 14px;
}

.hero-progress-track {
  left: 24px;
  right: 24px;
  bottom: 18px;
  height: 5px;
  padding: 1px;
  background: color-mix(in srgb, var(--label) 9%, transparent);
}

.hero-progress { height: 3px; }

.section-head {
  margin: 28px 4px 11px;
}

.section-head h3 {
  font-size: 18px;
  font-weight: 730;
}

.notice {
  min-height: 72px;
  padding: 15px 16px;
  border-radius: 23px;
  border: .5px solid var(--separator);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  box-shadow: 0 9px 28px rgba(35,49,75,.055);
}

.notice-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 14px;
}

.notice-copy strong { font-weight: 680; }

.screen-title {
  margin: 0 4px 23px;
}

.screen-title .screen-destination-title {
  position: static;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  margin-bottom: 8px;
  font-size: 42px;
}

.screen-title .subcopy { margin: 0; }

.primary-button {
  height: 56px;
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.14), transparent),
    linear-gradient(135deg, var(--blue), var(--blue-deep));
  border: .5px solid rgba(255,255,255,.38);
  box-shadow: 0 13px 28px color-mix(in srgb, var(--blue) 24%, transparent), inset 0 1px rgba(255,255,255,.3);
}

.group-label {
  margin: 29px 6px 11px;
  font-size: 12px;
  font-weight: 720;
  letter-spacing: .02em;
}

.list {
  display: grid;
  gap: 10px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.material-row {
  min-height: 94px;
  padding: 11px 14px;
  border: .5px solid var(--separator);
  border-radius: 25px;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: 0 9px 28px rgba(34,48,75,.05);
}

.material-row + .material-row::before { display: none; }
.row-selection-surface { inset: 0; border-radius: inherit; background: transparent; }

.doc-cover {
  width: 52px;
  height: 66px;
  flex-basis: 52px;
  padding: 10px 9px;
  border-radius: 15px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--blue) 85%, white), var(--blue-deep));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--blue) 23%, transparent), inset 0 1px rgba(255,255,255,.28);
}

.doc-cover.orange {
  background: linear-gradient(150deg, #ffbd52, #dd7208);
  box-shadow: 0 10px 22px rgba(210,112,10,.2), inset 0 1px rgba(255,255,255,.25);
}

.doc-cover.green {
  background: linear-gradient(150deg, #54d99b, #178557);
  box-shadow: 0 10px 22px rgba(22,139,82,.18), inset 0 1px rgba(255,255,255,.25);
}

.status-pill {
  border: .5px solid color-mix(in srgb, currentColor 16%, transparent);
  font-weight: 720;
}

.room-summary {
  position: relative;
  overflow: hidden;
  min-height: 300px;
  padding: 26px;
  border-radius: 34px;
  border: .5px solid color-mix(in srgb, var(--indigo) 14%, var(--separator));
  background:
    radial-gradient(100% 80% at 100% 100%, color-mix(in srgb, var(--indigo) 28%, transparent), transparent 58%),
    radial-gradient(90% 80% at 0% 0%, color-mix(in srgb, var(--mint) 13%, transparent), transparent 55%),
    var(--surface);
  box-shadow: 0 20px 56px rgba(35,48,78,.09);
}

.room-summary h2 { font-size: 31px !important; }

.people { margin-top: 28px; }
.avatar { width: 46px; height: 46px; border-width: 3px; }

.room-stats {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  gap: 8px;
}

.room-stat {
  padding: 15px 16px;
  border: .5px solid rgba(255,255,255,.22);
  border-radius: 20px;
  background: var(--control-glass);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}

.settings-list {
  margin-top: 14px;
  border: .5px solid var(--separator);
  border-radius: 25px;
  background: color-mix(in srgb, var(--surface) 91%, transparent);
  box-shadow: 0 9px 30px rgba(34,48,75,.045);
}

.settings-row { min-height: 59px; }

.detail {
  padding: 108px 16px 40px;
  background:
    radial-gradient(110% 60% at 82% 0%, color-mix(in srgb, var(--indigo) 16%, transparent), transparent 54%),
    var(--canvas);
}

.detail-top { top: 43px; left: 12px; right: 14px; }

.detail-top .back-button {
  width: auto;
  min-width: 78px;
  padding: 0 14px;
  display: flex;
  justify-content: center;
  white-space: nowrap;
}

.detail-header {
  min-height: 190px;
  padding: 24px;
  border-radius: 34px;
}

.detail-header-surface {
  background:
    radial-gradient(90% 100% at 100% 100%, color-mix(in srgb, var(--blue) 22%, transparent), transparent 62%),
    var(--surface);
  box-shadow: 0 20px 58px rgba(33,48,78,.1);
}

.detail-cover {
  width: 96px;
  height: 126px;
  flex-basis: 96px;
  border-radius: 22px;
}

.detail-facts {
  border: .5px solid var(--separator);
  border-radius: 25px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.tabbar-wrap {
  left: 30px;
  right: 30px;
  bottom: max(13px, env(safe-area-inset-bottom));
  height: 70px;
  border-radius: 35px;
}

#tabbar-shell > .liquid-glass-tint { background: rgba(255,255,255,.34); }
html.dark #tabbar-shell > .liquid-glass-tint { background: rgba(27,32,40,.58); }

.tabbar-highlight {
  top: 8px;
  width: calc((100% - 14px)/3 - 18px);
  height: 54px;
  border-radius: 27px;
}

.tabbar-lens-copy { top: -8px; }
.tab { gap: 2px; font-size: 9.5px; }
.tab svg { width: 22px; height: 22px; }

.sheet {
  left: 11px;
  right: 11px;
  bottom: 11px;
  padding-left: 20px;
  padding-right: 20px;
  border-radius: 34px;
}

#sheet .sheet-surface > .liquid-glass-tint { background: rgba(248,250,254,.82); }
html.dark #sheet .sheet-surface > .liquid-glass-tint { background: rgba(25,30,38,.79); }

.theme-choice button {
  height: 100px;
  border-radius: 23px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.sheet-note { border-radius: 20px; }

@media (max-width: 360px) {
  h2 { font-size: 35px; }
  .hero-count { font-size: 56px; }
  .tabbar-wrap { left: 22px; right: 22px; }
}

@media (prefers-contrast: more) {
  :root { --separator: rgba(40,48,63,.3); }
  html[data-theme="dark"] { --separator: rgba(238,243,252,.28); }
  .notice, .material-row, .room-summary, .settings-list, .detail-facts { border-width: 1px; }
}
