:root {
  color-scheme: light;
  --brand: #593378;
  --deep: #251633;
  --ink: #292037;
  --muted: #615769;
  --soft: #f1eaf6;
  --surface: #fcf9fd;
  --border: #e4dbe9;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: #eae3ef; }
button, input { font: inherit; }
button { cursor: pointer; touch-action: manipulation; }
button:focus-visible, input:focus-visible { outline: 3px solid #a25bbb; outline-offset: 3px; }
h1, h2, h3, p, figure { margin: 0; }
#app { max-width: 1056px; min-height: 100dvh; margin: auto; background: var(--surface); }
.masthead {
  min-height: 70px; padding: max(12px, env(safe-area-inset-top)) 17px 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: var(--deep); color: #fff;
}
.identity { display: flex; align-items: center; gap: 9px; line-height: 1.22; }
.identity strong { display: block; font-size: 15px; letter-spacing: -.015em; }
.identity div > span { color: #e0d0eb; font-size: 11px; display: block; margin-top: 3px; }
.brand-mark {
  display: grid; place-items: center; flex: 0 0 37px; height: 37px;
  border: 1px solid #866b98; border-radius: 10px; color: #e7c9f7; background: #3c264f;
}
.brand-mark svg { width: 24px; height: 24px; }
.demo-label, .image-label {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 4px 9px; font-size: 10px; font-weight: 740; letter-spacing: .045em;
}
.demo-label { color: #faf2ff; border: 1px solid #9b7eac; white-space: nowrap; }
.entry, .experience { padding: 16px 15px max(18px, env(safe-area-inset-bottom)); }
.hero {
  position: relative; isolation: isolate; display: flex; align-items: flex-end;
  min-height: clamp(350px, 62dvh, 550px); overflow: hidden;
  border-radius: 18px; background: #483752; color: white;
}
.hero > img, .avatar-card > img, .avatar-card > video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero > img { z-index: -2; object-position: 56% center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #1c1028a8, transparent 80%), linear-gradient(0deg, #1b1027f7 0%, #23152f43 60%, transparent 100%);
}
.hero-content { padding: 24px 17px 43px; }
.eyebrow { color: var(--brand); text-transform: uppercase; letter-spacing: .12em; font-size: 10px; font-weight: 800; }
.hero .eyebrow { color: #f2d6ff; display: flex; align-items: center; gap: 8px; }
.hero .eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #d6a7ee; }
h1 { max-width: 12ch; margin-top: 10px; font: 500 clamp(37px, 8.6vw, 79px)/.98 Georgia, serif; letter-spacing: -.055em; }
.image-label { position: absolute; top: 12px; right: 12px; background: #281a34ed; color: white; }
.entry-intro { display: grid; gap: 16px; padding: 19px 4px 0; }
.entry-intro p { color: var(--muted); max-width: 43ch; }
.primary {
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  border-radius: 12px; font-weight: 720; min-height: 50px; padding: 10px 15px;
}
.primary:hover, .menu .featured:hover { background: #482660; }
#start { width: 100%; display: flex; align-items: center; justify-content: space-between; text-align: left; }
#start span { font-size: 23px; line-height: 1; }
footer { color: var(--muted); padding: 19px 4px 0; font-size: 11px; }
footer span { padding: 0 3px; }
.experience-bar { margin: -4px 0 7px; }
.back {
  min-height: 44px; padding: 0 7px; border: 0; background: transparent;
  color: var(--brand); font-weight: 730; text-align: left; font-size: 13px;
}
.back:hover { text-decoration: underline; }
.avatar-card {
  min-height: clamp(166px, 25dvh, 230px); position: relative; isolation: isolate;
  overflow: hidden; display: flex; align-items: center;
  border-radius: 17px; background: #ebdbf3;
}
.avatar-card > img { z-index: -2; object-position: center 38%; }
.avatar-card:has(.avatar-copy:not([hidden]))::before {
  position: absolute; inset: 0; content: ""; z-index: -1;
  background: linear-gradient(90deg, #f0e5f9 0%, #f0e5f9ed 38%, #f0e5f900 69%);
}
.avatar-card > video { object-fit: contain; background: var(--deep); }
.avatar-copy { padding: 14px 15px; width: min(65%, 270px); }
.avatar-copy h2 { font: 500 clamp(24px, 5vw, 36px)/1.01 Georgia, serif; margin: 5px 0; letter-spacing: -.035em; }
.avatar-copy > p:last-child { font-size: 11px; color: var(--muted); }
.media-icon {
  display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid #b99fc9;
  border-radius: 50%; color: var(--brand); font-size: 17px; margin-bottom: 8px;
}
.panel > h2, .guide-screen > h2 { line-height: 1.18; letter-spacing: -.035em; font-size: 23px; margin: 15px 0 10px; }
.menu { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.menu button {
  display: flex; flex-direction: column; align-items: flex-start; position: relative; gap: 8px;
  padding: 10px; min-width: 0; min-height: 111px; background: white; color: var(--ink);
  text-align: left; border: 1px solid var(--border); border-radius: 13px;
}
.menu button:hover { border-color: #a282b6; background: #f8f3fa; }
.tile-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--soft); color: var(--brand); }
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tile-text { display: grid; gap: 3px; line-height: 1.2; }
.tile-text strong { font-size: 13px; }
.tile-text small { font-size: 11px; color: var(--muted); }
.tile-arrow { position: absolute; top: 10px; right: 10px; font-size: 15px; color: var(--brand); }
.menu .featured {
  grid-column: 1 / -1; min-height: 62px; flex-direction: row; align-items: center;
  gap: 10px; border-color: var(--brand); background: var(--brand); color: white;
}
.featured .tile-icon { background: #ffffff23; color: white; }
.featured .tile-text small { color: #f0def6; }
.featured .tile-arrow { color: white; top: 50%; transform: translateY(-50%); }
.topic, .guide-screen {
  background: white; border: 1px solid var(--border); border-radius: 17px;
  padding: 6px 13px 14px;
}
.topic .eyebrow { margin-top: 6px; }
.topic h2 { margin: 5px 0 9px; font: 500 clamp(31px, 6vw, 52px)/1.03 Georgia, serif; letter-spacing: -.045em; }
.topic-intro { margin-bottom: 17px; color: var(--muted); max-width: 61ch; }
.topic-block { background: var(--soft); border-radius: 11px; padding: 14px; margin: 9px 0; }
.topic-block h3 { font-size: 15px; margin-bottom: 3px; }
.topic-block p, .update-copy p { color: var(--muted); font-size: 14px; }
.gallery { touch-action: pan-y; }
.sample-photo { position: relative; overflow: hidden; aspect-ratio: 1.46; border-radius: 10px; background: var(--soft); }
.sample-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { padding: 10px 0; }
.gallery figcaption p { color: var(--muted); font-size: 13px; }
.gallery-nav { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: 13px; }
.secondary {
  min-height: 44px; padding: 7px 10px; color: var(--brand);
  border: 1px solid var(--border); border-radius: 10px; background: white; font-weight: 650;
}
.secondary:hover { background: var(--soft); }
.updates { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.updates li { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.updates .sample-photo { border-radius: 0; }
.update-copy { padding: 10px 12px 13px; }
.update-copy h3 { margin: 3px 0; font-size: 17px; }
time { font-size: 11px; font-weight: 740; color: var(--brand); }
.show-guide .avatar-stage { display: none; }
.guide-screen { min-height: 380px; display: flex; flex-direction: column; }
.guide-screen > h2 { margin-top: 3px; }
.guide-screen .back { align-self: flex-start; }
.guide-note, .voice-status { color: var(--muted); font-size: 12px; }
.sample-chat { display: flex; flex-direction: column; gap: 9px; }
.messages { min-height: 145px; max-height: min(45dvh, 460px); overflow: auto; overscroll-behavior-y: contain; display: flex; flex-direction: column; gap: 8px; padding: 4px 3px; }
.message { align-self: flex-start; flex-shrink: 0; max-width: 91%; overflow-wrap: anywhere; border-radius: 12px; padding: 8px 10px; background: var(--soft); font-size: 14px; }
.message strong { color: var(--brand); font-size: 11px; }
.message.yours { align-self: flex-end; background: var(--deep); color: white; }
.message.yours strong { color: #ebd8f4; }
.read-reply { min-height: 34px; padding: 0; font-size: 11px; border: 0; background: transparent; color: var(--brand); font-weight: 720; text-decoration: underline; }
.suggested { display: flex; flex-wrap: wrap; gap: 5px; }
.suggested button { min-height: 38px; font-size: 11px; }
.chat-form { display: grid; gap: 6px; grid-template-columns: auto minmax(0, 1fr) auto; }
.chat-form input { width: 100%; min-height: 44px; border: 1px solid #c5b3d0; padding: 8px; border-radius: 10px; background: white; color: var(--ink); }
.chat-form .primary { min-height: 44px; padding-inline: 10px; }
#voice { display: grid; place-items: center; min-width: 44px; padding: 0; }
#voice[aria-pressed=true] { background: var(--soft); border-color: var(--brand); }
.voice-status:empty { display: none; }
.guide-loading { flex: 1; display: grid; min-height: 170px; place-content: center; justify-items: center; gap: 10px; text-align: center; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 610px) {
  .masthead { padding-inline: 29px; }
  .entry, .experience { padding-inline: 27px; }
  .hero-content { padding: 30px 36px 48px; }
  .entry-intro { grid-template-columns: 1fr minmax(200px, 260px); align-items: center; }
  .tile-text strong { font-size: 15px; }
  .menu button { min-height: 104px; }
  .avatar-copy { padding-inline: 24px; }
  .panel > h2 { margin-top: 20px; }
  .topic, .guide-screen { padding-inline: 22px; }
  .updates { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 760px) {
  .experience:not(.show-topic):not(.show-guide) { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 18px; align-items: start; }
  .experience-bar { grid-column: 1 / -1; }
  .avatar-card { min-height: 359px; }
  .avatar-card > img { object-position: 62% center; }
  .panel > h2 { margin-top: 0; }
  .gallery .sample-photo { aspect-ratio: 2.3; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .hero { min-height: clamp(170px, 54dvh, 270px); }
  .hero-content { padding-block: 17px 27px; }
  .hero h1 { font-size: clamp(35px, 8vw, 57px); }
  .messages { min-height: 115px; }
}
.guide-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid color-mix(in srgb, var(--brand) 20%, white);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: guide-spin .8s linear infinite;
}
@keyframes guide-spin { to { transform: rotate(1turn); } }
@media (prefers-reduced-motion: reduce) {
  .guide-spinner { animation: none; }
}
.guide-chat { display: flex; flex: 1; min-height: 0; }
.embedded-ai-guide > #myai2-widget,
#guide-chat :is(#myai2-toggle-btn, #myai2-header-close-btn, #myai2-resize-handle) {
  display: none !important;
}
#guide-chat #myai2-widget {
  --primary-color: var(--brand) !important;
  --send-button-color: var(--brand) !important;
  --speech-bubble-color: var(--brand) !important;
  --launch-button-color: var(--brand) !important;
  --text-color: var(--ink);
  display: flex;
  flex: 1;
  min-width: 0;
  min-height: 0;
  font: inherit;
}
#guide-chat #myai2-chat-window {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  max-height: none !important;
  transform: none !important;
  box-shadow: none;
  transition: none;
  border: 1px solid var(--soft);
  border-radius: 14px;
}
#guide-chat .myai2-header { padding: 9px 12px; }
#guide-chat .myai2-header-subtitle { font-size: 12px; }
#guide-chat .myai2-messages { padding: 12px; background: #fff; }
#guide-chat .myai2-message.ai .myai2-message-bubble:not(.myai2-tool-bubble) {
  background: var(--soft);
  color: var(--ink);
}
#guide-chat .myai2-input-area { padding: 8px; border-color: var(--soft); }
#guide-chat #myai2-input { min-width: 0; font-size: 16px; }

.guide-chat:not([hidden]) { min-height: 355px; }
.show-guide:has(.guide-chat:not([hidden])) .guide-screen { min-height: max(410px, calc(var(--guide-height, 100dvh) - 146px)); }
