:root {
  --ink: #211820;
  --ink-soft: #493e46;
  --wine: #7a354d;
  --wine-deep: #4f1f33;
  --coral: #ef817b;
  --coral-soft: #f6b2aa;
  --rose-mist: #f3e1df;
  --cream: #fffaf5;
  --paper: #f7f2ed;
  --line: rgba(45, 31, 40, 0.11);
  --muted: #81757d;
  --white: #ffffff;
  --sage: #9aaa94;
  --shadow-sm: 0 8px 30px rgba(51, 33, 43, 0.07);
  --shadow-md: 0 24px 70px rgba(51, 28, 40, 0.14);
  --serif: Georgia, 'Times New Roman', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans JP', sans-serif;
  color-scheme: light;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 74% 8%, rgba(239, 129, 123, 0.08), transparent 28rem),
    var(--paper);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

button:not(:disabled),
[role='button'] {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(239, 129, 123, 0.48);
  outline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 14px;
  color: #fff;
  background: var(--wine);
  border-radius: 8px;
  transform: translateY(-150%);
  transition: transform 0.2s ease;
}

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

[hidden] {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 40;
  width: 224px;
  padding: 28px 18px 20px;
  color: rgba(255, 255, 255, 0.7);
  background:
    radial-gradient(circle at 10% 8%, rgba(239, 129, 123, 0.12), transparent 18rem),
    var(--ink);
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.04);
}

.brand {
  height: 48px;
  padding: 0 9px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
}

.brand-mark {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: var(--coral);
}

.brand-mark svg {
  width: 100%;
  height: 100%;
  stroke-width: 1.5;
}

.brand-word {
  color: inherit;
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.brand-word > span {
  color: var(--coral);
}

.side-nav {
  margin-top: 50px;
  display: grid;
  gap: 7px;
}

.nav-item {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  color: rgba(255, 255, 255, 0.55);
  background: transparent;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 13px;
  font-size: 13px;
  font-weight: 650;
  text-align: left;
  transition: 0.2s ease;
}

.nav-item svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.5;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.055);
}

.nav-item.is-active {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 3px 0 0 var(--coral);
}

.nav-item.is-active svg {
  color: var(--coral-soft);
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 16px;
}

.mini-streak {
  margin: 0 7px;
  padding: 14px 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.035);
}

.streak-flame {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--coral);
  border-radius: 50%;
  background: rgba(239, 129, 123, 0.12);
}

.streak-flame svg {
  width: 18px;
  height: 18px;
}

.mini-streak > span:last-child,
.profile-chip > span:nth-child(2) {
  min-width: 0;
  display: grid;
}

.mini-streak strong,
.profile-chip strong {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mini-streak small,
.profile-chip small {
  color: rgba(255, 255, 255, 0.36);
  font-size: 9px;
}

.profile-chip {
  width: 100%;
  padding: 11px 9px;
  display: grid;
  grid-template-columns: 34px 1fr 16px;
  align-items: center;
  gap: 10px;
  color: inherit;
  background: transparent;
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.profile-chip .avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--wine-deep);
  background: #e9c7bd;
  border-radius: 50%;
  font-family: var(--serif);
  font-weight: 700;
}

.profile-chip > svg {
  width: 15px;
}

.main-content {
  min-height: 100vh;
  margin-left: 224px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: 72px;
  padding: 0 clamp(24px, 3.2vw, 54px);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  background: rgba(247, 242, 237, 0.86);
  border-bottom: 1px solid rgba(44, 31, 39, 0.065);
  backdrop-filter: blur(18px);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.streak-pill {
  height: 35px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.02em;
}

.streak-pill > span:first-child {
  color: var(--coral);
  font-size: 12px;
}

.streak-pill strong {
  color: var(--ink);
  font-size: 12px;
}

.icon-button {
  position: relative;
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 50%;
}

.icon-button svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.6;
}

.notification-dot {
  position: absolute;
  top: 5px;
  right: 4px;
  width: 7px;
  height: 7px;
  background: var(--coral);
  border: 2px solid var(--paper);
  border-radius: 50%;
}

.menu-button,
.mobile-brand,
.bottom-nav {
  display: none;
}

.view {
  max-width: 1510px;
  margin: 0 auto;
  padding: 31px clamp(24px, 3.2vw, 54px) 70px;
  animation: view-in 0.35s ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.view-heading,
.subpage-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.view-heading {
  margin-bottom: 25px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--wine);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.19em;
  line-height: 1.2;
}

.view-heading h1,
.subpage-header h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(31px, 3.1vw, 48px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.view h1[tabindex='-1']:focus {
  outline: none;
}

.view-heading > div > p:last-child,
.subpage-header > div > p:last-child {
  max-width: 630px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.soft-button {
  min-height: 39px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  transition: 0.2s ease;
}

.soft-button:hover {
  color: var(--wine);
  background: #fff;
  transform: translateY(-1px);
}

.soft-button svg {
  width: 17px;
  height: 17px;
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 306px;
  align-items: start;
  gap: 25px;
}

.today-primary {
  min-width: 0;
}

.hero-card {
  position: relative;
  min-height: 525px;
  overflow: hidden;
  color: #fff;
  background: #503328;
  border-radius: 29px;
  box-shadow: var(--shadow-md);
  isolation: isolate;
}

.hero-card > img {
  position: absolute;
  inset: 0 0 0 auto;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 34%;
  transform: scale(1.012);
  transition: filter 0.45s ease, transform 8s ease;
}

.hero-card:hover > img {
  transform: scale(1.04);
}

.hero-card[data-scenario='bar'] > img {
  filter: saturate(0.78) brightness(0.58) hue-rotate(-8deg);
}

.hero-card[data-scenario='date'] > img {
  filter: saturate(0.88) brightness(0.83) sepia(0.08);
}

.hero-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(34, 20, 28, 0.96) 0%, rgba(52, 27, 34, 0.8) 30%, rgba(42, 25, 29, 0.2) 62%, rgba(25, 16, 19, 0.1) 100%),
    linear-gradient(0deg, rgba(29, 18, 22, 0.68) 0%, transparent 45%);
}

