/* ZCorpa Voice Kiosk — clinical clarity with the official purple identity */

@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-arabic.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-latin-ext.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02FF, U+1E00-1EFF, U+20A0-20CF;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/vazirmatn-latin.woff2") format("woff2-variations");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2122;
}

:root {
  --canvas: #f3ebf9;
  --canvas-deep: #e5d3f0;
  --surface: #fbf9fd;
  --surface-strong: #ffffff;
  --surface-soft: #f6f0fa;
  --ink: #2a3b4d;
  --ink-soft: #51485a;
  --muted: #756c7c;
  --line: rgba(112, 47, 138, .14);
  --line-strong: rgba(112, 47, 138, .24);
  --gold: #14a6c8;
  --gold-light: #bdebf5;
  --gold-dark: #087f9d;
  --wine: #702f8a;
  --wine-dark: #59168b;
  --success: #18826f;
  --danger: #b43a4b;

  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 17px;
  --radius-sm: 12px;
  --shadow: 0 28px 70px -42px rgba(48, 38, 30, .52);
  --shadow-soft: 0 18px 42px -30px rgba(48, 38, 30, .35);
  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(16px, 2vw, 30px);
  --font: "Vazirmatn", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  background: var(--canvas);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(70% 80% at 2% 100%, rgba(112, 47, 138, .15), transparent 64%),
    radial-gradient(58% 60% at 100% 0%, rgba(255, 255, 255, .72), transparent 68%),
    linear-gradient(135deg, #fbf9fd 0%, var(--canvas) 56%, #e7f7fb 100%);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.1'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body > * {
  position: relative;
  z-index: 1;
}

button,
input,
textarea {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  right: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  color: #fff;
  background: var(--ink);
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform .2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

:where(button, a):focus-visible {
  outline: 3px solid var(--wine);
  outline-offset: 3px;
}

/* Header */

.topbar {
  direction: ltr;
  min-height: clamp(76px, 8vw, 96px);
  padding: 8px var(--pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid rgba(23, 21, 21, .075);
  background: rgba(251, 250, 247, .72);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.brand {
  direction: ltr;
  display: flex;
  align-items: center;
  min-width: 0;
}

.brand__logo-frame {
  display: block;
  position: relative;
  width: 245px;
  height: 64px;
  overflow: visible;
  flex: none;
}

.brand__logo {
  display: block;
  width: 245px;
  height: 64px;
  max-width: 100%;
  object-fit: contain;
  transform: none;
}

.brand__descriptor {
  direction: rtl;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding-left: 0;
  padding-right: 22px;
  margin-left: 4px;
  border-right: 1px solid var(--line-strong);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
}

.brand__descriptor small {
  color: var(--muted);
  font-size: 10px;
}

.topbar__meta {
  direction: rtl;
  display: flex;
  align-items: center;
  gap: 16px;
}

.install-app {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid rgba(117, 47, 55, .28);
  border-radius: 999px;
  color: var(--wine-dark);
  background: rgba(255, 250, 245, .75);
  box-shadow: 0 8px 24px -20px rgba(23, 21, 21, .55);
  cursor: pointer;
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 700;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s var(--ease);
}

.install-app:hover,
.install-app:focus-visible {
  border-color: var(--wine);
  color: #fff;
  background: var(--wine);
  transform: translateY(-1px);
}

.session-timer {
  direction: rtl;
  min-width: 88px;
  min-height: 40px;
  padding: 5px 11px 6px;
  display: grid;
  gap: 0;
  border: 1px solid rgba(117, 47, 55, .22);
  border-radius: 13px;
  color: var(--wine-dark);
  background: rgba(255, 250, 245, .72);
  box-shadow: 0 8px 24px -20px rgba(23, 21, 21, .55);
  line-height: 1.1;
  text-align: center;
}

.session-timer span {
  color: var(--muted);
  font-size: 9px;
}

.session-timer strong {
  direction: ltr;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.session-timer.is-ending {
  border-color: rgba(154, 57, 67, .45);
  color: var(--danger);
  animation: sessionTimerPulse .9s ease-in-out infinite;
}

@keyframes sessionTimerPulse {
  50% { transform: scale(1.04); }
}

/* Phone gate is independent of the conversation rail so it can be enabled
   only after the server-side database configuration is complete. */
.entry-gate {
  position: fixed;
  z-index: 250;
  inset: 0;
  padding: max(22px, env(safe-area-inset-top)) max(22px, env(safe-area-inset-right)) max(22px, env(safe-area-inset-bottom)) max(22px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  overflow: auto;
  background:
    radial-gradient(72% 90% at 4% 110%, rgba(204, 165, 111, .34), transparent 62%),
    radial-gradient(66% 82% at 100% 0, rgba(255, 255, 255, .7), transparent 58%),
    rgba(238, 232, 223, .94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.entry-gate__card {
  width: min(100%, 580px);
  padding: clamp(30px, 5vw, 54px);
  border: 1px solid rgba(128, 89, 47, .18);
  border-radius: clamp(26px, 4vw, 38px);
  background:
    radial-gradient(circle at 100% 0, rgba(204, 165, 111, .17), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, .98), rgba(247, 242, 235, .97));
  box-shadow: 0 36px 90px -52px rgba(55, 34, 27, .82);
  text-align: center;
}

.entry-gate__brand {
  width: 46px;
  height: 46px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: var(--wine);
  background: linear-gradient(145deg, var(--gold-light), #fff9f0);
  box-shadow: inset 0 0 0 1px rgba(128, 89, 47, .12), 0 12px 24px -17px rgba(80, 29, 36, .72);
  font-family: Georgia, serif;
  font-size: 23px;
}

.entry-gate__screen {
  animation: gateReveal .3s var(--ease) both;
}

@keyframes gateReveal {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.entry-gate__eyebrow {
  margin: 0 0 9px;
  color: var(--wine);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
}

.entry-gate h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(25px, 4vw, 35px);
  line-height: 1.46;
}

.entry-gate h2 + p,
.entry-gate__form > p:not(.entry-gate__privacy, .entry-gate__error) {
  max-width: 39ch;
  margin: 14px auto 0;
  color: var(--ink-soft);
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.9;
}

.entry-gate__primary {
  width: min(100%, 340px);
  min-height: 60px;
  margin-top: 27px;
  padding: 12px 20px;
  border: 1px solid rgba(204, 165, 111, .62);
  border-radius: 17px;
  color: #fff;
  background: linear-gradient(140deg, #7e3540, var(--wine-dark) 78%);
  box-shadow: 0 20px 38px -24px rgba(80, 29, 36, .82);
  cursor: pointer;
  font-weight: 800;
  font-size: 16px;
  transition: transform .2s var(--ease), box-shadow .2s ease, opacity .2s ease;
}

.entry-gate__primary:hover:not(:disabled),
.entry-gate__primary:focus-visible:not(:disabled) {
  box-shadow: 0 24px 45px -23px rgba(80, 29, 36, .96);
  transform: translateY(-2px);
}

.entry-gate__primary:disabled {
  cursor: wait;
  opacity: .62;
}

.entry-gate__diagnostic {
  margin: 1rem 0 0;
  color: var(--ink-faint);
  font-size: .79rem;
  line-height: 1.5;
  text-align: center;
}

.entry-gate__diagnostic bdi {
  display: inline-block;
  margin-inline-start: .35rem;
  padding: .2rem .5rem;
  color: var(--ink-soft);
  background: rgba(16, 46, 64, .06);
  border: 1px solid rgba(16, 46, 64, .1);
  border-radius: 7px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .035em;
}

.entry-gate__form {
  text-align: right;
}

.entry-gate__form h2,
.entry-gate__form > p:not(.entry-gate__privacy, .entry-gate__error) {
  text-align: center;
}

.entry-gate__field {
  display: grid;
  gap: 8px;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 700;
}

.entry-gate__field input {
  min-height: 58px;
  padding: 11px 15px;
  border: 1px solid rgba(128, 89, 47, .24);
  border-radius: 15px;
  color: var(--ink);
  background: rgba(255, 255, 255, .8);
  font: 700 19px/1.2 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .04em;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.entry-gate__field input:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 4px rgba(117, 47, 55, .1);
}

.entry-gate__consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.7;
  cursor: pointer;
}

.entry-gate__consent input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--wine);
}

.entry-gate__privacy {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.75;
}

.entry-gate__error {
  margin: 15px 0 -8px;
  padding: 10px 12px;
  border-radius: 11px;
  color: #7d1f2b;
  background: rgba(249, 231, 233, .9);
  font-size: 12px;
  line-height: 1.7;
}

.entry-gate__pulse {
  height: 48px;
  margin-bottom: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.entry-gate__pulse i {
  width: 5px;
  height: 18px;
  border-radius: 99px;
  background: var(--wine);
  animation: gatePulse .8s ease-in-out infinite alternate;
}

.entry-gate__pulse i:nth-child(2) { animation-delay: .14s; }
.entry-gate__pulse i:nth-child(3) { animation-delay: .28s; }

@keyframes gatePulse {
  to { height: 42px; background: var(--gold-dark); }
}

@media (max-width: 620px) {
  .entry-gate__card { padding: 28px 22px; }
  .entry-gate__primary { width: 100%; }
  .session-timer span { display: none; }
  .session-timer { min-width: 55px; padding-inline: 7px; }
}

.status {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .58);
  box-shadow: 0 8px 24px -20px rgba(23, 21, 21, .55);
  font-size: clamp(11px, .9vw, 13px);
  transition: border-color .25s ease, color .25s ease, background .25s ease;
}

.status__dot {
  width: 7px;
  height: 7px;
  flex: none;
  border-radius: 50%;
  background: #9b948e;
  box-shadow: 0 0 0 4px rgba(155, 148, 142, .1);
  transition: background .25s ease, box-shadow .25s ease;
}

.status[data-state="ready"] {
  color: #315943;
  border-color: rgba(62, 116, 87, .22);
  background: rgba(232, 243, 236, .75);
}

.status[data-state="ready"] .status__dot {
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(62, 116, 87, .12);
}

.status[data-state="listening"] {
  color: var(--wine-dark);
  border-color: rgba(117, 47, 55, .24);
  background: rgba(248, 231, 232, .82);
}

.status[data-state="listening"] .status__dot {
  background: var(--wine);
  box-shadow: 0 0 0 4px rgba(117, 47, 55, .12);
  animation: statusPulse 1.15s ease-in-out infinite;
}

.status[data-state="thinking"] {
  color: var(--gold-dark);
  border-color: rgba(152, 112, 68, .25);
  background: rgba(248, 239, 226, .82);
}

.status[data-state="thinking"] .status__dot {
  background: var(--gold-dark);
  box-shadow: 0 0 0 4px rgba(204, 165, 111, .16);
  animation: statusPulse 1.15s ease-in-out infinite;
}

.status[data-state="speaking"] {
  color: #6b4b2c;
  border-color: rgba(204, 165, 111, .35);
  background: rgba(244, 229, 208, .9);
}

.status[data-state="speaking"] .status__dot {
  background: var(--gold-dark);
  box-shadow: 0 0 0 4px rgba(204, 165, 111, .18);
}

.status[data-state="error"] {
  color: var(--danger);
  border-color: rgba(154, 57, 67, .25);
  background: rgba(249, 231, 233, .8);
}

.status[data-state="error"] .status__dot {
  background: var(--danger);
}

@keyframes statusPulse {
  50% { opacity: .38; transform: scale(.82); }
}

.clock {
  min-width: 42px;
  color: var(--muted);
  font-size: clamp(11px, .9vw, 13px);
  font-variant-numeric: tabular-nums;
}

/* Main layout */

.stage {
  direction: ltr;
  width: 100%;
  max-width: 1920px;
  min-height: 0;
  margin: 0 auto;
  padding: var(--pad);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(430px, .82fr);
  gap: var(--pad);
  overflow: hidden;
}

.media {
  direction: rtl;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
}

.media__frame {
  position: relative;
  width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: var(--radius-xl);
  background: #181514;
  box-shadow:
    0 36px 90px -50px rgba(35, 25, 18, .9),
    0 0 0 1px rgba(23, 21, 21, .08);
}

.media__frame::after {
  content: "";
  position: absolute;
  z-index: 8;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, .08),
    inset 0 -120px 120px -80px rgba(0, 0, 0, .45);
}

.media__layer {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.018);
  transition: opacity .7s var(--ease), transform 1.2s var(--ease);
  will-change: opacity, transform;
}

.media__layer.is-active {
  opacity: 1;
  transform: scale(1);
}

.media__layer > video,
.media__layer > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media__layer.is-contain {
  background:
    radial-gradient(circle at 50% 38%, rgba(204, 165, 111, .12), transparent 38%),
    #171515;
}

.media__layer.is-contain > img,
.media__layer.is-contain > video {
  object-fit: contain;
  padding: 3%;
}

.media__vignette {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(8, 7, 7, .28), transparent 25%),
    linear-gradient(0deg, rgba(8, 7, 7, .82), rgba(8, 7, 7, .08) 48%, transparent 65%),
    linear-gradient(90deg, rgba(8, 7, 7, .15), transparent 34%);
}

.media__topline {
  direction: ltr;
  position: absolute;
  z-index: 4;
  top: clamp(20px, 2.2vw, 34px);
  left: clamp(22px, 2.4vw, 38px);
  display: flex;
  align-items: center;
  gap: 11px;
  color: rgba(255, 255, 255, .72);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(8px, .65vw, 10px);
  letter-spacing: .22em;
}

.media__topline-rule {
  width: clamp(28px, 3.2vw, 54px);
  height: 1px;
  background: rgba(255, 255, 255, .35);
}

.media__caption {
  position: absolute;
  z-index: 4;
  right: clamp(24px, 3vw, 50px);
  bottom: clamp(28px, 3.6vw, 58px);
  max-width: min(72%, 680px);
  color: #fff;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s ease;
}

.media__kicker {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  margin-bottom: 12px;
  border: 1px solid rgba(234, 216, 189, .42);
  border-radius: 999px;
  color: var(--gold-light);
  background: rgba(19, 16, 14, .34);
  backdrop-filter: blur(8px);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(8px, .72vw, 11px);
  letter-spacing: .2em;
}

.media__title {
  margin: 0 0 7px;
  font-size: clamp(24px, 2.6vw, 44px);
  font-weight: 650;
  line-height: 1.45;
  letter-spacing: -.025em;
  text-shadow: 0 3px 28px rgba(0, 0, 0, .5);
}

.media__sub {
  margin: 0;
  color: rgba(255, 255, 255, .76);
  font-size: clamp(12px, 1.05vw, 16px);
  line-height: 1.8;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .55);
}

.media__frame.is-bare .media__caption {
  opacity: 0;
  transform: translateY(8px);
}

.media__frame.is-bare .media__vignette {
  background:
    linear-gradient(180deg, rgba(8, 7, 7, .24), transparent 24%),
    linear-gradient(0deg, rgba(8, 7, 7, .34), transparent 30%);
}

/* هنگام معرفی محصول، تصویر در سمت راست و خلاصهٔ محصول در سمت چپ قرار می‌گیرد. */
.media__frame.is-product {
  background: #f7f4ed;
}

.media__frame.is-product .media__layer {
  inset: 0 0 0 48%;
  background: linear-gradient(145deg, #fbfaf5, #e8e2d5);
}

.media__frame.is-product .media__layer > img,
.media__frame.is-product .media__layer > video {
  object-fit: contain;
  padding: clamp(18px, 3vw, 52px);
}

.media__frame.is-product .media__vignette {
  background: linear-gradient(90deg, rgba(22, 50, 66, .04), transparent 55%);
}

.media__frame.is-product .media__caption {
  inset: 0 52% 0 0;
  display: flex;
  max-width: none;
  padding: clamp(24px, 4vw, 64px);
  justify-content: center;
  flex-direction: column;
  color: var(--ink);
  background: linear-gradient(135deg, #f7f2fb, #f2eee4);
  text-align: right;
}

.media__frame.is-product .media__kicker {
  align-self: flex-start;
  color: var(--navy);
  background: rgba(204, 165, 111, .18);
  border-color: rgba(150, 114, 54, .22);
  text-shadow: none;
}

.media__frame.is-product .media__title {
  color: var(--navy);
  font-size: clamp(22px, 2.3vw, 40px);
  text-shadow: none;
}

.media__frame.is-product .media__sub {
  color: var(--ink-soft);
  font-size: clamp(12px, 1vw, 16px);
  text-shadow: none;
  white-space: pre-line;
  line-height: 1.9;
}

.media__price {
  width: fit-content;
  margin: 12px 0 0;
  padding: 7px 12px;
  color: #0f5f55;
  background: rgba(112, 47, 138, .1);
  border: 1px solid rgba(112, 47, 138, .22);
  border-radius: 10px;
  font-size: clamp(12px, .9vw, 15px);
  font-weight: 850;
  line-height: 1.65;
  text-shadow: none;
}

.media__buy {
  display: inline-flex;
  width: fit-content;
  min-height: 48px;
  margin-top: clamp(16px, 2vw, 28px);
  padding: 11px 18px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: #fff !important;
  background: linear-gradient(135deg, #14a6c8 0%, #702f8a 72%);
  border: 2px solid #d9b45e;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(112, 47, 138, .3);
  font-family: var(--font);
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 850;
  line-height: 1.5;
  text-decoration: none;
  text-shadow: none;
  opacity: 1;
  pointer-events: auto;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}

.media__buy svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.media__buy:hover {
  filter: brightness(1.1);
  box-shadow: 0 14px 34px rgba(112, 47, 138, .38);
}

.media__buy:focus-visible {
  outline: 4px solid rgba(20, 166, 200, .42);
  outline-offset: 3px;
}

.media__buy:active {
  transform: translateY(1px);
}

.media__buy-note {
  display: block;
  width: fit-content;
  margin-top: 8px;
  color: #405966;
  font-family: var(--font);
  font-size: clamp(11px, .78vw, 13px);
  font-weight: 700;
  line-height: 1.7;
}

.media__frame.is-product .media__badge {
  color: var(--navy);
  background: rgba(255, 255, 255, .8);
  border-color: rgba(112, 47, 138, .14);
}

.media__badge {
  position: absolute;
  z-index: 6;
  top: clamp(19px, 2.2vw, 33px);
  right: clamp(22px, 2.4vw, 38px);
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px;
  color: #fff;
  background: rgba(19, 16, 14, .5);
  backdrop-filter: blur(12px);
  font-size: clamp(9px, .78vw, 12px);
  animation: badgeIn .4s var(--ease);
}

.media__badge span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(204, 165, 111, .15);
}

@keyframes badgeIn {
  from { opacity: 0; transform: translateY(-7px); }
}

.media__note {
  position: absolute;
  z-index: 4;
  left: clamp(22px, 2.4vw, 38px);
  bottom: clamp(24px, 3vw, 46px);
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, .62);
  font-size: clamp(9px, .75vw, 11px);
}

.media__note svg {
  width: 18px;
  height: 18px;
}

/* Consultation panel */

.panel {
  direction: rtl;
  position: relative;
  min-width: 0;
  min-height: 0;
  padding: clamp(20px, 2vw, 30px);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto minmax(112px, 1fr) auto;
  gap: clamp(13px, 1.25vw, 19px);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--radius-xl);
  background: rgba(251, 250, 247, .92);
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  top: 0;
  right: clamp(24px, 3vw, 48px);
  width: 62px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--gold);
}

.panel__intro {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-dark);
  font-size: clamp(10px, .8vw, 12px);
  font-weight: 600;
}

