/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 214, 112, 0.55), transparent 24%),
    radial-gradient(circle at 86% 12%, rgba(116, 95, 255, 0.28), transparent 28%),
    linear-gradient(180deg, rgba(255, 248, 237, 0.94) 0 56%, rgba(219, 194, 157, 0.72) 56% 100%),
    repeating-linear-gradient(90deg, rgba(119, 86, 52, 0.08) 0 1px, transparent 1px 92px);
  color: #24302f;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  min-height: 100vh;
}

a {
  color: #21515a;
  text-decoration: none;
}

.topbar {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(23, 60, 67, 0.96), rgba(82, 42, 130, 0.94) 46%, rgba(204, 92, 57, 0.96)),
    radial-gradient(circle at 16% 20%, rgba(255, 216, 122, 0.7), transparent 32%);
  box-shadow: 0 18px 45px rgba(30, 26, 53, 0.28), inset 0 -1px rgba(255, 255, 255, 0.24);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px clamp(16px, 4vw, 48px);
  position: relative;
  z-index: 3;
}

.brand {
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.24);
}

.topbar nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.topbar a,
.link-button {
  color: #fff;
}

.topbar nav a {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 6px 12px;
}

.link-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 32px clamp(16px, 4vw, 48px) 64px;
  position: relative;
  z-index: 1;
}

.hero,
.landing-hero,
.panel,
.card {
  background: #fffdf8;
  border: 1px solid #ddd5c6;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(43, 35, 24, 0.12), inset 0 1px rgba(255, 255, 255, 0.78);
  padding: 24px;
}

.hero {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
}

.landing-hero {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.96), rgba(255, 244, 224, 0.9)),
    radial-gradient(circle at 82% 18%, rgba(255, 107, 138, 0.22), transparent 28%);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  min-height: 520px;
  padding: clamp(28px, 6vw, 64px);
}

.landing-copy {
  max-width: 720px;
}

.strategy-board {
  background:
    linear-gradient(145deg, rgba(23, 60, 67, 0.98), rgba(50, 40, 91, 0.96)),
    radial-gradient(circle at 18% 12%, rgba(255, 214, 112, 0.5), transparent 28%);
  border-radius: 8px;
  box-shadow: 0 24px 55px rgba(23, 60, 67, 0.28);
  color: #fff;
  padding: 28px;
}

.strategy-board .status {
  color: #f1d9bd;
}

h1,
h2,
h3 {
  line-height: 1.35;
  margin: 0 0 12px;
}

h1 {
  font-size: clamp(32px, 4vw, 48px);
}

h2 {
  font-size: 25px;
}

.lead {
  color: #54615e;
  font-size: 20px;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 20px;
}

.section-band {
  margin-top: 28px;
}

.split {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
}

.policy-list {
  display: grid;
  gap: 10px;
}

.policy-list p {
  background: #fffdf8;
  border-left: 4px solid #b26b35;
  margin: 0;
  padding: 12px 14px;
}

.center {
  margin-top: 28px;
  text-align: center;
}

.centered {
  justify-content: center;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.button,
input[type="submit"],
button {
  background: linear-gradient(135deg, #d4773a, #b26b35);
  border: 0;
  border-radius: 6px;
  box-shadow: 0 10px 22px rgba(178, 107, 53, 0.28), inset 0 1px rgba(255, 255, 255, 0.28);
  color: #fff;
  cursor: pointer;
  display: inline-block;
  font: inherit;
  font-weight: 700;
  padding: 10px 16px;
}

.button.secondary {
  background: linear-gradient(135deg, #315d63, #213f55);
}

.button.vivid {
  background: linear-gradient(135deg, #ff6b8a, #7b61ff 52%, #00a896);
  box-shadow: 0 14px 30px rgba(123, 97, 255, 0.34), inset 0 1px rgba(255, 255, 255, 0.35);
}

input,
select,
textarea {
  border: 1px solid #c9c0b0;
  border-radius: 6px;
  font: inherit;
  padding: 10px 12px;
  width: 100%;
}

textarea {
  min-height: 120px;
}

label {
  display: block;
  font-weight: 700;
  margin: 14px 0 6px;
}

.message {
  border-left: 4px solid #315d63;
  margin: 14px 0;
  padding: 12px 16px;
  white-space: pre-wrap;
}

.message.assistant {
  border-left-color: #b26b35;
  background: #fff8ef;
}

.consultation-header {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(23, 60, 67, 0.98), rgba(64, 47, 130, 0.96) 50%, rgba(221, 105, 59, 0.96)),
    radial-gradient(circle at 16% 20%, rgba(255, 216, 122, 0.58), transparent 30%);
  border-radius: 8px;
  box-shadow: 0 22px 48px rgba(44, 33, 72, 0.25);
  color: #fff;
  display: flex;
  gap: 20px;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 22px 24px;
}

.consultation-header .status {
  color: #f1d9bd;
}

.presence {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.presence span {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  padding: 6px 10px;
}

.consultation-room {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.5fr) minmax(240px, 0.8fr);
}

.butler-panel,
.conversation-panel,
.side-panel {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 248, 236, 0.96));
  border: 1px solid #ddd5c6;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(43, 35, 24, 0.13), inset 0 1px rgba(255, 255, 255, 0.82);
  padding: 20px;
}

.butler-panel {
  position: sticky;
  top: 16px;
  text-align: center;
}

.side-panel {
  position: sticky;
  top: 16px;
}

.butler-avatar {
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.95), transparent 20%),
    linear-gradient(135deg, #fff6dc, #f5d6ff 42%, #bceff4);
  border: 5px solid #d7b77b;
  border-radius: 999px;
  box-shadow:
    0 18px 32px rgba(23, 60, 67, 0.2),
    0 0 34px rgba(255, 107, 138, 0.24),
    inset 0 0 0 6px rgba(255, 255, 255, 0.54);
  height: 156px;
  margin: 0 auto 16px;
  overflow: hidden;
  position: relative;
  width: 156px;
}

.butler-figure {
  height: 100%;
  position: relative;
  transform-origin: 50% 65%;
  width: 100%;
}

.butler-avatar.is-animated .butler-figure {
  animation: butler-nod 7s ease-in-out infinite;
}

.butler-head {
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.24), transparent 22%),
    #d8b18f;
  border-radius: 48% 48% 44% 44%;
  box-shadow: inset -8px -10px rgba(126, 75, 64, 0.1);
  height: 64px;
  left: 46px;
  position: absolute;
  top: 28px;
  width: 64px;
  z-index: 2;
}

.butler-hair {
  background: linear-gradient(135deg, #23252a, #4b384e);
  border-radius: 40px 40px 18px 18px;
  height: 30px;
  left: -4px;
  position: absolute;
  top: -6px;
  width: 72px;
  z-index: 3;
}

.butler-eye {
  background: #24302f;
  border-radius: 999px;
  height: 7px;
  position: absolute;
  top: 30px;
  width: 7px;
  z-index: 4;
}

.butler-eye.left {
  left: 18px;
}

.butler-eye.right {
  right: 18px;
}

.butler-avatar.is-animated .butler-eye {
  animation: butler-blink 4.6s ease-in-out infinite;
}

.butler-brow {
  background: #403032;
  border-radius: 999px;
  height: 3px;
  position: absolute;
  top: 23px;
  width: 14px;
  z-index: 4;
}

.butler-brow.left {
  left: 14px;
}

.butler-brow.right {
  right: 14px;
}

.butler-mouth {
  background: #7e4b40;
  border-radius: 0 0 999px 999px;
  height: 4px;
  left: 23px;
  position: absolute;
  top: 48px;
  width: 18px;
  z-index: 4;
}

.butler-avatar.is-animated .butler-mouth {
  animation: butler-talk 2.4s ease-in-out infinite;
}

.butler-cheek {
  background: rgba(255, 128, 139, 0.22);
  border-radius: 999px;
  height: 8px;
  position: absolute;
  top: 41px;
  width: 12px;
  z-index: 3;
}

.butler-cheek.left {
  left: 7px;
}

.butler-cheek.right {
  right: 7px;
}

.butler-body {
  background: linear-gradient(90deg, #152f38 0 34%, #f7f1e7 34% 66%, #152f38 66%);
  border-radius: 46px 46px 0 0;
  bottom: -18px;
  height: 76px;
  left: 28px;
  position: absolute;
  width: 100px;
  z-index: 1;
}

.butler-shirt {
  background: #fff8ec;
  bottom: 12px;
  clip-path: polygon(24% 0, 76% 0, 61% 100%, 39% 100%);
  height: 58px;
  left: 53px;
  position: absolute;
  width: 50px;
  z-index: 2;
}

.butler-tie {
  background: linear-gradient(180deg, #ff6b8a, #7b61ff);
  bottom: 14px;
  clip-path: polygon(50% 0, 72% 42%, 50% 100%, 28% 42%);
  height: 50px;
  left: 68px;
  position: absolute;
  width: 20px;
  z-index: 5;
}

.butler-hand {
  background: #d8b18f;
  border-radius: 999px;
  bottom: 18px;
  box-shadow: inset -3px -4px rgba(126, 75, 64, 0.12);
  height: 22px;
  position: absolute;
  width: 22px;
  z-index: 6;
}

.butler-hand.left {
  left: 35px;
  transform: rotate(-22deg);
}

.butler-hand.right {
  right: 35px;
  transform: rotate(22deg);
}

.expression-smile .butler-mouth,
.expression-encourage .butler-mouth,
.expression-joy .butler-mouth {
  border-radius: 0 0 999px 999px;
  height: 8px;
}

.expression-thinking .butler-brow.left {
  transform: rotate(-10deg);
}

.expression-thinking .butler-brow.right {
  transform: rotate(10deg);
}

.expression-empathy .butler-brow {
  transform: translateY(2px) rotate(-5deg);
}

.expression-joy .butler-eye {
  background: transparent;
  border-bottom: 3px solid #24302f;
  border-radius: 0;
  height: 8px;
}

.expression-encourage .butler-hand.right {
  bottom: 38px;
  right: 28px;
}

@keyframes butler-blink {
  0%,
  91%,
  100% {
    transform: scaleY(1);
  }

  94%,
  96% {
    transform: scaleY(0.12);
  }
}

@keyframes butler-talk {
  0%,
  64%,
  100% {
    height: 4px;
  }

  72%,
  84% {
    height: 10px;
  }
}

@keyframes butler-nod {
  0%,
  82%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  88% {
    transform: translateY(3px) rotate(1deg);
  }
}

@keyframes butler-nod-small {
  0%,
  82%,
  100% {
    transform: scale(0.36) translateY(0) rotate(0deg);
  }

  88% {
    transform: scale(0.36) translateY(8px) rotate(1deg);
  }
}

.butler-note {
  background: linear-gradient(135deg, #fff8ef, #fff0da);
  border-left: 4px solid #b26b35;
  border-radius: 6px;
  box-shadow: 0 12px 28px rgba(178, 107, 53, 0.12);
  margin-bottom: 18px;
  padding: 14px 16px;
}

.guest-note {
  color: #ffe8bc;
  margin: 4px 0 0;
}

.butler-note p {
  margin: 6px 0 0;
}

.consultation-form textarea {
  min-height: 180px;
}

.thinking-line {
  color: #6d5d49;
  font-size: 15px;
  margin: 10px 0 0;
}

.compact-item {
  border-bottom: 1px solid #e7dece;
  margin: 0;
  padding: 10px 0;
}

.ai-workspace {
  display: grid;
  gap: 18px;
  grid-template-columns: 350px minmax(0, 1fr) 280px;
  min-height: calc(100vh - 160px);
}

.ai-sidebar,
.ai-chat-stage,
.ai-inspector-card {
  backdrop-filter: blur(18px);
  background: rgba(255, 253, 248, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 18px;
  box-shadow: 0 24px 58px rgba(41, 35, 71, 0.16), inset 0 1px rgba(255, 255, 255, 0.9);
}

.ai-sidebar {
  background:
    radial-gradient(circle at 50% 10%, rgba(236, 196, 114, 0.28), transparent 36%),
    linear-gradient(180deg, rgba(8, 22, 38, 0.98), rgba(20, 36, 58, 0.96) 52%, rgba(48, 37, 72, 0.95));
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 620px;
  padding: 16px;
  position: sticky;
  top: 18px;
}

.ai-sidebar .status,
.ai-sidebar a {
  color: #fff;
}

.ai-sidebar-brand {
  align-items: center;
  display: grid;
  gap: 12px;
  grid-template-columns: 58px minmax(0, 1fr);
  margin-bottom: 8px;
}

.ai-brand-mark {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(248, 225, 161, 0.28), rgba(255, 255, 255, 0.08)),
    #0b1b2f;
  border: 1px solid rgba(248, 225, 161, 0.44);
  border-radius: 16px;
  box-shadow: 0 16px 28px rgba(3, 10, 20, 0.24);
  color: #fff8ec;
  display: flex;
  font-size: 25px;
  font-weight: 900;
  height: 58px;
  justify-content: center;
  width: 58px;
}

.ai-sidebar-brand .butler-avatar {
  border-width: 3px;
  height: 58px;
  margin: 0;
  width: 58px;
}

.ai-sidebar-brand .butler-figure,
.expression-chip .butler-figure,
.avatar-art .butler-figure {
  height: 156px;
  transform: scale(0.36);
  transform-origin: top left;
  width: 156px;
}

.ai-sidebar-brand .butler-avatar.is-animated .butler-figure,
.avatar-art .butler-avatar.is-animated .butler-figure {
  animation: butler-nod-small 7s ease-in-out infinite;
}

.ai-sidebar-brand h2 {
  font-size: 22px;
  margin: 0;
}

.ai-new-chat,
.ai-sidebar-link,
.ai-mini-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  display: block;
  padding: 10px 12px;
}

.ai-new-chat {
  background: linear-gradient(135deg, #ff6b8a, #7b61ff 54%, #00a896);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
  font-weight: 800;
  text-align: center;
}

.ai-sidebar-section {
  display: grid;
  gap: 8px;
}

.expression-strip {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
}

.expression-chip {
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 12px;
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 8px 6px;
}

.expression-chip .butler-avatar {
  border-width: 2px;
  height: 56px;
  margin: 0;
  width: 56px;
}

.expression-chip span {
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.butler-presence {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.18), rgba(255, 255, 255, 0.08)),
    radial-gradient(circle at 50% 16%, rgba(255, 212, 92, 0.32), transparent 42%);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 18px;
  box-shadow:
    0 22px 46px rgba(10, 18, 32, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.2);
  display: grid;
  gap: 12px;
  justify-items: center;
  overflow: hidden;
  padding: 12px;
  position: relative;
  text-align: center;
}

.butler-presence--mobile {
  display: none;
}

.butler-avatar__status {
  color: #fff8ec;
  font-size: 14px;
  font-weight: 800;
  margin: 0;
  position: relative;
  z-index: 2;
}

.butler-rive-stage {
  aspect-ratio: 6 / 7;
  display: grid;
  max-width: 360px;
  place-items: center;
  position: relative;
  width: min(100%, 360px);
  z-index: 2;
}

.butler-rive-canvas {
  animation: butler-idle 5s ease-in-out infinite;
  display: block;
  grid-area: 1 / 1;
  height: 100%;
  max-width: 100%;
  transform-origin: 50% 75%;
  width: 100%;
}

.butler-rive-canvas[hidden] {
  display: none;
}

.butler-rive-fallback {
  display: grid;
  gap: 8px;
  grid-area: 1 / 1;
  justify-items: center;
  width: 100%;
}

.butler-female-svg {
  animation: butler-idle 4.2s ease-in-out infinite;
  display: block;
  filter: drop-shadow(0 24px 26px rgba(20, 36, 58, 0.24));
  max-width: 100%;
  transform-origin: 50% 75%;
  width: 100%;
}

.butler-rive-fallback[hidden] {
  display: none;
}

.butler-rive-fallback p {
  background: rgba(20, 36, 58, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff8ec;
  font-size: 13px;
  font-weight: 800;
  margin: -46px 0 0;
  opacity: 0.92;
  padding: 7px 10px;
}

.butler-presence.is-thinking .butler-rive-canvas {
  animation: butler-canvas-thinking 2.8s ease-in-out infinite;
}

.butler-presence.is-speaking .butler-rive-canvas {
  animation: butler-canvas-speaking 1.2s ease-in-out infinite;
}

.butler-presence.is-listening .butler-rive-canvas {
  animation: butler-listening 4s ease-in-out infinite;
}

.butler-presence.is-empathy .butler-rive-canvas {
  animation: butler-empathy 3.2s ease-in-out infinite;
}

.butler-presence.is-encourage .butler-rive-canvas {
  animation: butler-encourage 2.6s ease-in-out infinite;
}

.butler-presence.is-happy .butler-rive-canvas {
  animation: butler-happy 0.8s ease-in-out 2, butler-idle 5s ease-in-out infinite;
}

.butler-presence-glow {
  animation: butler-presence-glow 6.5s ease-in-out infinite;
  background: radial-gradient(circle, rgba(255, 212, 92, 0.22), transparent 62%);
  inset: 8% 0 auto;
  height: 58%;
  pointer-events: none;
  position: absolute;
}

.butler-character {
  aspect-ratio: 1 / 1.18;
  animation: butler-idle 5s ease-in-out infinite;
  display: grid;
  max-width: 280px;
  place-items: center;
  position: relative;
  transform-origin: 50% 75%;
  width: min(100%, 280px);
  z-index: 2;
}

.butler-character-image {
  animation: butler-canvas-breathe 4s ease-in-out infinite;
  filter: drop-shadow(0 22px 24px rgba(20, 36, 58, 0.28));
  grid-area: 1 / 1;
  max-height: 100%;
  max-width: 100%;
  transform-origin: 50% 72%;
  width: 100%;
}

.butler-character-image[hidden] {
  display: none;
}

.butler-character-placeholder {
  display: none;
  grid-area: 1 / 1;
}

.butler-character:not(:has(.butler-character-image:not([hidden]))) .butler-character-placeholder {
  display: block;
}

.butler-blink-layer {
  animation: butler-blink 7.4s ease-in-out infinite;
  background: linear-gradient(180deg, rgba(20, 36, 58, 0), rgba(20, 36, 58, 0.16));
  border-radius: 999px;
  height: 12%;
  left: 28%;
  opacity: 0;
  pointer-events: none;
  position: absolute;
  top: 38%;
  width: 44%;
}

.butler-character[data-state="idle"],
.butler-character[data-state="smile"] {
  animation: butler-idle 5s ease-in-out infinite;
}

.butler-character[data-state="listening"] {
  animation: butler-listening 4s ease-in-out infinite;
}

.butler-character[data-state="thinking"] {
  animation: butler-canvas-thinking 2.8s ease-in-out infinite;
}

.butler-character[data-state="speaking"] .butler-character-image {
  animation: butler-canvas-speaking 1.2s ease-in-out infinite;
}

.butler-character[data-state="empathy"] {
  animation: butler-empathy 3.2s ease-in-out infinite;
}

.butler-character[data-state="encourage"] {
  animation: butler-encourage 2.6s ease-in-out infinite;
}

.butler-character[data-state="happy"] {
  animation: butler-happy 0.8s ease-in-out 2, butler-idle 5s ease-in-out infinite;
}

.butler-thinking-text[hidden] {
  display: none;
}

@keyframes butler-idle {
  0%,
  100% {
    transform: translateY(4px) scale(1);
  }

  50% {
    transform: translateY(-4px) scale(1.015);
  }
}

@keyframes butler-canvas-breathe {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.012);
  }
}

@keyframes butler-listening {
  0%,
  100% {
    transform: translateY(0) scale(1.02);
  }

  50% {
    transform: translateY(-4px) scale(1.03);
  }
}

@keyframes butler-canvas-thinking {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-3px) rotate(-1.5deg);
  }
}

