/* Telluna v3 mobile-first application shell */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--bg-soft);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: var(--bg-soft);
  color: var(--ink-2);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  color: var(--ink);
  font-family: var(--font-display);
}

button,
a,
input {
  font: inherit;
}

a {
  color: inherit;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-shell {
  position: relative;
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-soft);
}

.appbar {
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
  min-height: calc(63px + env(safe-area-inset-top));
  padding: calc(14px + env(safe-area-inset-top)) 20px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.appbar__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.appbar__logo img {
  display: block;
  width: auto;
  height: 18px;
}

.appbar__right {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.bar-bell {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  /* Resting state: no notifications, so the bell sits quietly in the bar. */
  color: var(--ink-3);
  cursor: pointer;
  transition: background var(--dur-fast), color var(--dur-fast);
}

.bar-bell:hover {
  background: var(--violet-soft);
  color: var(--violet);
}

/* Unread present: the bell earns more weight to draw the eye. */
.bar-bell--active {
  color: var(--ink-2);
}

.bar-bell svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bar-bell__dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 7px;
  height: 7px;
  border: 2px solid var(--bg);
  border-radius: var(--radius-full);
  background: var(--violet);
  box-sizing: content-box;
}

.bar-bell__dot[hidden] {
  display: none;
}

.bar-chip {
  display: inline-flex;
  min-width: 0;
  height: 40px;
  align-items: center;
  gap: 6px;
  padding: 2px 8px 2px 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg);
  cursor: pointer;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.bar-chip:hover {
  border-color: #D7C8F3;
  background: #FCFAFF;
}

.bar-chip__avatar {
  display: inline-flex;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 50% 36%, #FBEAD6, #E7B892);
  box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(180, 120, 60, 0.3);
  font-size: 1.2rem;
}

.bar-chip__name {
  max-width: 92px;
  overflow: hidden;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-chip__chevron {
  display: inline-flex;
  flex: 0 0 auto;
  color: var(--ink-3);
}

.bar-chip__chevron svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page {
  width: 100%;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 18px 16px calc(var(--nav-height) + 32px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.page::-webkit-scrollbar {
  width: 0;
}

.vhead {
  margin: 2px 4px 14px;
}

.vhead__t {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

.vhead__s {
  margin-top: 2px;
  color: var(--ink-3);
  font-size: 0.86rem;
}

/* Shared identity masthead for primary product surfaces. Each surface supplies
   its own accent, tint, and optional layout modifier. */
.surface-head {
  --surface-head-accent: var(--violet);
  --surface-head-accent-ink: var(--violet-ink);
  --surface-head-bg-from: var(--violet-bg);
  --surface-head-bg-to: var(--bg-soft);
  --surface-head-icon-from: var(--hero-from);
  --surface-head-icon-to: var(--violet);

  position: relative;
  overflow: hidden;
  padding: 22px 20px 20px;
  background: linear-gradient(145deg, var(--surface-head-bg-from), var(--surface-head-bg-to));
  isolation: isolate;
}

.surface-head::before {
  position: absolute;
  top: -82px;
  right: -66px;
  z-index: -1;
  width: 190px;
  height: 190px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle, color-mix(in srgb, var(--surface-head-accent) 14%, transparent), transparent 68%);
  content: "";
  pointer-events: none;
}

.surface-head__eyebrow {
  color: var(--surface-head-accent-ink);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  line-height: 1.3;
  text-transform: uppercase;
}

.surface-head__identity {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 9px;
}

.surface-head__icon {
  display: grid;
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  place-items: center;
  border-radius: 17px;
  background: linear-gradient(145deg, var(--surface-head-icon-from), var(--surface-head-icon-to));
  box-shadow: 0 9px 24px color-mix(in srgb, var(--surface-head-accent) 24%, transparent);
  color: #fff;
}

.surface-head__icon svg {
  width: 31px;
  height: 31px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.surface-head__icon .surface-head__spark {
  fill: #F6C560;
  stroke: #F6C560;
  stroke-width: 1;
}

.surface-head__copy {
  min-width: 0;
}

.surface-head__title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.72rem;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.surface-head__promise {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.4;
}

@media (max-width: 359px) {
  .surface-head {
    padding-right: 16px;
    padding-left: 16px;
  }

  .surface-head__identity {
    gap: 12px;
  }

  .surface-head__icon {
    width: 48px;
    height: 48px;
    flex-basis: 48px;
    border-radius: 15px;
  }

  .surface-head__title {
    font-size: 1.56rem;
  }
}

.page--surface {
  padding-top: 0;
}

.surface-head--edge {
  margin: 0 -16px 24px;
  border-radius: 0 0 26px 26px;
}

.surface-head--picture {
  --surface-head-accent: #6667C9;
  --surface-head-accent-ink: #41427F;
  --surface-head-bg-from: #E9EAFB;
  --surface-head-bg-to: #F8F5FF;
  --surface-head-icon-from: #35336F;
  --surface-head-icon-to: #7774D2;
}

.surface-head--journey {
  --surface-head-accent: #3E9E6E;
  --surface-head-accent-ink: #286747;
  --surface-head-bg-from: #E4F3EB;
  --surface-head-bg-to: #FBF6E8;
  --surface-head-icon-from: #285E46;
  --surface-head-icon-to: #57A777;
}

.nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 40;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: calc(var(--nav-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  border-top: 1px solid var(--line);
  background: var(--bg);
  box-shadow: 0 -6px 20px rgba(76, 29, 149, 0.06);
}

.nav__item {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 2px 8px;
  color: var(--ink-3);
  text-decoration: none;
}

.nav__ic {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity var(--dur-fast), transform var(--dur-fast);
}

.nav__ic svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav__lbl,
.nav__asklbl {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.nav__item--active {
  color: var(--violet);
}

.nav__item--active .nav__ic {
  opacity: 1;
  transform: translateY(-1px);
}

.nav__center {
  position: relative;
  width: 72px;
  flex: 0 0 72px;
}

.nav__ask {
  position: absolute;
  top: -20px;
  left: 50%;
  display: flex;
  width: 62px;
  height: 62px;
  align-items: center;
  justify-content: center;
  transform: translateX(-50%);
  border: 4px solid #fff;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 40% 30%, #8B4FE0, #6D28D9 70%);
  box-shadow: var(--shadow-btn);
  color: #fff;
}

.nav__ask:active {
  transform: translateX(-50%) scale(0.93);
}

.nav__ask svg {
  width: 26px;
  height: 26px;
  fill: currentColor;
}

.nav__asklbl {
  position: absolute;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--violet);
  white-space: nowrap;
}

.error-page {
  width: min(100% - 40px, 520px);
  margin: 15vh auto 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}

.error-page__status {
  color: var(--violet);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.error-page h1 {
  margin: 8px 0;
}

.error-page p:not(.error-page__status) {
  color: var(--ink-3);
}

.error-page a {
  color: var(--violet);
  font-weight: 700;
}

.login-body {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: auto;
  padding: 24px;
  place-items: center;
}

.login-page {
  width: min(100%, 420px);
}

.login-card {
  padding: clamp(26px, 8vw, 40px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.login-brand {
  display: inline-flex;
  align-items: center;
  margin-bottom: 34px;
  text-decoration: none;
}

.login-brand img {
  display: block;
  width: auto;
  height: 22px;
}

.login-card__eyebrow {
  margin-bottom: 8px;
  color: var(--violet);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.login-card h1 {
  font-size: clamp(2rem, 10vw, 2.7rem);
  /* font-size: 3.7rem; */
  letter-spacing: -0.045em;
  line-height: 1;
}

.login-card__intro {
  margin: 12px 0 28px;
  color: var(--ink-3);
}

.login-form {
  display: grid;
  gap: 9px;
}

.login-form label {
  margin-top: 8px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
}

.login-form input {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--card);
  color: var(--ink);
}

.login-form input:focus {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.15);
}

.login-form__error {
  margin-top: 8px;
  color: #A52B46;
  font-size: 0.82rem;
  font-weight: 600;
}

.login-form__error:empty {
  display: none;
}

.login-form button {
  min-height: 50px;
  margin-top: 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--violet-ink);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

.login-form button:hover {
  background: var(--violet);
}

.login-form button:focus-visible,
.nav__item:focus-visible,
.appbar__logo:focus-visible,
.bar-bell:focus-visible,
.bar-chip:focus-visible,
.login-brand:focus-visible {
  outline: 3px solid rgba(109, 40, 217, 0.3);
  outline-offset: 2px;
}

@media (max-width: 360px) {
  .appbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  .appbar__right {
    gap: 5px;
  }

  .bar-chip__name {
    max-width: 66px;
  }

  .nav__center {
    width: 64px;
    flex-basis: 64px;
  }
}

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

/* Home sequential block loading */
.home-loading {
  display: flex;
  min-height: 100px;
  align-items: center;
  justify-content: center;
  padding: 28px 0 16px;
}

.home-loading[hidden] {
  display: none;
}

.home-loading__spinner {
  width: 28px;
  height: 28px;
  border: 3px solid var(--line);
  border-top-color: var(--violet);
  border-radius: var(--radius-full);
  animation: spin 0.7s linear infinite;
}

.block-enter {
  animation: fadeUp 0.38s ease both;
}

.home-error {
  margin-top: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow);
}

.home-error[hidden] {
  display: none;
}

.home-error h2 {
  font-size: 1rem;
}

.home-error p {
  margin-top: 4px;
  color: var(--ink-3);
  font-size: 0.86rem;
}

.home-error button {
  margin-top: 14px;
  padding: 9px 14px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--violet);
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

/* Home moment Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 26px 22px 22px;
  border-radius: 26px;
  background: linear-gradient(155deg, var(--hero-from), var(--hero-mid) 55%, var(--hero-to));
  box-shadow: var(--shadow-lg);
  color: #fff;
  text-align: center;
}

.hero::after {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 22%, rgba(255, 255, 255, 0.2), transparent 55%);
  content: "";
  pointer-events: none;
}

.hero--moment {
  padding: 24px 22px 20px;
  text-align: left;
}

.hero--empty {
  text-align: center;
}

.hero__prime {
  position: relative;
  padding: 10px 8px 22px;
  text-align: center;
}

.hero__prime-ic {
  margin-bottom: 10px;
  font-size: 2rem;
}

.hero__prime-title {
  margin-bottom: 8px;
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
}

.hero__prime-sub {
  max-width: 34ch;
  margin: 0 auto;
  color: #D9C7FA;
  font-size: 0.86rem;
  line-height: 1.55;
}

.hero__nums {
  position: relative;
  display: flex;
  align-items: stretch;
  margin-bottom: 18px;
}

.hero__num-col {
  flex: 1;
  text-align: center;
}

.hero__num-v {
  color: #fff;
  font-family: var(--font-display);
  font-size: 3.3rem;
  font-weight: 700;
  line-height: 1;
}

.hero__num-l {
  margin-top: 5px;
  color: #C9B6EE;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__num-d {
  margin-top: 5px;
  color: #7FD4A8;
  font-size: 0.7rem;
  font-weight: 700;
}

.hero__num-col--ahead .hero__num-v {
  color: #F6C560;
}

.hero__nums-div {
  width: 1px;
  margin: 4px 6px;
  background: rgba(255, 255, 255, 0.14);
}

.hero__bar {
  position: relative;
  height: 9px;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
}

.hero__bar-ahead {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #F6C560, #3E9E6E);
  transition: width 0.8s ease;
}

.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px 18px;
  margin-bottom: 20px;
}

.hero__grid-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

.hero__grid-ic {
  flex-shrink: 0;
  font-size: 1.15rem;
}

.hero__grid-n {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.hero__grid-t {
  overflow: hidden;
  color: #E0D0F7;
  font-size: 0.85rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hero__btns {
  position: relative;
  display: flex;
  gap: 10px;
}

.hero__btn {
  display: flex;
  min-height: 46px;
  flex: 1;
  align-items: center;
  justify-content: center;
  padding: 13px 10px;
  border: 0;
  border-radius: 13px;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  transition: transform var(--dur-fast);
}

.hero__btn:active {
  transform: scale(0.97);
}

.hero__btn:focus-visible,
.home-error button:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.75);
  outline-offset: 2px;
}

.hero__btn--picture {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero__btn--moves {
  background: #fff;
  color: var(--violet-ink);
}

@media (max-width: 359px) {
  .hero--moment {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero__grid {
    column-gap: 10px;
  }
}

/* Section labels */
.sect__label {
  margin: 22px 4px 10px;
  color: var(--ink-3);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-blocks > div:first-child .sect__label:first-child {
  margin-top: 16px;
}

/* Path pin */
.pathpin {
  padding: 15px 16px;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--gold-bg), #FDF9F0);
  box-shadow: var(--shadow);
}

.pathpin__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}

.pathpin__name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 700;
}

.pathpin__when {
  color: var(--gold);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.pathpin__next {
  color: var(--ink-2);
  font-size: 0.85rem;
}

.pathpin__dots {
  display: flex;
  gap: 5px;
  margin-top: 11px;
}

.pathpin__dot {
  width: 22px;
  height: 5px;
  border-radius: 4px;
  background: #EBD9B4;
}

.pathpin__dot.on {
  background: var(--gold);
}

.pathpin + .pathpin {
  margin-top: 10px;
}

/* Path pin empty state — golden like active pin */
.pathpin--empty {
  margin-top: 0;
  padding: 18px;
  border: 1px solid var(--gold-border);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--gold-bg), #FDF9F0);
  box-shadow: var(--shadow);
}

.pathpin__empty-btn {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 12px 16px;
  border: 1px solid var(--gold-border);
  border-radius: 12px;
  background: #fff;
  color: var(--gold);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}

.pathpin__empty-btn:focus-visible {
  outline: 3px solid rgba(224, 164, 34, 0.4);
  outline-offset: 2px;
}

/* Move notices */
.move-notice {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow);
}

.move-notice + .move-notice {
  margin-top: 10px;
}

.move-notice__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.move-notice__top span {
  color: var(--violet);
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.055em;
  text-transform: uppercase;
}

.move-notice__top small {
  color: var(--ink-3);
  font-size: 0.66rem;
}

.move-notice__text {
  color: var(--ink-2);
  font-size: 0.88rem;
  line-height: 1.45;
}

.move-notice__actions {
  display: flex;
  gap: 7px;
  margin-top: 12px;
}

.move-notice__open,
.move-notice__dismiss {
  min-height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.76rem;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
}

.move-notice__open {
  flex: 1;
  border: 0;
  background: var(--violet);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.move-notice__dismiss {
  padding: 0 13px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-3);
}

/* Move feedback state */
.move-notice__feedback {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.move-notice__question {
  margin-bottom: 10px;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 700;
}

.move-notice__options {
  display: flex;
  gap: 8px;
}

.move-notice__option {
  flex: 1;
  min-height: 38px;
  padding: 9px 8px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}

.move-notice__option:hover {
  border-color: var(--violet);
}

.move-notice__option.on {
  border-color: var(--violet);
  background: var(--violet);
  color: #fff;
}

/* Story pin */
.storypin {
  position: relative;
  overflow: hidden;
  padding: 20px;
  border-radius: 20px;
  background: linear-gradient(150deg, #2A1758, #5B21B6);
  box-shadow: var(--shadow-lg);
  color: #fff;
}

.storypin::after {
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(246, 197, 96, 0.28), transparent 70%);
  content: "";
}

.storypin__badge {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #F6C560;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.storypin__title {
  position: relative;
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
}

.storypin__glimpse {
  position: relative;
  margin-bottom: 16px;
  color: #E6D6FA;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.55;
}

.storypin__actions {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 9px;
}

.storypin__btn {
  flex: 0 0 auto;
  padding: 13px 52px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.12s;
}

.storypin__btn:active {
  transform: scale(0.97);
}

.storypin__btn--read {
  background: #fff;
  color: var(--violet-ink);
}

.storypin__btn--dismiss {
  background: rgba(255, 255, 255, 0.14);
  color: #EADBFB;
}

.storypin__note {
  position: relative;
  margin-top: 11px;
  color: #C9B6EE;
  font-size: 0.75rem;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════════════
   PHASE 2 — Ask Sheet
   ══════════════════════════════════════════════════════════════════ */

/* ── Sheet overlay + panel ── */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  background: rgba(28, 21, 51, 0.50);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-normal);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.sheet[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.sheet__panel {
  width: 100%;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 20px 0 0;
  border-radius: 28px 28px 0 0;
  background: var(--bg-soft);
  transform: translateY(100%);
  transition: transform var(--dur-sheet) var(--ease-out);
}

.sheet[aria-hidden="false"] .sheet__panel {
  transform: translateY(0);
}

.sheet__grab {
  flex: none;
  align-self: center;
  width: 40px;
  height: 4px;
  margin: 0 0 12px;
  padding: 0;
  border: none;
  background: #D9CEF0;
  border-radius: 4px;
}

.sheet-stage {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  padding: 0 22px 26px;
  -webkit-overflow-scrolling: touch;
}

.sheet__title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 12px;
}

/* ── Timing switch ── */
.timing {
  display: flex;
  gap: 6px;
  background: #EFE9FB;
  border-radius: var(--radius-sm);
  padding: 4px;
  margin-bottom: 16px;
}

.timing__opt {
  flex: 1;
  text-align: center;
  padding: 9px 4px;
  border: none;
  border-radius: 9px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-3);
  background: transparent;
  cursor: pointer;
  font-family: var(--font-body);
  transition: all var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}

.timing__opt.on {
  background: #fff;
  color: var(--violet-ink);
  box-shadow: var(--shadow);
}

/* ── Board panels ── */
.ask-board[hidden] {
  display: none;
}

/* ── Selection chips ── */
.seclabel {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--ink-3);
  font-weight: 700;
  margin: 0 2px 10px;
}

.seclabel span {
  color: var(--ink-3);
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.selgrid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.selchip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 10px 15px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
  transition: all 0.14s;
  -webkit-tap-highlight-color: transparent;
}

.selchip .e {
  font-size: 1.15rem;
}

.selchip:hover {
  border-color: var(--violet-2);
}

.selchip.on {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

/* ── Input field ── */
.field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 15px;
  margin-bottom: 22px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.field input,
.field textarea {
  flex: 1;
  border: none;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--ink);
  background: transparent;
  resize: none;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--ink-3);
}

.field--tall textarea {
  min-height: 70px;
}

.mic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--bg-soft);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.mic:hover {
  background: #EDE4FF;
  border-color: var(--violet);
}

.mic svg {
  width: 17px;
  height: 17px;
  color: var(--violet);
}

/* ── Submit button ── */
.submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 17px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--violet);
  color: #fff;
  font-size: 1.02rem;
  font-weight: 700;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all var(--dur-fast);
  -webkit-tap-highlight-color: transparent;
}

.submit:hover {
  background: var(--violet-2);
}

.submit:disabled {
  background: #DED3F2;
  color: #fff;
  cursor: not-allowed;
}

.submit__hint {
  margin-top: 10px;
  font-size: 0.76rem;
  color: var(--ink-3);
  text-align: center;
}

/* ── Micro-trial note ── */
.mtnote {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 13px 15px;
  margin-bottom: 18px;
  border: 1px solid #F0DEB0;
  border-radius: 14px;
  background: linear-gradient(135deg, #FBF3DE, #FDF9F0);
}

.mtnote .g {
  font-size: 1.4rem;
}

.mtnote p {
  font-size: 0.82rem;
  color: var(--ink-2);
}

.mtnote b {
  color: var(--gold);
}

/* ── Thinking state ── */
.thinking {
  text-align: center;
  padding: 38px 0;
}

.thinking__orb {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  border-radius: var(--radius-full);
  background: radial-gradient(circle at 38% 32%, #F4E9FF, #8B4FE0 70%, #5B21B6);
  animation: think 1.3s ease-in-out infinite;
}

.thinking p {
  font-size: 0.88rem;
  color: var(--ink-3);
}

@keyframes think {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.14); }
}