.eyebrow span {
  width: 18px;
  height: 1px;
  background: var(--gold);
}

.panel__title {
  margin: 0 0 8px;
  max-width: 22ch;
  color: var(--ink);
  font-size: clamp(23px, 2vw, 32px);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -.035em;
}

.panel__lead {
  margin: 0;
  max-width: 50ch;
  color: var(--muted);
  font-size: clamp(11.5px, .92vw, 14px);
  line-height: 1.9;
}

.question-hub {
  display: grid;
  gap: clamp(12px, 1.1vw, 16px);
}

.section-heading {
  min-height: 26px;
  margin-bottom: 9px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-heading h2,
.conversation__head h2 {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(11px, .9vw, 13px);
  font-weight: 650;
}

.section-heading > span {
  color: var(--muted);
  font-size: clamp(9px, .72vw, 10.5px);
}

.section-heading--compact {
  min-height: 20px;
  margin-bottom: 7px;
}

.guide__grid {
  display: grid;
  grid-template-columns: 1.18fr 1fr 1fr;
  gap: 8px;
}

.guide-card {
  position: relative;
  min-width: 0;
  min-height: 118px;
  padding: 13px 12px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink-soft);
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 9px;
  overflow: hidden;
  transition:
    transform .25s var(--ease),
    border-color .25s ease,
    box-shadow .25s ease,
    color .25s ease,
    background .25s ease;
}

.guide-card::after {
  content: "";
  position: absolute;
  width: 76px;
  height: 76px;
  left: -38px;
  bottom: -42px;
  border: 1px solid rgba(204, 165, 111, .17);
  border-radius: 50%;
  pointer-events: none;
}

.guide-card:hover,
.guide-card:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(152, 112, 68, .32);
  box-shadow: 0 20px 40px -28px rgba(70, 51, 35, .55);
}

.guide-card:active {
  transform: translateY(0) scale(.985);
}