@keyframes butler-canvas-speaking {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  35% {
    transform: translateY(-2px) scale(1.025);
  }

  70% {
    transform: translateY(1px) scale(1.01);
  }
}

@keyframes butler-empathy {
  0%,
  100% {
    transform: translateY(0) scale(1.025);
  }

  50% {
    transform: translateY(3px) scale(1.045);
  }
}

@keyframes butler-encourage {
  0%,
  100% {
    transform: translateY(1px) rotate(0deg);
  }

  45% {
    transform: translateY(-5px) rotate(-0.8deg);
  }
}

@keyframes butler-happy {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  50% {
    transform: translateY(-8px) scale(1.03);
  }
}

@keyframes butler-blink {
  0%,
  92%,
  100% {
    opacity: 0;
    transform: scaleY(0.2);
  }

  95%,
  97% {
    opacity: 0.32;
    transform: scaleY(1);
  }
}

@keyframes butler-presence-glow {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.96);
  }

  50% {
    opacity: 0.85;
    transform: scale(1.04);
  }
}

.ai-chat-stage {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 248, 238, 0.92)),
    radial-gradient(circle at 90% 10%, rgba(215, 183, 123, 0.2), transparent 26%);
  display: flex;
  flex-direction: column;
  min-height: 620px;
  overflow: hidden;
}

.ai-chat-header {
  align-items: center;
  background:
    linear-gradient(135deg, rgba(8, 22, 38, 0.98), rgba(20, 36, 58, 0.96) 62%, rgba(128, 95, 45, 0.92)),
    radial-gradient(circle at 12% 20%, rgba(255, 221, 121, 0.42), transparent 28%);
  color: #fff;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px 22px;
}

.ai-chat-header h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.ai-chat-header .status {
  color: #ffe7b3;
}

.guest-note.dark {
  color: #fff3d7;
}

.ai-status-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.ai-status-pills span {
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  padding: 7px 11px;
}

.ai-thread {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 16px;
  padding: 22px;
}

.ai-message {
  align-items: flex-start;
  display: grid;
  gap: 12px;
  grid-template-columns: 42px minmax(0, 1fr);
  max-width: 920px;
}

.ai-message.user {
  align-self: flex-end;
  grid-template-columns: minmax(0, 1fr) 42px;
  max-width: 760px;
}

.ai-message.user .ai-message-avatar {
  grid-column: 2;
  grid-row: 1;
}

.ai-message.user .ai-message-body {
  grid-column: 1;
  grid-row: 1;
}

