/* Monte Switch Experience: quiet, architectural, hairline. */
:root {
  --ink: 28 27 25;
  --paper: 245 242 237;
  --accent: #9a7c52;
  --r: 16px;
  --ease: cubic-bezier(.22, .8, .16, 1);
  --gut: 28px;
  /* notch / home indicator: horizontal gutters grow into the safe area in landscape */
  --gx: max(var(--gut), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
  --font: 'Inter Tight', 'Vazirmatn', system-ui, sans-serif;
  color-scheme: light;
}
/* derived tokens live on body so the night override of --ink / --paper flows into them */
body {
  --fg: rgb(var(--ink));
  --muted: rgb(var(--ink) / .62);
  --faint: rgb(var(--ink) / .42);
  --line: rgb(var(--ink) / .13);
  --glass: rgb(var(--paper) / .66);
  --glass-strong: rgb(var(--paper) / .9);
}
body[data-light="night"] {
  --ink: 236 230 220;
  --paper: 22 21 20;
  --glass: rgb(var(--paper) / .58);
  --glass-strong: rgb(var(--paper) / .92);
  --accent: #d1b27f;
  color-scheme: dark;
}
html[dir="rtl"] { --font: 'Vazirmatn', 'Inter Tight', system-ui, sans-serif; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body {
  background: #d6d0c7; color: var(--fg);
  font: 400 13px/1.5 var(--font); letter-spacing: .005em;
  -webkit-font-smoothing: antialiased; transition: color .8s var(--ease);
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none; -webkit-text-size-adjust: 100%; text-size-adjust: 100%;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
/* the outline follows each control's own radius (pills stay pills) */
button:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 1px solid var(--accent); outline-offset: 3px; }
a.brand:focus-visible { border-radius: 6px; }
button:focus:not(:focus-visible) { outline: none; }
kbd { font: 500 9px/1 var(--font); color: var(--faint); border: 1px solid var(--line); border-radius: 4px; padding: 3px 4px; }

#stage { position: fixed; inset: 0; width: 100%; height: 100%; display: block; outline: none; }
#overlay { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
#labels { position: fixed; inset: 0; pointer-events: none; z-index: 3; }

.logo {
  display: inline-block; height: 20px; aspect-ratio: 1642 / 918; background: currentColor;
  -webkit-mask: url(../assets/logo-monte.png) center / contain no-repeat; mask: url(../assets/logo-monte.png) center / contain no-repeat;
}
.logo.big { height: 46px; }

.eyebrow { font-size: 10px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
html[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 11px; }

/* ui reveal */
.ui { opacity: 0; transform: translateY(10px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
body.ready .ui { opacity: 1; transform: none; }
body.ready .models { transition-delay: .15s; } body.ready .info { transition-delay: .3s; }
body.ready .dock { transition-delay: .45s; } body.ready .actions, body.ready .summary { transition-delay: .6s; }
body.ready .hint { transition-delay: .9s; }
body.inside .info { opacity: 0 !important; pointer-events: none; transition-delay: 0s !important; }
body.flush .dock, body.flush .models, body.flush .info .desc, body.flush .info .row, body.flush .hint {
  opacity: 0 !important; pointer-events: none; transition-delay: 0s !important;
}
body.inside .dock { opacity: 0 !important; pointer-events: none; transform: translateY(16px) !important; transition-delay: 0s !important; }
body.silence .ui, body.inside .hint { opacity: 0 !important; pointer-events: none; transform: translateY(6px); transition-delay: 0s !important; }

.glass {
  background: var(--glass); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
}

/* ------------------------------------------------------------ top */
.top {
  position: fixed; z-index: 10; top: var(--st); inset-inline: 0; height: 72px;
  display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gx);
}
.brand { display: flex; align-items: center; gap: 14px; color: var(--fg); text-decoration: none; }
.brand-sub { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); padding-inline-start: 14px; border-inline-start: 1px solid var(--line); line-height: 20px; }
html[dir="rtl"] .brand-sub { letter-spacing: 0; font-size: 12px; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: color .3s, background .3s; }
.icon-btn:hover { color: var(--fg); background: rgb(var(--ink) / .06); }
#sound .mute { display: block; } #sound .wave { display: none; }
#sound[aria-pressed="true"] .mute { display: none; } #sound[aria-pressed="true"] .wave { display: block; }
.lang { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 11px; letter-spacing: .1em; color: var(--muted); }
.lang i { width: 1px; height: 12px; background: var(--line); }
.lang span { transition: color .3s; }
html[lang="en"] .lang [data-l="en"], html[lang="fa"] .lang [data-l="fa"] { color: var(--fg); }

/* ------------------------------------------------------------ model index */
.models {
  position: fixed; z-index: 6; top: 50%; inset-inline-start: var(--gx); translate: 0 -50%;
  display: flex; flex-direction: column; gap: 18px; width: 200px;
}
body.ready .models { transform: none; }
.series-group { display: flex; flex-direction: column; gap: 1px; }
.series-group .eyebrow { margin-bottom: 6px; font-size: 9px; color: var(--faint); }
.m-item {
  display: flex; align-items: baseline; gap: 10px; padding: 3px 0; text-align: start;
  color: var(--muted); transition: color .35s var(--ease);
}
.m-item .n { font-size: 9px; color: var(--faint); font-variant-numeric: tabular-nums; width: 14px; }
.m-item .bar { width: 0; height: 1px; background: currentColor; align-self: center; transition: width .5s var(--ease); }
.m-item .nm { font-size: 13px; letter-spacing: .02em; transition: transform .5s var(--ease); }
.m-item:hover { color: var(--fg); }
.m-item:hover .bar { width: 10px; }
.m-item[aria-current="true"] { color: var(--fg); }
.m-item[aria-current="true"] .bar { width: 26px; }
.m-item[aria-current="true"] .nm { font-weight: 500; }

.peek {
  position: fixed; z-index: 7; margin: 0; width: 190px; pointer-events: none;
  inset-inline-start: 236px; top: 0; opacity: 0; transform: translateX(-8px) scale(.98);
  transition: opacity .35s var(--ease), transform .45s var(--ease);
}
html[dir="rtl"] .peek { transform: translateX(8px) scale(.98); }
.peek.on { opacity: 1; transform: none !important; }
.peek img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; border-radius: 10px; box-shadow: 0 24px 60px -24px rgb(0 0 0 / .45); }
.peek figcaption { margin-top: 8px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ------------------------------------------------------------ info */
.info {
  position: fixed; z-index: 6; top: calc(92px + var(--st)); inset-inline-end: var(--gx); width: 316px;
  display: flex; flex-direction: column; gap: 10px;
}
.info .head { display: flex; justify-content: space-between; align-items: baseline; }
.info .idx { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; letter-spacing: .1em; }
.info h1 {
  margin: 2px 0 0; font-weight: 200; font-size: clamp(34px, 4.2vw, 58px); line-height: .95;
  letter-spacing: .08em; text-transform: uppercase; overflow: hidden;
}
.info h1 .ch { display: inline-block; }
.info .tag { margin: 4px 0 0; font-size: 16px; font-weight: 300; line-height: 1.35; }
.info .desc { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.6; max-width: 300px; }
html[dir="rtl"] .info .desc { font-size: 13px; line-height: 1.9; }
html[dir="rtl"] .info h1 { letter-spacing: .04em; }
.info .row { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.photo-btn { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
html[dir="rtl"] .photo-btn { letter-spacing: 0; font-size: 11px; }
.photo-btn img { width: 40px; height: 52px; object-fit: cover; border-radius: 6px; transition: transform .5s var(--ease); }
.photo-btn:hover { color: var(--fg); } .photo-btn:hover img { transform: scale(1.06); }
.spec-btn { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
html[dir="rtl"] .spec-btn { letter-spacing: 0; font-size: 11px; }
.spec-btn:hover { color: var(--fg); }
.spec-btn .pm { width: 9px; height: 9px; position: relative; }
.spec-btn .pm::before, .spec-btn .pm::after { content: ''; position: absolute; inset: 4px 0 auto; height: 1px; background: currentColor; transition: transform .4s var(--ease); }
.spec-btn .pm::after { transform: rotate(90deg); }
.spec-btn[aria-expanded="true"] .pm::after { transform: rotate(0); }
.specs { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease); }
.specs.on { grid-template-rows: 1fr; }
.specs > div { overflow: hidden; }
.specs dl { margin: 6px 0 0; padding: 12px 14px; border-radius: 12px; }
.specs dl div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 11.5px; }
.specs dl div:last-child { border: 0; }
.specs dt { color: var(--muted); } .specs dd { margin: 0; }

/* ------------------------------------------------------------ actions */
.actions {
  position: fixed; z-index: 6; inset-inline-start: var(--gx); bottom: calc(30px + var(--sb));
  display: flex; gap: 6px;
}
.act {
  display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 10px; border-radius: 99px;
  color: var(--muted); border: 1px solid transparent; transition: color .3s, border-color .3s, background .3s;
}
.act:hover { color: var(--fg); border-color: var(--line); }
.act[aria-pressed="true"] { color: var(--fg); border-color: rgb(var(--ink) / .3); background: var(--glass); }
.act kbd { display: none; }
@media (hover: hover) and (pointer: fine) { .act:hover kbd { display: inline; } }
.ico { width: 16px; height: 16px; position: relative; flex: none; }
.ico-open { border: 1px solid currentColor; border-radius: 1px; }
.ico-open::after { content: ''; position: absolute; inset: -1px auto -1px -1px; width: 7px; background: currentColor; opacity: .25; transform-origin: left; transition: transform .6s var(--ease); }
.act[aria-pressed="true"] .ico-open::after { transform: perspective(30px) rotateY(-55deg); opacity: .5; }
.ico-inside::before, .ico-inside::after { content: ''; position: absolute; width: 10px; height: 13px; border: 1px solid currentColor; top: 1px; }
.ico-inside::before { left: 0; } .ico-inside::after { left: 5px; top: 3px; background: var(--glass-strong); }
.ico-flush::before { content: ''; position: absolute; inset: 7px 0 auto; height: 1px; background: currentColor; }
.ico-flush::after { content: ''; position: absolute; left: 7px; top: 1px; bottom: 1px; width: 1px; background: currentColor; }
.ico-silence { border: 1px solid currentColor; border-radius: 50%; }
.ico-silence::after { content: ''; position: absolute; left: 7px; top: 3px; bottom: 3px; width: 1px; background: currentColor; }

.hint {
  position: fixed; z-index: 5; inset-inline-start: var(--gx); bottom: calc(76px + var(--sb)); margin: 0;
  font-size: 10.5px; letter-spacing: .06em; color: var(--faint);
}
body.touched .hint { opacity: 0 !important; transition-delay: 0s !important; }

/* ------------------------------------------------------------ dock */
.dock {
  position: fixed; z-index: 6; bottom: calc(22px + var(--sb)); left: 50%; width: min(720px, calc(100vw - 2 * 390px));
  min-width: 520px; translate: -50% 0;
  border-radius: 22px; padding: 6px 6px 8px;
}
.tabs { display: flex; position: relative; padding: 0 8px; }
.tab {
  flex: 1; display: flex; gap: 7px; align-items: baseline; justify-content: center; height: 40px;
  color: var(--muted); font-size: 12px; letter-spacing: .02em; transition: color .3s;
}
.tab i { font-style: normal; font-size: 9px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tab:hover, .tab[aria-selected="true"] { color: var(--fg); }
.tabs .ink { position: absolute; bottom: 4px; height: 1px; background: var(--fg); transition: left .55s var(--ease), width .55s var(--ease); }
.panel {
  position: relative; border-top: 1px solid var(--line); margin: 0 4px; padding: 14px 10px 6px;
  min-height: 104px; display: flex; gap: 22px; align-items: flex-start;
  overflow-x: auto; scrollbar-width: none;
}
.panel::-webkit-scrollbar { display: none; }
/* contents rise in on a new tab or model only, never on a plain re-render after a pick */
.panel.fresh > * { animation: rise .55s var(--ease) both; }
.panel.fresh > *:nth-child(2) { animation-delay: .04s; } .panel.fresh > *:nth-child(3) { animation-delay: .08s; } .panel.fresh > *:nth-child(4) { animation-delay: .12s; } .panel.fresh > *:nth-child(5) { animation-delay: .16s; }
.panel { overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.grp { display: flex; flex-direction: column; gap: 9px; flex: none; }
.grp > .eyebrow { font-size: 9px; color: var(--faint); white-space: nowrap; }
.sw-row { display: flex; gap: 8px; }
.sw {
  width: 38px; height: 38px; border-radius: 50%; position: relative; flex: none;
  background: center / cover no-repeat; box-shadow: inset 0 0 0 1px rgb(0 0 0 / .08);
  transition: transform .45s var(--ease), background-color .3s;
}
.sw::after { content: ''; position: absolute; inset: -5px; border-radius: 50%; border: 1px solid transparent; transition: border-color .35s, inset .45s var(--ease); }
@media (hover: hover) { .sw:hover { transform: translateY(-3px); } }
.sw[aria-checked="true"]::after { border-color: var(--fg); inset: -4px; }
.sw .tip {
  position: absolute; bottom: calc(100% + 10px); left: 50%; translate: -50% 4px; white-space: nowrap; pointer-events: none;
  font-size: 10.5px; padding: 5px 9px; border-radius: 8px; background: var(--glass-strong); border: 1px solid var(--line);
  opacity: 0; transition: opacity .25s, translate .35s var(--ease);
}
@media (hover: hover) and (pointer: fine) { .sw:hover .tip { opacity: 1; translate: -50% 0; } }
.sw.dim { opacity: .35; }
.cur { font-size: 11.5px; color: var(--fg); white-space: nowrap; }
.cur small { display: block; color: var(--muted); font-size: 10px; }

.seg { display: flex; border: 1px solid var(--line); border-radius: 99px; padding: 3px; position: relative; flex: none; }
.seg button { position: relative; z-index: 1; height: 30px; padding: 0 13px; border-radius: 99px; font-size: 11.5px; color: var(--muted); white-space: nowrap; transition: color .3s; }
.seg button[aria-checked="true"] { color: rgb(var(--paper)); }
.seg .pill { position: absolute; top: 3px; bottom: 3px; border-radius: 99px; background: var(--fg); transition: left .5s var(--ease), width .5s var(--ease); }

.tgl { display: flex; align-items: center; gap: 12px; text-align: start; max-width: 260px; }
.tgl .track { width: 34px; height: 20px; border-radius: 99px; border: 1px solid rgb(var(--ink) / .3); position: relative; flex: none; transition: background .4s var(--ease), border-color .4s; }
.tgl .track::after { content: ''; position: absolute; top: 3px; inset-inline-start: 3px; width: 12px; height: 12px; border-radius: 50%; background: var(--fg); transition: inset-inline-start .45s var(--ease), background .4s; }
.tgl[aria-checked="true"] .track { background: var(--fg); border-color: var(--fg); }
.tgl[aria-checked="true"] .track::after { inset-inline-start: 17px; background: rgb(var(--paper)); }
.tgl b { display: block; font-weight: 500; font-size: 12px; }
.tgl small { display: block; color: var(--muted); font-size: 10.5px; line-height: 1.45; }
.note { font-size: 11px; color: var(--muted); max-width: 230px; line-height: 1.55; flex: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; white-space: nowrap; }
.chip::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.chips { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }

/* sliders */
.sl { flex: 1; min-width: 210px; display: flex; flex-direction: column; gap: 6px; user-select: none; }
.sl .top-row { display: flex; justify-content: space-between; align-items: baseline; }
.sl .val { font-size: 22px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.sl .val small { font-size: 10px; color: var(--muted); margin-inline-start: 4px; letter-spacing: .1em; }
.sl .trk { position: relative; height: 26px; cursor: ew-resize; touch-action: none; }
.sl .rail { position: absolute; inset: 12px 0 auto; height: 1px; background: var(--line); }
.sl .ticks { position: absolute; inset: 8px 0 auto; height: 9px; opacity: .55;
  background: repeating-linear-gradient(to right, rgb(var(--ink) / .25) 0 1px, transparent 1px var(--tick, 10%)); }
html[dir="rtl"] .sl .ticks { background: repeating-linear-gradient(to left, rgb(var(--ink) / .25) 0 1px, transparent 1px var(--tick, 10%)); }
.sl .fill { position: absolute; inset-inline-start: 0; top: 12px; height: 1px; background: var(--fg); }
.sl .std { position: absolute; top: 2px; width: 1px; height: 21px; background: var(--accent); }
.sl .std::after { content: attr(data-l); position: absolute; top: -13px; left: 50%; translate: -50% 0; font-size: 8.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.sl .knob { position: absolute; top: 5px; width: 15px; height: 15px; margin-inline-start: -7.5px; border-radius: 50%; background: rgb(var(--paper)); border: 1px solid var(--fg); transition: transform .3s var(--ease); }
.sl .trk:active .knob { transform: scale(1.25); }
.sl .ends { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
.sl .ends .mx { transition: color .4s; }
.sl.grew .ends .mx { color: var(--accent); }
.sl .ends .mx::after { content: ' →'; opacity: 0; transition: opacity .3s; }
html[dir="rtl"] .sl .ends .mx::after { content: ' ←'; }
.sl.at-max .ends .mx::after { opacity: 1; }

/* ------------------------------------------------------------ summary + drawer */
.summary {
  position: fixed; z-index: 6; inset-inline-end: var(--gx); bottom: calc(30px + var(--sb)); height: 44px;
  display: flex; align-items: center; gap: 12px; padding: 0 16px 0 18px; border-radius: 99px;
  background: var(--fg); color: rgb(var(--paper));
  transition: transform .5s var(--ease), box-shadow .5s, opacity .9s var(--ease) !important;
  box-shadow: 0 16px 40px -18px rgb(0 0 0 / .5);
}
@media (hover: hover) { .summary:hover { transform: translateY(-2px); } }
.summary .s-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; opacity: .65; }
html[dir="rtl"] .summary .s-label { letter-spacing: 0; }
.summary .s-code { font-size: 12px; font-variant-numeric: tabular-nums; letter-spacing: .06em; direction: ltr; }
html[dir="rtl"] .summary svg { transform: scaleX(-1); }

.drawer { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
.drawer::before { content: ''; position: absolute; inset: 0; background: rgb(10 10 9 / .28); opacity: 0; transition: opacity .6s var(--ease); }
.drawer.on { pointer-events: auto; }
.drawer.on::before { opacity: 1; }
.drawer-in {
  position: absolute; top: calc(12px + var(--st)); bottom: calc(12px + var(--sb)); inset-inline-end: max(12px, env(safe-area-inset-right, 0px)); width: min(420px, calc(100vw - 24px));
  overscroll-behavior: contain;
  border-radius: 22px; background: var(--glass-strong); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(30px); backdrop-filter: blur(30px);
  transform: translateX(calc(100% + 24px)); transition: transform .75s var(--ease);
  overflow-y: auto; padding: 26px 26px 22px; display: flex; flex-direction: column; gap: 18px;
}
html[dir="rtl"] .drawer-in { transform: translateX(calc(-100% - 24px)); }
.drawer.on .drawer-in { transform: none; }
.drawer .x { position: absolute; top: 18px; inset-inline-end: 18px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; }
.drawer h2 { margin: 0; font-weight: 200; font-size: 34px; letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
.drawer .code { font-size: 11px; letter-spacing: .14em; color: var(--muted); direction: ltr; text-align: start; }
.drawer .shot { width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 14px; background: rgb(var(--ink) / .06); display: block; opacity: 0; transition: opacity .5s var(--ease); }
.drawer .shot.in { opacity: 1; }
.cta [hidden] { display: none; }
.drawer dl { margin: 0; }
.drawer dl div { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.drawer dt { color: var(--muted); } .drawer dd { margin: 0; }
.drawer .h3 { margin: 6px 0 -6px; }
.cta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: auto; }
.cta a, .cta button { height: 46px; border-radius: 99px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; letter-spacing: .04em; border: 1px solid var(--line); color: var(--fg); text-decoration: none; transition: background .3s, border-color .3s; }
.cta a:hover, .cta button:hover { border-color: rgb(var(--ink) / .4); }
.cta .primary { grid-column: 1 / -1; background: var(--fg); color: rgb(var(--paper)); border-color: var(--fg); }
.cta .primary:hover { background: rgb(var(--ink) / .85); }

/* ------------------------------------------------------------ overlays */
.dim-l { stroke: rgb(var(--ink) / .55); stroke-width: 1; fill: none; }
.dim-t { fill: var(--fg); font: 400 11px var(--font); letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.lead { stroke: rgb(var(--ink) / .45); stroke-width: 1; fill: none; }
.lead-dot { fill: var(--fg); }
.lbl { position: absolute; left: 0; top: 0; padding: 6px 10px; border-radius: 10px; white-space: nowrap; transition: opacity .4s; }
.lbl b { display: block; font-weight: 500; font-size: 11.5px; }
.lbl span { display: block; font-size: 10.5px; color: var(--muted); }
.lbl.hw b::before { content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); margin-inline-end: 6px; vertical-align: 1px; }
.inside-title { position: fixed; z-index: 5; bottom: 44px; left: 50%; translate: -50% 0; text-align: center; opacity: 0; transition: opacity .6s; pointer-events: none; }
body.inside .inside-title { opacity: 1; }

.flushnote {
  position: fixed; z-index: 8; inset-inline-start: var(--gx); bottom: calc(96px + var(--sb)); pointer-events: none; padding: 0;
  opacity: 0; transition: opacity .5s var(--ease); max-width: 240px;
}
.flushnote.on { opacity: 1; }
.flushnote b { display: block; font-weight: 200; font-size: 64px; line-height: 1; letter-spacing: .02em; }
.flushnote span { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); }

.toast {
  position: fixed; z-index: 40; top: calc(84px + var(--st)); left: 50%; translate: -50% -8px; padding: 10px 16px; border-radius: 99px;
  background: var(--fg); color: rgb(var(--paper)); font-size: 12px; opacity: 0; pointer-events: none;
  transition: opacity .4s var(--ease), translate .5s var(--ease); max-width: calc(100vw - 32px); text-align: center; overflow-wrap: anywhere;
}
.toast.on { opacity: 1; translate: -50% 0; }
.silence-hint {
  position: fixed; z-index: 9; bottom: 28px; left: 50%; translate: -50% 0; margin: 0; font-size: 10.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--faint); opacity: 0; transition: opacity 1.2s; pointer-events: none;
}
html[dir="rtl"] .silence-hint { letter-spacing: 0; }
body.silence .silence-hint { opacity: 1; transition-delay: 1.2s; }
body.silence #stage { cursor: none; }

.lightbox { position: fixed; inset: 0; z-index: 45; display: grid; place-items: center; background: rgb(12 12 11 / .82); opacity: 0; pointer-events: none; transition: opacity .5s var(--ease); cursor: zoom-out; padding: 40px; }
.lightbox.on { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: min(86vw, 1100px); max-height: 80vh; max-height: 80dvh; border-radius: 14px; transform: scale(.96); transition: transform .7s var(--ease); }
.lightbox.on img { transform: none; }
.lightbox p { color: #e9e4dc; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin: 14px 0 0; text-align: center; }

/* ------------------------------------------------------------ intro */
#intro { position: fixed; inset: 0; z-index: 50; background: #121110; color: #ece6dc; transition: background 1.6s var(--ease); }
#intro.reveal { background: rgb(18 17 16 / 0); pointer-events: none; }
#intro.gone { display: none; }
.intro-line {
  position: absolute; width: 1px; background: linear-gradient(to top, #f3dfbd, #fff7ea);
  box-shadow: 0 0 12px 1px rgb(255 228 186 / .55); height: 0; transition: height .6s var(--ease), opacity .8s;
}
.intro-rect { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.intro-rect path { fill: none; stroke: #fff2dc; stroke-width: 1; filter: drop-shadow(0 0 6px rgb(255 226 180 / .7)); }
.intro-copy {
  position: absolute; left: var(--cx, 50%); top: 50%; translate: var(--tx, -50%) var(--ty, -50%); width: min(420px, 80vw);
  display: flex; flex-direction: column; align-items: flex-start; gap: 14px; transition: opacity .8s var(--ease), transform 1s var(--ease);
}
#intro.reveal .intro-copy { opacity: 0; transform: translateY(-10px); }
.intro-copy .logo { color: #ece6dc; margin-bottom: 18px; }
.intro-copy p { margin: 0; }
.intro-copy .i1 { font-size: 26px; font-weight: 200; line-height: 1.25; letter-spacing: .01em; }
.intro-copy .i2 { font-size: 13px; color: rgb(236 230 220 / .55); }
.intro-foot { margin-top: 26px; display: flex; align-items: center; gap: 22px; height: 44px; }
.i3 { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: rgb(236 230 220 / .4); transition: opacity .4s; }
html[dir="rtl"] .i3 { letter-spacing: 0; font-size: 12px; }
.enter {
  height: 44px; padding: 0 26px; border-radius: 99px; border: 1px solid rgb(236 230 220 / .35); color: #ece6dc;
  font-size: 11px; letter-spacing: .24em; text-transform: uppercase; opacity: 0; pointer-events: none;
  transition: opacity .6s var(--ease), background .3s, color .3s;
}
html[dir="rtl"] .enter { letter-spacing: 0; font-size: 13px; }
.enter:hover { background: #ece6dc; color: #121110; }
#intro.loaded .enter { opacity: 1; pointer-events: auto; }
#intro.loaded .i3 { display: none; }
.intro-lang { position: absolute; top: calc(18px + var(--st)); inset-inline-end: var(--gx); font-size: 12px; color: rgb(236 230 220 / .55); padding: 0 14px; min-height: 44px; }
#intro.failed .i3 { text-transform: none; letter-spacing: .02em; font-size: 13px; line-height: 1.6; color: rgb(236 230 220 / .8); max-width: 340px; }
#intro.failed .enter { display: none; }
.intro-lang:hover { color: #ece6dc; }
.intro-copy > * { animation: rise 1.2s var(--ease) both; }
.intro-copy .i1 { animation-delay: .5s; } .intro-copy .i2 { animation-delay: .8s; } .intro-foot { animation-delay: 1.1s; }

/* ------------------------------------------------------------ responsive */
/* the hover photo is a pointer nicety; touch screens open the photo from the info panel */
@media (hover: none), (pointer: coarse) { .peek { display: none; } }
@media (max-width: 1280px) {
  :root { --gut: 20px; }
  .info { width: 270px; }
  .info .desc { display: none; }
  .dock { width: calc(100vw - var(--gx) * 2 - 250px); min-width: 0; left: auto; translate: none; inset-inline-end: var(--gx); bottom: calc(86px + var(--sb)); }
  .actions { bottom: calc(30px + var(--sb)); }
  .hint { display: none; }
}
/* the model index becomes one scrolling row: phones, and phones held sideways */
@media (max-width: 820px), (max-height: 520px) and (orientation: landscape) {
  :root { --gut: 16px; }
  .top { height: 58px; }
  .brand-sub { display: none; }
  .models {
    top: calc(58px + var(--st)); translate: none; inset-inline: 0; width: auto; flex-direction: row; gap: 0;
    overflow-x: auto; scrollbar-width: none; padding: 0 var(--gx); white-space: nowrap;
    overscroll-behavior-x: contain;
    mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 24px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, #000 16px, #000 calc(100% - 24px), transparent);
  }
  .models::-webkit-scrollbar { display: none; }
  .series-group { flex-direction: row; gap: 14px; padding-inline-end: 14px; }
  .series-group .eyebrow { display: none; }
  .m-item { padding: 8px 0; min-height: 44px; align-items: center; }
  .m-item .n, .m-item .bar { display: none; }
  .m-item[aria-current="true"] .nm { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
}
@media (max-width: 820px) {
  .info { top: calc(104px + var(--st)); inset-inline: var(--gx); width: auto; gap: 4px; }
  .info h1 { font-size: 30px; }
  .info .tag { font-size: 13px; }
  .info .row, .info .specs { display: none; }
  .dock { inset-inline: max(8px, env(safe-area-inset-left, 0px)); bottom: calc(8px + var(--sb)); width: auto; border-radius: 20px; padding: 2px 4px 6px; }
  .tab { font-size: 11px; height: 42px; }
  .tab i { display: none; }
  /* a fixed panel height: switching tabs never moves the buttons above the dock */
  .panel { height: 108px; min-height: 0; overflow-y: hidden; gap: 18px; padding: 12px 8px 4px; }
  .actions { inset-inline-start: 8px; bottom: calc(172px + var(--sb)); gap: 0; }
  .act span { display: none; }
  .act { padding: 0 13px; height: 44px; }
  .summary { bottom: calc(172px + var(--sb)); inset-inline-end: 8px; height: 44px; padding: 0 12px 0 14px; }
  .summary .s-label { display: none; }
  .sl { min-width: 160px; gap: 4px; }
  .sl .val { font-size: 18px; }
  /* the switch's description wraps narrower so the first swatches stay in view */
  .tgl { max-width: 210px; }
  .panel .note { max-width: 270px; }
  .intro-copy { gap: 8px; }
  .intro-copy .i1 { font-size: 19px; }
  .intro-copy .i2 { display: none; }
  .intro-copy .logo.big { height: 30px; margin-bottom: 6px; }
  .intro-foot { margin-top: 10px; }
  .flushnote b { font-size: 30px; }
}

/* phones held sideways: the dock becomes a column on the far side, the door keeps the rest */
@media (max-height: 520px) and (orientation: landscape) {
  .top { height: 48px; }
  .icon-btn, .lang { height: 40px; }
  .models { top: calc(48px + var(--st)); }
  .m-item { min-height: 40px; padding: 6px 0; }
  .info { top: calc(94px + var(--st)); inset-inline-start: auto; inset-inline-end: var(--gx); width: min(380px, 46vw); gap: 2px; }
  .info .tag, .info .desc, .info .row, .info .specs { display: none; }
  .info h1 { font-size: 26px; }
  .dock {
    left: auto; right: auto; inset-inline-end: var(--gx); inset-inline-start: auto; translate: none;
    bottom: calc(8px + var(--sb)); width: min(380px, 46vw); min-width: 0; border-radius: 20px; padding: 2px 4px 6px;
  }
  .tab { font-size: 11px; height: 40px; }
  .tab i { display: none; }
  .panel { height: 108px; min-height: 0; overflow-y: hidden; gap: 16px; padding: 10px 8px 4px; }
  .actions { inset-inline-start: var(--gx); bottom: calc(8px + var(--sb)); gap: 0; }
  .act span { display: none; }
  .act { padding: 0 13px; height: 44px; }
  .summary { inset-inline-end: var(--gx); bottom: calc(172px + var(--sb)); height: 44px; padding: 0 12px 0 14px; }
  .summary .s-label { display: none; }
  .hint { display: none; }
  .sl { min-width: 150px; gap: 4px; }
  .sl .val { font-size: 18px; }
  .tgl { max-width: 200px; }
  .flushnote { bottom: calc(64px + var(--sb)); }
  .flushnote b { font-size: 30px; }
  .inside-title { bottom: calc(18px + var(--sb)); }
  .intro-copy { gap: 6px; }
  .intro-copy .i1 { font-size: 18px; }
  .intro-copy .i2 { display: none; }
  .intro-copy .logo.big { height: 28px; margin-bottom: 4px; }
  .intro-foot { margin-top: 8px; }
}

/* touch: every control is at least 44 px to the finger. Phones also get a lighter frosting:
   a wide backdrop blur is recomputed for every frame the 3D view behind it changes. */
@media (pointer: coarse) {
  .glass { -webkit-backdrop-filter: blur(12px) saturate(1.2); backdrop-filter: blur(12px) saturate(1.2); }
  body { --glass: rgb(var(--paper) / .74); }
  body[data-light="night"] { --glass: rgb(var(--paper) / .7); }
  .lbl.glass { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--glass-strong); }
  .icon-btn { width: 44px; height: 44px; }
  .lang { height: 44px; }
  .brand { min-height: 44px; }
  .act { height: 44px; }
  .tab { min-height: 44px; }
  .seg { padding: 3px; }
  .seg button { height: 36px; }
  .sl .trk { height: 36px; }
  .sl .rail { top: 17px; } .sl .fill { top: 17px; } .sl .ticks { top: 13px; } .sl .std { top: 7px; } .sl .knob { top: 8px; width: 19px; height: 19px; margin-inline-start: -9.5px; }
  .sl .ends .mx { min-height: 32px; min-width: 44px; text-align: end; }
  .chip:is(button) { min-height: 36px; padding: 4px 14px; }
  .spec-btn, .photo-btn { min-height: 44px; }
  .summary { min-height: 44px; }
  .drawer .x { width: 44px; height: 44px; top: 14px; inset-inline-end: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