.guide-card--sun {
  color: #fff;
  border-color: transparent;
  background:
    radial-gradient(circle at 4% 100%, rgba(234, 216, 189, .16), transparent 36%),
    linear-gradient(145deg, #292321 0%, #171515 70%);
  box-shadow: 0 20px 42px -28px rgba(23, 21, 21, .9);
}

.guide-card--sun::after {
  border-color: rgba(234, 216, 189, .18);
}

.guide-card--sun:hover,
.guide-card--sun:focus-visible {
  border-color: rgba(204, 165, 111, .62);
  box-shadow: 0 24px 44px -26px rgba(23, 21, 21, .9);
}

.guide-card__icon {
  width: 38px;
  height: 38px;
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(204, 165, 111, .26);
  border-radius: 12px;
  color: var(--gold-dark);
  background: rgba(204, 165, 111, .09);
}

.guide-card--sun .guide-card__icon {
  color: var(--gold-light);
  border-color: rgba(234, 216, 189, .24);
  background: rgba(234, 216, 189, .08);
}

.guide-card__icon svg {
  width: 21px;
  height: 21px;
}

.guide-card__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.guide-card__copy strong {
  color: inherit;
  font-size: clamp(11.5px, .88vw, 13.5px);
  line-height: 1.55;
  font-weight: 700;
}

.guide-card__copy small {
  overflow: hidden;
  color: var(--muted);
  font-size: clamp(9px, .68vw, 10.5px);
  line-height: 1.55;
  text-overflow: ellipsis;
}

.guide-card--sun .guide-card__copy small {
  color: rgba(255, 255, 255, .62);
}

.guide-card__arrow {
  position: absolute;
  left: 12px;
  top: 16px;
  color: #a59d96;
  font-size: 16px;
  transition: transform .25s var(--ease), color .25s ease;
}

.guide-card:hover .guide-card__arrow,
.guide-card:focus-visible .guide-card__arrow {
  color: var(--gold-dark);
  transform: translateX(-3px);
}

.guide-card--sun .guide-card__arrow {
  color: rgba(255, 255, 255, .55);
}

.guide-card[disabled],
.chip[disabled] {
  opacity: .46;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.challenge-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip {
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--surface-soft);
  cursor: pointer;
  white-space: nowrap;
  font-size: clamp(10px, .76vw, 11.5px);
  transition: color .22s ease, background .22s ease, border-color .22s ease, transform .22s var(--ease);
}

.chip:hover,
.chip:focus-visible {
  color: var(--wine-dark);
  border-color: rgba(117, 47, 55, .24);
  background: rgba(117, 47, 55, .065);
  transform: translateY(-1px);
}

.chip:active {
  transform: scale(.98);
}

/* Conversation */

.conversation {
  min-height: 0;
  padding: 12px 14px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(245, 241, 235, .64);
  overflow: hidden;
}

.conversation__head {
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.conversation__head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.conversation__head h2 span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(204, 165, 111, .12);
}

.transcript {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 2px 1px 4px 5px;
  scrollbar-width: thin;
  scrollbar-color: rgba(23, 21, 21, .18) transparent;
}

.transcript::-webkit-scrollbar {
  width: 5px;
}

.transcript::-webkit-scrollbar-thumb {
  border-radius: 99px;
  background: rgba(23, 21, 21, .16);
}

.empty {
  width: 100%;
  min-height: 76px;
  margin: auto;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
}

.empty p {
  max-width: 36ch;
  margin: 0;
  font-size: clamp(10px, .76vw, 11.5px);
  line-height: 1.8;
}

.empty__wave {
  direction: ltr;
  width: 40px;
  height: 28px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--gold-dark);
}

.empty__wave i {
  display: block;
  width: 2px;
  height: 9px;
  border-radius: 99px;
  background: currentColor;
  opacity: .6;
  animation: wave 1.5s ease-in-out infinite;
}

.empty__wave i:nth-child(2),
.empty__wave i:nth-child(4) {
  animation-delay: -.22s;
}

.empty__wave i:nth-child(3) {
  animation-delay: -.42s;
}

@keyframes wave {
  0%, 100% { transform: scaleY(.55); opacity: .35; }
  50% { transform: scaleY(1.9); opacity: .8; }
}

.bubble {
  max-width: 92%;
  padding: 10px 13px;
  border-radius: 14px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px -20px rgba(23, 21, 21, .55);
  font-size: clamp(10.5px, .8vw, 12.5px);
  line-height: 1.8;
  word-break: break-word;
  animation: bubbleIn .35s var(--ease);
}

@keyframes bubbleIn {
  from { opacity: 0; transform: translateY(7px); }
}

.bubble--user {
  align-self: flex-start;
  border-start-start-radius: 4px;
  background: #fff;
}

.bubble--bot {
  align-self: flex-end;
  color: #fff;
  border-color: transparent;
  border-start-end-radius: 4px;
  background: linear-gradient(145deg, #342c29, #1d1918);
}

.bubble__who {
  display: block;
  margin-bottom: 3px;
  color: var(--gold-dark);
  font-size: 9px;
  font-weight: 650;
}

.bubble--bot .bubble__who {
  color: var(--gold-light);
}

.bubble--typing .bubble__body::after {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  margin-right: 5px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  animation: statusPulse .9s infinite;
}

.reset {
  min-height: 44px;
  padding: 5px 9px;
  border: 0;
  border-radius: 9px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  font-size: 10px;
  transition: color .2s ease, background .2s ease;
}

.reset:hover,
.reset:focus-visible {
  color: var(--wine);
  background: rgba(117, 47, 55, .06);
}

/* Voice control */

.control {
  position: relative;
  min-height: 116px;
  padding: 12px 16px 12px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  border: 1px solid rgba(204, 165, 111, .32);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 0 100%, rgba(204, 165, 111, .16), transparent 34%),
    linear-gradient(145deg, #f7f1e8, #fbfaf7);
  overflow: hidden;
}

.control::after {
  content: "VOICE";
  position: absolute;
  left: 13px;
  bottom: 5px;
  color: rgba(152, 112, 68, .15);
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 9px;
  letter-spacing: .25em;
}

.talk {
  position: relative;
  width: clamp(86px, 7vw, 104px);
  aspect-ratio: 1;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  display: grid;
  place-items: center;
  cursor: pointer;
  touch-action: none;
  transition: transform .2s var(--ease), opacity .2s ease;
}

.talk:disabled {
  opacity: .42;
  cursor: wait;
}

.talk:not(:disabled):active {
  transform: scale(.96);
}

.talk__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.talk__ring--outer {
  border: 1px solid rgba(152, 112, 68, .24);
  transition: transform .08s linear, border-color .3s ease, box-shadow .3s ease;
}

.talk__ring--inner {
  inset: 8px;
  border: 1px solid rgba(152, 112, 68, .13);
}

.talk:not(.is-recording):not(.is-interrupting):not(.is-speaking):not(:disabled) .talk__ring--outer {
  animation: talkBreathe 3.2s ease-in-out infinite;
}

@keyframes talkBreathe {
  50% {
    border-color: rgba(152, 112, 68, .45);
    box-shadow: 0 0 0 6px rgba(204, 165, 111, .08);
  }
}

.talk__core {
  position: relative;
  width: calc(100% - 19px);
  height: calc(100% - 19px);
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, .16), transparent 30%),
    linear-gradient(145deg, #38302d, #171515 72%);
  box-shadow:
    0 16px 30px -17px rgba(23, 21, 21, .85),
    inset 0 0 0 1px rgba(255, 255, 255, .1);
  transition: background .3s ease, box-shadow .3s ease;
}

.talk__icon {
  width: clamp(25px, 2.25vw, 32px);
  height: auto;
}

.talk.is-recording .talk__core,
.talk.is-interrupting .talk__core {
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, .2), transparent 30%),
    linear-gradient(145deg, #984c56, var(--wine) 55%, var(--wine-dark));
  box-shadow: 0 17px 34px -16px rgba(117, 47, 55, .88);
}

.talk.is-recording .talk__ring--outer,
.talk.is-interrupting .talk__ring--outer {
  border-color: rgba(117, 47, 55, .58);
  box-shadow: 0 0 0 7px rgba(117, 47, 55, .09);
}

.talk.is-speaking .talk__core {
  color: #302116;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, .38), transparent 30%),
    linear-gradient(145deg, var(--gold-light), var(--gold) 56%, var(--gold-dark));
  box-shadow: 0 17px 34px -16px rgba(152, 112, 68, .72);
}

.talk.is-speaking .talk__ring--outer {
  border-color: rgba(152, 112, 68, .55);
  box-shadow: 0 0 0 7px rgba(204, 165, 111, .11);
}

.control__copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.control__eyebrow {
  margin-bottom: 2px;
  color: var(--gold-dark);
  font-size: clamp(9px, .68vw, 10px);
  font-weight: 600;
}

.talk__label {
  color: var(--ink);
  font-size: clamp(14px, 1.08vw, 17px);
  line-height: 1.55;
}

.control__hint {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: clamp(9.5px, .72vw, 11px);
  line-height: 1.7;
}

.control__kbd {
  display: block;
  color: var(--muted);
  font-size: .9em;
}

kbd {
  padding: 1px 6px;
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .62);
  font: inherit;
}

/* Dialog */

.overlay {
  position: fixed;
  z-index: 60;
  inset: 0;
  padding: 22px;
  display: grid;
  place-items: center;
  background: rgba(24, 20, 18, .68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: overlayIn .25s ease;
}

@keyframes overlayIn {
  from { opacity: 0; }
}

.overlay__card {
  position: relative;
  width: min(100%, 440px);
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .75);
  border-radius: var(--radius-lg);
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 36px 80px -35px #000;
  text-align: center;
}

.overlay__mark {
  display: block;
  width: 34px;
  height: 3px;
  margin: 0 auto 18px;
  border-radius: 3px;
  background: var(--gold);
}

.overlay__title {
  margin: 0 0 10px;
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.5;
}

.overlay__body {
  margin: 0 0 22px;
  color: var(--muted);
  white-space: pre-line;
  font-size: 13px;
  line-height: 1.95;
}

.overlay__btn {
  min-width: 132px;
  min-height: 46px;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: var(--ink);
  box-shadow: 0 14px 28px -18px rgba(23, 21, 21, .8);
  cursor: pointer;
  font-weight: 600;
  transition: transform .2s var(--ease), background .2s ease;
}

.overlay__btn:hover {
  background: var(--wine-dark);
}

.overlay__btn:active {
  transform: scale(.98);
}

audio {
  display: none;
}

noscript {
  position: fixed;
  z-index: 100;
  inset: auto 20px 20px;
  display: block;
  padding: 14px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--ink);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

/* Compact landscape kiosks */

@media (max-height: 1000px) and (min-width: 981px) {
  :root { --pad: 13px; }

  .topbar {
    min-height: 66px;
    height: 66px;
  }

  .brand__logo-frame {
    width: 218px;
    height: 52px;
  }

  .brand__logo {
    width: 254px;
    transform: translateY(-48px);
  }

  .panel {
    padding: 17px;
    gap: 10px;
    grid-template-rows: auto auto minmax(68px, 1fr) auto;
  }

  .eyebrow { margin-bottom: 4px; }
  .panel__title { margin-bottom: 3px; font-size: clamp(20px, 1.8vw, 26px); line-height: 1.42; }
  .panel__lead { line-height: 1.6; }
  .question-hub { gap: 8px; }
  .section-heading { min-height: 20px; margin-bottom: 5px; }
  .guide-card { min-height: 76px; padding: 9px; gap: 5px; }
  .guide-card__icon { width: 28px; height: 28px; border-radius: 9px; }
  .guide-card__icon svg { width: 17px; height: 17px; }
  .guide-card__copy small { display: none; }
  .guide-card__arrow { top: 10px; left: 9px; }
  .section-heading--compact { margin-bottom: 4px; }
  .chip { min-height: 44px; padding: 7px 10px; }
  .conversation { padding: 8px 10px; gap: 4px; }
  .empty { min-height: 46px; }
  .control { min-height: 82px; padding: 7px 11px; }
  .talk { width: 70px; }
  .control__kbd, .control::after { display: none; }
}

@media (max-height: 720px) and (min-width: 981px) {
  .challenge-list {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: thin;
  }
}

/* Tablets and portrait displays */