.ai-message-avatar {
  align-items: center;
  background: linear-gradient(135deg, #173c43, #7b61ff);
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(23, 60, 67, 0.2);
  color: #fff;
  display: flex;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.ai-message-avatar.avatar-art {
  background: transparent;
  border-radius: 999px;
  box-shadow: none;
  height: 56px;
  width: 56px;
}

.avatar-art .butler-avatar {
  border-width: 2px;
  height: 56px;
  margin: 0;
  width: 56px;
}

.ai-message.user .ai-message-avatar {
  background: linear-gradient(135deg, #ff6b8a, #b26b35);
}

.ai-message-body {
  background: #fffdf8;
  border: 1px solid #e7dece;
  border-radius: 16px;
  box-shadow: 0 16px 36px rgba(37, 30, 20, 0.11);
  padding: 14px 16px;
}

.ai-message.user .ai-message-body {
  background: linear-gradient(135deg, #fff0f4, #fff8ef);
}

.ai-composer {
  background: rgba(255, 253, 248, 0.95);
  border-top: 1px solid rgba(221, 213, 198, 0.9);
  box-shadow: 0 -18px 35px rgba(43, 35, 24, 0.08);
  padding: 16px;
}

.ai-composer-row {
  display: grid;
  gap: 10px;
  grid-template-columns: 180px minmax(0, 1fr);
}

.ai-input {
  background: #fff;
  border: 1px solid #d5c8b5;
  border-radius: 14px;
}

.ai-input {
  min-height: 84px;
  resize: vertical;
}

.ai-composer-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-top: 10px;
}

.ai-composer-actions p {
  color: #6d5d49;
  margin: 0;
}

.ai-followup {
  border-top: 1px solid #e7dece;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 18px 22px;
}

.ai-inspector {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 18px;
}

.ai-inspector-card {
  padding: 16px;
}

.ai-inspector-card.highlight {
  background:
    linear-gradient(135deg, rgba(255, 248, 239, 0.98), rgba(255, 230, 183, 0.92)),
    radial-gradient(circle at 100% 0, rgba(255, 107, 138, 0.2), transparent 34%);
}

.ai-inspector-card.highlight h2 {
  color: #173c43;
}

.motion-card .button {
  margin-top: 12px;
  width: 100%;
}

.status {
  color: #6d5d49;
  font-size: 14px;
  font-weight: 700;
}

.flash {
  margin: 16px auto 0;
  max-width: 1040px;
  padding: 10px 16px;
}

.notice {
  background: #e7f5ed;
}

.alert {
  background: #fde8e2;
}

@media (max-width: 760px) {
  .hero,
  .landing-hero,
  .split,
  .consultation-room,
  .ai-workspace,
  .ai-composer-row {
    grid-template-columns: 1fr;
  }

  .ai-sidebar,
  .ai-inspector {
    min-height: auto;
    position: static;
  }

  .butler-presence--side {
    display: none;
  }

  .butler-presence--mobile {
    display: grid;
  }

  .butler-presence--mobile .butler-character {
    max-width: 168px;
  }

  .ai-chat-header,
  .ai-composer-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .consultation-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .presence {
    justify-content: flex-start;
  }

  .butler-panel,
  .side-panel {
    position: static;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .butler-character,
  .butler-character-image,
  .butler-blink-layer,
  .butler-presence-glow,
  .butler-avatar.is-animated .butler-figure,
  .butler-avatar.is-animated .butler-eye,
  .butler-avatar.is-animated .butler-mouth {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.realtime-butler {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  position: relative;
}

.realtime-butler__video-frame {
  align-items: center;
  aspect-ratio: 9 / 14;
  background:
    radial-gradient(circle at 50% 18%, rgba(244, 212, 137, 0.24), transparent 44%),
    linear-gradient(145deg, rgba(255, 248, 236, 0.16), rgba(255, 255, 255, 0.05)),
    #081426;
  border: 1px solid rgba(248, 225, 161, 0.36);
  border-radius: 26px;
  box-shadow:
    0 28px 60px rgba(3, 10, 20, 0.32),
    inset 0 1px rgba(255, 255, 255, 0.18);
  display: flex;
  justify-content: center;
  min-height: 360px;
  overflow: hidden;
  position: relative;
  width: min(340px, 80vw);
}

.realtime-butler__video,
.realtime-butler__prerecorded-video {
  border: 0;
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.realtime-butler__video {
  z-index: 1;
}

.realtime-butler__prerecorded-video {
  z-index: 0;
}

.realtime-butler__prerecorded-video[hidden] {
  display: none;
}

.realtime-butler__placeholder {
  align-items: center;
  background: rgba(154, 47, 103, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  bottom: 18px;
  box-shadow: 0 12px 28px rgba(91, 0, 46, 0.22);
  color: #fff8e7;
  display: flex;
  font-weight: 800;
  justify-content: center;
  left: 50%;
  line-height: 1.35;
  max-width: min(86%, 420px);
  padding: 10px 16px;
  position: absolute;
  text-align: center;
  transform: translateX(-50%);
  z-index: 3;
}

.realtime-butler__audio-button {
  background: linear-gradient(135deg, #f4d489, #d7b77b);
  border: 0;
  border-radius: 999px;
  bottom: 18px;
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.24);
  color: #071326;
  cursor: pointer;
  font-weight: 900;
  left: 50%;
  min-height: 44px;
  padding: 0.7rem 1rem;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 2;
}

.realtime-butler__audio-button[hidden],
.realtime-butler__audio-status[hidden] {
  display: none;
}

.realtime-butler__status {
  margin-top: 0.75rem;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.82);
  color: #fff8e7;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-align: center;
}

.realtime-butler__audio-status {
  color: rgba(255, 248, 231, 0.78);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 320px;
  text-align: center;
}

@media (max-width: 760px) {
  .realtime-butler__video-frame {
    aspect-ratio: 16 / 10;
    min-height: 210px;
    width: min(100%, 520px);
  }
}

.did-test {
  display: grid;
  gap: 24px;
}

.did-test__header {
  background:
    radial-gradient(circle at 22% 0%, rgba(244, 212, 137, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(8, 20, 38, 0.96), rgba(34, 46, 72, 0.9));
  border: 1px solid rgba(248, 225, 161, 0.22);
  border-radius: 18px;
  color: #fff8e7;
  padding: 24px;
}

.did-test__header h1,
.did-test__header p {
  margin: 0;
}

.did-test__grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(280px, 420px) minmax(320px, 1fr);
}

.did-test__panel {
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(19, 39, 59, 0.12);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(8, 20, 38, 0.12);
  display: grid;
  gap: 14px;
  padding: 18px;
}

.did-test__video-frame {
  align-items: center;
  aspect-ratio: 9 / 14;
  background: #081426;
  border-radius: 18px;
  display: flex;
  justify-content: center;
  min-height: 420px;
  overflow: hidden;
  position: relative;
}

.did-test__video {
  height: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  width: 100%;
}

.did-test__placeholder {
  background: rgba(8, 20, 38, 0.72);
  border: 1px solid rgba(248, 225, 161, 0.28);
  border-radius: 16px;
  color: #fff8e7;
  font-weight: 800;
  line-height: 1.55;
  max-width: 280px;
  padding: 18px;
  position: relative;
  text-align: center;
  z-index: 1;
}

.did-test__status {
  background: rgba(15, 23, 42, 0.9);
  border-radius: 999px;
  color: #fff8e7;
  font-size: 0.92rem;
  font-weight: 800;
  padding: 0.6rem 0.9rem;
  text-align: center;
}

.did-test__audio-button {
  background: linear-gradient(135deg, #f4d489, #d7b77b);
  border: 0;
  border-radius: 999px;
  color: #071326;
  cursor: pointer;
  font-weight: 900;
  min-height: 44px;
  padding: 0.7rem 1rem;
}

.did-test__audio-button[hidden],
.did-test__audio-status[hidden] {
  display: none;
}

.did-test__audio-status {
  color: #5c6473;
  font-size: 0.86rem;
  text-align: center;
}

.did-test__input {
  border: 1px solid rgba(19, 39, 59, 0.18);
  border-radius: 12px;
  font: inherit;
  min-height: 120px;
  padding: 12px;
  resize: vertical;
}

.did-test__log {
  background: #071326;
  border-radius: 12px;
  color: #d6f5e8;
  font-size: 0.82rem;
  max-height: 260px;
  overflow: auto;
  padding: 12px;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .did-test__grid {
    grid-template-columns: 1fr;
  }

  .did-test__video-frame {
    aspect-ratio: 16 / 10;
    min-height: 240px;
  }
}

.did-env {
  display: grid;
  gap: 20px;
}

.did-env__header {
  background:
    radial-gradient(circle at 20% 0%, rgba(244, 212, 137, 0.22), transparent 34%),
    linear-gradient(135deg, rgba(8, 20, 38, 0.96), rgba(34, 46, 72, 0.9));
  border: 1px solid rgba(248, 225, 161, 0.22);
  border-radius: 18px;
  color: #fff8e7;
  padding: 24px;
}

.did-env__header h1,
.did-env__header p {
  margin: 0;
}

.did-env__grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.did-env__item {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(19, 39, 59, 0.12);
  border-radius: 14px;
  display: grid;
  gap: 8px;
  padding: 16px;
}

.did-env__item span {
  color: #5c6473;
  font-size: 0.82rem;
  font-weight: 900;
}

.did-env__item strong {
  color: #071326;
  overflow-wrap: anywhere;
}

.did-env__note {
  background: rgba(8, 20, 38, 0.08);
  border-radius: 14px;
  color: #13273b;
  line-height: 1.7;
  margin: 0;
  padding: 16px;
}

@media (max-width: 760px) {
  .did-env__grid {
    grid-template-columns: 1fr;
  }
}

.lounge-hero,
.lounge-dashboard__hero {
  background:
    radial-gradient(circle at 22% 12%, rgba(244, 212, 137, 0.28), transparent 28%),
    radial-gradient(circle at 82% 8%, rgba(255, 107, 138, 0.18), transparent 26%),
    linear-gradient(135deg, #071326, #13273b 58%, #2d3158);
  border: 1px solid rgba(248, 225, 161, 0.24);
  border-radius: 22px;
  box-shadow: 0 28px 70px rgba(7, 19, 38, 0.22);
  color: #fff8e7;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  overflow: hidden;
  padding: clamp(24px, 5vw, 56px);
  position: relative;
}

.lounge-hero h1,
.lounge-dashboard__hero h1 {
  color: #fff8e7;
  font-size: clamp(2.4rem, 7vw, 5.5rem);
  line-height: 1.02;
  margin: 0;
  max-width: 820px;
}

.lounge-hero .lead,
.lounge-dashboard__hero .lead {
  color: rgba(255, 248, 231, 0.84);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  max-width: 720px;
}

.lounge-daily-card,
.lounge-title-card {
  align-self: center;
  background:
    linear-gradient(145deg, rgba(255, 248, 231, 0.16), rgba(255, 255, 255, 0.08)),
    rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(248, 225, 161, 0.36);
  border-radius: 18px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.16);
  padding: 22px;
}

.lounge-daily-card h2,
.lounge-title-card strong {
  color: #fff8e7;
  display: block;
  font-size: 1.55rem;
  line-height: 1.35;
  margin: 8px 0;
}

.fortune-stars {
  color: #f4d489;
  font-size: 1.7rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.lounge-section,
.lounge-preview,
.lounge-dashboard,
.lounge-today-grid,
.lounge-action-row {
  display: grid;
  gap: 18px;
}

.section-heading h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  margin: 0;
}

.lounge-feature-grid,
.lounge-today-grid,
.lounge-action-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.lounge-card,
.lounge-panel {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(255, 248, 231, 0.92));
  border: 1px solid rgba(19, 39, 59, 0.12);
  border-radius: 16px;
  box-shadow: 0 22px 50px rgba(8, 20, 38, 0.1);
  display: grid;
  gap: 10px;
  padding: 20px;
}

.lounge-card span {
  color: #b89045;
  font-size: 0.82rem;
  font-weight: 900;
}

.lounge-card h3,
.lounge-panel h2 {
  color: #071326;
  margin: 0;
}

.lounge-card p,
.lounge-panel p {
  margin: 0;
}

.lounge-panel.highlight {
  background:
    radial-gradient(circle at 20% 0%, rgba(244, 212, 137, 0.2), transparent 36%),
    linear-gradient(135deg, #fffdf8, #fff3d5);
}

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

.lounge-card-result,
.lounge-praise {
  background: rgba(7, 19, 38, 0.07);
  border-left: 4px solid #d7b77b;
  border-radius: 12px;
  color: #13273b;
  font-weight: 800;
  line-height: 1.7;
  padding: 14px;
}

.lounge-card-result.is-revealed {
  animation: lounge-card-reveal 0.28s ease-out;
}

.lounge-reaction-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.lounge-reaction-buttons button {
  background: #071326;
  border: 1px solid rgba(248, 225, 161, 0.22);
  border-radius: 999px;
  color: #fff8e7;
  cursor: pointer;
  font-weight: 800;
  min-height: 38px;
  padding: 0.45rem 0.8rem;
}

@keyframes lounge-card-reveal {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 920px) {
  .lounge-hero,
  .lounge-dashboard__hero,
  .lounge-feature-grid,
  .lounge-preview,
  .lounge-today-grid,
  .lounge-action-row {
    grid-template-columns: 1fr;
  }
}

/* Tokimeki Kanojo theme */
body {
  background:
    linear-gradient(180deg, #fff6fb 0%, #ffeaf4 46%, #fff8fb 100%),
    repeating-linear-gradient(90deg, rgba(255, 123, 168, 0.08) 0 1px, transparent 1px 88px);
  color: #5a3345;
}

a {
  color: #c0447f;
}

.topbar {
  background:
    linear-gradient(135deg, rgba(255, 139, 181, 0.98), rgba(255, 183, 213, 0.96) 48%, rgba(255, 219, 235, 0.98));
  box-shadow: 0 18px 45px rgba(218, 76, 135, 0.22), inset 0 -1px rgba(255, 255, 255, 0.42);
}

.brand {
  color: #fff;
  text-shadow: 0 2px 12px rgba(178, 50, 112, 0.24);
}

.topbar nav a {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.46);
  color: #fff;
}

.hero,
.landing-hero,
.panel,
.card,
.lounge-card,
.lounge-panel,
.did-test__panel,
.did-env__item,
.ai-message-body,
.ai-composer,
.ai-inspector-card,
.ai-chat-stage,
.ai-sidebar,
.ai-inspector-card.highlight {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 244, 250, 0.94));
  border-color: rgba(255, 166, 204, 0.42);
  box-shadow: 0 22px 50px rgba(218, 76, 135, 0.13), inset 0 1px rgba(255, 255, 255, 0.86);
}

.lounge-hero,
.lounge-dashboard__hero {
  background:
    linear-gradient(135deg, #fff7fb 0%, #ffdce9 48%, #ffc6dd 100%);
  border-color: rgba(255, 139, 181, 0.46);
  box-shadow: 0 30px 72px rgba(218, 76, 135, 0.22);
  color: #7a3154;
}

.lounge-hero h1,
.lounge-dashboard__hero h1,
.lounge-daily-card h2,
.lounge-title-card strong {
  color: #9b2f67;
}

.lounge-hero .lead,
.lounge-dashboard__hero .lead {
  color: #7d5266;
}

.lounge-daily-card,
.lounge-title-card {
  background: rgba(255, 255, 255, 0.58);
  border-color: rgba(255, 139, 181, 0.48);
}

.status {
  color: #d64c8b;
}

.fortune-stars {
  color: #ff7bac;
  text-shadow: 0 3px 14px rgba(255, 123, 172, 0.28);
}

h1,
h2,
h3,
.lounge-card h3,
.lounge-panel h2,
.ai-inspector-card.highlight h2 {
  color: #8d315f;
}

.lead,
.compact-item,
.lounge-card p,
.lounge-panel p,
.ai-composer-actions p {
  color: #735365;
}

.button,
input[type="submit"],
button {
  background: linear-gradient(135deg, #ff79ad, #f05297);
  border-radius: 999px;
  box-shadow: 0 14px 28px rgba(240, 82, 151, 0.24), inset 0 1px rgba(255, 255, 255, 0.45);
}

.button.secondary {
  background: linear-gradient(135deg, #fff, #ffe7f1);
  border: 1px solid rgba(255, 139, 181, 0.46);
  color: #b93575;
}

.button.vivid {
  background: linear-gradient(135deg, #ff5fa2, #ff94c2 52%, #ffc7df);
  box-shadow: 0 18px 34px rgba(255, 95, 162, 0.3), inset 0 1px rgba(255, 255, 255, 0.5);
}

input,
select,
textarea,
.ai-input {
  border-color: rgba(255, 139, 181, 0.5);
  color: #5a3345;
}

.ai-composer-row {
  grid-template-columns: 1fr;
}

.ai-message.user .ai-message-avatar {
  background: linear-gradient(135deg, #ff79ad, #ffc4dc);
}

.ai-message.user .ai-message-body {
  background: linear-gradient(135deg, #fff0f7, #fffafd);
}

.lounge-card span {
  color: #e85b99;
}

.lounge-card-result,
.lounge-praise {
  background: rgba(255, 139, 181, 0.12);
  border-left-color: #ff79ad;
  color: #7a3154;
}

.lounge-reaction-buttons button {
  background: #fff;
  border-color: rgba(255, 139, 181, 0.56);
  color: #c0447f;
}

.realtime-butler__video-frame {
  background:
    linear-gradient(145deg, #fff6fb, #ffd8e8);
  border-color: rgba(255, 139, 181, 0.45);
  box-shadow: 0 28px 58px rgba(218, 76, 135, 0.18);
}

.realtime-butler__placeholder,
.realtime-butler__status {
  background: rgba(154, 47, 103, 0.84);
  color: #fff7fb;
}

body.chat-page {
  background:
    linear-gradient(90deg, rgba(255, 248, 252, 0.42), rgba(255, 230, 242, 0.08) 50%, rgba(255, 248, 252, 0.34)),
    url(/assets/tokimeki/chat-bed-bg-c1437896068ad9f1847b4f6954315d6fdfaf1ac8c32fdb98903bc5ab3c0812ee.png);
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.chat-page .shell {
  max-width: none;
  min-height: calc(100vh - 64px);
  padding: clamp(10px, 2vw, 22px);
}

/* Chat room: large avatar with soft forest-room background */
body.chat-page .ai-workspace {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  align-items: start;
  grid-template-rows: auto auto;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, 600px) minmax(320px, 1fr);
  row-gap: clamp(16px, 3vh, 32px);
  overflow: hidden;
  padding: 0;
  position: relative;
}

body.chat-page .ai-workspace::before {
  display: none;
}

body.chat-page .ai-workspace::after {
  display: none;
}

body.chat-page .ai-sidebar {
  grid-column: 2;
  grid-row: 1;
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.52);
  box-shadow: none;
  justify-self: center;
  min-height: min(780px, calc(100vh - 190px));
  padding: 0;
  width: min(600px, 100%);
  z-index: 1;
}

body.chat-page .ai-sidebar-brand {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 154, 199, 0.38);
  border-radius: 18px;
  margin-bottom: 0;
  padding: 10px;
}

body.chat-page .ai-sidebar .status,
body.chat-page .ai-sidebar a {
  color: #b93575;
}

body.chat-page .ai-brand-mark {
  background: linear-gradient(135deg, #ff79ad, #ffd6e8);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: 0 12px 24px rgba(218, 76, 135, 0.18);
}

body.chat-page .ai-chat-stage {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  background: rgba(255, 255, 255, 0.58);
  justify-self: center;
  min-height: auto;
  width: min(600px, 100%);
  z-index: 2;
}

body.chat-page .ai-chat-header {
  background: rgba(255, 255, 255, 0.58);
  color: #8d315f;
  padding: 14px 18px;
}

body.chat-page .ai-chat-header h1 {
  font-size: clamp(1.35rem, 3vw, 2rem);
  margin: 0;
}

body.chat-page .ai-chat-header .status,
body.chat-page .guest-note.dark {
  color: #b93575;
}

body.chat-page .ai-status-pills span {
  background: rgba(255, 123, 172, 0.12);
  border-color: rgba(255, 123, 172, 0.24);
  color: #b93575;
}

body.chat-page .ai-chat-stage .ai-thread {
  display: none;
}

body.chat-page .ai-composer {
  background: transparent;
  border-top: 1px solid rgba(255, 154, 199, 0.24);
  box-shadow: none;
  padding: clamp(14px, 2.5vw, 22px);
}

body.chat-page .ai-input {
  min-height: 128px;
}

body.chat-page .realtime-butler {
  flex: 1;
}

body.chat-page .realtime-butler__video-frame {
  aspect-ratio: 4 / 5;
  min-height: min(720px, calc(100vh - 220px));
  width: min(600px, 100%);
}

body.chat-page .realtime-butler__status {
  font-size: 1rem;
  margin-top: 0.4rem;
}

.lounge-hero {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(255, 247, 252, 0.78) 0%, rgba(255, 239, 248, 0.48) 34%, rgba(255, 224, 239, 0.14) 60%, rgba(255, 221, 236, 0.02) 100%),
    url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png);
  background-position: center right;
  background-size: cover;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  grid-template-columns: 1fr;
  margin: calc(-1 * clamp(16px, 4vw, 48px)) calc(-1 * clamp(16px, 4vw, 48px)) -64px;
  min-height: calc(100vh - 64px);
  padding: clamp(28px, 7vw, 86px);
}

.lounge-hero__copy {
  background: transparent;
  border: 0;
  box-shadow: none;
  max-width: 520px;
  padding: 0;
}

.lounge-hero__copy h1 {
  color: #9b2f67;
  font-size: clamp(4.4rem, 12vw, 9.5rem);
  line-height: 0.92;
  margin-bottom: 18px;
}

.lounge-hero .lead {
  color: #74465d;
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  margin: 0;
}

.lounge-hero .lounge-daily-card {
  display: none;
}

@media (max-width: 920px) {
  body.chat-page .ai-workspace {
    grid-template-columns: 1fr;
  }

  body.chat-page .ai-sidebar {
    min-height: auto;
    position: static;
  }

  body.chat-page .realtime-butler__video-frame {
    aspect-ratio: 16 / 11;
    min-height: 330px;
    width: 100%;
  }

  .lounge-hero {
    background:
      linear-gradient(180deg, rgba(255, 248, 252, 0.62), rgba(255, 232, 244, 0.18) 52%, rgba(255, 232, 244, 0.86)),
      url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png);
    background-position: 68% center;
    min-height: calc(100vh - 64px);
  }
}

/* Legacy high-impact header */
.topbar {
  background:
    radial-gradient(circle at 12% 20%, rgba(255, 255, 255, 0.5), transparent 18%),
    radial-gradient(circle at 88% 8%, rgba(255, 198, 229, 0.72), transparent 24%),
    linear-gradient(120deg, #8b0f4f 0%, #e21678 36%, #ff4fa3 62%, #2b0822 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.42);
  box-shadow:
    0 18px 48px rgba(139, 15, 79, 0.42),
    0 0 34px rgba(255, 79, 163, 0.32),
    inset 0 -1px rgba(255, 255, 255, 0.26);
  isolation: isolate;
  min-height: 76px;
  overflow: hidden;
}

.topbar::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.24), transparent);
  content: "";
  inset: 0 auto 0 -35%;
  position: absolute;
  transform: skewX(-18deg);
  width: 32%;
  z-index: -1;
  animation: header-shine 4.8s ease-in-out infinite;
}

.brand {
  color: #fff;
  font-size: clamp(1.7rem, 3.5vw, 2.45rem);
  font-weight: 950;
  letter-spacing: 0.04em;
  text-shadow:
    0 2px 0 rgba(92, 0, 47, 0.34),
    0 0 18px rgba(255, 217, 237, 0.8),
    0 0 34px rgba(255, 77, 163, 0.72);
}

.topbar nav {
  gap: 10px;
}

.topbar nav a,
.topbar .link-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 218, 237, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  box-shadow:
    0 10px 24px rgba(88, 0, 45, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.95);
  color: #9b004f;
  font-weight: 950;
  letter-spacing: 0.02em;
  min-height: 38px;
  padding: 8px 15px;
  text-shadow: none;
}

.topbar nav a:hover,
.topbar .link-button:hover {
  background: linear-gradient(180deg, #fff, #ffc3df);
  color: #6f003a;
  transform: translateY(-1px);
}

@keyframes header-shine {
  0% {
    left: -40%;
    opacity: 0;
  }

  38% {
    opacity: 0.72;
  }

  72%,
  100% {
    left: 112%;
    opacity: 0;
  }
}

/* Legacy soft theme */
:root {
  --tokimeki-bg: #fff6fb;
  --tokimeki-lavender: #eee8ff;
  --tokimeki-white: #fffdfd;
  --tokimeki-text: #6f5b63;
  --tokimeki-heading: #8d526b;
  --tokimeki-shadow: 0 22px 54px rgba(188, 116, 153, 0.18);
}

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 218, 235, 0.8), transparent 30%),
    radial-gradient(circle at 88% 0%, rgba(238, 232, 255, 0.88), transparent 34%),
    linear-gradient(180deg, #fff8fc 0%, #fff2f8 48%, #f8f3ff 100%);
  color: var(--tokimeki-text);
}

.topbar {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 222, 237, 0.86) 52%, rgba(238, 232, 255, 0.9));
  border-bottom: 1px solid rgba(255, 184, 215, 0.42);
  box-shadow: 0 14px 42px rgba(210, 132, 170, 0.18);
  min-height: 66px;
}

.topbar::before {
  display: none;
}

.brand {
  color: #b95f86;
  font-size: clamp(1.45rem, 3vw, 2rem);
  letter-spacing: 0;
  text-shadow: 0 2px 16px rgba(255, 172, 211, 0.58);
}

.topbar nav a,
.topbar .link-button,
.button,
input[type="submit"],
button {
  border-radius: 999px;
  letter-spacing: 0;
}

.topbar nav a,
.topbar .link-button {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 181, 215, 0.56);
  box-shadow: 0 10px 24px rgba(196, 122, 159, 0.13);
  color: #8b6673;
  font-weight: 850;
}

.topbar nav a:hover,
.topbar .link-button:hover {
  background: #fff;
  color: #b95f86;
}

.button,
input[type="submit"],
button {
  background: linear-gradient(135deg, #ff9bc5, #f7b0d0);
  border: 1px solid rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 32px rgba(218, 125, 170, 0.22);
  color: #fff;
  font-weight: 850;
}

.button.secondary {
  background: linear-gradient(135deg, #fff, #f3edff);
  border: 1px solid rgba(208, 190, 244, 0.72);
  color: #8b6673;
}

.button.vivid {
  background: linear-gradient(135deg, #ff8fbd, #d8caff);
  color: #fff;
}

.lounge-card,
.lounge-daily-card,
.lounge-panel,
.ai-chat-stage,
.ai-sidebar,
.ai-inspector-card,
.form-card,
.profile-card,
.memory-card,
.task-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 203, 226, 0.62);
  box-shadow: var(--tokimeki-shadow);
  color: var(--tokimeki-text);
}

.lounge-hero {
  background:
    linear-gradient(90deg, rgba(255, 250, 253, 0.84) 0%, rgba(255, 238, 247, 0.5) 34%, rgba(246, 239, 255, 0.18) 64%, rgba(255, 255, 255, 0.02) 100%),
    url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png);
  background-position: center right;
  background-size: cover;
}

.lounge-hero__copy h1,
.lounge-hero h1,
h1,
h2 {
  color: var(--tokimeki-heading);
}

.lounge-hero .lead,
.lead,
.status {
  color: #8b6673;
}

body.chat-page {
  background:
    linear-gradient(180deg, rgba(255, 249, 253, 0.72), rgba(250, 242, 255, 0.56)),
    url(/assets/tokimeki/chat-bed-bg-c1437896068ad9f1847b4f6954315d6fdfaf1ac8c32fdb98903bc5ab3c0812ee.png);
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.chat-page .shell {
  padding: clamp(8px, 1.8vw, 18px);
}

body.chat-page .ai-workspace {
  grid-template-columns: minmax(260px, 1fr) minmax(520px, 720px) minmax(260px, 1fr);
  row-gap: clamp(12px, 2.4vh, 24px);
}

body.chat-page .ai-sidebar {
  background: rgba(255, 255, 255, 0.32);
  border-color: rgba(255, 255, 255, 0.56);
  min-height: min(780px, calc(100vh - 178px));
  width: min(720px, 100%);
}

body.chat-page .realtime-butler__video-frame {
  background:
    linear-gradient(145deg, rgba(255, 250, 253, 0.3), rgba(242, 235, 255, 0.18));
  border: 1px solid rgba(255, 221, 237, 0.72);
  border-radius: 30px;
  box-shadow: 0 26px 64px rgba(166, 102, 134, 0.2);
  min-height: min(760px, calc(100vh - 205px));
  width: min(720px, 100%);
}

body.chat-page .realtime-butler__status,
body.chat-page .realtime-butler__audio-status {
  display: none;
}

body.chat-page .ai-chat-stage {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 205, 228, 0.66);
  border-radius: 26px;
  box-shadow: 0 18px 44px rgba(182, 111, 146, 0.16);
  width: min(720px, 100%);
}

body.chat-page .ai-composer {
  border-top: 0;
  padding: clamp(12px, 2vw, 18px);
}

body.chat-page .ai-input {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 190, 221, 0.72);
  border-radius: 24px;
  color: #6f5b63;
  min-height: 82px;
  resize: vertical;
}

body.chat-page .ai-input::placeholder {
  color: #b18a9a;
}

body.chat-page input[type="submit"] {
  background: linear-gradient(135deg, #ff95c2, #d9ccff);
  min-height: 46px;
  padding: 0.8rem 1.4rem;
}

@media (max-width: 920px) {
  body.chat-page .ai-workspace {
    grid-template-columns: 1fr;
  }

  body.chat-page .realtime-butler__video-frame {
    aspect-ratio: 4 / 5;
    min-height: min(66vh, 560px);
  }

  .lounge-hero {
    background:
      linear-gradient(180deg, rgba(255, 250, 253, 0.72), rgba(255, 236, 246, 0.22) 50%, rgba(255, 247, 251, 0.9)),
      url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png);
    background-position: 68% center;
  }
}

/* Statement header: vivid and seductive without explicit styling */
.topbar {
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 255, 255, 0.62), transparent 16%),
    radial-gradient(circle at 32% -18%, rgba(255, 201, 226, 0.92), transparent 30%),
    radial-gradient(circle at 78% 20%, rgba(255, 86, 164, 0.58), transparent 24%),
    linear-gradient(115deg, #3a0524 0%, #a90058 28%, #ff2d8f 52%, #ff9bc8 72%, #301024 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.58);
  box-shadow:
    0 18px 56px rgba(169, 0, 88, 0.34),
    0 0 42px rgba(255, 45, 143, 0.36),
    inset 0 -1px rgba(255, 255, 255, 0.28);
  min-height: 82px;
  position: relative;
}