.hero-card[data-scenario='bar'] .hero-wash {
  background:
    linear-gradient(90deg, rgba(28, 19, 36, 0.97), rgba(62, 31, 57, 0.72) 42%, rgba(18, 16, 31, 0.12) 80%),
    linear-gradient(0deg, rgba(20, 12, 27, 0.72), transparent 48%);
}

.hero-card[data-scenario='date'] .hero-wash {
  background:
    linear-gradient(90deg, rgba(53, 31, 29, 0.95), rgba(88, 53, 48, 0.63) 42%, rgba(46, 28, 25, 0.06) 78%),
    linear-gradient(0deg, rgba(42, 23, 24, 0.7), transparent 48%);
}

.hero-topline {
  position: absolute;
  top: 22px;
  right: 22px;
  left: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.online-chip {
  height: 27px;
  padding: 0 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(25, 18, 21, 0.36);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(12px);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.13em;
}

.online-chip i {
  width: 6px;
  height: 6px;
  background: #9fd28f;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(159, 210, 143, 0.16);
}

.sound-button {
  width: 35px;
  height: 35px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(25, 18, 21, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  backdrop-filter: blur(12px);
}

.sound-button svg {
  width: 17px;
  height: 17px;
}

.hero-copy {
  position: absolute;
  left: clamp(26px, 4vw, 55px);
  bottom: 36px;
  z-index: 2;
  width: min(510px, 59%);
}

.location-label {
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.16em;
}

.location-label svg {
  width: 14px;
  height: 14px;
}

.hero-copy blockquote {
  max-width: 520px;
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(29px, 3.25vw, 47px);
  font-weight: 500;
  letter-spacing: -0.045em;
  line-height: 1.06;
  text-wrap: balance;
  text-shadow: 0 3px 25px rgba(0, 0, 0, 0.2);
}

.translation-toggle {
  padding: 3px 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(255, 255, 255, 0.62);
  background: transparent;
  border: 0;
  font-size: 10px;
}

.translation-toggle svg {
  width: 11px;
  transition: transform 0.2s ease;
}

.translation-toggle[aria-expanded='true'] svg {
  transform: rotate(180deg);
}

.translation {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.hero-actions {
  margin-top: 23px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  padding: 0 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.primary-button {
  color: #fff;
  background: linear-gradient(135deg, #ee7d79, #d65b68);
  border: 0;
  box-shadow: 0 10px 28px rgba(217, 86, 103, 0.28);
}

.primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(217, 86, 103, 0.38);
}

.primary-button.small {
  min-height: 42px;
  padding: 0 17px;
}

.button-icon {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: #fff;
  border-radius: 50%;
}

.button-icon svg {
  width: 14px;
  height: 14px;
  stroke-width: 1.8;
}

.secondary-button {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid rgba(255, 255, 255, 0.26);
  backdrop-filter: blur(10px);
}

.secondary-button:hover {
  background: rgba(255, 255, 255, 0.18);
}

.secondary-button > svg {
  width: 17px;
  height: 17px;
}

.gentle-note {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.53);
  font-size: 9px;
}

.gentle-note span {
  margin-right: 4px;
  color: var(--coral-soft);
}

.scenario-section {
  margin-top: 31px;
}

.section-title-row {
  margin-bottom: 14px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.section-title-row h2,
.card-header h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  letter-spacing: -0.025em;
}

.section-title-row h2 {
  font-size: 20px;
}

.section-title-row > span {
  color: var(--muted);
  font-size: 9px;
}

.scenario-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.scenario-card {
  position: relative;
  min-width: 0;
  min-height: 86px;
  padding: 10px 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: left;
  transition: border 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.scenario-card:hover {
  transform: translateY(-2px);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.scenario-card.is-selected {
  background: #fff;
  border-color: rgba(122, 53, 77, 0.45);
  box-shadow: 0 9px 28px rgba(55, 35, 46, 0.08);
}

.scenario-art {
  flex: 0 0 54px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  overflow: hidden;
}

.scenario-art svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.35;
}

.cafe-art {
  color: #6d4334;
  background: linear-gradient(145deg, #ead3bd, #f7eee5);
}

.bar-art {
  color: #f0c4bd;
  background: linear-gradient(145deg, #38293d, #7b4755);
}

.date-art {
  color: #a95062;
  background: linear-gradient(145deg, #f5d8d3, #f4eee8);
}

.scenario-info {
  min-width: 0;
  display: grid;
}

.scenario-info small {
  overflow: hidden;
  color: var(--muted);
  font-size: 7px;
  font-style: normal;
  font-weight: 750;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.scenario-info strong {
  margin-top: 2px;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.scenario-info em {
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-style: normal;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.selected-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 17px;
  height: 17px;
  display: none;
  place-items: center;
  color: #fff;
  background: var(--wine);
  border-radius: 50%;
}

.selected-check svg {
  width: 11px;
  height: 11px;
  stroke-width: 2.4;
}

.scenario-card.is-selected .selected-check {
  display: grid;
}

.today-rail {
  display: grid;
  gap: 13px;
}

.relationship-card,
.memory-peek-card,
.reminder-card,
.privacy-card,
.story-side-card {
  background: rgba(255, 255, 255, 0.73);
  border: 1px solid rgba(45, 31, 40, 0.095);
  box-shadow: var(--shadow-sm);
}

.relationship-card,
.memory-peek-card {
  padding: 21px;
  border-radius: 21px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.card-header.compact {
  align-items: center;
}

.card-header h2 {
  font-size: 17px;
}

.mini-link {
  padding: 3px 0;
  color: var(--wine);
  background: transparent;
  border: 0;
  font-size: 9px;
  font-weight: 750;
}

.level-row {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.level-ring {
  --progress: 72;
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--coral) calc(var(--progress) * 1%), #eee6e1 0);
  border-radius: 50%;
}

.level-ring::before {
  content: '';
  position: absolute;
  inset: 5px;
  background: #fffaf7;
  border-radius: 50%;
}

.level-ring > span {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.level-ring small {
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.level-ring strong {
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 500;
  line-height: 1;
}

.level-copy {
  min-width: 0;
  display: grid;
}

.level-copy > span {
  color: var(--wine);
  font-family: var(--serif);
  font-size: 14px;
  font-style: italic;
}

.level-copy > strong {
  margin: 6px 0 5px;
  font-size: 9px;
  font-weight: 750;
}

.progress-track {
  height: 4px;
  overflow: hidden;
  background: #eee5e0;
  border-radius: 999px;
}

.progress-track i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--wine), var(--coral));
  border-radius: inherit;
  transition: width 0.6s ease;
}

.level-copy > small {
  margin-top: 6px;
  color: var(--muted);
  font-size: 7px;
}

.next-unlock {
  margin-top: 18px;
  padding: 11px;
  display: grid;
  grid-template-columns: 35px 1fr 13px;
  align-items: center;
  gap: 9px;
  background: #f5ece8;
  border-radius: 13px;
}

.unlock-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: #fff;
  border-radius: 10px;
}

.unlock-icon svg {
  width: 17px;
  height: 17px;
}

.next-unlock > span:nth-child(2) {
  min-width: 0;
  display: grid;
}

.next-unlock small {
  color: var(--wine);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.next-unlock strong {
  overflow: hidden;
  font-size: 9px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.unlock-arrow {
  color: var(--wine);
  font-size: 14px;
}

.memory-spark {
  color: var(--coral);
  font-size: 18px;
}

.memory-note {
  position: relative;
  margin-top: 14px;
  padding: 18px 15px 14px;
  background: linear-gradient(145deg, #faf2ed, #fffaf7);
  border-left: 2px solid var(--coral-soft);
  border-radius: 2px 12px 12px 2px;
}

.quote-mark {
  position: absolute;
  top: 3px;
  left: 9px;
  color: rgba(122, 53, 77, 0.18);
  font-family: var(--serif);
  font-size: 35px;
  line-height: 1;
}

.memory-note p {
  position: relative;
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 11px;
  font-style: italic;
  line-height: 1.55;
}

.memory-note small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 7px;
}

.text-link {
  width: 100%;
  padding: 14px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--wine);
  background: transparent;
  border: 0;
  font-size: 9px;
  font-weight: 750;
}

.reminder-card {
  min-height: 75px;
  padding: 14px;
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 17px;
}

.reminder-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: var(--rose-mist);
  border-radius: 12px;
}

.reminder-icon svg {
  width: 18px;
}

.reminder-card > div:nth-child(2) {
  display: grid;
}

.reminder-card small {
  color: var(--wine);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.reminder-card strong {
  font-size: 10px;
}

.reminder-card div span {
  color: var(--muted);
  font-size: 7px;
}

.switch {
  position: relative;
  width: 34px;
  height: 20px;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch > span {
  position: absolute;
  inset: 0;
  background: #d9d0cc;
  border-radius: 999px;
  transition: 0.2s ease;
}

.switch > span::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(37, 25, 32, 0.2);
  transition: 0.2s ease;
}

.switch input:checked + span {
  background: var(--wine);
}

.switch input:checked + span::after {
  transform: translateX(14px);
}

.subpage-header {
  min-height: 135px;
  margin: -31px calc(-1 * clamp(24px, 3.2vw, 54px)) 36px;
  padding: 35px clamp(24px, 3.2vw, 54px) 28px;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 75% 20%, rgba(239, 129, 123, 0.13), transparent 20rem),
    rgba(255, 255, 255, 0.42);
}

.memory-count,
.collection-count {
  display: flex;
  align-items: baseline;
  gap: 7px;
  color: var(--muted);
}

.memory-count > span,
.collection-count strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 35px;
  line-height: 1;
}

.memory-count small,
.collection-count span {
  font-size: 9px;
}

.memory-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  align-items: start;
  gap: 38px;
}

.memory-timeline {
  display: grid;
  gap: 12px;
}

.memory-entry {
  position: relative;
  min-height: 130px;
  padding: 22px 55px 22px 95px;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: 0 8px 28px rgba(51, 33, 43, 0.04);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.memory-entry.is-removing {
  opacity: 0;
  transform: translateX(-12px);
}

.memory-date {
  position: absolute;
  left: 22px;
  top: 22px;
  width: 52px;
  height: 58px;
  display: grid;
  place-content: center;
  text-align: center;
  background: #f2e5df;
  border-radius: 13px;
}

.memory-date strong {
  color: var(--wine);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.memory-date b {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  line-height: 1;
}

.memory-content {
  min-width: 0;
}

.memory-category {
  display: inline-flex;
  padding: 3px 7px;
  color: var(--wine);
  background: var(--rose-mist);
  border-radius: 999px;
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.memory-category.travel { color: #48635c; background: #e3ece7; }
.memory-category.likes { color: #765329; background: #f0e5d2; }
.memory-category.people { color: #62517b; background: #e9e4ef; }

.memory-content h2 {
  margin: 7px 0 3px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.memory-content p {
  margin: 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
}

.memory-content small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 8px;
}

.memory-menu {
  position: absolute;
  top: 19px;
  right: 18px;
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  color: #a3979e;
  background: transparent;
  border: 0;
  border-radius: 50%;
}

.memory-menu:hover {
  color: #a13f52;
  background: #f8e7e5;
}

.memory-menu svg {
  width: 16px;
  height: 16px;
}

.empty-memories {
  min-height: 330px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
}

.empty-memories > span {
  color: var(--coral);
  font-size: 28px;
}

.empty-memories h2 {
  margin: 10px 0 3px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
}

.empty-memories p {
  margin: 0;
  font-size: 11px;
}

.privacy-card {
  position: sticky;
  top: 100px;
  padding: 27px;
  border-radius: 22px;
}

.privacy-icon {
  width: 47px;
  height: 47px;
  margin-bottom: 23px;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: var(--rose-mist);
  border-radius: 15px;
}

.privacy-icon svg {
  width: 22px;
  height: 22px;
}

.privacy-card h2,
.story-side-card h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.privacy-card > p:not(.eyebrow) {
  margin: 12px 0 20px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.75;
}

.story-header {
  background:
    radial-gradient(circle at 77% 12%, rgba(239, 129, 123, 0.16), transparent 17rem),
    linear-gradient(135deg, rgba(255, 255, 255, 0.54), rgba(245, 230, 226, 0.48));
}

.story-level-badge {
  min-width: 140px;
  padding: 13px 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  column-gap: 9px;
  color: #fff;
  background: var(--wine-deep);
  border-radius: 17px;
  box-shadow: 0 12px 30px rgba(79, 31, 51, 0.2);
}

.story-level-badge small {
  grid-column: 1 / -1;
  color: var(--coral-soft);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.story-level-badge strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.story-level-badge > span {
  color: rgba(255, 255, 255, 0.59);
  font-size: 8px;
}

.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 42px;
}

.story-path {
  position: relative;
  display: grid;
  gap: 16px;
}

.path-line {
  position: absolute;
  top: 44px;
  bottom: 44px;
  left: 25px;
  width: 2px;
  background: #ded4d0;
}

.path-line i {
  display: block;
  width: 100%;
  background: linear-gradient(var(--coral), var(--wine));
}

.story-milestone {
  position: relative;
  min-height: 150px;
  padding: 23px 23px 23px 76px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  align-items: center;
  gap: 20px;
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.story-milestone.compact-milestone {
  min-height: 85px;
  grid-template-columns: 1fr;
  opacity: 0.66;
}

.milestone-node {
  position: absolute;
  top: 50%;
  left: 8px;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: var(--paper);
  border: 2px solid #d7ccc8;
  border-radius: 50%;
  font-family: var(--serif);
  font-size: 12px;
  transform: translateY(-50%);
}

.milestone-node svg {
  width: 15px;
  stroke-width: 2.2;
}

.story-milestone.is-complete .milestone-node {
  color: #fff;
  background: var(--wine);
  border-color: var(--wine);
  box-shadow: 0 0 0 5px var(--rose-mist);
}

.story-milestone.is-next {
  background: linear-gradient(135deg, rgba(255, 252, 249, 0.92), rgba(245, 228, 225, 0.72));
  border-color: rgba(122, 53, 77, 0.28);
}

.story-milestone.is-next .milestone-node {
  color: var(--wine);
  background: #fff;
  border-color: var(--coral);
  box-shadow: 0 0 0 5px rgba(239, 129, 123, 0.14);
}

.milestone-copy small {
  color: var(--wine);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.milestone-copy h2 {
  margin: 5px 0 4px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.milestone-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
}

.milestone-copy > span {
  display: inline-block;
  margin-top: 9px;
  color: #a1979d;
  font-size: 7px;
}

.milestone-photo,
.unlock-ticket,
.locked-preview {
  height: 104px;
  overflow: hidden;
  border-radius: 14px;
}

.milestone-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 27%;
}

.unlock-ticket {
  padding: 18px;
  display: grid;
  align-content: center;
  color: #fff;
  background: linear-gradient(145deg, #5d3b31, #b17c60);
}

.unlock-ticket span,
.unlock-ticket small {
  color: rgba(255, 255, 255, 0.62);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.unlock-ticket strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
}

.locked-preview {
  position: relative;
  padding: 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  color: #fff;
  background: #7a5550;
}

.locked-preview::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(26, 15, 21, 0.65), transparent);
}

.café-preview {
  background:
    linear-gradient(rgba(112, 61, 48, 0.2), rgba(112, 61, 48, 0.25)),
    url('assets/anna-date.webp') center 26% / cover;
  filter: saturate(0.65);
}

.night-preview {
  background:
    linear-gradient(rgba(35, 21, 46, 0.22), rgba(35, 21, 46, 0.36)),
    url('assets/anna-night.webp') center 25% / cover,
    linear-gradient(145deg, #222139, #803f5f);
}

.trip-preview {
  background:
    linear-gradient(rgba(36, 74, 82, 0.12), rgba(36, 74, 82, 0.34)),
    url('assets/anna-travel.webp') center 30% / cover,
    linear-gradient(145deg, #78a3a0, #e0bc87);
}

.lock-pill,
.locked-preview strong {
  position: relative;
  z-index: 1;
}

.lock-pill {
  padding: 3px 7px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.23);
  border-radius: 999px;
  font-size: 6px;
  font-style: normal;
  backdrop-filter: blur(8px);
}

.locked-preview strong {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
}

.story-side-card {
  position: sticky;
  top: 100px;
  padding: 25px;
  border-radius: 21px;
}

.week-row {
  margin: 20px 0 14px;
  display: flex;
  justify-content: space-between;
  gap: 3px;
}

.week-row > span {
  display: grid;
  justify-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 7px;
  font-weight: 700;
}

.week-row i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #a99ca3;
  background: #eee7e3;
  border-radius: 50%;
  font-size: 8px;
  font-style: normal;
}

.week-row .done i {
  color: #fff;
  background: var(--coral);
}

.story-side-card > p:not(.eyebrow) {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 9px;
}

.closet-filter {
  margin-bottom: 21px;
  display: inline-flex;
  padding: 4px;
  background: #ebe3de;
  border-radius: 999px;
}

.closet-filter button {
  height: 31px;
  padding: 0 14px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
}

.closet-filter button.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 3px 10px rgba(50, 31, 42, 0.08);
}

.closet-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.outfit-card {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease;
}

.outfit-card:hover {
  transform: translateY(-4px);
}

.outfit-image {
  position: relative;
  height: clamp(280px, 28vw, 390px);
  overflow: hidden;
  background: linear-gradient(145deg, #d7b9ae, #6a4438);
}

.outfit-image > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transition: transform 0.6s ease;
}

.outfit-card:hover .outfit-image > img {
  transform: scale(1.025);
}

.casual-look .outfit-image > img {
  filter: sepia(0.08) saturate(0.82) brightness(0.92);
  transform: scale(1.08) translateY(1%);
}

.outfit-card.locked .outfit-image > img {
  filter: saturate(0.5) brightness(0.65);
}

.outfit-card.locked:hover .outfit-image > img {
  transform: scale(1.02);
}

.equipped-pill,
.level-lock {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  height: 25px;
  padding: 0 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #fff;
  background: rgba(35, 23, 29, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.level-lock svg {
  width: 12px;
  height: 12px;
}

.outfit-info {
  min-height: 64px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.outfit-info > span:first-child {
  min-width: 0;
  display: grid;
}

.outfit-info small {
  color: var(--wine);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.outfit-info strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.outfit-info button {
  flex: 0 0 auto;
  min-width: 30px;
  height: 30px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: var(--rose-mist);
  border: 0;
  border-radius: 999px;
  font-size: 8px;
  font-weight: 700;
}

.outfit-info button svg {
  width: 14px;
  height: 14px;
  stroke-width: 2.2;
}

.outfit-info button:disabled {
  color: #9d9399;
  background: transparent;
  cursor: default;
}

.outfit-info .wear-button {
  min-width: 70px;
}

.locked-label {
  color: #a0969c;
  font-size: 8px;
}

.night-outfit {
  background: linear-gradient(145deg, #222139, #803f5f);
}

.date-outfit {
  background: linear-gradient(145deg, #c5cbb8, #f0dfcf);
}

.travel-outfit {
  background: linear-gradient(145deg, #77a5aa, #efc995);
}

.image-missing::after {
  content: '✦';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.45);
  font-size: 48px;
}

.generated-look {
  display: grid;
  place-items: center;
}

.halloween-look {
  background:
    radial-gradient(circle at 70% 24%, rgba(238, 174, 105, 0.26), transparent 8rem),
    linear-gradient(145deg, #241a2c, #6d3047);
}

.winter-look {
  background:
    radial-gradient(circle at 34% 20%, rgba(255, 255, 255, 0.62) 0 2px, transparent 3px),
    radial-gradient(circle at 73% 36%, rgba(255, 255, 255, 0.5) 0 2px, transparent 3px),
    linear-gradient(145deg, #a8bbc3, #e6dad8);
  background-size: auto, auto, auto;
}

.season-symbol {
  color: rgba(255, 255, 255, 0.54);
  font-family: var(--serif);
  font-size: 84px;
}

dialog {
  padding: 0;
  border: 0;
}

dialog::backdrop {
  background: rgba(24, 15, 21, 0.72);
  backdrop-filter: blur(8px);
}

.talk-dialog {
  width: min(1180px, calc(100vw - 50px));
  height: min(760px, calc(100dvh - 42px));
  max-width: none;
  max-height: none;
  overflow: hidden;
  color: #fff;
  background: #33241f;
  border-radius: 28px;
  box-shadow: 0 45px 120px rgba(18, 10, 15, 0.5);
}

.talk-scene {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}

.talk-scene > img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 24%;
}

.talk-scene-wash {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(0deg, rgba(25, 15, 19, 0.88) 0%, rgba(27, 17, 20, 0.25) 42%, rgba(20, 13, 17, 0.18) 100%),
    linear-gradient(90deg, rgba(30, 18, 24, 0.38), transparent 55%);
}

.talk-scene[data-scenario='bar'] > img {
  filter: saturate(0.75) brightness(0.56) hue-rotate(-8deg);
}

.talk-scene[data-scenario='bar'] .talk-scene-wash {
  background: linear-gradient(0deg, rgba(22, 13, 28, 0.94), rgba(33, 19, 44, 0.3) 60%, rgba(15, 12, 25, 0.35));
}

.talk-scene[data-scenario='date'] > img {
  filter: saturate(0.9) brightness(0.76) sepia(0.08);
}

.talk-header {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 4;
  height: 76px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(rgba(22, 14, 18, 0.56), transparent);
}

.talk-person {
  display: flex;
  align-items: center;
  gap: 11px;
}

.talk-avatar {
  width: 39px;
  height: 39px;
  overflow: hidden;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
}

.talk-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 17%;
}

.talk-person > span:last-child {
  display: grid;
}

.talk-person strong {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
}

.talk-person small {
  display: flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 8px;
}

.talk-person small i {
  width: 5px;
  height: 5px;
  background: #9fd28f;
  border-radius: 50%;
}

.talk-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.talk-time {
  min-width: 48px;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
  font-size: 10px;
  text-align: center;
}

.round-icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(28, 17, 22, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  backdrop-filter: blur(9px);
}

.round-icon-button svg {
  width: 16px;
  height: 16px;
}

.sound-off-icon {
  display: none;
}

#talkSoundButton[aria-pressed='true'] .sound-on-icon {
  display: none;
}

#talkSoundButton[aria-pressed='true'] .sound-off-icon {
  display: block;
}

.dialogue-area {
  position: absolute;
  right: 25px;
  bottom: 190px;
  left: 25px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  pointer-events: none;
}

.dialogue-bubble {
  max-width: min(570px, 73%);
  padding: 14px 17px;
  border-radius: 17px;
  backdrop-filter: blur(15px);
  pointer-events: auto;
  animation: bubble-in 0.3s ease both;
}

@keyframes bubble-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.anna-bubble {
  background: rgba(36, 24, 29, 0.73);
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-bottom-left-radius: 4px;
}

.user-bubble {
  align-self: flex-end;
  color: var(--ink);
  background: rgba(255, 250, 247, 0.94);
  border-bottom-right-radius: 4px;
}

.dialogue-bubble > span {
  display: block;
  margin-bottom: 3px;
  color: var(--coral-soft);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.user-bubble > span {
  color: var(--wine);
}

.dialogue-bubble p {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(16px, 2vw, 23px);
  line-height: 1.25;
}

.inline-translation {
  margin-top: 7px;
  padding: 0;
  color: rgba(255, 255, 255, 0.52);
  background: transparent;
  border: 0;
  font-size: 8px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dialogue-bubble > small {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.69);
  font-size: 9px;
}

.thinking-bubble {
  min-height: 34px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(36, 24, 29, 0.73);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  backdrop-filter: blur(12px);
}

.thinking-bubble i {
  width: 4px;
  height: 4px;
  background: var(--coral-soft);
  border-radius: 50%;
  animation: thinking 1s ease-in-out infinite;
}

.thinking-bubble i:nth-child(2) { animation-delay: 0.15s; }
.thinking-bubble i:nth-child(3) { animation-delay: 0.3s; }

.thinking-bubble span {
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.57);
  font-size: 7px;
}

@keyframes thinking {
  50% { transform: translateY(-3px); opacity: 0.4; }
}

.talk-controls {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 4;
  height: 177px;
  padding: 19px 25px 17px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(26, 17, 21, 0.58);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
}

.voice-state {
  justify-self: start;
  min-width: 140px;
  display: grid;
}

.wave-bars {
  height: 16px;
  display: flex;
  align-items: center;
  gap: 3px;
}

.wave-bars i {
  width: 2px;
  height: 5px;
  background: var(--coral-soft);
  border-radius: 999px;
  transition: height 0.2s ease;
}

.talk-controls.is-listening .wave-bars i {
  animation: wave 0.7s ease-in-out infinite alternate;
}

.talk-controls.is-listening .wave-bars i:nth-child(2) { animation-delay: 0.1s; }
.talk-controls.is-listening .wave-bars i:nth-child(3) { animation-delay: 0.2s; }
.talk-controls.is-listening .wave-bars i:nth-child(4) { animation-delay: 0.05s; }
.talk-controls.is-listening .wave-bars i:nth-child(5) { animation-delay: 0.15s; }

@keyframes wave {
  from { height: 4px; }
  to { height: 15px; }
}

.voice-state p {
  margin: 4px 0 1px;
  font-size: 10px;
  font-weight: 700;
}

.voice-state small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 7px;
}

.mic-button {
  position: relative;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: #fff;
  border: 7px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  box-shadow: 0 9px 35px rgba(0, 0, 0, 0.24);
  background-clip: padding-box;
  transition: 0.2s ease;
}

.mic-button:hover {
  transform: scale(1.04);
}

.mic-button svg {
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
  stroke-width: 1.7;
}

.mic-ripple {
  position: absolute;
  inset: -11px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  opacity: 0;
}

.talk-controls.is-listening .mic-button {
  color: #fff;
  background-color: var(--coral);
}

.talk-controls.is-listening .mic-ripple {
  animation: ripple 1.3s ease-out infinite;
}

@keyframes ripple {
  from { opacity: 0.6; transform: scale(0.85); }
  to { opacity: 0; transform: scale(1.35); }
}

.talk-assists {
  justify-self: end;
  display: grid;
  gap: 6px;
}

.talk-assists button {
  padding: 4px 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  color: rgba(255, 255, 255, 0.66);
  background: transparent;
  border: 0;
  font-size: 8px;
}

.talk-assists button > span {
  width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  font-size: 8px;
}

.talk-assists svg {
  width: 15px;
  height: 15px;
}

.suggestion-chip {
  position: absolute;
  right: 25px;
  bottom: 126px;
  display: grid;
  padding: 10px 13px;
  background: rgba(255, 250, 247, 0.95);
  border-radius: 12px 12px 3px 12px;
  box-shadow: 0 12px 30px rgba(20, 10, 15, 0.18);
}

.suggestion-chip span {
  color: var(--wine);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.suggestion-chip button {
  margin-top: 3px;
  padding: 0;
  color: var(--ink);
  background: transparent;
  border: 0;
  font-family: var(--serif);
  font-size: 12px;
}

.message-form {
  position: absolute;
  right: 25px;
  bottom: 54px;
  left: 25px;
  height: 54px;
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 7px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
}

.message-form input {
  min-width: 0;
  padding: 0 13px;
  color: var(--ink);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 11px;
}

.message-form button {
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--wine);
  border: 0;
  border-radius: 12px;
}

.message-form button svg {
  width: 18px;
  height: 18px;
}

.talk-controls.is-typing {
  grid-template-columns: 1fr;
}

.talk-controls.is-typing > .voice-state,
.talk-controls.is-typing > .mic-button,
.talk-controls.is-typing > .talk-assists {
  visibility: hidden;
}

.conversation-result {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 8;
  width: min(385px, calc(100% - 34px));
  padding: 31px;
  color: var(--ink);
  background: rgba(255, 250, 247, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(18, 10, 15, 0.34);
  text-align: center;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(18px);
  animation: result-in 0.45s cubic-bezier(0.2, 0.9, 0.25, 1.15) both;
}

@keyframes result-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.result-spark {
  width: 46px;
  height: 46px;
  margin: 0 auto 13px;
  display: grid;
  place-items: center;
  color: var(--wine);
  background: var(--rose-mist);
  border-radius: 50%;
  font-size: 20px;
}

.conversation-result h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 500;
}

.result-stats {
  margin: 20px 0 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.result-stats > span {
  padding: 12px;
  display: grid;
}

.result-stats > span + span {
  border-left: 1px solid var(--line);
}

.result-stats strong {
  color: var(--wine);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 500;
}

.result-stats small,
.new-memory small {
  color: var(--muted);
  font-size: 6px;
  font-weight: 750;
  letter-spacing: 0.09em;
}

.new-memory {
  margin-bottom: 18px;
  padding: 12px;
  text-align: left;
  background: #f4eae5;
  border-radius: 12px;
}

.new-memory p {
  margin: 3px 0 0;
  font-size: 10px;
}

.conversation-result .primary-button {
  width: 100%;
}

.simple-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 35px;
  color: var(--ink);
  background: var(--cream);
  border-radius: 24px;
  box-shadow: 0 35px 100px rgba(20, 11, 16, 0.35);
  text-align: center;
}

.dialog-close {
  position: absolute;
  top: 13px;
  right: 13px;
  width: 31px;
  height: 31px;
  color: var(--muted);
  background: #f0e7e2;
  border: 0;
  border-radius: 50%;
}

.simple-dialog-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 17px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--coral);
  border-radius: 50%;
}

.simple-dialog-icon.shield {
  color: var(--wine);
  background: var(--rose-mist);
  font-size: 19px;
}

.simple-dialog h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.simple-dialog > p:not(.eyebrow) {
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 10px;
}

.simple-dialog ul {
  margin: 0 0 22px;
  padding: 15px 15px 15px 32px;
  color: var(--ink-soft);
  background: #f4ebe6;
  border-radius: 13px;
  font-size: 9px;
  line-height: 1.9;
  text-align: left;
}

.simple-dialog > .primary-button {
  width: 100%;
}

.appointment {
  margin: 0 0 20px;
  padding: 12px;
  display: grid;
  grid-template-columns: 50px 1fr;
  align-items: center;
  gap: 13px;
  background: #f2e5df;
  border-radius: 14px;
  text-align: left;
}

.appointment > span {
  padding-right: 12px;
  color: var(--wine);
  border-right: 1px solid rgba(122, 53, 77, 0.17);
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-align: center;
}

.appointment > span strong {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
}

.appointment > div {
  min-width: 0;
  display: grid;
}

.appointment small {
  color: var(--wine);
  font-size: 6px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.appointment strong {
  overflow: hidden;
  font-family: var(--serif);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  z-index: 150;
  min-width: 220px;
  min-height: 52px;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  background: rgba(34, 24, 31, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  box-shadow: 0 16px 45px rgba(25, 14, 21, 0.24);
  opacity: 0;
  transform: translateY(15px);
  pointer-events: none;
  transition: 0.25s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

.toast > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--coral-soft);
  background: rgba(239, 129, 123, 0.15);
  border-radius: 50%;
  font-size: 11px;
}

.toast p {
  margin: 0;
  font-size: 10px;
  font-weight: 650;
}

.mobile-overlay {
  display: none;
}

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

  .today-rail {
    grid-template-columns: 1.25fr 1fr 0.95fr;
    align-items: stretch;
  }

  .relationship-card,
  .memory-peek-card {
    min-height: 100%;
  }

  .reminder-card {
    grid-template-columns: 38px 1fr;
    align-content: center;
  }

  .reminder-card .switch {
    grid-column: 1 / -1;
    justify-self: end;
    margin-top: -25px;
  }

  .hero-card {
    min-height: 565px;
  }
}

@media (max-width: 1020px) {
  .sidebar {
    width: 205px;
  }

  .main-content {
    margin-left: 205px;
  }

  .scenario-list {
    grid-template-columns: 1fr;
  }

  .scenario-card {
    min-height: 74px;
  }

  .scenario-art {
    height: 54px;
  }

  .memory-layout,
  .story-layout {
    grid-template-columns: 1fr;
  }

  .privacy-card,
  .story-side-card {
    position: static;
  }

  .story-side-card {
    max-width: 390px;
  }

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

  .outfit-image {
    height: clamp(300px, 47vw, 440px);
  }
}

@media (max-width: 760px) {
  body {
    background: #f8f3ee;
  }

  .sidebar {
    width: min(280px, 82vw);
    visibility: hidden;
    transform: translateX(-105%);
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
  }

  .sidebar.is-open {
    visibility: visible;
    transform: none;
    transition-delay: 0s;
  }

  .mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 35;
    display: block;
    background: rgba(26, 16, 22, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .mobile-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
  }

  .main-content {
    margin-left: 0;
    padding-bottom: 68px;
  }

  .topbar {
    height: 61px;
    padding: 0 15px;
    justify-content: space-between;
  }

  .menu-button,
  .mobile-brand {
    display: grid;
  }

  .mobile-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .mobile-brand .brand-word {
    font-size: 22px;
  }

  .topbar-actions .streak-pill {
    display: none;
  }

  .bottom-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 34;
    height: calc(65px + env(safe-area-inset-bottom));
    padding: 5px 8px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 252, 249, 0.95);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(18px);
  }

  .bottom-nav button {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 2px;
    color: #92878e;
    background: transparent;
    border: 0;
    font-size: 7px;
    font-weight: 700;
  }

  .bottom-nav button svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.55;
  }

  .bottom-nav button.is-active {
    color: var(--wine);
  }

  .view {
    padding: 22px 15px 35px;
  }

  .view-heading {
    margin-bottom: 18px;
  }

  .view-heading h1,
  .subpage-header h1 {
    font-size: clamp(29px, 9vw, 39px);
  }

  .desktop-only {
    display: none !important;
  }

  .today-grid {
    gap: 18px;
  }

  .hero-card {
    min-height: 620px;
    border-radius: 23px;
  }

  .hero-card > img {
    height: 65%;
    object-position: center 25%;
  }

  .hero-wash,
  .hero-card[data-scenario='bar'] .hero-wash,
  .hero-card[data-scenario='date'] .hero-wash {
    background:
      linear-gradient(0deg, rgba(33, 19, 26, 0.99) 0%, rgba(50, 26, 35, 0.94) 34%, rgba(44, 25, 29, 0.34) 67%, rgba(25, 16, 19, 0.08) 100%);
  }

  .hero-topline {
    top: 16px;
    right: 16px;
    left: 16px;
  }

  .hero-copy {
    right: 22px;
    bottom: 24px;
    left: 22px;
    width: auto;
  }

  .hero-copy blockquote {
    font-size: clamp(29px, 9.4vw, 40px);
  }

  .hero-actions {
    align-items: stretch;
  }

  .primary-button,
  .secondary-button {
    flex: 1;
    min-height: 51px;
    padding: 0 13px;
  }

  .gentle-note {
    text-align: center;
  }

  .scenario-list {
    display: flex;
    margin-right: -15px;
    padding-right: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .scenario-list::-webkit-scrollbar {
    display: none;
  }

  .scenario-card {
    flex: 0 0 245px;
    scroll-snap-align: start;
  }

  .today-rail {
    grid-template-columns: 1fr;
  }

  .reminder-card {
    grid-template-columns: 38px 1fr auto;
  }

  .reminder-card .switch {
    grid-column: auto;
    margin-top: 0;
  }

  .subpage-header {
    min-height: 0;
    margin: -22px -15px 25px;
    padding: 28px 15px 23px;
    align-items: flex-start;
  }

  .subpage-header > div:first-child {
    min-width: 0;
  }

  .subpage-header > div > p:last-child {
    font-size: 10px;
  }

  .memory-count,
  .collection-count {
    flex: 0 0 auto;
  }

  .memory-entry {
    padding: 20px 43px 20px 76px;
  }

  .memory-date {
    left: 14px;
    width: 48px;
  }

  .privacy-card {
    padding: 22px;
  }

  .story-layout {
    gap: 23px;
  }

  .story-milestone {
    min-height: 0;
    padding: 19px 17px 19px 61px;
    grid-template-columns: 1fr;
  }

  .path-line {
    left: 18px;
  }

  .milestone-node {
    left: 0;
  }

  .milestone-photo,
  .unlock-ticket,
  .locked-preview {
    height: 125px;
  }

  .story-side-card {
    max-width: none;
  }

  .closet-grid {
    gap: 11px;
  }

  .outfit-card {
    border-radius: 16px;
  }

  .outfit-image {
    height: 59vw;
  }

  .outfit-info {
    min-height: 59px;
    padding: 10px;
  }

  .outfit-info strong {
    font-size: 13px;
  }

  .locked-label {
    display: none !important;
  }

  .talk-dialog {
    width: 100vw;
    height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .talk-scene > img {
    object-position: center 18%;
  }

  .talk-header {
    height: 68px;
    padding: 0 15px;
  }

  .dialogue-area {
    right: 15px;
    bottom: 192px;
    left: 15px;
  }

  .dialogue-bubble {
    max-width: 91%;
  }

  .talk-controls {
    height: 180px;
    padding: 15px;
  }

  .voice-state {
    min-width: 0;
  }

  .voice-state small {
    display: none;
  }

  .talk-assists button {
    font-size: 0;
  }

  .talk-assists button > span,
  .talk-assists svg {
    width: 27px;
    height: 27px;
    font-size: 11px;
  }

  .suggestion-chip {
    right: 15px;
    bottom: 130px;
  }

  .message-form {
    right: 15px;
    bottom: 55px;
    left: 15px;
  }

  .toast {
    right: 15px;
    bottom: 80px;
    left: 15px;
  }
}

@media (max-width: 430px) {
  .hero-card {
    min-height: 600px;
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
  }

  .primary-button,
  .secondary-button {
    font-size: 10px;
  }

  .memory-count small,
  .collection-count span {
    display: none;
  }

  .story-level-badge {
    min-width: 86px;
    padding: 10px;
    grid-template-columns: 1fr;
  }

  .story-level-badge > span {
    display: none;
  }

  .closet-filter {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .closet-filter button {
    padding: 0 7px;
  }

  .equipped-pill,
  .level-lock {
    top: 8px;
    right: 8px;
    height: 22px;
    padding: 0 6px;
  }


  .outfit-info .wear-button {
    min-width: 54px;
    padding: 0 6px;
    font-size: 7px;
  }

  .simple-dialog {
    padding: 32px 23px 25px;
  }
}

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