@media (max-width: 980px) {
  html,
  body {
    min-height: 100%;
    height: auto;
  }

  body {
    display: block;
    overflow: auto;
  }

  .topbar {
    position: sticky;
    z-index: 20;
    top: 0;
  }

  .stage {
    overflow: visible;
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .media__frame {
    max-height: none;
  }

  .panel {
    overflow: visible;
    min-height: 760px;
    grid-template-rows: auto auto minmax(150px, 1fr) auto;
  }

  .guide-card {
    min-height: 112px;
  }

  .chip {
    min-height: 44px;
  }
}

@media (max-width: 680px) {
  :root {
    --pad: 12px;
    --radius-xl: 24px;
  }

  .topbar {
    min-height: 68px;
    gap: 10px;
  }

  .brand__logo-frame {
    width: 178px;
    height: 49px;
  }

  .brand__logo {
    width: 220px;
    transform: translate(-5px, -42px);
  }

  .brand__descriptor,
  .clock {
    display: none;
  }

  .status {
    min-height: 36px;
    max-width: 145px;
    padding: 7px 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .media__topline,
  .media__note {
    display: none;
  }

  .media__caption {
    right: 18px;
    bottom: 18px;
    max-width: calc(100% - 36px);
  }

  .media__kicker {
    min-height: 24px;
    margin-bottom: 7px;
  }

  .media__title {
    margin-bottom: 2px;
    font-size: clamp(18px, 6vw, 26px);
  }

  .media__sub {
    font-size: 11px;
  }

  .media__badge {
    top: 14px;
    right: 14px;
  }

  .panel {
    min-height: 0;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
  }

  .panel__title {
    font-size: 23px;
  }

  .guide__grid {
    grid-template-columns: 1fr;
  }

  .guide-card {
    min-height: 88px;
    padding: 12px;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }

  .guide-card__copy {
    flex: 1;
  }

  .guide-card__arrow {
    position: static;
    margin-right: auto;
  }

  .challenge-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .chip {
    min-width: 0;
    white-space: normal;
  }

  .conversation {
    min-height: 190px;
  }

  .control {
    min-height: 108px;
  }

  .talk {
    width: 82px;
  }

  .control__kbd,
  .control::after {
    display: none;
  }
}

@media (max-width: 390px) {
  .brand__logo-frame { width: 176px; }
  .brand__logo { transform: translate(-5px, -42px); }
  .status { max-width: 132px; font-size: 10px; }
  .panel__lead { font-size: 11.5px; }
  .challenge-list { grid-template-columns: 1fr; }
  .control { gap: 10px; padding-inline: 10px; }
  .talk { width: 72px; }
  .talk__label { font-size: 13px; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (forced-colors: active) {
  .guide-card,
  .chip,
  .conversation,
  .control,
  .status {
    border: 1px solid CanvasText;
  }
}

/* Minimal consultation layout */

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.conversation.visually-hidden .reset {
  display: none !important;
}

.stage {
  align-items: start;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, .72fr);
}

.media {
  align-self: start;
  align-items: flex-start;
}

.media__frame {
  max-height: none;
}

.media__layer.is-contain.is-image {
  background: var(--surface-soft);
}

.media__layer.is-contain.is-image > img {
  padding: 2.5%;
}

.media__caption {
  right: clamp(22px, 2.5vw, 40px);
  bottom: clamp(22px, 2.5vw, 40px);
}

.media__title {
  font-size: clamp(21px, 2.1vw, 34px);
}

.media__badge {
  top: auto;
  right: auto;
  bottom: clamp(21px, 2.4vw, 38px);
  left: clamp(21px, 2.4vw, 38px);
}

/* Baseline question styling; the final layout block places it above the video. */
.quick-question {
  position: absolute;
  z-index: 12;
  top: clamp(13px, 1.6vw, 24px);
  right: clamp(13px, 1.6vw, 24px);
  left: clamp(13px, 1.6vw, 24px);
  padding: clamp(12px, 1.25vw, 18px);
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: clamp(15px, 1.5vw, 21px);
  color: var(--ink);
  background: rgba(251, 250, 247, .93);
  box-shadow: 0 20px 55px -28px rgba(0, 0, 0, .75);
  backdrop-filter: blur(18px) saturate(115%);
  -webkit-backdrop-filter: blur(18px) saturate(115%);
  animation: quickQuestionIn .28s var(--ease);
}

@keyframes quickQuestionIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
}

.quick-question__text {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: clamp(12px, 1.08vw, 16px);
  font-weight: 750;
  line-height: 1.55;
  text-align: right;
}

.quick-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(6px, .7vw, 10px);
}

.quick-options button {
  min-width: 0;
  min-height: 44px;
  padding: 8px 9px;
  border: 1px solid rgba(23, 21, 21, .13);
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, .82);
  cursor: pointer;
  font-size: clamp(10px, .82vw, 13px);
  font-weight: 700;
  line-height: 1.45;
  transition:
    color .2s ease,
    background .2s ease,
    border-color .2s ease,
    transform .2s var(--ease);
}

.quick-options button:hover,
.quick-options button:focus-visible {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
  transform: translateY(-1px);
}

.quick-options button:active {
  transform: scale(.98);
}

.quick-options button:disabled {
  opacity: .48;
  cursor: wait;
  transform: none;
}

.quick-options button.is-selected,
.quick-options button[aria-pressed="true"] {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
  opacity: 1;
}

/* A deliberately quiet right rail: one question, three paths, one action. */
.panel {
  align-self: stretch;
  height: 100%;
  padding: clamp(26px, 2.5vw, 42px);
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 2vw, 30px);
  overflow: hidden;
}

.panel::before {
  right: clamp(28px, 3vw, 48px);
  width: 52px;
}

.panel__intro {
  padding-top: clamp(6px, 1vw, 14px);
}

.panel__title {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(26px, 2.25vw, 36px);
  font-weight: 750;
  line-height: 1.55;
  letter-spacing: -.035em;
}

.category-picker {
  display: grid;
  gap: clamp(10px, 1vw, 14px);
}

.category-button {
  position: relative;
  width: 100%;
  min-height: clamp(72px, 6.5vw, 92px);
  padding: 15px clamp(18px, 1.6vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: clamp(16px, 1.4vw, 20px);
  color: var(--ink);
  background: rgba(255, 255, 255, .76);
  box-shadow: 0 15px 36px -31px rgba(23, 21, 21, .72);
  cursor: pointer;
  text-align: right;
  font-size: clamp(18px, 1.45vw, 22px);
  font-weight: 800;
  transition:
    color .23s ease,
    background .23s ease,
    border-color .23s ease,
    box-shadow .23s ease,
    transform .23s var(--ease);
}

.category-button::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 4px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: center;
  transition: transform .23s var(--ease);
}

.category-button:hover,
.category-button:focus-visible,
.category-button.is-active,
.category-button[aria-pressed="true"] {
  color: #fff;
  border-color: var(--ink);
  background: var(--ink);
  box-shadow: 0 22px 40px -27px rgba(23, 21, 21, .78);
  transform: translateY(-2px);
}

.category-button:hover::before,
.category-button:focus-visible::before,
.category-button.is-active::before,
.category-button[aria-pressed="true"]::before {
  transform: scaleY(1);
}

.category-button:active {
  transform: scale(.985);
}

.category-button:disabled {
  opacity: .45;
  cursor: wait;
  transform: none;
  box-shadow: none;
}

.category-button.is-active:disabled,
.category-button[aria-pressed="true"]:disabled {
  opacity: .78;
}

.category-button__arrow {
  color: var(--gold-dark);
  font-size: 24px;
  font-weight: 400;
  transition: color .23s ease, transform .23s var(--ease);
}

.category-button:hover .category-button__arrow,
.category-button:focus-visible .category-button__arrow,
.category-button.is-active .category-button__arrow,
.category-button[aria-pressed="true"] .category-button__arrow {
  color: var(--gold-light);
  transform: translateX(-4px);
}

.control {
  min-height: 0;
  margin-top: auto;
  padding: 0;
  display: block;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}

.control::after {
  display: none;
}

.talk {
  position: relative;
  width: 100%;
  min-height: clamp(102px, 9vw, 124px);
  aspect-ratio: auto;
  padding: 14px clamp(18px, 1.65vw, 26px);
  border: 1px solid rgba(204, 165, 111, .55);
  border-radius: clamp(19px, 1.7vw, 25px);
  color: #fff;
  background:
    radial-gradient(circle at 0 100%, rgba(204, 165, 111, .17), transparent 38%),
    linear-gradient(145deg, #342d2a, #171515 72%);
  box-shadow:
    0 24px 46px -27px rgba(23, 21, 21, .9),
    inset 0 0 0 1px rgba(255, 255, 255, .035);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: clamp(15px, 1.5vw, 22px);
  cursor: pointer;
  touch-action: none;
  transition:
    transform .2s var(--ease),
    opacity .2s ease,
    border-color .2s ease,
    box-shadow .2s ease;
}

.talk:hover:not(:disabled),
.talk:focus-visible:not(:disabled) {
  border-color: var(--gold);
  box-shadow:
    0 26px 50px -25px rgba(23, 21, 21, .95),
    0 0 0 4px rgba(204, 165, 111, .09);
  transform: translateY(-2px);
}

.talk:not(:disabled):active {
  transform: scale(.985);
}

.talk__visual {
  position: relative;
  width: clamp(70px, 6.3vw, 84px);
  height: clamp(70px, 6.3vw, 84px);
  flex: none;
  display: grid;
  place-items: center;
}

.talk__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}

.talk__ring--outer {
  border: 1px solid rgba(234, 216, 189, .45);
}

.talk__ring--inner {
  inset: 7px;
  border: 1px solid rgba(234, 216, 189, .18);
}

.talk__core {
  position: relative;
  width: calc(100% - 18px);
  height: calc(100% - 18px);
  color: var(--ink);
  background: linear-gradient(145deg, var(--gold-light), var(--gold));
  box-shadow:
    0 16px 28px -18px rgba(0, 0, 0, .92),
    inset 0 0 0 1px rgba(255, 255, 255, .32);
}

.talk__icon {
  width: clamp(23px, 2vw, 29px);
}

.talk__label {
  color: #fff;
  font-size: clamp(16px, 1.35vw, 21px);
  font-weight: 800;
  line-height: 1.55;
  text-align: right;
}