.topbar::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.34), transparent);
  content: "";
  display: block;
  inset: 0 auto 0 -38%;
  position: absolute;
  transform: skewX(-18deg);
  width: 34%;
  z-index: 0;
  animation: header-shine 4.4s ease-in-out infinite;
}

.topbar::after {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.72) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(255, 212, 235, 0.8) 0 1px, transparent 2px);
  background-position: 8% 38%, 72% 32%;
  background-size: 92px 46px, 76px 38px;
  content: "";
  inset: 0;
  opacity: 0.32;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

.brand,
.topbar nav {
  position: relative;
  z-index: 1;
}

.brand {
  background:
    linear-gradient(180deg, #fff 0%, #ffe4f1 48%, #ffc0df 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #fff;
  filter: drop-shadow(0 3px 0 rgba(83, 0, 44, 0.58)) drop-shadow(0 0 18px rgba(255, 213, 235, 0.98));
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 1000;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 7px 0;
  text-shadow:
    0 1px 0 #fff,
    0 4px 18px rgba(72, 0, 38, 0.72),
    0 0 34px rgba(255, 255, 255, 0.9),
    0 0 58px rgba(255, 75, 160, 0.92);
}

.topbar nav {
  gap: 12px;
}

.topbar nav a,
.topbar .link-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 204, 229, 0.93));
  border: 1px solid rgba(255, 255, 255, 0.92);
  box-shadow:
    0 12px 30px rgba(77, 0, 42, 0.24),
    0 0 18px rgba(255, 161, 207, 0.32),
    inset 0 1px rgba(255, 255, 255, 0.95);
  color: #8f004f;
  font-weight: 950;
  min-height: 42px;
  padding: 10px 17px;
}

.topbar nav a:hover,
.topbar .link-button:hover {
  background:
    linear-gradient(180deg, #fff, #ffb6d8);
  color: #5f0036;
  transform: translateY(-2px) scale(1.03);
}

@media (max-width: 760px) {
  .topbar {
    min-height: auto;
    padding: 14px;
  }

  .brand {
    font-size: clamp(1.65rem, 8vw, 2.2rem);
  }

  .topbar nav a,
  .topbar .link-button {
    min-height: 38px;
    padding: 8px 13px;
  }
}

/* Tokimeki auth and feature polish */
body.auth-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 214, 235, 0.82), transparent 30%),
    radial-gradient(circle at 88% 10%, rgba(230, 222, 255, 0.9), transparent 34%),
    linear-gradient(180deg, #fff8fc, #fff0f7 52%, #f7f1ff);
}

.auth-screen {
  display: grid;
  min-height: calc(100vh - 150px);
  place-items: center;
  padding: clamp(22px, 5vw, 70px);
}

.auth-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 251, 0.82)),
    radial-gradient(circle at 84% 8%, rgba(238, 232, 255, 0.88), transparent 34%);
  border: 1px solid rgba(255, 203, 226, 0.78);
  border-radius: 34px;
  box-shadow:
    0 30px 80px rgba(180, 103, 144, 0.2),
    inset 0 1px rgba(255, 255, 255, 0.94);
  color: #6f5b63;
  max-width: 520px;
  padding: clamp(26px, 5vw, 46px);
  width: min(100%, 520px);
}

.auth-card .status {
  color: #c66c96;
  font-weight: 900;
  margin-bottom: 10px;
}

.auth-card h1 {
  color: #9f5571;
  font-size: clamp(2.1rem, 7vw, 3.8rem);
  line-height: 1;
  margin-bottom: 14px;
}

.auth-lead {
  color: #7d6570;
  font-size: 1.05rem;
  line-height: 1.8;
  margin: 0 0 24px;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field label,
.auth-check {
  color: #7c606d;
  font-weight: 850;
}

.auth-field input {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 190, 221, 0.78);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
  color: #6f5b63;
  font: inherit;
  min-height: 48px;
  padding: 0.85rem 1rem;
}

.auth-field input::placeholder {
  color: #b895a3;
}

.auth-check {
  align-items: center;
  display: flex;
  gap: 10px;
  line-height: 1.5;
}

.auth-check input {
  accent-color: #f58ab8;
  height: 18px;
  width: 18px;
}

.auth-submit {
  margin-top: 4px;
  min-height: 52px;
  width: 100%;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: center;
  margin-top: 22px;
}

.auth-links a {
  color: #ad5f81;
  font-weight: 850;
  text-decoration: none;
}

.auth-links a:hover {
  color: #8f004f;
}

.auth-errors {
  background: rgba(255, 238, 245, 0.92);
  border: 1px solid rgba(255, 164, 205, 0.66);
  border-radius: 18px;
  color: #8f3f60;
  margin-bottom: 18px;
  padding: 14px 16px;
}

.auth-errors p {
  font-weight: 900;
  margin: 0 0 8px;
}

.auth-errors ul {
  margin: 0;
  padding-left: 1.2rem;
}

.tokimeki-feature-strip {
  align-self: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(28px, 8vh, 92px);
  max-width: 1080px;
  width: min(100%, 1080px);
}

.tokimeki-feature-strip article {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(255, 203, 226, 0.72);
  border-radius: 24px;
  box-shadow: 0 22px 54px rgba(188, 116, 153, 0.16);
  padding: 18px;
}

.tokimeki-feature-strip h2 {
  color: #9f5571;
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.tokimeki-feature-strip p {
  color: #735f68;
  line-height: 1.65;
  margin: 0;
}

.tokimeki-live-panel {
  align-self: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(22px, 5vh, 58px);
  max-width: 1080px;
  width: min(100%, 1080px);
}

.tokimeki-live-panel article,
.chat-mvp-panel article {
  backdrop-filter: blur(18px);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 203, 226, 0.72);
  border-radius: 24px;
  box-shadow: 0 22px 54px rgba(188, 116, 153, 0.16);
  padding: 18px;
}

.tokimeki-live-panel h2 {
  color: #9f5571;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.55;
  margin-bottom: 10px;
}

.tokimeki-live-panel p,
.chat-mvp-panel p {
  color: #735f68;
  line-height: 1.65;
  margin: 0;
}

.tokimeki-live-panel form {
  margin-top: 12px;
}

.story-unlock-panel {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 203, 226, 0.62);
  border-radius: 22px;
  box-shadow: var(--tokimeki-shadow);
  margin-top: 14px;
  padding: 16px;
  width: min(100%, 1080px);
}

.story-unlock-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.story-unlock-card {
  background: rgba(255, 250, 253, 0.82);
  border: 1px solid rgba(255, 203, 226, 0.7);
  border-radius: 18px;
  padding: 14px;
}

.story-unlock-card span {
  color: #b95f86;
  font-size: 0.78rem;
  font-weight: 900;
}

.story-unlock-card h2 {
  font-size: 1rem;
  margin: 6px 0;
}

.story-unlock-card p {
  color: #8b6673;
  line-height: 1.6;
  margin: 0;
}

.story-unlock-card.is-locked {
  opacity: 0.72;
}

.chat-mvp-panel {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 14px 14px 0;
}

.chat-mvp-panel article {
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(188, 116, 153, 0.12);
  padding: 13px;
}

.chat-mvp-panel .button {
  font-size: 0.9rem;
  min-height: 40px;
  padding: 0.65rem 1rem;
  width: 100%;
}

.chat-idle-prompt {
  color: #8d6675;
  font-weight: 850;
  margin: 0;
}

.chat-idle-prompt[hidden] {
  display: none;
}

@media (max-width: 920px) {
  .tokimeki-feature-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tokimeki-live-panel,
  .story-unlock-grid,
  .chat-mvp-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .tokimeki-feature-strip {
    grid-template-columns: 1fr;
  }

  .auth-card {
    border-radius: 26px;
  }
}

.room-shell,
.goods-shell,
.support-page {
  display: grid;
  gap: 24px;
}

.room-hero,
.section-heading,
.support-page {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(74, 45, 64, 0.18);
  padding: clamp(24px, 4vw, 44px);
}

.room-grid,
.goods-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.room-card,
.goods-card,
.date-card-story {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 20px;
  box-shadow: 0 18px 46px rgba(74, 45, 64, 0.14);
  padding: 22px;
}

.room-card--wide,
.date-card-story {
  grid-column: 1 / -1;
}

.companion-type-grid,
.date-card-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
}

.companion-type-option,
.mood-chip {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(177, 105, 139, 0.28);
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  gap: 8px;
  padding: 8px 12px;
}

.companion-type-option.is-selected,
.mood-chip:hover {
  background: rgba(255, 216, 233, 0.75);
  border-color: rgba(177, 105, 139, 0.54);
}

body.home-page {
  background: url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png) center right / cover fixed no-repeat;
}

body.home-page .shell {
  padding: 0;
}

body.home-page .lounge-hero {
  background: transparent;
  margin: 0;
  min-height: calc(100vh - 64px);
  padding: clamp(28px, 7vw, 86px);
}

body.home-page .lounge-hero__copy h1,
body.home-page .lounge-hero .lead,
body.home-page .lounge-hero .status {
  text-shadow: 0 2px 18px rgba(255, 255, 255, 0.88);
}

@media (max-width: 920px) {
  body.home-page {
    background-position: 68% center;
  }
}

/* Legacy high-impact header */
.topbar {
  background:
    radial-gradient(circle at 12% 18%, rgba(255, 245, 185, 0.95), transparent 15%),
    radial-gradient(circle at 38% -28%, rgba(255, 55, 150, 0.98), transparent 34%),
    radial-gradient(circle at 84% 16%, rgba(255, 188, 70, 0.72), transparent 24%),
    linear-gradient(112deg, #16000d 0%, #55002f 18%, #d00072 44%, #ff4fa8 62%, #2b0019 100%);
  border-bottom: 1px solid rgba(255, 230, 246, 0.85);
  box-shadow:
    0 18px 52px rgba(255, 36, 140, 0.34),
    0 0 62px rgba(255, 67, 158, 0.38),
    inset 0 -2px rgba(255, 234, 248, 0.5);
  isolation: isolate;
  min-height: 92px;
  overflow: hidden;
}

.topbar::before {
  background:
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.58), rgba(255, 215, 232, 0.82), transparent);
  filter: blur(0.5px);
  opacity: 0.78;
  width: 28%;
}

.topbar::after {
  background:
    linear-gradient(90deg, transparent 0 3%, rgba(255, 255, 255, 0.72) 3% 4%, transparent 4% 10%),
    radial-gradient(circle at 18% 28%, rgba(255, 255, 255, 0.95) 0 2px, transparent 3px),
    radial-gradient(circle at 72% 66%, rgba(255, 229, 142, 0.9) 0 2px, transparent 3px);
  background-size: 78px 100%, 132px 58px, 118px 62px;
  bottom: 0;
  content: "";
  left: 0;
  opacity: 0.32;
  pointer-events: none;
  position: absolute;
  right: 0;
  top: 0;
  z-index: 0;
}

.brand {
  background: linear-gradient(180deg, #fff 0%, #ffe1ef 38%, #ff9dca 68%, #ffd56d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 3px 0 rgba(74, 0, 39, 0.82))
    drop-shadow(0 0 22px rgba(255, 225, 240, 0.98))
    drop-shadow(0 0 42px rgba(255, 55, 150, 0.92));
  font-size: clamp(2.25rem, 5vw, 4.1rem);
  font-weight: 1000;
  letter-spacing: 0.03em;
  line-height: 0.9;
}

.topbar nav {
  gap: 10px;
}

.topbar nav a,
.topbar .link-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 190, 222, 0.96) 56%, rgba(255, 123, 184, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 999px;
  box-shadow:
    0 14px 32px rgba(52, 0, 30, 0.34),
    0 0 18px rgba(255, 214, 94, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.98);
  color: #72003e;
  font-size: 0.96rem;
  font-weight: 950;
  min-height: 44px;
  padding: 10px 18px;
}

