/*
 * 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/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.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 bedroom 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/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.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/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.png);
    background-position: 68% center;
    min-height: calc(100vh - 64px);
  }
}

/* Bold romantic 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;
  }
}

/* Soft pink final theme */
:root {
  --tokimeki-bg: #fff6fb;
  --tokimeki-pink: #ffd8e9;
  --tokimeki-pink-strong: #f58ab8;
  --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/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.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/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.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/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.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);
}

.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;
}

/* Night final theme for kare */
:root {
  --tokimeki-bg: #071326;
  --tokimeki-night: #071326;
  --tokimeki-panel: rgba(9, 23, 42, 0.78);
  --tokimeki-panel-strong: rgba(10, 28, 51, 0.9);
  --tokimeki-line: rgba(196, 214, 236, 0.22);
  --tokimeki-gold: #f4d489;
  --tokimeki-cyan: #72d6df;
  --tokimeki-text: #e8eef7;
  --tokimeki-muted: #b9c7d8;
  --tokimeki-heading: #fff7df;
  --tokimeki-shadow: 0 28px 70px rgba(0, 0, 0, 0.38);
}

body,
body.auth-page {
  background:
    radial-gradient(circle at 14% 6%, rgba(114, 214, 223, 0.22), transparent 30%),
    radial-gradient(circle at 84% 0%, rgba(244, 212, 137, 0.18), transparent 28%),
    linear-gradient(180deg, #071326 0%, #0b1c34 52%, #111827 100%);
  color: var(--tokimeki-text);
}

.topbar {
  background:
    linear-gradient(135deg, rgba(5, 13, 27, 0.96), rgba(13, 34, 59, 0.96) 52%, rgba(47, 39, 70, 0.94)),
    radial-gradient(circle at 88% 18%, rgba(244, 212, 137, 0.16), transparent 32%);
  border-bottom: 1px solid rgba(244, 212, 137, 0.2);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.34);
  min-height: 70px;
}

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

.brand {
  background: none;
  color: #fff7df;
  filter: none;
  font-size: clamp(1.45rem, 3vw, 2.1rem);
  letter-spacing: 0;
  text-shadow: 0 0 22px rgba(244, 212, 137, 0.42);
}

.topbar nav a,
.topbar .link-button {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(244, 212, 137, 0.22);
  box-shadow: none;
  color: #f5ead0;
  font-weight: 850;
}

.topbar nav a:hover,
.topbar .link-button:hover {
  background: rgba(244, 212, 137, 0.14);
  color: #fff7df;
  transform: translateY(-1px);
}

.button,
input[type="submit"],
button {
  background: linear-gradient(135deg, #f4d489, #9c7a3a);
  border: 1px solid rgba(255, 247, 223, 0.38);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22);
  color: #111827;
}

.button.secondary {
  background: linear-gradient(135deg, rgba(114, 214, 223, 0.18), rgba(255, 255, 255, 0.08));
  border-color: rgba(114, 214, 223, 0.34);
  color: #e8fbff;
}

.button.vivid,
body.chat-page input[type="submit"],
.chat-mvp-panel .button {
  background: linear-gradient(135deg, #72d6df, #f4d489);
  color: #071326;
}

a,
.text-link,
.auth-links a {
  color: #72d6df;
}

h1,
h2,
h3,
.lounge-hero__copy h1,
.lounge-hero h1,
.tokimeki-live-panel h2,
.tokimeki-feature-strip h2,
.auth-card h1 {
  color: var(--tokimeki-heading);
}

.lead,
.status,
.lounge-hero .lead,
.tokimeki-live-panel p,
.tokimeki-feature-strip p,
.story-unlock-card p,
.chat-idle-prompt,
.auth-lead,
.goods-card dt {
  color: var(--tokimeki-muted);
}

.shell {
  color: var(--tokimeki-text);
}

.hero,
.landing-hero,
.panel,
.card,
.lounge-card,
.lounge-daily-card,
.lounge-panel,
.ai-chat-stage,
.ai-sidebar,
.ai-inspector-card,
.form-card,
.profile-card,
.memory-card,
.task-card,
.auth-card,
.tokimeki-live-panel article,
.tokimeki-feature-strip article,
.story-unlock-panel,
.story-unlock-card,
.chat-mvp-panel article,
.room-hero,
.section-heading,
.support-page,
.room-card,
.goods-card,
.date-card-story {
  backdrop-filter: blur(18px);
  background: var(--tokimeki-panel);
  border: 1px solid var(--tokimeki-line);
  box-shadow: var(--tokimeki-shadow);
  color: var(--tokimeki-text);
}

.lounge-hero {
  background:
    linear-gradient(90deg, rgba(7, 19, 38, 0.9) 0%, rgba(7, 19, 38, 0.7) 36%, rgba(7, 19, 38, 0.22) 70%, rgba(7, 19, 38, 0.04) 100%),
    url(/assets/tokimeki/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.png);
  background-color: #071326;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 100%, contain;
}

body.chat-page {
  background:
    linear-gradient(180deg, rgba(7, 19, 38, 0.72), rgba(7, 19, 38, 0.5)),
    url(/assets/tokimeki/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.png);
  background-attachment: fixed;
  background-color: #071326;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-size: 100% 100%, contain;
}

body.chat-page .ai-sidebar,
body.chat-page .ai-chat-stage,
body.chat-page .ai-sidebar-brand {
  background: rgba(7, 19, 38, 0.62);
  border-color: var(--tokimeki-line);
}

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

body.chat-page .realtime-butler__video-frame {
  background:
    linear-gradient(145deg, rgba(7, 19, 38, 0.22), rgba(114, 214, 223, 0.1));
  border: 1px solid rgba(244, 212, 137, 0.24);
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.36);
}