.talk.is-recording,
.talk.is-interrupting {
  border-color: rgba(177, 87, 97, .8);
  background: linear-gradient(145deg, #762f38, var(--wine-dark));
}

.talk.is-speaking {
  border-color: var(--gold);
}

@media (max-height: 700px) and (min-width: 981px) {
  .media__frame {
    width: min(100%, calc((100vh - 92px) * 16 / 9));
    width: min(100%, calc((100svh - 92px) * 16 / 9));
    margin-inline: auto;
  }

  .panel {
    padding: 18px 22px;
    gap: 12px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .panel__intro {
    padding-top: 3px;
  }

  .panel__title {
    font-size: 23px;
    line-height: 1.42;
  }

  .category-picker {
    gap: 8px;
  }

  .category-button {
    min-height: 58px;
    padding-block: 10px;
    font-size: 17px;
  }

  .talk {
    min-height: 90px;
  }

  .talk__visual {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 980px) {
  .topbar {
    position: sticky;
    z-index: 40;
    top: 0;
    height: 76px;
    min-height: 76px;
  }

  .stage {
    padding: 0 var(--pad) var(--pad);
    grid-template-columns: 1fr;
    gap: 16px;
    overflow: visible;
  }

  .media {
    position: sticky;
    z-index: 25;
    top: 76px;
    padding: 10px 0 12px;
    background: rgba(238, 232, 223, .96);
  }

  .media::before {
    content: "";
    position: absolute;
    z-index: -1;
    inset: 0 calc(var(--pad) * -1);
    border-bottom: 1px solid rgba(23, 21, 21, .07);
    background: inherit;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .media__frame {
    width: 100%;
    max-height: none;
    aspect-ratio: 16 / 9;
    border-radius: 24px;
  }

  .panel {
    min-height: 0;
    height: auto;
    padding: 28px;
    gap: 18px;
    overflow: visible;
  }

  .panel__title {
    font-size: clamp(25px, 4.5vw, 34px);
  }

  .category-button {
    min-height: 72px;
  }

  .control {
    margin-top: 12px;
  }

  .talk {
    min-height: 108px;
  }
}

@media (max-width: 680px) {
  .topbar {
    height: 68px;
    min-height: 68px;
  }

  .stage {
    gap: 12px;
  }

  .media {
    top: 68px;
    padding: 8px 0 10px;
  }

  .media__frame {
    border-radius: 18px;
  }

  .media__caption {
    right: 14px;
    bottom: 13px;
    max-width: calc(100% - 28px);
  }

  .media__kicker {
    display: none;
  }

  .media__title {
    margin: 0 0 1px;
    font-size: clamp(16px, 5vw, 22px);
  }

  .media__sub {
    font-size: 10px;
    line-height: 1.5;
  }

  .media__badge {
    bottom: 12px;
    left: 12px;
  }

  .quick-question {
    top: 9px;
    right: 9px;
    left: 9px;
    padding: 9px;
    border-radius: 13px;
  }

  .quick-question__text {
    margin-bottom: 7px;
    overflow: hidden;
    font-size: clamp(11px, 3.25vw, 13px);
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .quick-options {
    gap: 5px;
  }

  .quick-options button {
    min-height: 44px;
    padding: 5px 3px;
    border-radius: 9px;
    font-size: clamp(9px, 2.65vw, 11px);
  }

  .panel {
    padding: 24px 18px;
    gap: 14px;
    border-radius: 22px;
  }

  .panel__intro {
    padding-top: 4px;
  }

  .panel__title {
    font-size: 24px;
    line-height: 1.48;
  }

  .category-picker {
    gap: 9px;
  }

  .category-button {
    min-height: 64px;
    padding: 12px 16px;
    border-radius: 15px;
    font-size: 18px;
  }

  .category-button__arrow {
    font-size: 21px;
  }

  .control {
    margin-top: 8px;
  }

  .talk {
    min-height: 96px;
    padding: 12px 16px;
    border-radius: 18px;
    gap: 13px;
  }

  .talk__visual {
    width: 67px;
    height: 67px;
  }

  .talk__label {
    font-size: 16px;
  }
}

/* در نمایشگرهای افقی کوتاه، قاب همچنان ثابت و ۱۶:۹ می‌ماند اما تمام صفحه را نمی‌پوشاند. */
@media (max-width: 980px) and (max-height: 700px) {
  .media__frame {
    width: min(100%, calc((100vh - 220px) * 16 / 9));
    width: min(100%, calc((100svh - 220px) * 16 / 9));
    margin-inline: auto;
  }
}

/* گوشی و تبلت افقی کوتاه: رسانه قفل می‌ماند و پنل در ستون کناری اسکرول می‌شود. */
@media (max-width: 980px) and (max-height: 500px) and (orientation: landscape) {
  body {
    overflow: hidden;
  }

  .topbar {
    height: 60px;
    min-height: 60px;
  }

  .brand__logo-frame {
    height: 44px;
  }

  .stage {
    height: calc(100vh - 60px);
    height: calc(100svh - 60px);
    padding: 10px var(--pad);
    grid-template-columns: minmax(0, 1fr) minmax(240px, .72fr);
    gap: 10px;
    overflow: hidden;
  }

  .media {
    position: sticky;
    top: 60px;
    padding: 0;
    background: transparent;
  }

  .media::before {
    display: none;
  }

  .media__frame {
    width: 100%;
    margin-inline: 0;
  }

  .panel {
    height: 100%;
    padding: 13px;
    gap: 8px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .panel__title {
    font-size: 18px;
    line-height: 1.4;
  }

  .category-picker {
    gap: 6px;
  }

  .category-button {
    min-height: 50px;
    padding-block: 8px;
    font-size: 16px;
  }

  .control {
    margin-top: 2px;
  }

  .talk {
    min-height: 72px;
  }

  .talk__visual {
    width: 54px;
    height: 54px;
  }

  .talk__label {
    font-size: 14px;
  }
}

@media (max-width: 390px) {
  .panel {
    padding: 20px 15px;
  }

  .panel__title {
    font-size: 22px;
  }

  .category-button {
    min-height: 60px;
  }

  .talk {
    min-height: 90px;
    padding-inline: 13px;
  }

  .talk__visual {
    width: 62px;
    height: 62px;
  }
}

@media (forced-colors: active) {
  .category-button,
  .talk,
  .quick-options button,
  .quick-question {
    border: 1px solid CanvasText;
  }
}

/* ══════════════════════════════════════════════════════════════
   ZCORPA visual balance — header identity, question dock, cards
   ══════════════════════════════════════════════════════════════ */

.topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  justify-content: normal;
  gap: clamp(14px, 2vw, 28px);
}

.brand {
  justify-self: start;
}

.brand__descriptor {
  display: none;
}

.topbar__ai-title {
  position: relative;
  direction: rtl;
  min-height: 44px;
  padding: 8px clamp(15px, 1.8vw, 26px);
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  overflow: hidden;
  border: 1px solid rgba(128, 89, 47, .2);
  border-radius: 999px;
  color: var(--wine-dark);
  background:
    radial-gradient(circle at 15% 0, rgba(255, 255, 255, .95), transparent 42%),
    linear-gradient(120deg, rgba(255, 255, 255, .88), rgba(239, 224, 204, .75));
  box-shadow:
    0 16px 34px -27px rgba(80, 29, 36, .65),
    inset 0 0 0 1px rgba(255, 255, 255, .52);
  font-size: clamp(14px, 1.15vw, 18px);
  font-weight: 800;
  letter-spacing: -.025em;
  line-height: 1.4;
  white-space: nowrap;
}

.topbar__ai-title::after {
  content: "";
  position: absolute;
  right: 20%;
  bottom: 0;
  left: 20%;
  height: 2px;
  border-radius: 2px 2px 0 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.topbar__ai-mark {
  color: var(--gold-dark);
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 4px 14px rgba(204, 165, 111, .45);
}

.topbar__meta {
  justify-self: end;
}

.stage {
  grid-template-columns: minmax(0, 1.48fr) minmax(350px, .72fr);
  gap: clamp(16px, 1.7vw, 28px);
}

.media {
  width: 100%;
  height: 100%;
  align-self: stretch;
  display: grid;
  place-items: center;
}

.media__stack {
  width: 100%;
  min-width: 0;
  align-self: center;
  display: grid;
  align-content: start;
  gap: 0;
}

.media__stack:has(.quick-question:not([hidden])) {
  gap: clamp(9px, .85vw, 13px);
}

.media__question-slot {
  min-width: 0;
}

/* The question is now in normal flow above the frame; it never covers the video. */
.quick-question {
  position: relative;
  inset: auto;
  width: 100%;
  padding: clamp(10px, .9vw, 14px);
  display: grid;
  grid-template-columns: minmax(145px, .31fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(10px, 1vw, 16px);
  border: 1px solid rgba(128, 89, 47, .22);
  border-radius: clamp(15px, 1.25vw, 20px);
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, rgba(204, 165, 111, .16), transparent 34%),
    linear-gradient(115deg, rgba(255, 255, 255, .96), rgba(247, 241, 232, .94));
  box-shadow:
    0 18px 42px -34px rgba(80, 29, 36, .58),
    inset 0 0 0 1px rgba(255, 255, 255, .65);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.quick-question::before {
  content: "";
  position: absolute;
  top: 16%;
  right: 0;
  bottom: 16%;
  width: 3px;
  border-radius: 3px 0 0 3px;
  background: linear-gradient(180deg, var(--gold), var(--wine));
}

.quick-question__text {
  margin: 0;
  color: var(--wine-dark);
  font-size: clamp(12px, 1vw, 15px);
  font-weight: 800;
  line-height: 1.6;
  white-space: normal;
}

.quick-options {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(5px, .55vw, 9px);
}

.quick-options button {
  min-height: 46px;
  padding: 7px 8px;
  border-color: rgba(128, 89, 47, .18);
  border-radius: 11px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 10px 20px -20px rgba(80, 29, 36, .8);
  font-size: clamp(10px, .78vw, 12.5px);
  font-weight: 750;
}

.quick-options button:hover,
.quick-options button:focus-visible,
.quick-options button.is-selected,
.quick-options button[aria-pressed="true"] {
  border-color: var(--wine);
  color: #fff;
  background: linear-gradient(135deg, var(--wine), var(--wine-dark));
}

.media__frame {
  box-shadow:
    0 36px 88px -48px rgba(55, 34, 27, .86),
    0 0 0 1px rgba(128, 89, 47, .1);
}

.media__fullscreen {
  position: absolute;
  z-index: 20;
  top: clamp(14px, 1.35vw, 21px);
  left: clamp(14px, 1.35vw, 21px);
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(234, 216, 189, .42);
  border-radius: 999px;
  color: #fff;
  background: rgba(22, 17, 16, .62);
  box-shadow: 0 16px 30px -19px rgba(0, 0, 0, .88);
  backdrop-filter: blur(12px) saturate(115%);
  -webkit-backdrop-filter: blur(12px) saturate(115%);
  cursor: pointer;
  font-size: clamp(10px, .8vw, 12px);
  font-weight: 750;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s var(--ease);
}

.media__fullscreen:hover,
.media__fullscreen:focus-visible,
.media__fullscreen[aria-pressed="true"] {
  border-color: var(--gold);
  color: var(--wine-dark);
  background: rgba(239, 221, 194, .94);
  transform: translateY(-1px);
}

.media__fullscreen-icon {
  width: 18px;
  height: 18px;
  flex: none;
}

.media__fullscreen-icon--exit {
  display: none;
}

.media__fullscreen[aria-pressed="true"] .media__fullscreen-icon--enter {
  display: none;
}

.media__fullscreen[aria-pressed="true"] .media__fullscreen-icon--exit {
  display: block;
}

html.media-fullscreen-open,
body.media-fullscreen-open {
  overflow: hidden !important;
}

.media__stack:fullscreen,
.media__stack:-webkit-full-screen,
.media__stack.is-pseudo-fullscreen {
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  max-width: none !important;
  max-height: none !important;
  padding: clamp(8px, 1.2vw, 18px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: stretch;
  gap: clamp(8px, 1vw, 14px);
  background: #0d0b0b;
}

.media__stack.is-pseudo-fullscreen {
  position: fixed !important;
  z-index: 1000;
  inset: 0 !important;
}

.media__stack:fullscreen .media__frame,
.media__stack:-webkit-full-screen .media__frame,
.media__stack.is-pseudo-fullscreen .media__frame {
  width: 100% !important;
  height: 100% !important;
  min-height: 0;
  max-height: none !important;
  margin: 0 !important;
  aspect-ratio: auto;
  border-radius: clamp(14px, 1.4vw, 22px);
}

.media__stack:fullscreen .media__layer > video,
.media__stack:fullscreen .media__layer > img,
.media__stack:-webkit-full-screen .media__layer > video,
.media__stack:-webkit-full-screen .media__layer > img,
.media__stack.is-pseudo-fullscreen .media__layer > video,
.media__stack.is-pseudo-fullscreen .media__layer > img {
  object-fit: contain;
  padding: 0;
}

.media__stack::backdrop {
  background: #0d0b0b;
}

/* تبلت لمسی: دکمه‌ی تمام‌صفحه باید با لمس یک‌دستی واضح و بزرگ بماند. */
@media (min-width: 681px) and (max-width: 1200px) and (pointer: coarse) {
  .media__fullscreen {
    min-width: 54px;
    min-height: 54px;
    padding: 10px 15px;
    font-size: 13px;
  }

  .media__fullscreen-icon {
    width: 21px;
    height: 21px;
  }

  .media__stack.is-pseudo-fullscreen {
    padding: max(14px, env(safe-area-inset-top)) max(14px, env(safe-area-inset-right)) max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
  }
}

.panel {
  padding: clamp(25px, 2.35vw, 39px);
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 1.65vw, 27px);
  border-color: rgba(128, 89, 47, .16);
  background:
    radial-gradient(circle at 100% 0, rgba(204, 165, 111, .18), transparent 30%),
    radial-gradient(circle at 0 100%, rgba(117, 47, 55, .055), transparent 34%),
    linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(247, 242, 235, .95));
  box-shadow:
    0 30px 68px -48px rgba(55, 34, 27, .7),
    inset 0 0 0 1px rgba(255, 255, 255, .58);
}

.panel::before {
  right: clamp(27px, 3vw, 46px);
  width: clamp(58px, 5vw, 82px);
  height: 4px;
  background: linear-gradient(90deg, var(--wine), var(--gold));
}

.panel::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: -70px;
  left: -70px;
  width: 190px;
  height: 190px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(204, 165, 111, .13), transparent 67%);
  pointer-events: none;
}

.panel > * {
  position: relative;
  z-index: 1;
}

.panel__intro {
  padding-top: clamp(5px, .7vw, 10px);
}

.panel__title {
  max-width: 16ch;
  font-size: clamp(26px, 2.15vw, 35px);
  font-weight: 800;
  line-height: 1.52;
}

.category-picker {
  align-self: stretch;
  gap: clamp(10px, 1vw, 14px);
}

.control {
  margin-top: auto;
}

.category-button {
  isolation: isolate;
  min-height: clamp(78px, 6.4vw, 94px);
  padding: 13px clamp(16px, 1.5vw, 22px);
  border-color: rgba(128, 89, 47, .2);
  border-radius: clamp(17px, 1.45vw, 21px);
  color: var(--ink);
  background:
    radial-gradient(circle at 0 0, rgba(204, 165, 111, .13), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(246, 238, 228, .88));
  box-shadow:
    0 18px 38px -31px rgba(80, 29, 36, .7),
    inset 0 0 0 1px rgba(255, 255, 255, .64);
}

.category-button::before {
  top: 17%;
  right: 0;
  bottom: 17%;
  width: 4px;
  border-radius: 4px 0 0 4px;
  background: linear-gradient(180deg, var(--gold), var(--wine));
  transform: scaleY(.66);
}

.category-button::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0;
  opacity: 0;
  background:
    radial-gradient(circle at 5% 20%, rgba(234, 216, 189, .2), transparent 35%),
    linear-gradient(135deg, var(--wine), var(--wine-dark));
  transition: opacity .25s ease;
  pointer-events: none;
}

.category-button > * {
  position: relative;
  z-index: 1;
}

.category-button__identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.25vw, 17px);
}

.category-button__icon {
  width: clamp(45px, 4vw, 54px);
  height: clamp(45px, 4vw, 54px);
  flex: none;
  display: grid;
  place-items: center;
  border: 1px solid rgba(128, 89, 47, .2);
  border-radius: 16px;
  color: var(--wine);
  background: linear-gradient(145deg, rgba(255, 255, 255, .9), rgba(234, 216, 189, .6));
  box-shadow:
    0 12px 24px -20px rgba(80, 29, 36, .72),
    inset 0 0 0 1px rgba(255, 255, 255, .55);
  transition: color .23s ease, background .23s ease, border-color .23s ease, transform .23s var(--ease);
}

.category-button[data-category="obesity"] .category-button__icon {
  color: var(--gold-dark);
}

.category-button[data-category="safe-use"] .category-button__icon {
  color: #087f9d;
}

.category-button__icon svg {
  width: 25px;
  height: 25px;
}

.category-button__label {
  font-size: clamp(18px, 1.35vw, 21px);
  font-weight: 850;
  letter-spacing: -.02em;
}

.category-button:hover,
.category-button:focus-visible,
.category-button.is-active,
.category-button[aria-pressed="true"] {
  border-color: rgba(117, 47, 55, .72);
  color: #fff;
  background: var(--wine-dark);
  box-shadow:
    0 24px 44px -28px rgba(80, 29, 36, .82),
    0 0 0 1px rgba(204, 165, 111, .12);
  transform: translateY(-2px);
}

.category-button:hover::after,
.category-button:focus-visible::after,
.category-button.is-active::after,
.category-button[aria-pressed="true"]::after {
  opacity: 1;
}

.category-button:hover::before,
.category-button:focus-visible::before,
.category-button.is-active::before,
.category-button[aria-pressed="true"]::before {
  transform: scaleY(1);
}

.category-button:hover .category-button__icon,
.category-button:focus-visible .category-button__icon,
.category-button.is-active .category-button__icon,
.category-button[aria-pressed="true"] .category-button__icon {
  border-color: rgba(234, 216, 189, .55);
  color: var(--wine-dark);
  background: linear-gradient(145deg, #f5e8d5, var(--gold));
  transform: rotate(-2deg) scale(1.035);
}

.category-button:disabled {
  opacity: .5;
}

.category-button.is-active:disabled,
.category-button[aria-pressed="true"]:disabled {
  opacity: .84;
}

.category-button__arrow {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(128, 89, 47, .16);
  border-radius: 50%;
  color: var(--gold-dark);
  background: rgba(255, 255, 255, .55);
  font-size: 20px;
}

.category-button:hover .category-button__arrow,
.category-button:focus-visible .category-button__arrow,
.category-button.is-active .category-button__arrow,
.category-button[aria-pressed="true"] .category-button__arrow {
  border-color: rgba(234, 216, 189, .42);
  color: var(--gold-light);
  background: rgba(255, 255, 255, .07);
  transform: translateX(-3px);
}

.talk {
  min-height: clamp(204px, 18vw, 248px);
  border-color: rgba(204, 165, 111, .58);
  background:
    radial-gradient(circle at 0 100%, rgba(204, 165, 111, .18), transparent 40%),
    linear-gradient(140deg, #7e3540, var(--wine-dark) 76%);
  box-shadow:
    0 25px 48px -29px rgba(80, 29, 36, .9),
    inset 0 0 0 1px rgba(255, 255, 255, .055);
}

.talk__visual {
  width: clamp(90px, 8vw, 108px);
  height: clamp(90px, 8vw, 108px);
}

.talk__label {
  font-size: clamp(18px, 1.5vw, 23px);
}

.talk:hover:not(:disabled),
.talk:focus-visible:not(:disabled) {
  border-color: var(--gold);
  box-shadow:
    0 27px 52px -27px rgba(80, 29, 36, .95),
    0 0 0 4px rgba(204, 165, 111, .1);
}

@media (max-height: 700px) and (min-width: 981px) {
  .media__frame {
    width: min(100%, calc((100vh - 174px) * 16 / 9));
    width: min(100%, calc((100svh - 174px) * 16 / 9));
  }

  .quick-question {
    padding: 8px 10px;
  }

  .quick-options button {
    min-height: 44px;
  }

  .category-button__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .panel {
    padding: 14px 18px;
    gap: 8px;
  }

  .panel__intro {
    padding-top: 2px;
  }

  .panel__title {
    font-size: 21px;
    line-height: 1.4;
  }

  .category-picker {
    gap: 6px;
  }

  .category-button {
    min-height: 56px;
    padding: 7px 12px;
    border-radius: 14px;
  }

  .category-button__identity {
    gap: 9px;
  }

  .category-button__label {
    font-size: 16.5px;
  }

  .category-button__arrow {
    width: 28px;
    height: 28px;
    font-size: 17px;
  }

  .talk {
    min-height: 156px;
  }

  .talk__visual {
    width: 80px;
    height: 80px;
  }

  .talk__label {
    font-size: 15px;
  }
}

@media (max-width: 1100px) {
  .topbar__ai-title {
    padding-inline: 16px;
    font-size: 14px;
  }

  .stage {
    grid-template-columns: minmax(0, 1.42fr) minmax(330px, .72fr);
  }
}

@media (max-width: 980px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  }

  .stage {
    grid-template-columns: 1fr;
  }

  .media {
    height: auto;
    align-self: auto;
    display: block;
  }

  .media__stack {
    width: 100%;
  }

  .media__stack:has(.quick-question:not([hidden])) .media__frame {
    width: min(100%, calc((100vh - 290px) * 16 / 9));
    width: min(100%, calc((100svh - 290px) * 16 / 9));
    margin-inline: auto;
  }

  .panel {
    grid-template-rows: auto auto auto;
  }

  .talk {
    min-height: 216px;
  }
}

@media (max-width: 900px) and (min-width: 681px) {
  .brand__logo-frame {
    width: 200px;
    height: 52px;
  }

  .brand__logo {
    width: 245px;
    transform: translateY(-46px);
  }

  .category-picker {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .category-button {
    min-height: 82px;
    padding: 12px;
  }

  .category-button__identity {
    gap: 9px;
  }

  .category-button__icon {
    width: 42px;
    height: 42px;
    border-radius: 13px;
  }

  .category-button__arrow {
    display: none;
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 8px;
  }

  .topbar__ai-title {
    min-height: 38px;
    padding: 7px 11px;
    gap: 6px;
    font-size: 12px;
  }

  .topbar__ai-mark {
    font-size: 14px;
  }

  .media__stack:has(.quick-question:not([hidden])) {
    gap: 8px;
  }

  .quick-question {
    inset: auto;
    padding: 9px 10px 10px;
    grid-template-columns: 1fr;
    gap: 7px;
    border-radius: 14px;
  }

  .quick-question__text {
    margin: 0;
    overflow: visible;
    font-size: 12px;
    line-height: 1.5;
    text-overflow: clip;
    white-space: normal;
  }

  .quick-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .quick-options button {
    min-height: 44px;
    font-size: 10.5px;
  }

  .panel {
    padding: 22px 18px;
    gap: 15px;
  }

  .category-button {
    min-height: 70px;
    padding: 10px 14px;
  }

  .category-button__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  .category-button__icon svg {
    width: 23px;
    height: 23px;
  }

  .category-button__label {
    font-size: 18px;
  }

  .talk {
    min-height: 192px;
  }

  .talk__visual {
    width: 82px;
    height: 82px;
  }

  .talk__label {
    font-size: 17px;
  }
}

@media (max-width: 390px) and (orientation: portrait) {
  .talk {
    min-height: 180px;
  }

  .talk__visual {
    width: 76px;
    height: 76px;
  }
}

@media (max-width: 540px) {
  .topbar {
    padding-inline: 9px;
    gap: 6px;
  }

  .brand__logo-frame {
    width: 100px;
    height: 34px;
  }

  .brand__logo {
    width: 123px;
    transform: translate(-2px, -23px);
  }

  .topbar__ai-title {
    min-height: 36px;
    padding: 6px 8px;
    max-width: 145px;
    font-size: clamp(9.5px, 2.65vw, 11px);
    line-height: 1.25;
    text-align: center;
    white-space: normal;
  }

  .status {
    min-width: 36px;
    width: 36px;
    min-height: 36px;
    padding: 0;
    justify-content: center;
  }

  .status__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (max-width: 350px) {
  .topbar {
    padding-inline: 8px;
    gap: 4px;
  }

  .brand__logo-frame {
    width: 84px;
    height: 30px;
  }

  .brand__logo {
    width: 106px;
    transform: translate(-2px, -20px);
  }

  .topbar__ai-title {
    min-height: 32px;
    padding: 5px 6px;
    gap: 4px;
    max-width: 134px;
    font-size: 9.5px;
  }

  .topbar__ai-mark {
    font-size: 11px;
  }

  .status {
    min-width: 32px;
    width: 32px;
    min-height: 32px;
  }
}

/* Short landscape: question and video stay together; the consultation rail scrolls independently. */
@media (max-width: 980px) and (max-height: 700px) and (orientation: landscape) {
  body {
    overflow: hidden;
  }

  .topbar {
    height: 60px;
    min-height: 60px;
  }

  .stage {
    height: calc(100vh - 60px);
    height: calc(100svh - 60px);
    padding: 10px var(--pad);
    grid-template-columns: minmax(0, 1fr) minmax(240px, .72fr);
    gap: 10px;
    overflow: hidden;
  }

  .media {
    position: sticky;
    top: 60px;
    height: 100%;
    align-self: stretch;
    display: grid;
    place-items: center;
    padding: 0;
    background: transparent;
  }

  .media::before {
    display: none;
  }

  .media__stack:has(.quick-question:not([hidden])) {
    gap: 6px;
  }

  .quick-question {
    padding: 6px 7px;
    grid-template-columns: minmax(78px, .28fr) minmax(0, 1fr);
    gap: 5px;
    border-radius: 11px;
  }

  .quick-question__text {
    font-size: 9.5px;
    line-height: 1.35;
  }

  .quick-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
  }

  .quick-options button {
    min-height: 44px;
    padding: 3px 2px;
    border-radius: 8px;
    font-size: 8.5px;
    line-height: 1.25;
  }

  .media__frame {
    width: 100%;
    margin-inline: 0;
  }

  .panel {
    height: 100%;
    padding: 12px;
    gap: 7px;
    overflow-y: auto;
    scrollbar-width: thin;
  }

  .panel__title {
    font-size: 18px;
    line-height: 1.4;
  }

  .category-picker {
    align-self: stretch;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .category-button {
    min-height: 52px;
    padding: 7px 10px;
    border-radius: 13px;
  }

  .category-button__identity {
    gap: 8px;
  }

  .category-button__icon {
    width: 36px;
    height: 36px;
    border-radius: 11px;
  }

  .category-button__icon svg {
    width: 20px;
    height: 20px;
  }

  .category-button__label {
    font-size: 15px;
  }

  .category-button__arrow {
    width: 27px;
    height: 27px;
    font-size: 16px;
  }

  .talk {
    min-height: 136px;
  }

  .talk__visual {
    width: 70px;
    height: 70px;
  }

  .talk__label {
    font-size: 13px;
  }
}

@media (max-width: 620px) and (max-height: 700px) and (orientation: landscape) {
  .brand__logo-frame {
    width: 130px;
    height: 42px;
  }

  .brand__logo {
    width: 160px;
    transform: translate(-3px, -30px);
  }

  .topbar__ai-title {
    min-height: 34px;
    padding: 5px 7px;
    font-size: 10.5px;
  }

  .status {
    min-width: 34px;
    width: 34px;
    min-height: 34px;
    padding: 0;
    justify-content: center;
  }

  .status__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
}

@media (min-width: 981px) and (min-height: 701px) and (max-height: 850px) {
  .panel {
    padding: 14px 18px;
    gap: 8px;
    overflow: hidden;
  }

  .panel__intro {
    padding-top: 2px;
  }

  .panel__title {
    font-size: 21px;
    line-height: 1.4;
  }

  .category-picker {
    gap: 6px;
  }

  .category-button {
    min-height: 56px;
    padding: 7px 12px;
    border-radius: 14px;
  }

  .category-button__identity {
    gap: 9px;
  }

  .category-button__icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .category-button__label {
    font-size: 16.5px;
  }

  .category-button__arrow {
    width: 28px;
    height: 28px;
    font-size: 17px;
  }
}

@media (forced-colors: active) {
  .topbar__ai-title,
  .category-button__icon,
  .category-button__arrow,
  .media__fullscreen {
    border: 1px solid CanvasText;
  }
}

/* ── Zcorpa finishing system: light, restrained and tablet-friendly ── */
html { background: #f3ebf9; }

body {
  background:
    radial-gradient(62% 70% at 0 100%, rgba(20, 166, 200, .16), transparent 66%),
    radial-gradient(55% 65% at 100% 0, rgba(112, 47, 138, .13), transparent 69%),
    linear-gradient(135deg, #fbf9fd 0%, #f3ebf9 54%, #e7f7fb 100%);
  font-feature-settings: "ss01" 1, "kern" 1;
}

.topbar {
  border-bottom-color: rgba(112, 47, 138, .09);
  background: rgba(255, 253, 247, .86);
}

.brand__logo-frame {
  width: clamp(156px, 16vw, 245px);
  height: clamp(42px, 4.25vw, 64px);
}

.brand__logo {
  width: 100%;
  height: 100%;
  transform: none;
}

.brand__descriptor { border-right-color: rgba(112, 47, 138, .18); }

.topbar__ai-title {
  color: #fff;
  background: linear-gradient(135deg, #702f8a, #14a6c8);
  box-shadow: 0 12px 28px -20px rgba(112, 47, 138, .8);
}

.topbar__ai-mark { color: #bdebf5; }

.stage { gap: clamp(16px, 1.7vw, 28px); }

.panel {
  border-color: rgba(112, 47, 138, .12);
  background:
    radial-gradient(circle at 100% 0, rgba(20, 166, 200, .17), transparent 29%),
    radial-gradient(circle at 0 100%, rgba(112, 47, 138, .08), transparent 35%),
    linear-gradient(145deg, rgba(255, 255, 255, .97), rgba(247, 252, 250, .96));
  box-shadow: 0 30px 68px -48px rgba(112, 47, 138, .46), inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.panel::before { background: linear-gradient(90deg, var(--wine), var(--gold)); }
.panel::after { background: radial-gradient(circle, rgba(112, 47, 138, .11), transparent 67%); }
.panel__title { color: var(--ink); }

.category-button {
  border-color: rgba(112, 47, 138, .16);
  background:
    radial-gradient(circle at 0 0, rgba(20, 166, 200, .12), transparent 38%),
    linear-gradient(135deg, rgba(255, 255, 255, .97), rgba(239, 248, 246, .9));
  box-shadow: 0 18px 38px -31px rgba(112, 47, 138, .42), inset 0 0 0 1px rgba(255, 255, 255, .7);
}

.category-button::before { background: linear-gradient(180deg, var(--gold), var(--wine)); }
.category-button::after { background: linear-gradient(135deg, #14a6c8, #702f8a); }
.category-button__icon {
  border-color: rgba(112, 47, 138, .16);
  color: var(--wine);
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(235, 246, 243, .8));
  box-shadow: 0 12px 24px -20px rgba(112, 47, 138, .46), inset 0 0 0 1px rgba(255,255,255,.7);
}

.category-button[data-category="diabetes"] .category-button__icon { color: #14a6c8; }
.category-button[data-category="safe-use"] .category-button__icon { color: #087f9d; }

.category-button:hover,
.category-button:focus-visible,
.category-button.is-active,
.category-button[aria-pressed="true"] {
  border-color: rgba(112, 47, 138, .75);
  background: #702f8a;
  box-shadow: 0 24px 44px -28px rgba(112, 47, 138, .74), 0 0 0 1px rgba(20, 166, 200, .15);
}

.category-button:hover .category-button__icon,
.category-button:focus-visible .category-button__icon,
.category-button.is-active .category-button__icon,
.category-button[aria-pressed="true"] .category-button__icon {
  color: #702f8a;
  background: #bdebf5;
}

.media__frame {
  border-color: rgba(255, 255, 255, .62);
  background: #2e173a;
  box-shadow: 0 36px 88px -48px rgba(112, 47, 138, .7), 0 0 0 1px rgba(112, 47, 138, .1);
}

.media__frame::after {
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.1), inset 0 -120px 120px -80px rgba(42, 18, 55, .52);
}

/* Portrait posters sit inside a deliberate gallery mat instead of stretching. */
.media__layer.is-contain {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 42%, rgba(20, 166, 200, .2), transparent 39%),
    linear-gradient(135deg, #702f8a, #59168b);
}

.media__layer.is-contain.is-image > img,
.media__layer.is-contain.is-video > video {
  width: min(74%, calc(100% - 44px));
  height: calc(100% - 36px);
  padding: 0;
  object-fit: contain;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: clamp(14px, 1.7vw, 24px);
  background: #f7f2fb;
  box-shadow: 0 22px 42px -27px rgba(0,0,0,.72);
}

.quick-question {
  border-color: rgba(112, 47, 138, .18);
  background:
    radial-gradient(circle at 100% 0, rgba(20, 166, 200, .15), transparent 34%),
    linear-gradient(115deg, rgba(255, 255, 255, .98), rgba(245, 251, 249, .96));
  box-shadow: 0 18px 42px -34px rgba(112, 47, 138, .46), inset 0 0 0 1px rgba(255,255,255,.7);
}

.quick-question::before { background: linear-gradient(180deg, var(--gold), var(--wine)); }
.quick-question__text { color: var(--ink); }
.quick-options button { border-color: rgba(112, 47, 138, .15); color: var(--ink-soft); }
.quick-options button:hover,
.quick-options button:focus-visible,
.quick-options button.is-selected,
.quick-options button[aria-pressed="true"] { border-color: var(--wine); background: linear-gradient(135deg, #14a6c8, #702f8a); }

.entry-gate {
  background:
    linear-gradient(120deg, rgba(89, 22, 139, .87), rgba(112, 47, 138, .78)),
    url("assets/zcorpa/hero.jpg") center / cover;
}

.entry-gate__card { border-color: rgba(255,255,255,.42); box-shadow: 0 34px 84px -44px rgba(0,0,0,.74); }
.entry-gate__brand { color: #fff; background: linear-gradient(135deg, var(--wine), #702f8a); }
.entry-gate__primary { background: linear-gradient(135deg, #14a6c8, #702f8a); }

.comparison-panel {
  display: block;
  width: 100%;
  padding: clamp(16px, 1.5vw, 23px);
  border: 1px solid rgba(112, 47, 138, .15);
  border-radius: clamp(18px, 1.75vw, 26px);
  color: var(--ink);
  background:
    radial-gradient(circle at 100% 0, rgba(20, 166, 200, .15), transparent 35%),
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(242,250,248,.98));
  box-shadow: 0 22px 48px -37px rgba(112, 47, 138,.52);
}

.comparison-panel[hidden] { display: none !important; }

.comparison-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.comparison-panel__eyebrow { margin: 0; color: var(--wine); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; font-weight: 800; letter-spacing: .14em; }
.comparison-panel__close { min-height: 34px; padding: 5px 11px; border: 1px solid rgba(112, 47, 138,.18); border-radius: 999px; color: var(--ink); background: rgba(255,255,255,.7); cursor: pointer; font-size: 12px; font-weight: 750; }
.comparison-panel__close:hover, .comparison-panel__close:focus-visible { color: #fff; border-color: var(--wine); background: var(--wine); }
.comparison-panel__title { margin: 14px 0; font-size: clamp(15px, 1.35vw, 20px); line-height: 1.7; }
.comparison-panel__cards { display: grid; min-height: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; gap: clamp(10px, 1vw, 15px); }
.comparison-card { display: grid; min-width: 0; min-height: 0; overflow: hidden; grid-template-rows: minmax(0, 1fr) auto; border: 1px solid rgba(112, 47, 138,.13); border-radius: 16px; background: #fff; box-shadow: 0 14px 28px -25px rgba(112, 47, 138,.58); }
.comparison-card__image { display: block; width: 100%; height: 100%; min-height: 0; aspect-ratio: 16 / 8; object-fit: cover; background: #e8f1f0; }
.comparison-card--packaging .comparison-card__image { object-fit: contain; padding: 8px; background: linear-gradient(145deg, #f8fbfa, #e8f1f0); }
.comparison-card--no-image .comparison-card__image { display: none; }
.comparison-card__body { display: grid; min-width: 0; padding: 11px 12px 13px; align-content: start; }
.comparison-card__eyebrow { margin: 0 0 5px; color: var(--wine); font-size: 10px; font-weight: 800; }
.comparison-card__title { margin: 0; font-size: clamp(12px, 1vw, 15px); line-height: 1.65; }
.comparison-card__subtitle { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.comparison-card__price { margin: 8px 0 0; color: #0f665b; font-size: clamp(11px, .9vw, 14px); font-weight: 850; line-height: 1.65; }
.comparison-card__buy {
  display: inline-flex;
  width: fit-content;
  min-height: 38px;
  margin-top: 9px;
  padding: 7px 13px;
  align-items: center;
  justify-content: center;
  color: #fff !important;
  background: linear-gradient(135deg, #14a6c8, #702f8a);
  border: 1px solid #d7b662;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.5;
  text-decoration: none;
}
.comparison-card__buy:hover, .comparison-card__buy:focus-visible { filter: brightness(1.1); outline: 3px solid rgba(20, 166, 200,.34); outline-offset: 2px; }
.comparison-panel__note { margin: 12px 0 0; color: var(--muted); font-size: 11px; line-height: 1.8; }
.media__stack:has(.comparison-panel:not([hidden])) { gap: clamp(9px, .85vw, 13px); }

/* هنگام مقایسه در همهٔ حالت‌ها فقط کارت‌های مقایسه در قاب تصویری می‌مانند. */
.media__stack.is-comparing {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.media__stack.is-comparing > .media__question-slot,
.media__stack.is-comparing > .media__frame {
  display: none !important;
}

.media__stack.is-comparing > .comparison-panel {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: clamp(14px, 1.5vw, 23px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
}

@media (max-width: 700px) {
  .brand__logo-frame { width: 146px; height: 40px; }
  .comparison-panel__cards { grid-template-columns: 1fr; }
  .media__stack.is-comparing > .comparison-panel { height: auto; min-height: 100%; overflow-y: auto; }
  .comparison-card { grid-template-columns: minmax(110px, .48fr) 1fr; grid-template-rows: minmax(150px, auto); }
  .comparison-card__image { height: 100%; aspect-ratio: auto; }
  .media__layer.is-contain.is-image > img,
  .media__layer.is-contain.is-video > video { width: min(88%, calc(100% - 26px)); height: calc(100% - 24px); }
}

/* در تمام‌صفحه نیز همین ساختار، تمام ارتفاع ایمن دستگاه را مصرف می‌کند. */
.media__stack.is-comparing:fullscreen,
.media__stack.is-comparing:-webkit-full-screen,
.media__stack.is-comparing.is-pseudo-fullscreen {
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
}

.media__stack.is-comparing:fullscreen > .media__question-slot,
.media__stack.is-comparing:fullscreen > .media__frame,
.media__stack.is-comparing:-webkit-full-screen > .media__question-slot,
.media__stack.is-comparing:-webkit-full-screen > .media__frame,
.media__stack.is-comparing.is-pseudo-fullscreen > .media__question-slot,
.media__stack.is-comparing.is-pseudo-fullscreen > .media__frame {
  display: none !important;
}

.media__stack.is-comparing:fullscreen > .comparison-panel,
.media__stack.is-comparing:-webkit-full-screen > .comparison-panel,
.media__stack.is-comparing.is-pseudo-fullscreen > .comparison-panel {
  display: grid;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: clamp(16px, 2vw, 30px);
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: clamp(14px, 1.4vw, 22px);
}

.media__stack.is-comparing:fullscreen .comparison-panel__close,
.media__stack.is-comparing:-webkit-full-screen .comparison-panel__close,
.media__stack.is-comparing.is-pseudo-fullscreen .comparison-panel__close {
  min-width: 58px;
  min-height: 44px;
  padding: 8px 14px;
}

.media__stack.is-comparing:fullscreen .comparison-panel__title,
.media__stack.is-comparing:-webkit-full-screen .comparison-panel__title,
.media__stack.is-comparing.is-pseudo-fullscreen .comparison-panel__title {
  margin: clamp(8px, 1vh, 14px) 0;
  font-size: clamp(17px, 1.5vw, 26px);
}

.media__stack.is-comparing:fullscreen .comparison-panel__cards,
.media__stack.is-comparing:-webkit-full-screen .comparison-panel__cards,
.media__stack.is-comparing.is-pseudo-fullscreen .comparison-panel__cards {
  height: 100%;
  min-height: 0;
  align-items: stretch;
}

.media__stack.is-comparing:fullscreen .comparison-card,
.media__stack.is-comparing:-webkit-full-screen .comparison-card,
.media__stack.is-comparing.is-pseudo-fullscreen .comparison-card {
  display: grid;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) auto;
}

.media__stack.is-comparing:fullscreen .comparison-card__image,
.media__stack.is-comparing:-webkit-full-screen .comparison-card__image,
.media__stack.is-comparing.is-pseudo-fullscreen .comparison-card__image {
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
}

.media__stack.is-comparing:fullscreen .comparison-panel__note,
.media__stack.is-comparing:-webkit-full-screen .comparison-panel__note,
.media__stack.is-comparing.is-pseudo-fullscreen .comparison-panel__note {
  margin-top: clamp(7px, 1vh, 12px);
}

@media (max-width: 700px) {
  .media__stack.is-comparing:fullscreen .comparison-card,
  .media__stack.is-comparing:-webkit-full-screen .comparison-card,
  .media__stack.is-comparing.is-pseudo-fullscreen .comparison-card {
    grid-template-rows: minmax(0, 1fr);
  }
}

@media (min-width: 701px) and (max-height: 700px) {
  .media__stack.is-comparing > .comparison-panel { padding: 10px 13px; }
  .comparison-panel__title { margin: 5px 0 7px; font-size: 14px; }
  .comparison-card__body { padding: 7px 9px 8px; }
  .comparison-card__subtitle { margin-top: 2px; }
  .comparison-card__price { margin-top: 4px; }
  .comparison-card__buy { min-height: 32px; margin-top: 5px; padding-block: 5px; }
  .comparison-panel__note { margin-top: 5px; line-height: 1.45; }
}

/* Mobile PWA handoff */
.mobile-access {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 18px;
}
.mobile-access__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 29, 43, .76);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.mobile-access__card {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(100%, 470px);
  max-height: calc(100svh - 32px);
  justify-items: center;
  overflow-y: auto;
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  color: var(--ink);
  background: linear-gradient(145deg, #fff, var(--surface));
  box-shadow: 0 38px 90px -34px rgba(0,0,0,.74);
  text-align: center;
}
.mobile-access__close {
  position: absolute;
  top: 13px;
  left: 13px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-soft);
  background: #fff;
  cursor: pointer;
  font-size: 1.25rem;
}
.mobile-access__eyebrow { margin: 0 0 8px; color: var(--wine); direction: ltr; font-size: .66rem; font-weight: 850; letter-spacing: .12em; }
.mobile-access__card h2 { margin: 0; font-size: clamp(1.3rem, 5vw, 1.9rem); line-height: 1.6; }
.mobile-access__card > p:not(.mobile-access__eyebrow) { max-width: 370px; margin: 9px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.95; }
.mobile-access__qr {
  display: grid;
  width: 218px;
  height: 218px;
  place-items: center;
  margin: 19px 0 15px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 18px 42px -32px rgba(112, 47, 138,.5);
}
.mobile-access__qr img, .mobile-access__qr canvas { display: block; width: 192px !important; height: 192px !important; image-rendering: pixelated; }
.mobile-access__qr-error { max-width: 165px; color: var(--muted); font-size: .7rem; line-height: 1.9; }
.mobile-access__link { display: grid; width: 100%; gap: 4px; padding: 12px 15px; border: 1px solid var(--line); border-radius: 13px; color: var(--ink); background: var(--surface-soft); text-decoration: none; }
.mobile-access__link span { font-size: .78rem; font-weight: 800; }
.mobile-access__link bdi { color: var(--muted); font-size: .64rem; }
.mobile-access__copy { min-height: 41px; margin-top: 9px; padding: 8px 18px; border: 0; border-radius: 999px; color: #fff; background: var(--wine); cursor: pointer; font-weight: 750; }
body.has-mobile-access { overflow: hidden; }

/* Update prompt: visible only when a newly installed service worker is waiting. */
.pwa-update {
  position: fixed;
  right: 50%;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 320;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: min(calc(100% - 28px), 520px);
  min-height: 70px;
  align-items: center;
  gap: 12px;
  padding: 10px 12px 10px 10px;
  border: 1px solid rgba(255, 255, 255, .54);
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 92% 0, rgba(20, 166, 200, .25), transparent 38%),
    linear-gradient(135deg, rgba(89, 22, 139, .97), rgba(112, 47, 138, .98));
  box-shadow: 0 24px 66px -28px rgba(4, 26, 38, .92), inset 0 1px rgba(255,255,255,.12);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(50%);
  animation: pwa-update-enter .36s cubic-bezier(.2, .8, .2, 1) both;
}
.pwa-update[hidden] { display: none; }
.pwa-update__icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 14px;
  color: #bdebf5;
  background: rgba(255,255,255,.1);
}
.pwa-update__icon svg { width: 21px; height: 21px; }
.pwa-update__copy { display: grid; min-width: 0; gap: 2px; }
.pwa-update__copy strong { font-size: .78rem; font-weight: 850; line-height: 1.55; }
.pwa-update__copy small { overflow: hidden; color: rgba(255,255,255,.72); font-size: .62rem; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.pwa-update__button {
  min-height: 42px;
  padding: 8px 16px;
  border: 0;
  border-radius: 13px;
  color: #702f8a;
  background: linear-gradient(135deg, #fff2c8, #bdebf5);
  box-shadow: 0 10px 24px -14px rgba(0,0,0,.8);
  cursor: pointer;
  font: inherit;
  font-size: .7rem;
  font-weight: 850;
}
.pwa-update__button:hover,
.pwa-update__button:focus-visible { background: #fff; transform: translateY(-1px); }
.pwa-update__button:disabled { cursor: wait; opacity: .72; transform: none; }

.release-version {
  position: fixed;
  z-index: 24;
  inset-inline-start: max(10px, env(safe-area-inset-left));
  inset-block-end: max(8px, env(safe-area-inset-bottom));
  padding: 2px 5px;
  color: rgba(255,255,255,.72);
  background: rgba(10, 37, 51, .28);
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 5px;
  font: 700 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: .04em;
  pointer-events: none;
  user-select: none;
}

@keyframes pwa-update-enter {
  from { opacity: 0; transform: translate(50%, 18px) scale(.98); }
  to { opacity: 1; transform: translate(50%, 0) scale(1); }
}

@media (max-width: 620px) {
  /* On a phone the QR handoff is redundant; keeping only install + status also
     prevents the kiosk header from widening the visual viewport. */
  html,
  body { max-width: 100%; overflow-x: clip; }
  .topbar {
    grid-template-columns: 100px minmax(0, 1fr) auto;
    overflow-x: clip;
  }
  .brand__logo-frame { width: 100px; height: 34px; }
  .topbar__meta { min-width: 0; gap: 6px; }
  .mobile-access-trigger { display: none; }
  .install-app:not(.mobile-access-trigger) { min-height: 36px; padding-inline: 10px; font-size: 10px; }
  .conversation.visually-hidden { display: none !important; }
  .mobile-access__qr { width: 194px; height: 194px; }
  .mobile-access__qr img, .mobile-access__qr canvas { width: 168px !important; height: 168px !important; }
  .pwa-update { grid-template-columns: auto minmax(0, 1fr); padding: 10px; }
  .pwa-update__button { grid-column: 1 / -1; width: 100%; min-height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  .pwa-update { animation: none; }
  .pwa-update__button { transition: none; }
}