.topbar nav a:hover,
.topbar .link-button:hover {
  background: linear-gradient(180deg, #fff, #ffd7e8 45%, #ff4fa8);
  box-shadow:
    0 18px 36px rgba(82, 0, 46, 0.38),
    0 0 28px rgba(255, 229, 124, 0.62);
  color: #3d001f;
  transform: translateY(-2px) scale(1.04);
}

@media (max-width: 760px) {
  .topbar {
    min-height: auto;
    padding: 14px;
  }

  .brand {
    font-size: clamp(2rem, 10vw, 2.85rem);
  }

  .topbar nav a,
  .topbar .link-button {
    font-size: 0.88rem;
    min-height: 38px;
    padding: 8px 12px;
  }
}

.diagnosis-form,
.companion-type-save-form,
.goods-card dl {
  display: grid;
  gap: 12px;
}

.diagnosis-form label,
.goods-card dl div {
  display: grid;
  gap: 6px;
}

.diagnosis-form select {
  border: 1px solid rgba(33, 81, 90, 0.24);
  border-radius: 12px;
  font: inherit;
  padding: 10px 12px;
}

.goods-card dl {
  margin: 18px 0;
}

.goods-card dt {
  color: #7b6d77;
  font-size: 13px;
}

.goods-card dd {
  margin: 0;
}

.button.is-disabled {
  display: inline-flex;
  opacity: 0.68;
  pointer-events: none;
}

.unlocked-story-list p {
  align-items: center;
  border-bottom: 1px solid rgba(36, 48, 47, 0.1);
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 10px 0;
}

.unlocked-story-list .is-locked {
  opacity: 0.58;
}


.legal-page {
  margin-top: 18px;
}

.home-legal-links {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: center;
  margin: 26px auto 0;
  padding: 18px 12px 4px;
}

.home-legal-links a {
  color: rgba(95, 76, 87, 0.92);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
}

.home-legal-links a:hover {
  color: #d91574;
}

.legal-grid .card {
  min-height: 190px;
}

/* Tokimeki girlfriend final theme */
:root {
  --header-height: 74px;
  --companion-bark: #4f3320;
  --companion-brown: #8b623d;
  --companion-honey: #d99a36;
  --companion-cream: #fff8ee;
  --companion-moss: #5f7b54;
  --companion-sage: #dce7cf;
  --companion-ink: #34281f;
  --companion-shadow: 0 22px 54px rgba(75, 51, 32, 0.18);
}

body {
  background:
    radial-gradient(circle at 12% 9%, rgba(238, 205, 146, 0.46), transparent 28%),
    radial-gradient(circle at 86% 0%, rgba(188, 211, 170, 0.62), transparent 32%),
    linear-gradient(180deg, #fff8ee 0%, #f1eadc 48%, #e4ead8 100%);
  color: var(--companion-ink);
  padding-top: var(--header-height);
}

a {
  color: #6d5638;
}

.topbar {
  background:
    radial-gradient(circle at 8% 12%, rgba(217, 154, 54, 0.35), transparent 24%),
    linear-gradient(135deg, #2f241c, #4f3320 54%, #5f7b54);
  border-bottom: 1px solid rgba(255, 248, 238, 0.22);
  box-shadow: 0 16px 42px rgba(47, 36, 28, 0.26);
  left: 0;
  min-height: 74px;
  position: fixed;
  right: 0;
  top: 0;
  z-index: 100;
}

.topbar::before,
.topbar::after {
  display: none;
}

.brand {
  background: none;
  color: #fff8ee;
  filter: none;
  font-size: clamp(1.65rem, 3.4vw, 2.45rem);
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1.1;
  text-shadow: 0 2px 3px rgba(20, 14, 10, 0.74), 0 0 18px rgba(255, 248, 238, 0.28);
}

.brand::before {
  content: "●";
  color: #f0bd62;
  font-size: 0.62em;
  margin-right: 0.35em;
  vertical-align: 0.08em;
}

.topbar nav a,
.topbar .link-button {
  background: rgba(255, 248, 238, 0.96);
  border: 1px solid rgba(255, 248, 238, 0.72);
  box-shadow: 0 10px 24px rgba(20, 14, 10, 0.18);
  color: #3f2b19;
  font-size: 0.94rem;
  font-weight: 900;
  min-height: 40px;
  padding: 8px 15px;
}

.topbar nav a:hover,
.topbar .link-button:hover {
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(20, 14, 10, 0.24);
  color: #2f241c;
  transform: translateY(-1px);
}

h1,
h2,
h3,
.lounge-hero__copy h1,
.lounge-hero h1,
.lounge-card h3,
.lounge-panel h2 {
  color: var(--companion-bark);
}

.status {
  color: var(--companion-moss);
  letter-spacing: 0;
}

.lead,
.compact-item,
.lounge-card p,
.lounge-panel p,
.ai-composer-actions p,
.tokimeki-live-panel p,
.chat-mvp-panel p {
  color: #6c5945;
}

.button,
input[type="submit"],
button {
  background: linear-gradient(135deg, #9d7145, #d99a36);
  border: 1px solid rgba(255, 248, 236, 0.8);
  border-radius: 999px;
  box-shadow: 0 14px 32px rgba(132, 88, 44, 0.22);
  color: #fffaf0;
}

.button.secondary {
  background: linear-gradient(135deg, #fffaf0, #e5edd9);
  border-color: rgba(105, 128, 83, 0.34);
  color: #5d4a32;
}

.button.vivid {
  background: linear-gradient(135deg, #7c9a62, #d99a36);
  color: #fffaf0;
}

.button.primary-cta {
  font-size: 1.08rem;
  min-height: 52px;
  padding: 0.9rem 1.25rem;
}

.hero,
.landing-hero,
.panel,
.card,
.lounge-card,
.lounge-panel,
.room-hero,
.room-card,
.goods-card,
.date-card-story,
.ai-chat-stage,
.ai-sidebar,
.ai-inspector-card,
.auth-card,
.tokimeki-live-panel article,
.chat-mvp-panel article {
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.92), rgba(246, 239, 225, 0.86));
  border: 1px solid rgba(124, 92, 54, 0.18);
  box-shadow: var(--companion-shadow);
  color: var(--companion-ink);
}

body.home-page {
  background:
    linear-gradient(90deg, rgba(255, 250, 239, 0.94) 0%, rgba(255, 250, 239, 0.62) 33%, rgba(255, 250, 239, 0.12) 66%),
    url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png) center right / cover fixed no-repeat;
}

body.home-page .lounge-hero {
  align-items: end;
  background: transparent;
  min-height: calc(100vh - var(--header-height));
}

body.home-page .shell {
  min-height: calc(100vh - var(--header-height));
}

.lounge-hero__copy {
  max-width: 720px;
}

.lounge-hero__copy h1 {
  font-size: clamp(3.25rem, 8.5vw, 7.8rem);
  line-height: 0.98;
  max-width: 760px;
}

body.home-page .lounge-hero__copy h1,
body.home-page .lounge-hero .lead,
body.home-page .lounge-hero .status {
  text-shadow: 0 2px 18px rgba(255, 252, 244, 0.92);
}

.tokimeki-live-panel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.home-feature-strip {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 1080px;
  width: min(100%, 1080px);
}

.home-feature-strip article,
.support-contact,
.support-boost {
  backdrop-filter: blur(14px);
  background: rgba(255, 252, 244, 0.84);
  border: 1px solid rgba(124, 92, 54, 0.18);
  border-radius: 18px;
  box-shadow: var(--companion-shadow);
  padding: 20px;
}

.home-feature-strip h2 {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.home-feature-strip p {
  color: #6c5945;
  margin: 0;
}

.tokimeki-live-panel article,
.chat-mvp-panel article {
  backdrop-filter: blur(12px);
  border-radius: 18px;
}

.tokimeki-live-panel h2 {
  color: #5c4028;
}

body.chat-page {
  background:
    linear-gradient(180deg, rgba(255, 248, 236, 0.72), rgba(52, 38, 25, 0.16)),
    url(/assets/tokimeki/chat-bed-bg-c1437896068ad9f1847b4f6954315d6fdfaf1ac8c32fdb98903bc5ab3c0812ee.png) center / cover fixed no-repeat;
}

body.chat-page .ai-workspace {
  grid-template-columns: minmax(240px, 1fr) minmax(520px, 720px) minmax(240px, 1fr);
}

body.chat-page .ai-sidebar,
body.chat-page .ai-chat-stage {
  background: rgba(255, 250, 239, 0.72);
  border-color: rgba(255, 250, 239, 0.7);
}

.realtime-butler__video-frame,
body.chat-page .realtime-butler__video-frame {
  background:
    linear-gradient(180deg, rgba(61, 41, 24, 0.08), rgba(61, 41, 24, 0.22)),
    url(/assets/tokimeki/chat-bed-bg-c1437896068ad9f1847b4f6954315d6fdfaf1ac8c32fdb98903bc5ab3c0812ee.png) center / cover no-repeat;
  border: 1px solid rgba(255, 240, 210, 0.72);
  border-radius: 28px;
  box-shadow: 0 28px 64px rgba(45, 31, 19, 0.24);
}

.realtime-butler__video-frame::after {
  background:
    radial-gradient(circle at 50% 40%, transparent 0 42%, rgba(255, 248, 236, 0.18) 43%, transparent 48%),
    linear-gradient(180deg, transparent 66%, rgba(61, 41, 24, 0.2));
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 2;
}

.realtime-butler__status,
.realtime-butler__placeholder {
  background: rgba(63, 43, 25, 0.82);
  color: #fff8ee;
}

.companion-avatar {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  min-height: 100%;
  padding: 18px;
  position: relative;
}

.companion-avatar__stage {
  align-items: end;
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 248, 238, 0.58), transparent 34%),
    linear-gradient(180deg, rgba(255, 248, 238, 0.12), rgba(63, 43, 25, 0.2)),
    url(/assets/tokimeki/chat-bed-bg-c1437896068ad9f1847b4f6954315d6fdfaf1ac8c32fdb98903bc5ab3c0812ee.png) center / cover no-repeat;
  border: 1px solid rgba(255, 240, 210, 0.72);
  border-radius: 30px;
  box-shadow: 0 28px 64px rgba(45, 31, 19, 0.24);
  display: grid;
  justify-items: center;
  min-height: min(760px, calc(100vh - 205px));
  overflow: hidden;
  position: relative;
  width: min(720px, 100%);
}

.companion-avatar__glow {
  animation: companion-glow 5.6s ease-in-out infinite;
  background: radial-gradient(circle, rgba(240, 189, 98, 0.34), transparent 64%);
  height: 66%;
  left: 50%;
  pointer-events: none;
  position: absolute;
  top: 16%;
  transform: translateX(-50%);
  width: 78%;
}

.companion-avatar__figure {
  animation: companion-breathe 4.4s ease-in-out infinite;
  height: min(72%, 520px);
  margin-bottom: 4%;
  position: relative;
  transform-origin: 50% 86%;
  width: min(78%, 500px);
  z-index: 2;
}

.companion-avatar__head {
  background:
    radial-gradient(circle at 34% 24%, rgba(255, 248, 238, 0.18), transparent 20%),
    linear-gradient(145deg, #bf834b, #8b5c35 76%);
  border-radius: 46% 46% 44% 44%;
  box-shadow: inset -18px -24px rgba(58, 38, 22, 0.14), 0 18px 36px rgba(36, 24, 14, 0.22);
  height: 56%;
  left: 50%;
  position: absolute;
  top: 4%;
  transform: translateX(-50%);
  width: 76%;
  z-index: 3;
}

.companion-avatar__ear {
  background: #9a6539;
  border: 12px solid #c9874a;
  border-radius: 999px;
  box-shadow: inset 0 0 0 18px #6f4528;
  height: 27%;
  position: absolute;
  top: 0;
  width: 27%;
  z-index: 2;
}

.companion-avatar__ear--left {
  left: 4%;
}

.companion-avatar__ear--right {
  right: 4%;
}

.companion-avatar__eye {
  animation: companion-blink 5.8s ease-in-out infinite;
  background: #221813;
  border-radius: 999px;
  box-shadow: inset 5px 5px rgba(255, 255, 255, 0.72);
  height: 9%;
  position: absolute;
  top: 39%;
  width: 9%;
}

.companion-avatar__eye--left {
  left: 27%;
}

.companion-avatar__eye--right {
  right: 27%;
}

.companion-avatar__brow {
  background: #4d301d;
  border-radius: 999px;
  height: 2.4%;
  position: absolute;
  top: 32%;
  width: 12%;
}

.companion-avatar__brow--left {
  left: 25%;
  transform: rotate(-8deg);
}

.companion-avatar__brow--right {
  right: 25%;
  transform: rotate(8deg);
}

.companion-avatar__face {
  background: #f2d7ad;
  border-radius: 48% 48% 46% 46%;
  bottom: 15%;
  height: 31%;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 42%;
}

.companion-avatar__nose {
  background: linear-gradient(180deg, #3b271c, #1d1410);
  border-radius: 48% 48% 54% 54%;
  height: 23%;
  left: 50%;
  position: absolute;
  top: 18%;
  transform: translateX(-50%);
  width: 30%;
}

.companion-avatar__mouth {
  border-bottom: 7px solid #2b1d15;
  border-radius: 0 0 999px 999px;
  height: 24%;
  left: 50%;
  position: absolute;
  top: 52%;
  transform: translateX(-50%);
  width: 34%;
}

.companion-avatar__mouth::before {
  background: #2b1d15;
  border-radius: 999px;
  content: "";
  height: 34%;
  left: 50%;
  position: absolute;
  top: -24%;
  transform: translateX(-50%);
  width: 8%;
}

.companion-avatar__body {
  background: linear-gradient(145deg, #a56f40, #754827);
  border-radius: 48% 48% 24% 24%;
  bottom: 0;
  box-shadow: inset -18px -22px rgba(58, 38, 22, 0.16), 0 18px 38px rgba(36, 24, 14, 0.22);
  height: 45%;
  left: 50%;
  position: absolute;
  transform: translateX(-50%);
  width: 68%;
  z-index: 1;
}

.companion-avatar__hand {
  background: #8a5630;
  border-radius: 999px;
  bottom: 8%;
  height: 18%;
  position: absolute;
  width: 18%;
  z-index: 4;
}

.companion-avatar__hand--left {
  animation: companion-left-paw 4.8s ease-in-out infinite;
  left: 19%;
  transform: rotate(-18deg);
}

.companion-avatar__hand--right {
  animation: companion-right-paw 5.2s ease-in-out infinite;
  right: 19%;
  transform: rotate(18deg);
}

.companion-avatar__status {
  background: rgba(63, 43, 25, 0.88);
  border: 1px solid rgba(255, 248, 238, 0.24);
  border-radius: 999px;
  color: #fff8ee;
  font-size: 0.95rem;
  font-weight: 850;
  padding: 0.55rem 0.95rem;
  text-align: center;
}


.companion-first-message {
  background: rgba(255, 248, 238, 0.86);
  border: 1px solid rgba(116, 80, 45, 0.16);
  border-radius: 18px;
  color: #5c4630;
  font-weight: 750;
  line-height: 1.7;
  padding: 14px 16px;
}

.companion-first-message p {
  margin: 0;
}

.chat-mood-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.guest-save-note {
  color: #6c5945;
  font-size: 0.92rem;
  margin: 10px 0 0;
}

.support-page {
  align-items: start;
  background: transparent;
  border: 0;
  box-shadow: none;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  padding: 0;
}

.support-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.support-form textarea {
  min-height: 180px;
}

.companion-avatar.is-talking .companion-avatar__mouth {
  animation: companion-talk 0.34s ease-in-out infinite;
  background: #2b1d15;
  border-bottom: 0;
}

.companion-avatar.is-thinking .companion-avatar__figure {
  animation: companion-thinking 1.8s ease-in-out infinite;
}

.companion-avatar.is-empathy .companion-avatar__brow--left,
.companion-avatar.is-empathy .companion-avatar__brow--right {
  top: 35%;
}

.companion-avatar.is-encourage .companion-avatar__hand--right,
.companion-avatar.is-happy .companion-avatar__hand--right {
  animation: companion-wave 1.1s ease-in-out infinite;
  transform-origin: 20% 80%;
}

.companion-avatar.is-happy .companion-avatar__eye {
  background: transparent;
  border-bottom: 7px solid #221813;
  border-radius: 0;
  box-shadow: none;
}

@keyframes companion-breathe {
  0%,
  100% {
    transform: translateY(5px) scale(1);
  }

  50% {
    transform: translateY(-5px) scale(1.015);
  }
}

@keyframes companion-blink {
  0%,
  91%,
  100% {
    transform: scaleY(1);
  }

  94%,
  96% {
    transform: scaleY(0.08);
  }
}

@keyframes companion-talk {
  0%,
  100% {
    height: 12%;
    width: 24%;
  }

  50% {
    height: 24%;
    width: 30%;
  }
}

@keyframes companion-thinking {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-4px) rotate(-2deg);
  }
}

@keyframes companion-wave {
  0%,
  100% {
    bottom: 10%;
    transform: rotate(22deg);
  }

  50% {
    bottom: 19%;
    transform: rotate(-18deg);
  }
}

@keyframes companion-left-paw {
  0%,
  100% {
    transform: rotate(-18deg);
  }

  50% {
    transform: rotate(-10deg);
  }
}

@keyframes companion-right-paw {
  0%,
  100% {
    transform: rotate(18deg);
  }

  50% {
    transform: rotate(10deg);
  }
}

@keyframes companion-glow {
  0%,
  100% {
    opacity: 0.52;
    transform: translateX(-50%) scale(0.96);
  }

  50% {
    opacity: 0.86;
    transform: translateX(-50%) scale(1.04);
  }
}

input,
select,
textarea,
.ai-input,
.diagnosis-form select {
  background: rgba(255, 252, 244, 0.92);
  border-color: rgba(124, 92, 54, 0.24);
  color: var(--companion-ink);
}

.companion-type-option.is-selected,
.mood-chip:hover {
  background: rgba(221, 233, 207, 0.86);
  border-color: rgba(95, 123, 84, 0.45);
}



.topbar nav a,
.topbar .link-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0) 48%),
    linear-gradient(135deg, #ffe76a 0%, #ff9b3d 48%, #65c96f 100%);
  border: 2px solid rgba(255, 250, 231, 0.92);
  border-radius: 14px 24px 13px 24px;
  box-shadow:
    0 5px 0 #835a24,
    0 12px 22px rgba(91, 55, 22, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.72);
  color: #4e351a;
  font-weight: 950;
  padding: 0.62rem 0.86rem;
  transform: translateY(0) rotate(-0.35deg);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.topbar nav a:nth-child(even),
.topbar form:nth-child(even) .link-button {
  border-radius: 22px 14px 24px 13px;
  transform: translateY(0) rotate(0.45deg);
}

.topbar nav a:hover,
.topbar .link-button:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(255, 255, 255, 0) 48%),
    linear-gradient(135deg, #fff184 0%, #ff8f3d 45%, #38bd70 100%);
  color: #3e2814;
  filter: saturate(1.18) brightness(1.04);
  transform: translateY(-2px) rotate(0deg);
  box-shadow:
    0 7px 0 #835a24,
    0 16px 26px rgba(91, 55, 22, 0.25),
    inset 0 2px 0 rgba(255, 255, 255, 0.78);
}

.topbar nav a:active,
.topbar .link-button:active {
  transform: translateY(4px) rotate(0deg);
  box-shadow:
    0 1px 0 #835a24,
    0 8px 16px rgba(91, 55, 22, 0.18),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

/* Final girlfriend button treatment */
.button,
input[type="submit"],
button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0) 42%),
    linear-gradient(135deg, #ff6f3c 0%, #ffb800 44%, #50b85a 100%);
  border: 2px solid rgba(255, 250, 231, 0.95);
  border-radius: 18px 30px 16px 30px;
  box-shadow:
    0 7px 0 #8f5b24,
    0 18px 30px rgba(91, 55, 22, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.72),
    inset 0 -3px 0 rgba(93, 61, 26, 0.16);
  color: #fffdf4;
  font-weight: 900;
  letter-spacing: 0;
  padding: 0.78rem 1.18rem;
  position: relative;
  transform: translateY(0) rotate(-0.6deg);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.button:hover,
input[type="submit"]:hover,
button:hover {
  filter: saturate(1.15) brightness(1.04);
  transform: translateY(-2px) rotate(0.4deg);
  box-shadow:
    0 9px 0 #8f5b24,
    0 22px 34px rgba(91, 55, 22, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.78),
    inset 0 -3px 0 rgba(93, 61, 26, 0.14);
}

.button:active,
input[type="submit"]:active,
button:active {
  transform: translateY(5px) rotate(0deg);
  box-shadow:
    0 2px 0 #8f5b24,
    0 10px 18px rgba(91, 55, 22, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.5);
}

.button.secondary {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0) 46%),
    linear-gradient(135deg, #fff8d7 0%, #b9e86f 58%, #74c56a 100%);
  border-color: rgba(95, 123, 84, 0.36);
  box-shadow:
    0 7px 0 #6e8f3d,
    0 16px 28px rgba(83, 111, 54, 0.24),
    inset 0 2px 0 rgba(255, 255, 255, 0.74);
  color: #4e421f;
}

.button.secondary:hover {
  box-shadow:
    0 9px 0 #6e8f3d,
    0 20px 32px rgba(83, 111, 54, 0.28),
    inset 0 2px 0 rgba(255, 255, 255, 0.8);
}

.button.secondary:active {
  box-shadow:
    0 2px 0 #6e8f3d,
    0 9px 16px rgba(83, 111, 54, 0.22),
    inset 0 2px 0 rgba(255, 255, 255, 0.54);
}

.button.vivid,
input[type="submit"],
.ai-composer input[type="submit"] {
  background:
    radial-gradient(circle at 18% 20%, rgba(255, 255, 255, 0.68) 0 10%, transparent 11%),
    linear-gradient(135deg, #ff4f3d 0%, #ffb000 42%, #24b86a 100%);
  box-shadow:
    0 8px 0 #8f3f20,
    0 20px 34px rgba(162, 70, 28, 0.32),
    inset 0 2px 0 rgba(255, 255, 255, 0.72),
    inset 0 -4px 0 rgba(90, 48, 18, 0.18);
  color: #fffdf4;
}

.button.primary-cta {
  border-radius: 22px 38px 20px 38px;
  font-size: 1.12rem;
  min-height: 58px;
  padding: 1rem 1.45rem;
  transform: translateY(0) rotate(-1.2deg);
}

.mood-chip {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0) 48%),
    linear-gradient(135deg, #fff4c2, #ffcf4a 55%, #f47d38);
  border: 2px solid rgba(255, 250, 231, 0.95);
  border-radius: 16px 24px 14px 24px;
  box-shadow:
    0 5px 0 #9a6428,
    0 12px 20px rgba(91, 55, 22, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.72);
  color: #5a3518;
  font-weight: 900;
  transform: rotate(-0.4deg);
}