input,
select,
textarea,
.auth-field input,
body.chat-page .ai-input {
  background: rgba(4, 12, 25, 0.72);
  border: 1px solid rgba(196, 214, 236, 0.24);
  color: #e8eef7;
}

input::placeholder,
textarea::placeholder,
body.chat-page .ai-input::placeholder {
  color: #8fa3bc;
}

.companion-type-option,
.mood-chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(196, 214, 236, 0.22);
  color: #e8eef7;
}

.companion-type-option.is-selected,
.mood-chip:hover {
  background: rgba(244, 212, 137, 0.16);
  border-color: rgba(244, 212, 137, 0.44);
}

.lounge-card-result,
.lounge-praise,
.auth-errors {
  background: rgba(114, 214, 223, 0.1);
  border-color: rgba(114, 214, 223, 0.24);
  color: #d9faff;
}

.story-unlock-card span,
.auth-card .status {
  color: var(--tokimeki-gold);
}

@media (max-width: 920px) {
  .lounge-hero {
    background:
      linear-gradient(180deg, rgba(7, 19, 38, 0.82), rgba(7, 19, 38, 0.44) 48%, rgba(7, 19, 38, 0.92)),
      url(/assets/tokimeki/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.png);
    background-position: center, center;
    background-repeat: no-repeat, no-repeat;
    background-size: 100% 100%, contain;
  }
}

/* Full-background image and vivid night header */
body.home-page,
body.chat-page {
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 0, 118, 0.22), transparent 28%),
    radial-gradient(circle at 88% 6%, rgba(244, 212, 137, 0.24), transparent 30%),
    linear-gradient(180deg, rgba(7, 19, 38, 0.72), rgba(7, 19, 38, 0.62)),
    url(/assets/tokimeki/night-bedroom-boyfriend-pajamas-ebaa97cadb5f5d72890a467972694d3b54e418bdddd7294865695048f109ea61.png);
  background-attachment: fixed;
  background-color: #050914;
  background-position: center, center, center, center;
  background-repeat: no-repeat, no-repeat, no-repeat, no-repeat;
  background-size: 100% 100%, 100% 100%, 100% 100%, contain;
}

.lounge-hero {
  background:
    linear-gradient(90deg, rgba(5, 9, 20, 0.94) 0%, rgba(18, 13, 32, 0.7) 34%, rgba(97, 13, 54, 0.22) 66%, rgba(5, 9, 20, 0) 100%);
  background-color: transparent;
}

.topbar {
  background:
    radial-gradient(circle at 8% 24%, rgba(255, 255, 255, 0.5), transparent 14%),
    radial-gradient(circle at 30% -18%, rgba(255, 0, 118, 0.84), transparent 32%),
    radial-gradient(circle at 82% 18%, rgba(244, 212, 137, 0.58), transparent 28%),
    linear-gradient(115deg, rgba(5, 7, 16, 0.98) 0%, rgba(72, 4, 42, 0.98) 28%, rgba(192, 0, 92, 0.96) 52%, rgba(255, 72, 150, 0.95) 72%, rgba(17, 10, 30, 0.98) 100%);
  border-bottom: 1px solid rgba(244, 212, 137, 0.54);
  box-shadow:
    0 22px 70px rgba(255, 0, 118, 0.34),
    0 0 42px rgba(244, 212, 137, 0.2),
    inset 0 -1px rgba(255, 255, 255, 0.28);
  isolation: isolate;
  min-height: 82px;
  overflow: hidden;
  position: relative;
}

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

.topbar::after {
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.76) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(244, 212, 137, 0.76) 0 1px, transparent 2px);
  background-position: 9% 34%, 74% 30%;
  background-size: 88px 44px, 76px 38px;
  content: "";
  display: block;
  inset: 0;
  opacity: 0.36;
  pointer-events: none;
  position: absolute;
  z-index: 0;
}

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

.brand {
  background: linear-gradient(180deg, #fff 0%, #fff1c7 38%, #ff70b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: #fff7df;
  filter: drop-shadow(0 3px 0 rgba(45, 0, 24, 0.62)) drop-shadow(0 0 24px rgba(255, 73, 158, 0.86));
  font-size: clamp(1.9rem, 4vw, 3rem);
  font-weight: 1000;
  letter-spacing: 0.03em;
  line-height: 1;
  text-shadow:
    0 1px 0 #fff,
    0 0 22px rgba(244, 212, 137, 0.84),
    0 0 54px rgba(255, 0, 118, 0.9);
}

.topbar nav a,
.topbar .link-button {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 205, 232, 0.9));
  border: 1px solid rgba(255, 247, 223, 0.82);
  box-shadow:
    0 12px 32px rgba(48, 0, 28, 0.34),
    0 0 22px rgba(255, 73, 158, 0.34),
    inset 0 1px rgba(255, 255, 255, 0.95);
  color: #67002f;
  font-weight: 950;
  min-height: 42px;
  padding: 10px 17px;
}

.topbar nav a:hover,
.topbar .link-button:hover {
  background: linear-gradient(180deg, #fff, #f4d489);
  color: #25000f;
  transform: translateY(-2px) scale(1.04);
}

@media (max-width: 920px) {
  body.home-page,
  body.chat-page {
    background-position: center, center, center, center top;
    background-size: 100% 100%, 100% 100%, 100% 100%, contain;
  }

  .lounge-hero {
    background:
      linear-gradient(180deg, rgba(5, 9, 20, 0.9), rgba(36, 14, 38, 0.38) 48%, rgba(5, 9, 20, 0.92));
  }
}