.mood-chip:nth-child(even) {
  transform: rotate(0.6deg);
}

.mood-chip:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(255, 255, 255, 0) 48%),
    linear-gradient(135deg, #fff7d8, #ffdb5f 52%, #ff7f45);
  border-color: rgba(255, 250, 231, 1);
  transform: translateY(-2px) rotate(0deg);
}


@media (max-width: 920px) {
  body.home-page {
    background:
      linear-gradient(180deg, rgba(255, 250, 239, 0.78), rgba(255, 250, 239, 0.26) 50%, rgba(255, 250, 239, 0.92)),
      url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png) 68% center / cover fixed no-repeat;
  }

  .tokimeki-live-panel,
  .home-feature-strip,
  .chat-mvp-panel {
    grid-template-columns: 1fr;
  }

  .support-page {
    grid-template-columns: 1fr;
  }

  body.chat-page .ai-workspace {
    grid-template-columns: 1fr;
  }
}

/* Kanojo scenario chat room */

.vrm-chat {
  display: block;
  margin: 0 auto;
  max-width: 1120px;
  min-height: calc(100vh - 110px);
  padding: clamp(14px, 3vw, 28px);
}

.pre-chat-intro {
  align-items: center;
  display: grid;
  gap: 16px;
  justify-items: center;
  margin: 0 auto;
  max-width: 480px;
  min-height: calc(100vh - 150px);
  text-align: center;
  transition: opacity 180ms ease, transform 180ms ease;
}

.pre-chat-intro[hidden] {
  display: none;
}

.pre-chat-intro.is-exiting {
  opacity: 0;
  transform: translateY(-8px);
}

.pre-chat-intro__media {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 209, 231, 0.22), transparent 34%),
    linear-gradient(180deg, rgba(18, 21, 38, 0.86), rgba(6, 9, 18, 0.96));
  border: 1px solid rgba(255, 222, 237, 0.28);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  max-height: min(68vh, 680px);
  overflow: hidden;
  position: relative;
  width: min(100%, 420px);
}

.pre-chat-intro__video,
.pre-chat-intro__poster {
  display: block;
  height: 100%;
  object-fit: contain;
  object-position: center;
  width: 100%;
}

.pre-chat-intro__text-fallback {
  align-items: center;
  color: #fff7fb;
  display: flex;
  font-size: 1.35rem;
  font-weight: 900;
  height: 100%;
  justify-content: center;
  padding: 24px;
}

.pre-chat-intro__message {
  color: #fff7fb;
  font-size: clamp(1.05rem, 3vw, 1.3rem);
  font-weight: 800;
  line-height: 1.7;
  margin: 0;
}

.pre-chat-intro__button {
  background: linear-gradient(135deg, #ff7aa8, #ffb2c8);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 14px 30px rgba(255, 122, 168, 0.28);
  color: #341424;
  cursor: pointer;
  font-weight: 900;
  padding: 0.9rem 1.35rem;
}

.pre-chat-intro__noscript {
  color: rgba(255, 247, 251, 0.72);
  font-size: 0.86rem;
  line-height: 1.6;
  margin: 0;
  max-width: 420px;
}

.vrm-chat__main {
  align-items: stretch;
  display: grid;
  gap: clamp(16px, 3vw, 28px);
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 460px);
}

.vrm-chat__main[hidden] {
  display: none;
}

.vrm-chat:not(.has-started) .vrm-chat__main {
  display: none;
}

.vrm-chat__stage-panel,
.vrm-chat__panel {
  background: rgba(8, 12, 24, 0.72);
  border: 1px solid rgba(255, 222, 237, 0.28);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.vrm-chat__stage-panel {
  align-items: center;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
  overflow: hidden;
  padding: clamp(10px, 2vw, 18px);
}

.vrm-chat__stage {
  aspect-ratio: 4 / 5;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 209, 231, 0.24), transparent 34%),
    linear-gradient(180deg, rgba(18, 21, 38, 0.82), rgba(6, 9, 18, 0.94));
  border-radius: 14px;
  min-height: 440px;
  overflow: hidden;
  position: relative;
  width: min(100%, 560px);
}

.vrm-chat__stage.is-fallback::before,
.vrm-chat__stage.is-fallback::after {
  content: "";
  pointer-events: none;
  position: absolute;
  z-index: 3;
}

.vrm-chat__stage.is-live-photo::before,
.vrm-chat__stage.is-live-photo::after {
  display: none;
}

.vrm-chat__stage.is-fallback::before {
  background:
    radial-gradient(ellipse at center, rgba(76, 33, 43, 0.46) 0 35%, transparent 38%),
    linear-gradient(rgba(120, 55, 62, 0.56), rgba(120, 55, 62, 0.56));
  background-position: center 54%, center 58%;
  background-repeat: no-repeat;
  background-size: 54% 34%, 72% 9%;
  border-radius: 50%;
  height: 4%;
  left: 68%;
  opacity: 0.76;
  top: 29.2%;
  transform: translateX(-50%) scaleY(0.34);
  transform-origin: 50% 18%;
  width: 10%;
}

.vrm-chat__stage.is-fallback::after {
  animation: vrm-fallback-blink 5.8s ease-in-out infinite;
  background:
    radial-gradient(ellipse at center, rgba(31, 22, 27, 0.58) 0 32%, transparent 35%),
    radial-gradient(ellipse at center, rgba(31, 22, 27, 0.58) 0 32%, transparent 35%);
  background-position: 63.5% 50%, 72.5% 50%;
  background-repeat: no-repeat;
  background-size: 5% 100%, 5% 100%;
  height: 1.8%;
  left: 0;
  opacity: 0.92;
  top: 22.8%;
  transform-origin: center;
  width: 100%;
}

.vrm-chat__stage canvas,
.vrm-chat__fallback-image {
  height: 100%;
  inset: 0;
  object-fit: cover;
  object-position: 72% 50%;
  position: absolute;
  width: 100%;
}

.vrm-chat__fallback-video {
  object-fit: contain;
  object-position: center;
}

.vrm-chat__fallback-image {
  animation: kare-photo-idle 7.2s ease-in-out infinite;
  transform-origin: 50% 58%;
}

.vrm-chat.is-idle .vrm-chat__stage.is-fallback::before {
  animation: vrm-fallback-smile-mouth 5.4s ease-in-out infinite;
}

.vrm-chat.is-idle .vrm-chat__stage.is-fallback::after {
  animation: vrm-fallback-smile-eyes 5.8s ease-in-out infinite;
}

.vrm-chat.is-speaking .vrm-chat__fallback-image {
  animation: kare-photo-speaking 2.4s ease-in-out infinite;
}

.vrm-chat.is-speaking .vrm-chat__stage.is-fallback::before {
  animation: vrm-fallback-mouth 0.54s steps(4, end) infinite;
  opacity: 0.84;
}

.vrm-chat.is-speaking .vrm-chat__stage.is-fallback::after {
  animation: vrm-fallback-talk-eyes 4.8s ease-in-out infinite;
}

.vrm-chat__fallback-image[hidden] {
  display: none;
}

.vrm-chat__panel {
  align-content: start;
  display: grid;
  gap: 16px;
  padding: clamp(16px, 3vw, 24px);
}

.vrm-chat__dev-warning {
  background: rgba(255, 229, 229, 0.92);
  border: 1px solid rgba(164, 22, 26, 0.36);
  border-radius: 8px;
  color: #5f1114;
  font-size: 0.86rem;
  max-width: min(100%, 560px);
  padding: 0.7rem 0.85rem;
  width: 100%;
}

.vrm-chat__asset-status {
  background: rgba(8, 12, 24, 0.82);
  border: 1px solid rgba(255, 222, 237, 0.24);
  border-radius: 999px;
  color: rgba(255, 247, 251, 0.82);
  font-size: 0.86rem;
  font-weight: 800;
  margin: 0;
  max-width: min(100%, 560px);
  padding: 0.45rem 0.75rem;
  text-align: center;
  width: 100%;
}

.vrm-chat__dev-warning ul {
  margin: 0.25rem 0 0;
  padding-left: 1.2rem;
}

.vrm-chat__header h1 {
  color: #fff7fb;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  margin: 0.25rem 0 0;
}

.vrm-chat__bubble {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 222, 237, 0.62);
  border-radius: 14px;
  color: #372535;
  font-size: 1.05rem;
  line-height: 1.75;
  min-height: 132px;
  padding: 1rem;
}

.vrm-chat__next-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.vrm-chat__feedback {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.vrm-chat__feedback-label {
  color: rgba(255, 247, 251, 0.78);
  flex-basis: 100%;
  font-size: 0.86rem;
  margin: 0;
}

.vrm-chat__composer {
  display: grid;
  gap: 0.75rem;
}

.vrm-chat__composer .ai-input {
  min-height: 132px;
}

.vrm-chat__note {
  color: rgba(255, 247, 251, 0.72);
  font-size: 0.86rem;
  line-height: 1.55;
  margin: 0;
}

.vrm-chat.is-busy .vrm-chat__bubble {
  opacity: 0.72;
}

.vrm-chat.is-playing-response .vrm-chat__composer,
.vrm-chat.is-playing-response .vrm-chat__next-buttons,
.vrm-chat.is-playing-response .vrm-chat__feedback {
  opacity: 0.58;
  pointer-events: none;
}

@media (max-width: 840px) {
  .vrm-chat {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .vrm-chat__main {
    grid-template-columns: 1fr;
  }

  .vrm-chat__stage {
    min-height: 50vh;
    width: min(100%, 420px);
  }

  .vrm-chat__panel {
    padding-bottom: 20px;
  }
}

@keyframes vrm-fallback-smile-mouth {
  0%, 68%, 100% { transform: translateX(-50%) scaleY(0.34); }
  74% { transform: translateX(-50%) scaleY(0.5); }
}

@keyframes vrm-fallback-smile-eyes {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.18); }
}

@keyframes vrm-fallback-mouth {
  0%, 100% { transform: translateX(-50%) scaleY(0.26); }
  50% { transform: translateX(-50%) scaleY(0.62); }
}

@keyframes vrm-fallback-talk-eyes {
  0%, 90%, 100% { transform: scaleY(1); }
  94% { transform: scaleY(0.2); }
}

@keyframes kare-photo-idle {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.01) translateY(-4px); }
}

@keyframes kare-photo-speaking {
  0%, 100% { transform: scale(1) translateY(0); }
  50% { transform: scale(1.012) translateY(-5px); }
}

.scenario-response {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(244, 212, 137, 0.28);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(5, 12, 24, 0.14);
  color: #132238;
  margin: 0 0 1rem;
  padding: 1rem;
}

.scenario-response__bubble {
  font-size: 1rem;
  line-height: 1.75;
}

.scenario-response__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.admin-scenario-assets {
  margin: 0 auto;
  max-width: 1180px;
  padding: 2rem 1rem;
}

.admin-scenario-assets__header {
  margin-bottom: 1rem;
}

.scenario-admin-cards {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin-bottom: 1rem;
}

.scenario-admin-card,
.scenario-missing-assets {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(244, 212, 137, 0.28);
  border-radius: 8px;
  color: #132238;
  padding: 1rem;
}

.scenario-admin-card h2,
.scenario-missing-assets h2 {
  color: #132238;
  font-size: 1rem;
  margin-bottom: 0.4rem;
}

.scenario-admin-card p {
  margin: 0.35rem 0;
}

.scenario-vrm-upload {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
}

.scenario-vrm-upload input[type="file"] {
  background: rgba(7, 19, 38, 0.08);
  color: #132238;
}

.scenario-admin-help {
  color: #4b5870;
  font-size: 0.85rem;
  line-height: 1.5;
}

.scenario-admin-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.scenario-admin-links a {
  background: rgba(7, 19, 38, 0.08);
  border: 1px solid rgba(7, 19, 38, 0.16);
  border-radius: 999px;
  color: #123553;
  font-size: 0.82rem;
  font-weight: 800;
  padding: 0.35rem 0.55rem;
}

.scenario-missing-assets {
  margin-top: 1rem;
}

.scenario-missing-assets pre {
  background: #071326;
  border-radius: 8px;
  color: #e8eef7;
  overflow-x: auto;
  padding: 1rem;
  white-space: pre-wrap;
}

.asset-warning {
  color: #a4161a;
  font-weight: 800;
}

.admin-scenario-assets__table-wrap {
  overflow-x: auto;
}

.admin-scenario-assets__table {
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 1100px;
  width: 100%;
}

.admin-scenario-assets__table th,
.admin-scenario-assets__table td {
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
  padding: 0.7rem;
  text-align: left;
  vertical-align: top;
}

.asset-pill {
  border-radius: 999px;
  display: inline-block;
  font-weight: 800;
  min-width: 64px;
  padding: 0.25rem 0.55rem;
  text-align: center;
}

.asset-pill.is-ok {
  background: #d8f3dc;
  color: #1b5e20;
}

.asset-pill.is-missing {
  background: #ffe5e5;
  color: #a4161a;
}

.asset-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.asset-actions form {
  margin: 0;
}

.scenario-video-placeholder {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.scenario-video-placeholder__image {
  animation: scenario-idle-breathe 4.8s ease-in-out infinite;
  height: 104%;
  object-fit: cover;
  object-position: center 22%;
  transform-origin: 50% 62%;
  width: 104%;
}

.realtime-butler.is-talking .scenario-video-placeholder__image {
  animation: scenario-talk-breathe 2.4s ease-in-out infinite;
}

.scenario-video-placeholder::after {
  animation: scenario-idle-light 3.6s ease-in-out infinite;
  background: linear-gradient(115deg, transparent 18%, rgba(255, 248, 231, 0.18) 44%, transparent 68%);
  content: "";
  inset: -24%;
  pointer-events: none;
  position: absolute;
  transform: translateX(-42%);
}

.scenario-video-placeholder__caption {
  background: rgba(7, 19, 38, 0.82);
  border: 1px solid rgba(244, 212, 137, 0.36);
  border-radius: 8px;
  bottom: 16px;
  color: #fff8e7;
  left: 16px;
  max-width: calc(100% - 32px);
  padding: 0.65rem 0.75rem;
  position: absolute;
}

.scenario-video-placeholder__caption span {
  color: #f4d489;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  margin-bottom: 0.2rem;
}

.scenario-video-placeholder__caption strong {
  display: block;
  font-size: 0.92rem;
  line-height: 1.35;
}

@keyframes scenario-idle-breathe {
  0%, 100% {
    transform: scale(1) translateY(0);
  }

  50% {
    transform: scale(1.035) translateY(-1.2%);
  }
}

@keyframes scenario-idle-light {
  0%, 100% {
    opacity: 0;
    transform: translateX(-46%);
  }

  45% {
    opacity: 0.65;
  }

  70% {
    opacity: 0;
    transform: translateX(42%);
  }
}

@keyframes scenario-talk-breathe {
  0%, 100% {
    filter: brightness(1);
    transform: scale(1.015) translateY(0) rotate(0deg);
  }

  32% {
    filter: brightness(1.04);
    transform: scale(1.04) translateY(-1.4%) rotate(-0.35deg);
  }

  64% {
    filter: brightness(1.02);
    transform: scale(1.03) translateY(0.6%) rotate(0.28deg);
  }
}

@keyframes face-rig-head-talk {
  0%, 100% {
    transform: translateY(0) rotate(0deg);
  }

  25% {
    transform: translateY(-0.35%) rotate(-0.35deg);
  }

  56% {
    transform: translateY(0.18%) rotate(0.42deg);
  }

  78% {
    transform: translateY(-0.16%) rotate(-0.18deg);
  }
}

@keyframes face-rig-brow-left {
  0%, 100% {
    transform: translateX(-50%) translateY(0) rotate(-7deg);
  }

  35% {
    transform: translateX(-50%) translateY(-42%) rotate(-3deg);
  }

  68% {
    transform: translateX(-50%) translateY(18%) rotate(-10deg);
  }
}

@keyframes face-rig-brow-right {
  0%, 100% {
    transform: translateX(-50%) translateY(0) rotate(7deg);
  }

  35% {
    transform: translateX(-50%) translateY(-42%) rotate(3deg);
  }

  68% {
    transform: translateX(-50%) translateY(18%) rotate(10deg);
  }
}

@keyframes face-rig-blink {
  0%, 91%, 100% {
    transform: translateX(-50%) scaleY(1);
  }

  94%, 96% {
    transform: translateX(-50%) scaleY(0.12);
  }
}

@keyframes face-rig-talk-eyes {
  0%, 44%, 100% {
    transform: translateX(-50%) scaleY(1);
  }

  48%, 51% {
    transform: translateX(-50%) scaleY(0.14);
  }

  72% {
    transform: translateX(-50%) translateY(-5%) scaleY(0.88);
  }
}

@keyframes face-rig-cheek-talk {
  0%, 100% {
    opacity: 0.34;
    transform: translateX(-50%) scale(0.96);
  }

  52% {
    opacity: 0.58;
    transform: translateX(-50%) scale(1.08);
  }
}

@keyframes face-rig-mouth-idle {
  0%, 100% {
    transform: translateX(-50%) scaleY(0.72);
  }

  50% {
    transform: translateX(-50%) scaleY(0.9);
  }
}

@keyframes face-rig-mouth-talk {
  0% {
    transform: translateX(-50%) scaleX(0.92) scaleY(0.48);
  }

  25% {
    transform: translateX(-50%) scaleX(1.05) scaleY(0.92);
  }

  50% {
    transform: translateX(-50%) scaleX(0.98) scaleY(1.32);
  }

  75% {
    transform: translateX(-50%) scaleX(1.1) scaleY(0.76);
  }

  100% {
    transform: translateX(-50%) scaleX(0.94) scaleY(0.56);
  }
}

/* Video quality gate: keep unapproved/generated media modest and framed. */
body.chat-page {
  background-color: #090b13;
}

body.chat-page .shell {
  background: rgba(4, 6, 12, 0.42);
}

body.chat-page .ai-workspace {
  grid-template-columns: minmax(260px, 1fr) minmax(360px, 520px) minmax(260px, 1fr);
}

body.chat-page .ai-sidebar {
  min-height: auto;
  width: min(480px, 100%);
}

body.chat-page .realtime-butler {
  flex: initial;
  justify-content: flex-start;
}

body.chat-page .realtime-butler__video-frame,
.realtime-butler__video-frame {
  aspect-ratio: 9 / 14;
  background:
    linear-gradient(180deg, rgba(7, 11, 22, 0.42), rgba(7, 11, 22, 0.68)),
    #0b1020;
  border: 1px solid rgba(255, 222, 237, 0.32);
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.38);
  max-height: min(620px, calc(100vh - 260px));
  max-width: 440px;
  min-height: 0;
  width: min(440px, 82vw);
}

body.chat-page .realtime-butler__prerecorded-video,
.realtime-butler__prerecorded-video {
  object-fit: cover;
  object-position: center 18%;
}

body.chat-page .realtime-butler__status {
  background: rgba(8, 12, 24, 0.82);
  border: 1px solid rgba(255, 222, 237, 0.24);
  max-width: min(440px, 82vw);
}

.admin-video-assets .video-quality-guidelines {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 139, 181, 0.28);
  border-radius: 8px;
  margin-bottom: 1rem;
  padding: 1rem;
}

.admin-video-assets .video-quality-guidelines ul {
  display: grid;
  gap: 0.35rem 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
}

.admin-video-preview {
  aspect-ratio: 9 / 14;
  background: #0b1020;
  border-radius: 8px;
  display: block;
  object-fit: cover;
  width: 104px;
}

.admin-video-actions {
  display: grid;
  gap: 0.35rem;
  min-width: 112px;
}

.admin-video-actions .button_to,
.admin-video-actions button {
  margin: 0;
  width: 100%;
}

@media (max-width: 920px) {
  body.chat-page .ai-workspace {
    grid-template-columns: 1fr;
  }

  body.chat-page .realtime-butler__video-frame,
  .realtime-butler__video-frame {
    max-height: 430px;
    max-width: 360px;
    width: min(360px, 86vw);
  }
}

/* Keep the main chat background crisp and visible. */
body.chat-page {
  background: url(/tokimeki/night-bedroom-boyfriend-pajamas.png);
  background-attachment: fixed;
  background-color: #cde8fb;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.chat-page .shell {
  background: transparent;
}

.lounge-daily-card,
.lounge-title-card,
.lounge-card,
.lounge-panel,
.tokimeki-live-panel article,
.room-hero,
.room-card,
.section-heading,
.scenario-response,
body.chat-page .ai-chat-stage,
body.chat-page .ai-sidebar,
.vrm-chat__panel,
.vrm-chat__stage-panel {
  backdrop-filter: blur(18px) saturate(1.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(232, 247, 255, 0.72)),
    linear-gradient(115deg, rgba(229, 247, 255, 0.42), rgba(174, 224, 255, 0.28));
  border: 1px solid rgba(255, 255, 255, 0.82);
  box-shadow:
    0 18px 48px rgba(41, 112, 171, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.82);
  color: #16405f;
}

.lounge-daily-card h2,
.lounge-title-card strong,
.tokimeki-live-panel h2,
.room-card h2,
.room-hero h1,
.section-heading h1,
.scenario-response,
.vrm-chat__header h1 {
  color: #16405f;
}

.lounge-daily-card .status,
.lounge-title-card .status,
.tokimeki-live-panel .status,
.room-card .status,
.room-hero .status,
.section-heading .status,
.vrm-chat__feedback-label,
.vrm-chat__note {
  color: #3c749a;
}

.vrm-chat__asset-status,
body.chat-page .realtime-butler__status {
  background: rgba(232, 247, 255, 0.72);
  border-color: rgba(255, 255, 255, 0.82);
  color: #16405f;
}

.tokimeki-live-panel article {
  backdrop-filter: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.42), rgba(226, 245, 255, 0.24));
  border-color: rgba(255, 255, 255, 0.56);
  border-radius: 24px;
  box-shadow:
    0 12px 32px rgba(41, 112, 171, 0.08),
    inset 0 1px rgba(255, 255, 255, 0.48);
  padding: 20px;
}

body.home-page {
  background: url(/tokimeki/night-bedroom-boyfriend-pajamas.png);
  background-attachment: fixed;
  background-color: #cde8fb;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

body.home-page .lounge-hero {
  background: transparent;
}

.brand {
  background:
    linear-gradient(180deg, #ffffff 0%, #f2fdff 24%, #bff2ff 52%, #62dfff 78%, #eafcff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  filter:
    drop-shadow(0 2px 0 rgba(10, 71, 111, 0.62))
    drop-shadow(0 0 14px rgba(255, 255, 255, 0.94))
    drop-shadow(0 0 30px rgba(98, 223, 255, 0.78))
    drop-shadow(0 0 48px rgba(47, 199, 255, 0.58));
  text-shadow:
    1px 0 0 rgba(8, 64, 104, 0.82),
    -1px 0 0 rgba(8, 64, 104, 0.82),
    0 1px 0 rgba(8, 64, 104, 0.82),
    0 -1px 0 rgba(8, 64, 104, 0.82),
    0 0 14px rgba(255, 255, 255, 0.92),
    0 0 30px rgba(126, 232, 255, 0.86),
    0 0 52px rgba(47, 199, 255, 0.48);
  -webkit-text-stroke: 1px rgba(8, 64, 104, 0.72);
  -webkit-text-fill-color: transparent;
}

.tokimeki-live-panel article p {
  color: #315f82;
}

.tokimeki-live-panel .text-link {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(224, 244, 255, 0.86));
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  box-shadow:
    0 10px 24px rgba(36, 105, 162, 0.16),
    inset 0 1px rgba(255, 255, 255, 0.9);
  color: #18547c;
  display: inline-block;
  font-weight: 900;
  margin-top: 0.35rem;
  padding: 0.62rem 0.95rem;
  text-decoration: none;
}

body.chat-page .button,
body.chat-page button,
body.chat-page input[type="submit"],
.vrm-chat__composer button,
.vrm-chat__next-buttons .button,
.vrm-chat__feedback .button {
  background:
    linear-gradient(135deg, rgba(12, 61, 95, 0.96), rgba(33, 116, 165, 0.96));
  border: 1px solid rgba(219, 244, 255, 0.78);
  box-shadow:
    0 12px 28px rgba(5, 20, 36, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.26);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 18, 36, 0.42);
}

body.chat-page .button.secondary,
.vrm-chat__next-buttons .button.secondary,
.vrm-chat__feedback .button.secondary {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(211, 240, 255, 0.92));
  border: 1px solid rgba(12, 61, 95, 0.28);
  box-shadow:
    0 10px 24px rgba(5, 20, 36, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.9);
  color: #0c3d5f;
  text-shadow: none;
}

body.chat-page .button:hover,
body.chat-page button:hover,
body.chat-page input[type="submit"]:hover,
.vrm-chat__composer button:hover,
.vrm-chat__next-buttons .button:hover,
.vrm-chat__feedback .button:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.vrm-chat__panel {
  backdrop-filter: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.48), rgba(226, 245, 255, 0.28));
}

.vrm-chat__bubble,
.vrm-chat__composer .ai-input {
  background: rgba(255, 255, 255, 0.58);
}

/* Video-first Kanojo chat refinement */
.vrm-chat {
  max-width: 1280px;
}

.vrm-chat__main {
  align-items: center;
  grid-template-columns: 1fr;
}

.vrm-chat__stage-panel {
  width: 100%;
}

.vrm-chat__stage {
  aspect-ratio: 16 / 9;
  min-height: clamp(360px, 62vh, 760px);
  width: min(100%, 1100px);
}

.vrm-chat__fallback-video {
  animation: none;
  object-fit: contain;
  object-position: center;
}

.vrm-chat__panel {
  margin: 0 auto;
  max-width: 940px;
  width: 100%;
}

.friendship-rules-grid {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.friendship-rules-grid p {
  align-items: center;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 183, 208, 0.36);
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding: 0.75rem 0.85rem;
}

.friendship-rules-grid span {
  color: #b83262;
  font-weight: 900;
  margin-left: 0.75rem;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .vrm-chat__stage {
    min-height: 42vh;
  }

  .friendship-rules-grid {
    grid-template-columns: 1fr;
  }
}

/* Tokimeki Girlfriend pastel pink theme */
:root {
  --tokimeki-pink-50: #fff5fa;
  --tokimeki-pink-100: #ffe8f2;
  --tokimeki-pink-200: #ffcfe2;
  --tokimeki-pink-400: #ff7fb3;
  --tokimeki-berry: #c73572;
  --tokimeki-lavender: #b88cff;
  --tokimeki-mint: #8df4df;
  --tokimeki-yellow: #ffe27a;
  --tokimeki-ink: #4b2136;
}

html {
  background: var(--tokimeki-pink-50);
}

body {
  background:
    radial-gradient(circle at 9% 12%, rgba(255, 127, 179, 0.26), transparent 24%),
    radial-gradient(circle at 88% 10%, rgba(184, 140, 255, 0.26), transparent 26%),
    radial-gradient(circle at 18% 84%, rgba(255, 226, 122, 0.24), transparent 24%),
    linear-gradient(180deg, #fff7fb 0%, #ffeaf3 42%, #fff8fc 100%);
  color: var(--tokimeki-ink);
  overflow-x: hidden;
}

body::before,
body::after {
  color: rgba(255, 105, 163, 0.22);
  content: "♡  ♡     ♡   ♡  ♡     ♡";
  font-size: clamp(30px, 5vw, 74px);
  font-weight: 900;
  left: -4vw;
  letter-spacing: 0.52em;
  line-height: 1;
  pointer-events: none;
  position: fixed;
  right: -4vw;
  text-shadow: 0 8px 22px rgba(255, 127, 179, 0.16);
  top: 118px;
  transform: rotate(-7deg);
  white-space: nowrap;
  z-index: 0;
}

body::after {
  color: rgba(184, 140, 255, 0.16);
  content: "♡    ♡  ♡     ♡    ♡";
  font-size: clamp(24px, 4vw, 58px);
  top: auto;
  bottom: 42px;
  transform: rotate(6deg);
}

.topbar {
  background:
    radial-gradient(circle at 12% 26%, rgba(255, 255, 255, 0.9), transparent 12%),
    radial-gradient(circle at 28% 12%, rgba(255, 226, 122, 0.9), transparent 22%),
    radial-gradient(circle at 74% 10%, rgba(141, 244, 223, 0.8), transparent 24%),
    linear-gradient(105deg, #ff66a8 0%, #ff9cc5 24%, #b88cff 50%, #62dfff 74%, #ffe27a 100%);
  border-bottom: 3px solid rgba(255, 255, 255, 0.86);
  box-shadow:
    0 18px 38px rgba(199, 53, 114, 0.26),
    0 4px 0 rgba(255, 182, 212, 0.65),
    inset 0 -1px rgba(255, 255, 255, 0.72);
  overflow: hidden;
}

.topbar::before,
.topbar::after {
  color: rgba(255, 255, 255, 0.62);
  content: "♡ ♡ ♡ ♡ ♡ ♡ ♡ ♡";
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.7em;
  pointer-events: none;
  position: absolute;
  right: 18px;
  top: 8px;
  text-shadow: 0 2px 8px rgba(199, 53, 114, 0.24);
  z-index: 0;
}

.topbar::after {
  bottom: 6px;
  left: 20px;
  right: auto;
  top: auto;
  transform: rotate(-3deg);
}

.brand,
.topbar nav {
  position: relative;
  z-index: 1;
}

.brand {
  animation: brand-rainbow-shine 5.5s ease-in-out infinite;
  background:
    linear-gradient(90deg, #ff3b7f 0%, #ff9d2f 15%, #ffe95c 30%, #4ee878 45%, #34d5ff 60%, #6a7cff 75%, #d85cff 90%, #ff3b7f 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter:
    drop-shadow(0 1px 0 rgba(95, 20, 58, 0.72))
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.96))
    drop-shadow(0 0 18px rgba(255, 224, 109, 0.88))
    drop-shadow(0 0 30px rgba(69, 217, 255, 0.72))
    drop-shadow(0 0 44px rgba(255, 72, 174, 0.64));
  font-weight: 1000;
  letter-spacing: 0;
  text-decoration: none;
  -webkit-text-stroke: 0.8px rgba(255, 255, 255, 0.62);
  -webkit-text-fill-color: transparent;
}

.brand::before {
  content: none;
}

@keyframes brand-rainbow-shine {
  0%, 100% {
    background-position: 0% 50%;
    filter:
      drop-shadow(0 1px 0 rgba(95, 20, 58, 0.72))
      drop-shadow(0 0 8px rgba(255, 255, 255, 0.9))
      drop-shadow(0 0 18px rgba(255, 224, 109, 0.78))
      drop-shadow(0 0 30px rgba(69, 217, 255, 0.62))
      drop-shadow(0 0 44px rgba(255, 72, 174, 0.54));
  }

  50% {
    background-position: 100% 50%;
    filter:
      drop-shadow(0 1px 0 rgba(95, 20, 58, 0.72))
      drop-shadow(0 0 12px rgba(255, 255, 255, 1))
      drop-shadow(0 0 24px rgba(255, 238, 129, 0.98))
      drop-shadow(0 0 38px rgba(69, 217, 255, 0.82))
      drop-shadow(0 0 58px rgba(255, 72, 174, 0.76));
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand {
    animation: none;
  }
}

.topbar nav a,
.topbar .link-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 232, 242, 0.72));
  border: 1px solid rgba(255, 255, 255, 0.86);
  border-radius: 999px;
  box-shadow:
    0 8px 18px rgba(146, 33, 85, 0.18),
    inset 0 1px rgba(255, 255, 255, 0.9);
  color: #8d2452;
  font-weight: 900;
}

.topbar nav a::before,
.topbar .link-button::before {
  content: "♡";
  font-size: 0.88em;
  margin-right: 0.28rem;
}

.topbar nav a:hover,
.topbar .link-button:hover {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 226, 122, 0.86));
  color: #b51f62;
  transform: translateY(-1px) scale(1.03);
}

.topbar {
  align-items: center;
  background:
    linear-gradient(90deg, rgba(255, 107, 74, 0.96), rgba(255, 154, 194, 0.96), rgba(145, 216, 255, 0.96));
  border-bottom: 3px solid rgba(255, 255, 255, 0.74);
  box-shadow: 0 10px 0 rgba(189, 63, 50, 0.18), 0 18px 34px rgba(80, 49, 33, 0.2);
  gap: 16px;
  min-height: 76px;
  overflow: visible;
  padding: 16px clamp(16px, 4vw, 48px);
  backdrop-filter: blur(14px);
}

.topbar::before,
.topbar::after {
  content: none;
  display: none;
}

.brand {
  animation: none;
  background: linear-gradient(90deg, #fff36f 0%, #ff6b4a 22%, #ff4fd8 45%, #8f5bff 68%, #27d9ff 86%, #ffffff 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: #fff7a8;
  filter: drop-shadow(0 2px 0 rgba(116, 37, 31, 0.42)) drop-shadow(0 0 12px rgba(255, 243, 111, 0.88)) drop-shadow(0 0 24px rgba(255, 79, 216, 0.58));
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 900;
  line-height: 1.08;
  text-shadow: 0 0 16px rgba(255, 255, 255, 0.86), 0 0 28px rgba(255, 209, 102, 0.7);
  white-space: nowrap;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 0;
}

.brand::before {
  content: none;
}

.topbar nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  font-size: 15px;
  gap: 12px;
  justify-content: flex-end;
  overflow-x: auto;
}

.topbar nav a,
.topbar .link-button {
  align-items: center;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  box-shadow: 0 5px 0 rgba(125, 70, 26, 0.42), 0 12px 20px rgba(80, 49, 33, 0.18);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  text-shadow: 0 1px 0 rgba(76, 43, 20, 0.26);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
  white-space: nowrap;
}

.topbar nav a::before,
.topbar .link-button::before {
  content: none;
}

.topbar nav a:nth-of-type(1) {
  background: linear-gradient(180deg, #8ee7b2 0%, #35b978 58%, #20875b 100%);
}

.topbar nav a:nth-of-type(2) {
  background: linear-gradient(180deg, #6fd7ff 0%, #1d9be6 58%, #1670c8 100%);
}

.topbar nav a:nth-of-type(3) {
  background: linear-gradient(180deg, #d9b8ff 0%, #8f5bff 58%, #5c35d6 100%);
  box-shadow: 0 5px 0 rgba(70, 39, 152, 0.62), 0 12px 20px rgba(80, 49, 33, 0.18);
}

.topbar nav a:nth-of-type(4) {
  background: linear-gradient(180deg, #ffd36f 0%, #ff8b3d 58%, #e95b27 100%);
}

.topbar nav a:nth-of-type(5),
.topbar .link-button {
  background: linear-gradient(180deg, #ff9b6f 0%, #ff6b4a 58%, #e84a38 100%);
  border: 2px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 7px 0 #a9372e, 0 18px 30px rgba(155, 65, 43, 0.24);
}

.topbar nav a:hover,
.topbar .link-button:hover {
  filter: saturate(1.08);
  transform: translateY(-2px);
}

.topbar nav a:active,
.topbar .link-button:active {
  box-shadow: 0 3px 0 rgba(120, 47, 32, 0.75), 0 8px 18px rgba(80, 49, 33, 0.2);
  transform: translateY(4px);
}

@media (max-width: 780px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    justify-content: flex-start;
    width: 100%;
  }
}

.shell,
.room-shell,
.goods-shell,
.vrm-chat,
.panel,
.card,
.room-card,
.goods-card,
.lounge-card,
.lounge-panel,
.lounge-daily-card,
.lounge-title-card,
.auth-card,
.tokimeki-live-panel article,
.chat-mvp-panel article,
.vrm-chat__panel,
.vrm-chat__stage-panel,
.scenario-admin-card,
.date-card-story {
  position: relative;
  z-index: 1;
}

.panel,
.card,
.room-card,
.goods-card,
.lounge-card,
.lounge-panel,
.lounge-daily-card,
.lounge-title-card,
.auth-card,
.tokimeki-live-panel article,
.chat-mvp-panel article,
.vrm-chat__panel,
.vrm-chat__stage-panel,
.scenario-admin-card,
.date-card-story {
  background:
    linear-gradient(#fffafd, #fffafd) padding-box,
    linear-gradient(135deg, #ff8fbd, #ffd2e5 30%, #b88cff 62%, #ffe27a) border-box;
  border: 2px solid transparent;
  border-radius: 12px;
  box-shadow:
    0 18px 40px rgba(199, 53, 114, 0.13),
    0 0 0 5px rgba(255, 214, 230, 0.22),
    inset 0 1px rgba(255, 255, 255, 0.92);
}

.panel::after,
.card::after,
.room-card::after,
.goods-card::after,
.lounge-card::after,
.lounge-panel::after,
.vrm-chat__panel::after,
.vrm-chat__stage-panel::after {
  color: rgba(255, 127, 179, 0.32);
  content: "♡";
  font-size: 22px;
  font-weight: 900;
  position: absolute;
  right: 14px;
  top: 10px;
}

h1,
h2,
h3,
.room-hero h1,
.vrm-chat__header h1,
.section-heading h1 {
  color: #9f285d;
}

.status,
.room-card .status,
.room-hero .status,
.vrm-chat__feedback-label,
.vrm-chat__note,
.lead {
  color: #b23b72;
}

.rainbow-brand-text {
  animation: brand-rainbow-shine 5.5s ease-in-out infinite;
  background:
    linear-gradient(90deg, #ff3b7f 0%, #ff9d2f 15%, #ffe95c 30%, #4ee878 45%, #34d5ff 60%, #6a7cff 75%, #d85cff 90%, #ff3b7f 100%);
  background-size: 240% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
  filter:
    drop-shadow(0 1px 0 rgba(95, 20, 58, 0.72))
    drop-shadow(0 0 8px rgba(255, 255, 255, 0.96))
    drop-shadow(0 0 18px rgba(255, 224, 109, 0.88))
    drop-shadow(0 0 30px rgba(69, 217, 255, 0.72))
    drop-shadow(0 0 44px rgba(255, 72, 174, 0.64));
  -webkit-text-stroke: 0.45px rgba(255, 255, 255, 0.62);
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .rainbow-brand-text {
    animation: none;
  }
}

.button,
a.button,
button,
input[type="submit"],
.vrm-chat__composer button {
  background:
    linear-gradient(135deg, #ff6fae 0%, #ff9cc5 46%, #b88cff 100%);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 999px;
  box-shadow:
    0 12px 24px rgba(199, 53, 114, 0.24),
    inset 0 1px rgba(255, 255, 255, 0.64);
  color: #ffffff;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(109, 23, 61, 0.32);
}

.button.secondary,
.vrm-chat__next-buttons .button.secondary,
.vrm-chat__feedback .button.secondary {
  background:
    linear-gradient(180deg, #ffffff, #ffe8f2);
  border: 1px solid rgba(255, 127, 179, 0.45);
  color: #9f285d;
  text-shadow: none;
}

.button.vivid,
.button.primary-cta {
  background:
    linear-gradient(135deg, #ff4f9c, #ff9fbc 42%, #ffe27a 100%);
  color: #ffffff;
}

.vrm-chat__stage {
  background:
    radial-gradient(circle at 50% 12%, rgba(255, 207, 226, 0.44), transparent 32%),
    linear-gradient(180deg, #fff7fb, #ffe4f0);
  border: 2px solid rgba(255, 184, 213, 0.7);
  box-shadow:
    inset 0 0 0 6px rgba(255, 255, 255, 0.38),
    0 22px 48px rgba(199, 53, 114, 0.18);
}

.vrm-chat__bubble,
.vrm-chat__composer .ai-input,
input,
textarea,
select {
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 143, 189, 0.46);
  border-radius: 12px;
  color: var(--tokimeki-ink);
}

.vrm-chat__asset-status,
body.chat-page .realtime-butler__status {
  background: rgba(255, 245, 250, 0.88);
  border-color: rgba(255, 143, 189, 0.52);
  color: #9f285d;
}


@media (max-width: 720px) {
  body::before,
  body::after {
    font-size: 28px;
    letter-spacing: 0.38em;
  }

  .topbar::before,
  .topbar::after {
    opacity: 0.42;
  }
}

/* Restore bedroom background image while keeping pink UI theme */
body {
  background:
    linear-gradient(180deg, rgba(255, 247, 251, 0.68), rgba(255, 236, 246, 0.44)),
    url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png) center right / cover fixed no-repeat;
}

body.chat-page {
  background:
    linear-gradient(180deg, rgba(255, 247, 251, 0.62), rgba(255, 232, 244, 0.36)),
    url(/assets/tokimeki/chat-bed-bg-c1437896068ad9f1847b4f6954315d6fdfaf1ac8c32fdb98903bc5ab3c0812ee.png) center / cover fixed no-repeat;
}

body.home-page {
  background:
    linear-gradient(90deg, rgba(255, 247, 251, 0.82) 0%, rgba(255, 236, 246, 0.46) 42%, rgba(255, 236, 246, 0.1) 72%),
    url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png) center right / cover fixed no-repeat;
}

/* Sharpen bedroom background visibility */
body {
  background:
    linear-gradient(180deg, rgba(255, 247, 251, 0.18), rgba(255, 236, 246, 0.08)),
    url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png) center right / cover fixed no-repeat;
}

body.chat-page {
  background:
    linear-gradient(180deg, rgba(255, 247, 251, 0.14), rgba(255, 232, 244, 0.06)),
    url(/assets/tokimeki/chat-bed-bg-c1437896068ad9f1847b4f6954315d6fdfaf1ac8c32fdb98903bc5ab3c0812ee.png) center / cover fixed no-repeat;
}

body.home-page {
  background:
    linear-gradient(90deg, rgba(255, 247, 251, 0.26) 0%, rgba(255, 236, 246, 0.12) 42%, rgba(255, 236, 246, 0.02) 72%),
    url(/assets/tokimeki/hero-bed-woman-40999a4310305f2c6acc3959136a32807c28b535b58f66c36bb92dafb1059d7e.png) center right / cover fixed no-repeat;
}

/* Let bedroom background show through cards */
.panel,
.card,
.room-hero,
.room-card,
.goods-card,
.lounge-card,
.lounge-panel,
.lounge-daily-card,
.lounge-title-card,
.auth-card,
.tokimeki-live-panel article,
.chat-mvp-panel article,
.vrm-chat__panel,
.vrm-chat__stage-panel,
.scenario-admin-card,
.date-card-story {
  backdrop-filter: blur(8px) saturate(1.08);
  background:
    linear-gradient(rgba(255, 250, 253, 0.72), rgba(255, 244, 249, 0.58)) padding-box,
    linear-gradient(135deg, rgba(255, 143, 189, 0.9), rgba(255, 210, 229, 0.76) 30%, rgba(184, 140, 255, 0.72) 62%, rgba(255, 226, 122, 0.82)) border-box;
}

.room-hero,
.lounge-hero .lounge-daily-card,
.lounge-title-card {
  background:
    linear-gradient(rgba(255, 250, 253, 0.66), rgba(255, 244, 249, 0.5)) padding-box,
    linear-gradient(135deg, rgba(255, 143, 189, 0.92), rgba(184, 140, 255, 0.72), rgba(255, 226, 122, 0.82)) border-box;
}

.vrm-chat__bubble,
.vrm-chat__composer .ai-input,
.friendship-rules-grid p {
  background: rgba(255, 255, 255, 0.68);
  backdrop-filter: blur(6px) saturate(1.06);
}

/* Room page cards: clearer translucent background */
body.room-page .room-hero,
body.room-page .room-card {
  backdrop-filter: blur(4px) saturate(1.04);
  background:
    linear-gradient(rgba(255, 250, 253, 0.46), rgba(255, 244, 249, 0.34)) padding-box,
    linear-gradient(135deg, rgba(255, 143, 189, 0.82), rgba(255, 210, 229, 0.58) 30%, rgba(184, 140, 255, 0.56) 62%, rgba(255, 226, 122, 0.68)) border-box;
  box-shadow:
    0 16px 34px rgba(199, 53, 114, 0.1),
    0 0 0 4px rgba(255, 214, 230, 0.14),
    inset 0 1px rgba(255, 255, 255, 0.58);
}

body.room-page .friendship-rules-grid p {
  background: rgba(255, 255, 255, 0.42);
}

/* Room page cards: extra transparent pass */
body.room-page .room-hero,
body.room-page .room-card {
  backdrop-filter: blur(3px) saturate(1.03);
  background:
    linear-gradient(rgba(255, 250, 253, 0.32), rgba(255, 244, 249, 0.22)) padding-box,
    linear-gradient(135deg, rgba(255, 143, 189, 0.74), rgba(255, 210, 229, 0.48) 30%, rgba(184, 140, 255, 0.46) 62%, rgba(255, 226, 122, 0.58)) border-box;
  box-shadow:
    0 14px 30px rgba(199, 53, 114, 0.08),
    0 0 0 3px rgba(255, 214, 230, 0.1),
    inset 0 1px rgba(255, 255, 255, 0.42);
}

body.room-page .friendship-rules-grid p {
  background: rgba(255, 255, 255, 0.3);
}

.pricing-page,
.legal-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 16px 56px;
}

.legal-page {
  background: rgba(255, 253, 248, 0.9);
  border: 1px solid rgba(125, 71, 99, 0.14);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(41, 112, 171, 0.08);
  line-height: 1.9;
}

.legal-page h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.25;
  margin-bottom: 14px;
}

.legal-page h2 {
  border-top: 1px solid rgba(125, 71, 99, 0.14);
  font-size: 1.18rem;
  margin-top: 30px;
  padding-top: 22px;
}

.legal-page h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.legal-page ul {
  padding-left: 1.4rem;
}

.back-link {
  color: #6d5638;
  display: inline-block;
  font-weight: 700;
  margin-bottom: 16px;
  text-decoration: none;
}

.back-link:hover {
  color: #d91574;
}

.contact-page {
  max-width: 760px;
}

.contact-form {
  margin-top: 24px;
}

.bot-field {
  height: 0;
  left: -9999px;
  overflow: hidden;
  position: absolute;
  width: 0;
}

.form-errors {
  background: #fff0f5;
  border: 1px solid rgba(183, 37, 92, 0.28);
  border-radius: 8px;
  color: #7c214c;
  padding: 12px;
}

.admin-users-page {
  background: rgba(255, 253, 248, 0.94);
  border: 1px solid rgba(125, 71, 99, 0.14);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(41, 112, 171, 0.08);
  color: #2f2230;
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1180px;
  padding: 24px;
}

.admin-users-header h1 {
  font-size: clamp(1.7rem, 4vw, 2.4rem);
  margin: 0 0 6px;
}

.admin-summary-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.admin-summary-grid div {
  background: #fff7fb;
  border: 1px solid rgba(124, 33, 76, 0.18);
  border-radius: 8px;
  padding: 14px;
}

.admin-summary-grid span {
  color: #6b5965;
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
}

.admin-summary-grid strong {
  color: #7c214c;
  font-size: 1.6rem;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-users-table {
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 1080px;
  width: 100%;
}

.admin-users-table th,
.admin-users-table td {
  border-bottom: 1px solid rgba(124, 33, 76, 0.14);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.admin-users-table th {
  background: #fff0f5;
  color: #7c214c;
  font-weight: 900;
}

.admin-users-table tbody tr:hover {
  background: rgba(255, 247, 251, 0.72);
}

.admin-recent-contacts {
  border-top: 1px solid rgba(124, 33, 76, 0.14);
  padding-top: 16px;
}

.admin-recent-contacts h2 {
  font-size: 1.15rem;
  margin: 0 0 10px;
}

.admin-recent-contacts ul {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.admin-recent-contacts li {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(160px, 1fr) minmax(180px, 1fr) auto;
}

@media (max-width: 720px) {
  .admin-users-page {
    padding: 16px;
  }

  .admin-recent-contacts li {
    align-items: start;
    grid-template-columns: 1fr;
  }
}

.pricing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  margin-top: 24px;
}

.pricing-card {
  background: #fffdf8;
  border: 1px solid rgba(125, 71, 99, 0.2);
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(41, 112, 171, 0.1);
  color: #2f2230;
  padding: 20px;
}

.pricing-card.featured {
  border-color: rgba(178, 107, 53, 0.42);
}

.pricing-card ul {
  color: #312532;
  font-weight: 600;
  margin: 16px 0 20px;
  padding-left: 20px;
}

.checkout-confirmation,
.checkout-summary,
.legal-consent-box {
  display: grid;
  gap: 12px;
}

.checkout-summary,
.legal-consent-box,
.chat-usage-card {
  background: #fff7fb;
  border: 1px solid rgba(124, 33, 76, 0.24);
  border-radius: 8px;
  padding: 12px;
}

.legal-consent {
  align-items: center;
  background: #fffdf8;
  border: 1px solid rgba(124, 33, 76, 0.22);
  border-radius: 8px;
  display: grid;
  gap: 10px;
  grid-template-columns: 20px minmax(0, 1fr);
  padding: 10px;
}

.legal-consent input {
  height: 20px;
  margin: 0;
  width: 20px;
}

.legal-consent-main,
.plan-current,
.auth-note {
  color: #425466;
  font-weight: 700;
}

.legal-consent-links {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.legal-consent-button,
.primary-button,
.secondary-button,
.google-login-button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-weight: 700;
  justify-content: center;
  padding: 10px 14px;
  text-align: center;
  text-decoration: none;
}

.primary-button {
  background: linear-gradient(135deg, #d4773a, #b26b35);
  border: 0;
  color: #fff;
}

.secondary-button {
  background: #425466;
  color: #fff;
}

.google-login-button {
  background: #fff;
  border: 1px solid rgba(12, 61, 95, 0.18);
  color: #17384f;
  width: 100%;
}

.google-login-button.is-disabled {
  background: rgba(255, 255, 255, 0.7);
  color: #607383;
  cursor: not-allowed;
}

.pricing-usage-card {
  margin-top: 18px;
  width: min(100%, 420px);
}

.vrm-chat__usage {
  margin: 0 0 14px;
  width: 100%;
}

.chat-usage-card__link {
  color: #21515a;
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: underline;
}

.oauth-actions {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.oauth-actions h2 {
  font-size: 1rem;
  margin: 0;
}

.english-page .shell {
  max-width: 1160px;
}

.en-hero {
  align-items: stretch;
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.97), rgba(241, 252, 249, 0.94)),
    radial-gradient(circle at 78% 16%, rgba(255, 214, 112, 0.38), transparent 26%);
  border: 1px solid #ddd5c6;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(43, 35, 24, 0.12), inset 0 1px rgba(255, 255, 255, 0.78);
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  padding: clamp(28px, 6vw, 64px);
}

.en-hero__copy {
  max-width: 720px;
}

.en-hero__panel {
  align-self: center;
  background: linear-gradient(145deg, #173c43, #315d63 48%, #5d4b8b);
  border-radius: 8px;
  box-shadow: 0 24px 55px rgba(23, 60, 67, 0.26);
  color: #fff;
  display: grid;
  gap: 14px;
  padding: 28px;
}

.en-hero__panel span,
.en-hero__panel p {
  color: #f1d9bd;
}

.en-hero__panel strong {
  font-size: 24px;
  line-height: 1.45;
}

.en-feature-grid,
.en-pricing-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 24px;
}

.en-feature-grid article,
.en-page,
.en-note {
  background: #fffdf8;
  border: 1px solid #ddd5c6;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(43, 35, 24, 0.1), inset 0 1px rgba(255, 255, 255, 0.78);
  padding: 24px;
}

.en-feature-grid h2,
.en-pricing-grid h2 {
  font-size: 23px;
}

.en-pricing-grid .pricing-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 320px;
}

.en-note {
  margin-top: 24px;
}

@media (max-width: 760px) {
  .en-hero {
    grid-template-columns: 1fr;
    padding: 24px;
  }

  .en-hero__panel strong {
    font-size: 20px;
  }
}
