:root {
  --bg: #fbf5f1;
  --paper: rgba(255, 250, 246, 0.92);
  --line: #ead9cb;
  --brown: #503b30;
  --muted: #9a8576;
  --red: #963b35;
  --gold: #d8ad67;
  --soft: #efe0d5;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--brown);
  background:
    radial-gradient(circle at 12% 20%, rgba(216, 173, 103, 0.12), transparent 22rem),
    radial-gradient(circle at 82% 28%, rgba(150, 59, 53, 0.08), transparent 26rem),
    var(--bg);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; border: 0; color: inherit; background: transparent; }
.hidden { display: none !important; }
.muted { color: var(--muted); }

.welcome-screen {
  min-height: 100vh;
  background: url("assets/welcome-opt.webp?v=20260706-slim") center / cover no-repeat;
  position: relative;
  overflow: hidden;
}
.welcome-fade { opacity: 0; animation: fadeUp 2.2s ease forwards; }
.welcome-logo {
  position: absolute;
  left: 9vw;
  top: 16vh;
  color: #3e3029;
  font-size: clamp(40px, 6vw, 96px);
  font-weight: 900;
  text-shadow: 0 4px white, 4px 4px 0 #8f342f;
}
.welcome-logo span { font-size: 24px; margin-left: 8px; }
.welcome-title {
  position: absolute;
  left: 50%;
  bottom: 18vh;
  transform: translateX(-50%);
  padding: 24px 54px;
  min-width: min(720px, 78vw);
  border-radius: 42px;
  color: #4c3830;
  background: rgba(255, 250, 246, 0.92);
  border: 5px solid #b78b6d;
  box-shadow: 0 8px 0 white, 0 18px 36px rgba(80, 59, 48, 0.12);
  font-size: clamp(34px, 5vw, 82px);
  font-weight: 900;
  animation: titleFadeUp 2.2s ease 0.65s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes titleFadeUp {
  from { opacity: 0; transform: translateX(-50%) translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.shell {
  min-height: 100vh;
  padding: 34px 46px;
  border: 1px solid #f0ded2;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.3), transparent 32%),
    repeating-radial-gradient(circle at 4% 95%, rgba(214, 181, 153, 0.18) 0 2px, transparent 3px 16px);
}
.topbar {
  position: relative;
  z-index: 60;
  height: 92px;
  display: flex;
  align-items: center;
  gap: 44px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 34px;
  font-weight: 900;
  text-shadow: 0 3px white, 2px 2px 0 #8f342f;
}
.brand-mark, .mascot, .chair-mascot, .box-ball {
  display: grid;
  place-items: center;
  color: #8f342f;
  background: radial-gradient(circle at 44% 35%, #ffe0b7, #f5b876 62%, #c47a47);
  border: 7px solid white;
  box-shadow: 0 0 0 3px #5a4034, 0 16px 26px rgba(80, 59, 48, 0.16);
}
.brand-mark { width: 58px; height: 58px; border-radius: 50%; font-size: 30px; }
.nav {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: clamp(22px, 4vw, 84px);
}
.nav-item {
  position: relative;
  padding: 16px 10px 18px;
  font-size: 24px;
  font-weight: 800;
  color: #6b594e;
}
.nav-item.active { color: var(--red); }
.nav-item.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 160px;
  height: 2px;
  transform: translateX(-50%);
  background: #cda27f;
}
.login-pill {
  padding: 16px 28px;
  border: 1px solid var(--line);
  border-radius: 38px;
  background: rgba(255,255,255,0.55);
  box-shadow: inset 0 0 0 7px rgba(255,255,255,0.45);
  font-size: 23px;
  font-weight: 900;
}
.page-hero { margin: 58px 0 24px 22%; }
.page-hero h1, .box-stage h1 { margin: 0; font-size: 64px; line-height: 1; }
.page-hero p, .box-stage p { margin: 16px 0; font-size: 25px; font-weight: 700; }
.hall-layout { display: grid; grid-template-columns: 310px 1fr; gap: 28px; }
.left-panel, .life-side { display: grid; gap: 28px; align-content: start; }
.panel, .content-card, .publish-card, .tip {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  box-shadow: 0 8px 22px rgba(80, 59, 48, 0.08);
}
.panel { padding: 24px; }
.panel h3, .panel h2 { margin-top: 0; }
.category {
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 18px;
  color: #7a6659;
}
.category.active, .category:hover { background: #efe2d9; }
.publish-card {
  min-height: 190px;
  padding: 24px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  overflow: hidden;
}
.publish-card h3 { color: var(--red); font-size: 30px; margin: 0 0 12px; }
.mascot.small { width: 118px; height: 118px; border-radius: 36px; font-size: 54px; transform: rotate(-6deg); }
.brown-btn {
  padding: 12px 24px;
  border-radius: 22px;
  color: white;
  background: var(--red);
  font-weight: 800;
  box-shadow: inset 0 -3px rgba(0,0,0,0.12);
}
.hall-card { padding: 22px; }
.filters { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
select, input, textarea {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.7);
  color: #6b594e;
  padding: 12px 18px;
  outline: none;
}
textarea { min-height: 110px; resize: vertical; }
.filters select:last-child { margin-left: auto; }
.companion-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(170px, 1fr));
  gap: 22px;
}
.companion-card {
  border: 1px solid #ead8cc;
  border-radius: 22px;
  overflow: hidden;
  background: #fff9f5;
  text-align: left;
  transition: transform .2s, box-shadow .2s;
}
.companion-card:hover { transform: translateY(-4px); box-shadow: 0 16px 28px rgba(80,59,48,.15); }
.card-img {
  height: 250px;
  background: linear-gradient(135deg, #b98863, #f3c79a);
  position: relative;
  overflow: hidden;
}
.card-img::after {
  content: attr(data-icon);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 90px;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.game-tag, .online {
  position: absolute;
  top: 10px;
  padding: 5px 10px;
  border-radius: 12px;
  color: white;
  background: rgba(105, 70, 54, .72);
  font-weight: 800;
}
.game-tag { left: 10px; }
.online { right: 10px; color: #dffb7e; }
.card-info { padding: 14px 16px 18px; }
.card-info h3 { margin: 0 0 8px; font-size: 22px; }
.badge { display: inline-block; padding: 4px 10px; margin-bottom: 10px; border-radius: 12px; background: #eadedb; color: #9a6a34; font-weight: 800; }
.price { color: var(--red); font-size: 24px; font-weight: 900; }
.bottom-banner {
  margin: 28px 0 0 330px;
  min-height: 130px;
  border: 1px solid var(--line);
  border-radius: 34px;
  display: flex;
  align-items: center;
  gap: 46px;
  padding: 18px 44px;
  background: #f1dfd1;
}
.bottom-banner .mascot { width: 128px; height: 128px; border-radius: 34px; margin-top: -44px; }
.bottom-banner span { font-size: 20px; font-weight: 900; }

.ai-scene, .box-view {
  min-height: calc(100vh - 128px);
  display: grid;
  align-items: center;
  grid-template-columns: 1fr minmax(430px, 820px) 1fr;
  gap: 44px;
}
.chat-box {
  height: 660px;
  border: 4px solid #c7aa91;
  border-radius: 48px;
  padding: 44px;
  background: rgba(255,250,246,.86);
  display: flex;
  flex-direction: column;
}
.chat-title { font-size: 27px; font-weight: 900; }
.chat-messages { flex: 1; overflow: auto; padding: 18px 0; }
.message { max-width: 82%; margin: 12px 0; padding: 13px 16px; border-radius: 18px; background: #f1e3d8; }
.message.user { margin-left: auto; color: white; background: var(--red); }
.message .mini-card { margin-top: 10px; }
.chat-form { display: flex; gap: 12px; border: 1px solid var(--line); border-radius: 32px; padding: 8px; background: white; }
.chat-form input { flex: 1; border: 0; }
.send-btn { width: 54px; height: 54px; border-radius: 50%; color: white; background: var(--red); font-size: 26px; }
.sleeping-mascot { align-self: center; font-size: 42px; transform: rotate(-11deg); color: #111; text-align: center; }
.chair-mascot { width: 280px; height: 420px; border-radius: 70px; font-size: 130px; justify-self: center; }

.box-view { position: relative; grid-template-columns: 300px 1fr 300px; }
.box-stage { text-align: center; justify-self: center; }
.box-ball { width: 420px; height: 420px; border-radius: 50%; margin: 28px auto; font-size: 170px; box-shadow: 0 0 0 26px rgba(255,213,139,.25), 0 0 70px #ffd68f; }
.box-ball.spin { animation: spin .7s ease; }
@keyframes spin { 50% { transform: rotate(12deg) scale(1.08); } }
.draw-btn { min-width: 370px; padding: 20px 42px; border-radius: 34px; color: white; background: var(--red); border: 5px solid #d5a168; font-size: 40px; font-weight: 900; }
.tip { padding: 28px; font-size: 20px; align-self: end; }
.box-result { margin-top: 20px; display: flex; justify-content: center; }

.life-layout { display: grid; grid-template-columns: 380px minmax(520px, 1fr) 380px; gap: 28px; margin-top: 96px; }
.feed { padding: 22px; }
.feed-tabs { display: flex; gap: 20px; margin-bottom: 20px; }
.feed-tabs button:not(.brown-btn) { padding: 11px 18px; font-weight: 800; }
.feed-tabs button.active {
  box-shadow: 0 8px 18px rgba(150, 59, 53, .16);
}
.post {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 20px;
  margin-bottom: 18px;
  background: rgba(255,250,246,.8);
}
.post-head { display: flex; gap: 14px; align-items: center; font-weight: 900; }
.avatar { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; background: #ecc296; display: grid; place-items: center; }
.avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}
.post-profile-link,
.post-author {
  border: 0;
  background: transparent;
  color: #4f392e;
  font-weight: 900;
}
.post-author {
  padding: 0;
  font-size: 18px;
}
.post-profile-link:hover,
.post-author:hover {
  color: #963b35;
}
.follow-btn,
.post-delete {
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 900;
}
.follow-btn {
  color: #963b35;
  background: #f2e2d6;
  border: 1px solid #d6b89e;
}
.follow-btn.following {
  color: #fff;
  background: #963b35;
}
.post-delete {
  margin-left: auto;
  color: #8f3832;
  background: rgba(255, 250, 246, .86);
  border: 1px solid #ddbfb0;
}
.post-delete:hover {
  color: #fff;
  background: #963b35;
}
.post-stats {
  display: flex;
  gap: 18px;
  color: #9a8576;
  font-size: 14px;
  font-weight: 800;
}
.post-media {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 12px;
  margin: 16px 0;
}

.post-media img,
.post-media video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border-radius: 14px;
  background: #fff9f5;
}
.post-actions { display: flex; gap: 34px; color: #9a8576; }
.slim { min-height: 150px; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 70px; }
.admin-grid .content-card { padding: 28px; }
.admin-grid label, .modal-card label { display: grid; gap: 8px; margin: 12px 0; font-weight: 800; }
.wide { grid-column: 1 / -1; }
.admin-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.admin-row {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px;
  margin: 12px 0;
  background: #fff9f5;
}
.admin-row button { margin: 8px 8px 0 0; }

.modal { border: 0; background: transparent; }
.modal::backdrop { background: rgba(64, 45, 36, .34); }
.modal-card {
  width: min(620px, 92vw);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 30px;
  padding: 28px;
  background: #fffaf6;
  box-shadow: 0 28px 80px rgba(80,59,48,.24);
  position: relative;
}
.close { position: absolute; right: 18px; top: 14px; font-size: 32px; }
.login-tabs { display: flex; gap: 10px; margin-bottom: 18px; }
.tab { padding: 10px 16px; border-radius: 18px; background: #f0e3d9; font-weight: 800; }
.tab.active { color: white; background: var(--red); }
.modal-card input, .modal-card textarea { width: 100%; margin: 8px 0; }
.detail-card { width: min(860px, 94vw); }
.detail-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.detail-hero img { width: 100%; min-height: 320px; object-fit: cover; border-radius: 22px; background: #f0dfcf; }
.detail-copy { min-width: 0; }
.voice-player {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  margin: 16px 0;
  padding: 10px 12px;
  border: 1px solid #ddc5b5;
  border-radius: 14px;
  background: #f7ebe2;
  box-shadow: 0 8px 18px rgba(80, 59, 48, .08);
}
.voice-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: #963b35;
  font: 900 18px/1 Arial, sans-serif;
  cursor: pointer;
}
.voice-toggle:hover { background: #7f302c; }
.voice-toggle:focus-visible { outline: 3px solid rgba(150, 59, 53, .24); outline-offset: 2px; }
.voice-content { min-width: 0; }
.voice-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #573f34;
  font-size: 13px;
}
.voice-meta span { color: #8b7568; white-space: nowrap; }
.voice-track {
  height: 6px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dbc5b6;
}
.voice-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #963b35;
  transition: width .12s linear;
}
.voice-player audio {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.voice-player.is-playing { border-color: #c99c88; background: #f5e4d9; }
.voice-player.is-loading .voice-toggle { animation: voicePulse .75s ease-in-out infinite alternate; }
.voice-player.is-error { border-color: #c9827c; }
.mini-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  background: #fffaf6;
}

@media (max-width: 1200px) {
  .shell { padding: 18px; }
  .topbar { gap: 12px; }
  .nav { gap: 12px; overflow: auto; justify-content: flex-start; }
  .hall-layout, .life-layout, .ai-scene, .box-view { grid-template-columns: 1fr; }
  .left-panel, .right, .sleeping-mascot, .chair-mascot, .tip { display: none; }
  .page-hero, .bottom-banner { margin-left: 0; }
  .companion-grid, .admin-cards { grid-template-columns: repeat(2, 1fr); }
  .brand { font-size: 24px; }
  .nav-item, .login-pill { font-size: 16px; white-space: nowrap; }
}

@media (max-width: 700px) {
  .topbar { height: auto; flex-wrap: wrap; }
  .companion-grid, .admin-grid, .admin-cards, .detail-hero { grid-template-columns: 1fr; }
  .filters { flex-wrap: wrap; }
  .box-ball { width: 270px; height: 270px; font-size: 120px; }
  .draw-btn { min-width: 0; width: 100%; font-size: 28px; }
  .chat-box { height: 70vh; padding: 24px; }
}

/* Hall remake: match the provided lobby template and use the new art assets. */
body {
  background: #fbf5f1 url("assets/new-bg-opt.webp?v=20260706-slim") center top / cover fixed no-repeat;
}

.shell {
  padding: 42px 48px 38px;
  border: 0;
  background:
    linear-gradient(rgba(251, 245, 241, 0.18), rgba(251, 245, 241, 0.18)),
    url("assets/new-bg-opt.webp?v=20260706-slim") center top / cover fixed no-repeat;
}

.topbar {
  height: 96px;
  gap: 34px;
}

.brand {
  width: 286px;
  height: 100px;
  flex: 0 0 286px;
  background: url("assets/logo-cropped-opt.webp?v=20260706-slim") left center / contain no-repeat;
  font-size: 0;
  text-shadow: none;
}

.nav {
  gap: clamp(34px, 5.2vw, 112px);
  align-self: flex-start;
  padding-top: 18px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 10px 18px;
  font-size: 25px;
  font-weight: 900;
  color: #6c584d;
}

.nav-item::before {
  font-size: 30px;
  line-height: 1;
}

.nav-item[data-view="ai"]::before { content: "🎧"; }
.nav-item[data-view="hall"]::before { content: "🎓"; }
.nav-item[data-view="box"]::before { content: "📦"; }
.nav-item[data-view="life"]::before { content: "▣"; }

.nav-item.active {
  color: var(--brown);
}

.nav-item.active::after {
  width: 164px;
  height: 2px;
  bottom: 2px;
  background: #d9b392;
}

.nav-item.active::before {
  filter: drop-shadow(0 2px 0 rgba(150, 59, 53, 0.18));
}

.login-pill {
  align-self: flex-start;
  min-width: 216px;
  margin-top: 8px;
  padding: 17px 28px;
  border-radius: 38px;
  border-color: #ead9cb;
  background: rgba(255, 250, 246, 0.78);
  font-size: 24px;
}

.page-hero {
  margin: 78px 0 26px 420px;
}

.page-hero h1 {
  font-size: 74px;
  color: #4f392e;
  letter-spacing: 0;
}

.page-hero p {
  margin-top: 14px;
  font-size: 29px;
  color: #5a4034;
}

.hall-layout {
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 36px;
}

.panel,
.content-card,
.publish-card {
  border: 2px solid #ecd9ca;
  border-radius: 28px;
  background: rgba(255, 250, 246, 0.86);
  box-shadow: 0 10px 26px rgba(91, 67, 54, 0.08);
}

.category-panel {
  min-height: 384px;
  padding: 30px 26px;
}

.category-panel h3 {
  margin-bottom: 22px;
  font-size: 24px;
}

.category {
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 19px;
  font-size: 19px;
  justify-content: flex-start;
}

.category b {
  display: none;
}

.category.active,
.category:hover {
  background: #eaded5;
}

.box-view {
  min-height: calc(100vh - 138px);
  grid-template-columns: 1fr;
  place-items: center;
  position: relative;
}

.box-stage {
  width: min(560px, 92vw);
  justify-self: center;
  align-self: center;
  text-align: center;
}

.box-view .left-tip,
.box-view .right-tip {
  position: absolute;
  bottom: 34px;
  width: 310px;
}

.box-view .left-tip {
  left: 24px;
}

.box-view .right-tip {
  right: 24px;
}

.hall-demand-card {
  position: relative;
  min-height: 220px;
  padding: 30px 24px;
}

.hall-demand-card::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: -4px;
  width: 158px;
  height: 186px;
  background: url("assets/char-sit-opt.webp?v=20260706-slim") right bottom / contain no-repeat;
}

.hall-demand-card > div {
  position: relative;
  z-index: 1;
  max-width: 172px;
}

.hall-demand-card h3 {
  font-size: 34px;
  line-height: 1;
}

.hall-card {
  min-height: 512px;
  padding: 28px 26px;
  border-radius: 26px;
}

.filters {
  margin-bottom: 28px;
}

.brown-btn,
.all-game-btn {
  background: #963b35;
  border-radius: 22px;
  box-shadow: none;
}

select {
  min-width: 156px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255, 250, 246, 0.78);
}

.companion-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.companion-card {
  border: 2px solid #ead5c7;
  border-radius: 21px;
  background: rgba(255, 250, 246, 0.92);
  box-shadow: none;
}

.companion-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 30px rgba(87, 63, 51, 0.14);
}

.card-img {
  height: 264px;
  background: linear-gradient(135deg, #c8956d, #efbd8d);
}

.template-art {
  background-image: url("assets/hall-reference-opt.webp?v=20260706-slim");
  background-repeat: no-repeat;
  background-size: 731% auto;
}

.template-art::after {
  display: none;
}

.art-1 { background-position: 23.2% 51.2%; }
.art-2 { background-position: 41.2% 51.2%; }
.art-3 { background-position: 59.3% 51.2%; }
.art-4 { background-position: 77.4% 51.2%; }
.art-5 { background-position: 95.5% 51.2%; }

.game-tag,
.online {
  top: 12px;
  border-radius: 11px;
  background: rgba(103, 75, 60, 0.76);
  font-size: 16px;
}

.online {
  color: #e7ff75;
}

.card-info {
  padding: 15px 18px 22px;
}

.card-info h3 {
  font-size: 24px;
  color: #4a372e;
}

.badge {
  background: #eadfd6;
  color: #9c6a36;
}

.price {
  color: #a63d34;
}

.hall-footer {
  position: relative;
  min-height: 134px;
  margin: 26px 0 0 346px;
  padding: 24px 54px 22px 196px;
  border-radius: 30px;
  background: #f0ded0;
  overflow: visible;
}

.footer-char {
  position: absolute;
  left: 28px;
  bottom: 0;
  width: 160px;
  height: 190px;
  object-fit: contain;
}

.hall-footer h2 {
  margin: 0 0 8px;
  font-size: 34px;
}

.hall-footer p {
  margin: 0;
  font-size: 20px;
}

.hall-footer span {
  min-width: 150px;
  font-size: 20px;
  color: #5b4034;
}

.hall-footer small {
  font-size: 14px;
  font-weight: 500;
  color: #8d7768;
}

.scene-char {
  max-width: none;
  object-fit: contain;
  pointer-events: none;
}

.scene-char.sleep {
  width: 440px;
  justify-self: end;
}

.scene-char.chair {
  width: 380px;
  justify-self: center;
}

@media (max-width: 1200px) {
  .brand {
    width: 186px;
    height: 70px;
    flex-basis: 186px;
  }

  .page-hero {
    margin-left: 0;
  }

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

  .hall-footer {
    margin-left: 0;
    padding-left: 170px;
  }
}

@media (max-width: 700px) {
  .shell {
    padding: 18px;
  }

  .brand {
    width: 156px;
    height: 58px;
    flex-basis: 156px;
  }

  .page-hero h1 {
    font-size: 46px;
  }

  .companion-grid {
    grid-template-columns: 1fr;
  }

  .hall-footer {
    padding: 24px;
  }

  .footer-char {
    display: none;
  }
}

/* Latest fixes: welcome image-only entry, clean assets, mobile polish, box draw popup. */
.welcome-screen {
  background: url("assets/welcome-opt.webp?v=20260706-slim") center / cover no-repeat;
}

.welcome-logo {
  display: none;
}

.welcome-title {
  left: 50%;
  bottom: 17.2vh;
  width: min(1120px, 62vw);
  height: clamp(96px, 12vw, 184px);
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-shadow: none;
  color: transparent;
  font-size: 0;
  animation: titleFadeUp 1.8s ease 0.35s forwards;
}

.welcome-title:hover {
  background: rgba(255, 255, 255, 0.05);
}

.brand {
  width: 320px;
  height: 104px;
  flex: 0 0 320px;
  background-image: url("assets/logo-full-opt.webp?v=20260706-slim");
  background-position: left center;
  background-size: contain;
  background-repeat: no-repeat;
}

.nav-item[data-view="ai"]::before { content: "🎧"; }
.nav-item[data-view="hall"]::before { content: "🎓"; }
.nav-item[data-view="box"]::before { content: "📦"; }
.nav-item[data-view="life"]::before { content: "▣"; }

.hall-demand-card::after {
  background-image: url("assets/char-sit-clean-opt.webp?v=20260706-slim");
}

.footer-char {
  content: url("assets/char-salute-clean-opt.webp?v=20260706-slim");
}

.scene-char.sleep {
  content: url("assets/ai-left-custom-opt.webp?v=20260720-perf1");
}

.scene-char.chair {
  content: url("assets/ai-right-custom-opt.webp?v=20260720-perf1");
}

.box-ball {
  width: 360px;
  height: 360px;
  border: 0;
  box-shadow: 0 0 0 22px rgba(255, 213, 139, 0.24), 0 0 68px #ffd68f;
  background: radial-gradient(circle at 50% 45%, #fff6e8, #f2be7b 72%);
  font-size: 176px;
}

.box-ball.spin {
  animation: madSpin 1.2s cubic-bezier(.14,.74,.22,1) both;
}

@keyframes madSpin {
  0% { transform: rotate(0deg) scale(1); }
  20% { transform: rotate(360deg) scale(1.06); }
  40% { transform: rotate(1080deg) scale(1.12); }
  70% { transform: rotate(1800deg) scale(1.05); }
  100% { transform: rotate(2160deg) scale(1); }
}

.box-result:not(:empty) {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(66, 45, 36, 0.28);
  backdrop-filter: blur(4px);
}

.box-popup-card {
  width: min(340px, 92vw);
  animation: popCard .24s ease both;
}

.box-popup-card .companion-card {
  width: 100%;
  box-shadow: 0 28px 80px rgba(78, 55, 45, 0.26);
}

@keyframes popCard {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.detail-art {
  height: 320px;
  border-radius: 22px;
}

.detail-fallback {
  width: 100%;
  height: 320px;
  font-size: 130px;
}

.service-order-btn {
  width: 100%;
  margin-top: 18px;
  text-align: center;
}

.service-qr-dialog {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  border: 0;
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: transparent;
  backdrop-filter: blur(5px);
}

.service-qr-dialog::backdrop {
  background: rgba(48, 34, 28, .42);
  backdrop-filter: blur(5px);
}

.service-qr-dialog.hidden {
  display: none;
}

.service-qr-card {
  width: min(360px, calc(100vw - 32px));
  text-align: center;
  align-items: center;
  padding: 24px;
}

.service-qr-card h2 {
  margin: 6px 0 8px;
  color: #8f3832;
  font-size: 24px;
}

.service-qr-card p {
  margin: 0 0 16px;
}

.service-qr-card img {
  width: min(260px, 72vw);
  height: min(260px, 72vw);
  object-fit: contain;
  padding: 10px;
  border: 3px solid #c8a486;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(80, 59, 48, .18);
}

@media (max-width: 900px) {
  body {
    background-attachment: scroll;
  }

  .welcome-screen {
    min-height: 100svh;
    background-size: cover;
    background-position: center;
  }

  .welcome-title {
    width: 76vw;
    height: 15vw;
    bottom: 18vh;
  }

  .shell {
    padding: 14px;
    background-attachment: scroll;
  }

  .topbar {
    height: auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
  }

  .brand {
    width: 176px;
    height: 62px;
    flex-basis: auto;
  }

  .login-pill {
    min-width: 0;
    margin: 0;
    padding: 10px 14px;
    font-size: 14px;
    white-space: nowrap;
  }

  .nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    gap: 10px;
    padding: 4px 0 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-item {
    flex: 0 0 auto;
    padding: 8px 10px 12px;
    font-size: 15px;
  }

  .nav-item::before {
    font-size: 18px;
  }

  .nav-item.active::after {
    width: 86%;
  }

  .page-hero {
    margin: 28px 0 16px;
  }

  .page-hero h1 {
    font-size: 42px;
  }

  .page-hero p {
    font-size: 17px;
  }

  .hall-layout,
  .life-layout,
  .ai-scene,
  .box-view {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .left-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .category-panel {
    min-height: 0;
    padding: 16px;
  }

  .category-panel h3 {
    margin-bottom: 10px;
    font-size: 18px;
  }

  .category {
    min-height: 34px;
    padding: 8px 10px;
    font-size: 14px;
  }

  .hall-demand-card {
    min-height: 132px;
    padding: 18px;
  }

  .hall-demand-card::after {
    width: 108px;
    height: 122px;
  }

  .hall-demand-card h3 {
    font-size: 24px;
  }

  .hall-demand-card p {
    max-width: 170px;
    font-size: 13px;
  }

  .hall-card {
    padding: 14px;
  }

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

  .filters select,
  .filters button {
    width: 100%;
    min-width: 0;
    height: 42px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .filters select:last-child {
    margin-left: 0;
  }

  .companion-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .card-img {
    height: 220px;
  }

  .card-info h3 {
    font-size: 20px;
  }

  .bottom-banner,
  .hall-footer {
    margin: 16px 0 0;
    padding: 18px;
    display: grid;
    gap: 10px;
  }

  .footer-char {
    display: none;
  }

  .hall-footer h2 {
    font-size: 24px;
  }

  .hall-footer p,
  .hall-footer span {
    font-size: 15px;
  }

  .chat-box {
    height: calc(100svh - 150px);
    min-height: 520px;
    padding: 20px;
    border-radius: 28px;
  }

  .scene-char {
    display: none;
  }

  .box-stage {
    width: 100%;
  }

  .box-ball {
    width: 220px;
    height: 220px;
    font-size: 110px;
  }

  .draw-btn {
    width: min(360px, 100%);
    min-width: 0;
    font-size: 26px;
  }

  .tip {
    display: none;
  }

  .detail-card {
    width: 94vw;
    padding: 18px;
  }

  .detail-hero {
    grid-template-columns: 1fr;
  }

  .detail-art,
  .detail-hero img,
  .detail-fallback {
    min-height: 0;
    height: 250px;
  }

  .modal-card {
    width: 94vw;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .welcome-screen {
    background-size: auto 100%;
  }

  .welcome-title {
    width: 88vw;
    height: 17vw;
    bottom: 20vh;
  }

  .brand {
    width: 142px;
    height: 52px;
  }

  .nav-item {
    font-size: 14px;
  }

  .filters {
    grid-template-columns: 1fr;
  }
}

/* Animation and cleaned UI overrides. */
.view-enter {
  animation: viewEnter .42s ease both;
}

@keyframes viewEnter {
  from { opacity: 0; transform: translateY(18px) scale(.985); filter: blur(3px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

.welcome-screen {
  background: url("assets/new-bg-opt.webp?v=20260706-slim") center / cover no-repeat;
}

.welcome-screen::before {
  content: "";
  position: absolute;
  left: 8vw;
  top: 14vh;
  width: min(370px, 34vw);
  height: 150px;
  background: url("assets/logo-full-opt.webp?v=20260706-slim") left center / contain no-repeat;
  opacity: 0;
  animation: welcomeFade .9s ease .15s forwards;
}

.welcome-brand-img {
  display: none;
}

.welcome-character-img {
  position: absolute;
  left: 50%;
  top: 17vh;
  width: min(360px, 34vw);
  transform: translateX(-50%) translateY(26px) scale(.92);
  opacity: 0;
  filter: drop-shadow(0 18px 18px rgba(80, 59, 48, .16));
  image-rendering: auto;
  animation: characterIntro 1.25s cubic-bezier(.16,.84,.25,1) .25s forwards;
}

.welcome-title {
  display: grid;
  place-items: center;
  left: 50%;
  bottom: 17vh;
  width: min(1060px, 70vw);
  height: clamp(104px, 12vw, 178px);
  color: #4a372f;
  font-size: clamp(32px, 4.4vw, 72px);
  font-weight: 900;
  border: 5px solid #b58a68;
  border-radius: 999px;
  background: rgba(255, 250, 246, .94);
  box-shadow: 0 8px 0 white, 0 22px 36px rgba(80, 59, 48, .13);
  text-shadow: 0 3px #fff;
  opacity: 0;
  transform: translateX(-50%) translateY(22px) scale(.86);
  animation: bubblePop .75s cubic-bezier(.2,1.1,.3,1) 1.05s forwards;
  transition: transform .24s ease, box-shadow .24s ease;
}

.welcome-title:hover {
  background: rgba(255, 250, 246, .98);
  transform: translateX(-50%) translateY(0) scale(1.06);
  box-shadow: 0 10px 0 white, 0 28px 44px rgba(80, 59, 48, .18);
}

.welcome-exit {
  animation: welcomeExit .42s ease forwards;
}

@keyframes welcomeFade {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes characterIntro {
  from { opacity: 0; transform: translateX(-50%) translateY(26px) scale(.92); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes bubblePop {
  0% { opacity: 0; transform: translateX(-50%) translateY(22px) scale(.86); }
  75% { opacity: 1; transform: translateX(-50%) translateY(-2px) scale(1.035); }
  100% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

@keyframes welcomeExit {
  to { opacity: 0; transform: scale(1.02); filter: blur(3px); }
}

.scene-char.sleep {
  width: min(520px, 30vw);
  filter: drop-shadow(0 16px 12px rgba(80, 59, 48, .12));
}

.scene-char.chair {
  width: min(430px, 26vw);
  filter: drop-shadow(0 16px 12px rgba(80, 59, 48, .12));
}

.message.bot .mini-card {
  display: block;
  width: min(360px, 100%);
  margin-top: 10px;
  text-align: left;
}

.feed-tabs button {
  border: 0;
  background: transparent;
  color: #6f5a4f;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
}

.feed-tabs button.active {
  color: #fff;
  background: #9f3c35;
}

.post {
  animation: viewEnter .34s ease both;
}

.post-head {
  align-items: center;
}

.avatar,
.post-author,
.action-btn,
.mini-feed-item,
.post-delete {
  cursor: pointer;
}

.avatar {
  overflow: hidden;
  border: 0;
}

.avatar img,
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
}

.post-author {
  border: 0;
  background: transparent;
  color: #4a372f;
  font: inherit;
  font-weight: 900;
  padding: 0;
}

.post-delete {
  margin-left: auto;
  border: 1px solid #ead7c8;
  background: rgba(255, 250, 246, .92);
  color: #9f3c35;
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 800;
}

.post-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

.action-btn {
  border: 0;
  background: transparent;
  color: #7c675c;
  font-weight: 800;
  padding: 8px 4px;
}

.action-btn.liked {
  color: #b44b43;
}

.comments {
  margin-top: 10px;
  padding: 12px 14px;
  background: rgba(241, 224, 211, .62);
  border-radius: 14px;
}

.comment-row {
  display: flex;
  gap: 10px;
  line-height: 1.7;
  color: #5f4b41;
}

.comment-row b {
  color: #9f3c35;
  white-space: nowrap;
}

.mini-feed-item {
  width: 100%;
  display: block;
  text-align: left;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #4a372f;
  padding: 10px 8px;
}

.mini-feed-item:hover {
  background: rgba(241, 224, 211, .72);
}

.mini-feed-item span {
  display: block;
  margin-top: 4px;
  color: #8c786e;
  font-size: 14px;
}

.profile-card {
  max-width: 760px;
}

.profile-head {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.profile-avatar {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: #f1dfd1;
  color: #9f3c35;
  font-size: 42px;
  overflow: hidden;
}

.profile-post {
  border: 1px solid #ead7c8;
  background: rgba(255, 250, 246, .86);
  border-radius: 16px;
  padding: 14px 16px;
  margin-top: 10px;
}

.profile-post p {
  margin: 8px 0 0;
}

.empty-post {
  padding: 30px;
  color: #8c786e;
  text-align: center;
}

.follow-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 250, 246, .78);
}

.follow-bar span {
  font-weight: 900;
  color: var(--red);
}

.follow-bar em {
  color: var(--muted);
  font-style: normal;
}

.follow-chip,
.follow-author {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1dfd1;
  color: var(--brown);
  font-size: 14px;
  font-weight: 800;
}

.follow-author {
  margin-left: 8px;
  background: var(--red);
  color: #fff;
}

.follow-author.followed,
.follow-profile.followed {
  background: #7e6a5d;
}

.post-titleline {
  min-width: 0;
}

.profile-actions,
.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.account-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin: 14px 0 4px;
  border: 1px solid #ead8cc;
  border-radius: 18px;
  background: #fff9f5;
  color: #6b594e;
}

.account-summary span,
.account-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: #f1dfd1;
  color: var(--brown);
  font-size: 13px;
  font-weight: 800;
}

.account-actions {
  margin-bottom: 14px;
}

.logout-btn {
  background: #7e6a5d;
}

.player-edit-box {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid #ead8cc;
  border-radius: 20px;
  background: rgba(255, 249, 245, .82);
}

.player-manager-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.player-manager-head h3 {
  margin: 0 0 6px;
}

.player-manager-head p {
  margin: 0;
  color: #8d796d;
  font-size: 14px;
}

.profile-manager-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.profile-manager-grid label {
  display: grid;
  gap: 6px;
  color: #6b594e;
  font-weight: 800;
}

.profile-manager-grid input,
.profile-manager-grid select,
.profile-manager-grid textarea {
  width: 100%;
}

.profile-manager-wide {
  grid-column: 1 / -1;
}

@media (max-width: 720px) {
  .profile-manager-grid {
    grid-template-columns: 1fr;
  }
}

#authRegisterPane {
  max-height: min(62vh, 620px);
  overflow: auto;
  padding-right: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 80;
  transform: translateX(-50%);
  padding: 12px 18px;
  border-radius: 999px;
  background: #9f3c35;
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 40px rgba(80, 59, 48, .24);
  animation: viewEnter .24s ease both;
}

.scene-char,
.welcome-character-img,
.post-media img,
.card-img img {
  image-rendering: auto;
  transform: translateZ(0);
}

.card-img:has(> img)::after {
  display: none;
  content: none;
}

.enterprise-qr {
  position: fixed;
  left: 24px;
  bottom: 24px;
  z-index: 45;
  display: grid;
  justify-items: center;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  pointer-events: auto;
  animation: viewEnter .42s ease both;
}

.enterprise-qr:hover img,
.enterprise-qr:focus-visible img {
  transform: translateY(-2px) scale(1.03);
}

.enterprise-qr:focus-visible {
  outline: 3px solid rgba(143, 56, 50, .32);
  outline-offset: 8px;
  border-radius: 22px;
}

.enterprise-qr img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border: 4px solid rgba(255, 250, 246, .96);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 32px rgba(80, 59, 48, .18);
  transition: transform .18s ease;
}

.enterprise-qr-bubble {
  max-width: 168px;
  padding: 9px 14px;
  border: 2px solid #c8a486;
  border-radius: 999px;
  background: rgba(255, 250, 246, .95);
  color: #8f3832;
  font-weight: 900;
  font-size: 15px;
  line-height: 1.25;
  text-align: center;
  box-shadow: 0 8px 0 rgba(255, 255, 255, .75), 0 12px 24px rgba(80, 59, 48, .12);
  text-shadow: 0 1px #fff;
}

.box-ball.win-pop {
  animation: winPop .55s cubic-bezier(.2,1.25,.3,1) both;
}

.confetti-burst {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 70;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.confetti-burst span {
  position: absolute;
  width: 12px;
  height: 18px;
  border-radius: 3px;
  background: var(--c);
  box-shadow: 0 0 0 1px rgba(255,255,255,.45);
  animation: confettiFly 1.25s ease-out forwards;
}

.confetti-front-layer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow: hidden;
  pointer-events: none;
}

.confetti-front-layer span {
  position: absolute;
  left: var(--left);
  top: var(--top);
  width: 12px;
  height: 22px;
  border-radius: 3px;
  background: var(--c);
  opacity: 0;
  transform: translate3d(0, 0, 0) rotate(0) scale(var(--scale));
  box-shadow: 0 0 0 1px rgba(255,255,255,.45);
  animation: confettiScreenFall var(--duration) cubic-bezier(.15,.82,.26,1) var(--delay) forwards;
}

@keyframes winPop {
  0% { transform: scale(.82) rotate(-8deg); }
  55% { transform: scale(1.18) rotate(8deg); }
  100% { transform: scale(1) rotate(0); }
}

@keyframes confettiFly {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(0); }
  12% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(1) rotate(var(--r)); }
}

@keyframes confettiScreenFall {
  0% { opacity: 0; transform: translate3d(0, -20px, 0) rotate(0) scale(var(--scale)); }
  10% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; transform: translate3d(var(--drift), 110vh, 0) rotate(var(--r)) scale(var(--scale)); }
}

@media (max-width: 900px) {
  .welcome-screen::before {
    width: 190px;
    height: 80px;
    left: 18px;
    top: 18px;
  }

  .welcome-character-img {
    width: min(260px, 68vw);
    top: 18vh;
  }

  .welcome-title {
    width: 86vw;
    height: 96px;
    bottom: 17vh;
    font-size: clamp(28px, 9vw, 42px);
  }

  .scene-char.sleep,
  .scene-char.chair {
    display: none;
  }

  .enterprise-qr {
    left: 12px;
    bottom: 12px;
    gap: 5px;
  }

  .enterprise-qr img {
    width: 82px;
    height: 82px;
    border-radius: 13px;
    border-width: 3px;
  }

  .enterprise-qr-bubble {
    max-width: 116px;
    padding: 7px 9px;
    font-size: 12px;
  }
}

/* Hall one-row pagination override. */
.hall-card {
  position: relative;
  overflow: hidden;
}

.hall-card .hall-paged-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 260px));
  grid-auto-rows: 1fr;
  grid-auto-flow: column;
  justify-content: start;
  align-items: stretch;
  gap: 24px;
  padding-right: 92px;
  overflow: hidden;
}

.hall-card .hall-paged-grid .companion-card {
  width: 100%;
  min-width: 0;
}

.hall-page-control {
  position: absolute;
  top: 52%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  border: 3px solid #ef6262;
  border-radius: 50%;
  color: #ef6262;
  background: rgba(255, 250, 246, .72);
  font-size: 58px;
  line-height: 1;
  font-weight: 300;
  transform: translateY(-50%);
  transition: transform .2s ease, background .2s ease, color .2s ease;
}

.hall-page-control:hover {
  color: #fff;
  background: #ef6262;
  transform: translateY(-50%) scale(1.04);
}

.hall-page-next {
  right: 28px;
}

.hall-page-prev {
  left: 28px;
}

.hall-page-count {
  position: absolute;
  right: 42px;
  bottom: 24px;
  z-index: 4;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 250, 246, .88);
  color: #9f3c35;
  font-weight: 900;
  font-size: 14px;
}

.hall-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 18px auto 0;
}

.hall-pagination .hall-page-prev,
.hall-pagination .hall-page-next,
.hall-page-btn {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  bottom: auto;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border: 2px solid #cfa78b;
  border-radius: 50%;
  color: #963b35;
  background: rgba(255, 250, 246, .92);
  box-shadow: 0 8px 18px rgba(80, 59, 48, .12);
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  transform: none;
  transition: transform .18s ease, background .18s ease, color .18s ease, opacity .18s ease;
}

.hall-page-btn:not(:disabled):hover {
  color: #fff;
  background: #963b35;
  transform: translateY(-2px);
}

.hall-page-btn:disabled {
  cursor: not-allowed;
  opacity: .38;
}

.hall-pagination .hall-page-count {
  position: static;
  transform: none;
  min-width: 72px;
  text-align: center;
}

@media (max-width: 1200px) {
  .hall-card .hall-paged-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-right: 72px;
  }

  .hall-page-control {
    width: 58px;
    height: 58px;
    font-size: 42px;
  }
}

@media (max-width: 700px) {
  .hall-card .hall-paged-grid {
    grid-template-columns: 1fr;
    padding-right: 0;
    padding-bottom: 64px;
  }

  .hall-page-control {
    top: auto;
    bottom: 14px;
    transform: none;
  }

  .hall-page-control:hover {
    transform: scale(1.04);
  }

  .hall-page-next {
    right: 18px;
  }

  .hall-page-prev {
    left: 18px;
  }

  .hall-page-count {
    left: 50%;
    right: auto;
    bottom: 28px;
    transform: translateX(-50%);
  }

  .hall-pagination {
    margin-top: 12px;
    padding-bottom: 2px;
  }

  .hall-page-btn {
    width: 48px;
    height: 48px;
    font-size: 30px;
  }

  .hall-pagination .hall-page-count {
    transform: none;
  }
}

/* Final character asset replacements. */
.welcome-character-img {
  content: url("assets/welcome-character-custom-opt.webp?v=20260720-perf1");
  width: min(420px, 36vw);
  top: 12vh;
}

.hall-demand-card::after {
  right: -42px;
  bottom: -18px;
  width: 230px;
  height: 178px;
  background: url("assets/hall-left-user-opt.webp?v=20260706-slim") right bottom / contain no-repeat;
}

.footer-char {
  content: url("assets/hall-right-user-opt.webp?v=20260706-slim");
  left: 18px;
  width: 180px;
  height: 210px;
  object-fit: contain;
}

@media (max-width: 900px) {
  .welcome-character-img {
    width: min(310px, 70vw);
    top: 14vh;
  }

  .hall-demand-card::after {
    width: 150px;
    height: 124px;
    right: -28px;
  }
}

/* 2026-07-06 final hall and AI character assets. */
.scene-char.sleep {
  content: url("assets/ai-left-custom-opt.webp?v=20260720-perf1");
}

.scene-char.chair {
  content: url("assets/ai-right-custom-opt.webp?v=20260720-perf1");
}

.hall-demand-card::after {
  right: -18px;
  bottom: -20px;
  width: 178px;
  height: 178px;
  background: url("assets/hall-left-book-opt.webp?v=20260706-slim") right bottom / contain no-repeat;
}

.footer-char {
  content: url("assets/hall-right-salute-opt.webp?v=20260706-slim");
  left: 18px;
  width: 170px;
  height: 210px;
  object-fit: contain;
}

.hall-card .hall-paged-grid {
  min-height: 420px;
}

.hall-card .hall-paged-grid .muted {
  align-self: start;
  margin: 18px 0 0;
  font-size: 18px;
}

@media (max-width: 900px) {
  .hall-demand-card::after {
    width: 132px;
    height: 132px;
    right: -16px;
  }

  .footer-char {
    width: 128px;
    height: 164px;
  }
}

/* 2026-07-06 UI polish: richer selection motion, blind-box draw, and compact mobile cards. */
.view {
  transform-origin: center top;
}

.nav-item,
.category,
.brown-btn,
.draw-btn,
.login-pill,
.enterprise-qr {
  transition:
    transform .18s ease,
    box-shadow .18s ease,
    background .18s ease,
    color .18s ease,
    border-color .18s ease;
}

.nav-item:hover,
.category:hover,
.brown-btn:hover,
.login-pill:hover {
  transform: translateY(-2px);
}

.nav-item.active {
  animation: selectedTabPulse .42s cubic-bezier(.2, 1.15, .24, 1) both;
}

.nav-item.active::after {
  animation: underlineSlide .36s ease both;
}

.category {
  position: relative;
  overflow: hidden;
}

.category::after {
  content: "";
  position: absolute;
  inset: 8px auto 8px 10px;
  width: 4px;
  border-radius: 999px;
  background: #b84a3f;
  opacity: 0;
  transform: scaleY(.3);
  transition: opacity .18s ease, transform .18s ease;
}

.category.active {
  color: #7d332f;
  background: linear-gradient(90deg, rgba(238, 210, 189, .95), rgba(255, 250, 246, .74));
  box-shadow: inset 0 0 0 1px rgba(184, 74, 63, .12);
}

.category.active::after {
  opacity: 1;
  transform: scaleY(1);
}

.brown-btn:hover,
.draw-btn:hover {
  box-shadow: 0 12px 24px rgba(150, 59, 53, .2);
}

.brown-btn:active,
.draw-btn:active,
.login-pill:active,
.category:active {
  transform: translateY(1px) scale(.99);
}

.draw-btn:disabled {
  cursor: progress;
  opacity: .88;
  transform: translateY(0) scale(.98);
  box-shadow: 0 0 0 10px rgba(216, 173, 103, .14), 0 18px 40px rgba(150, 59, 53, .22);
}

.welcome-title {
  animation:
    titleFadeUp 1.2s ease .15s both,
    welcomeBreath 2.8s ease-in-out 1.35s infinite;
}

.welcome-title:active {
  transform: translateX(-50%) scale(.97);
}

.card-pop-in {
  animation: cardPopIn .34s cubic-bezier(.2, 1.05, .24, 1) var(--card-delay, 0ms) both;
}

.companion-card {
  will-change: transform;
}

.companion-card:hover .card-img img {
  transform: scale(1.045);
}

.card-img img {
  transition: transform .32s ease;
}

.box-stage {
  isolation: isolate;
  position: relative;
}

.box-stage::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(540px, 86vw);
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(216, 173, 103, .18) 0 12deg, transparent 12deg 24deg);
  filter: blur(.2px);
  opacity: .7;
  z-index: -1;
  animation: prizeHalo 12s linear infinite;
}

.box-ball {
  position: relative;
  transform-origin: 50% 50%;
}

#boxBall {
  color: transparent;
  font-size: 0;
}

.box-ball::before {
  content: "";
  position: absolute;
  inset: -18px;
  border-radius: inherit;
  border: 3px dashed rgba(150, 59, 53, .28);
  animation: ringSpin 8s linear infinite reverse;
}

.box-ball.spin {
  animation: franticMouseSpin 1.45s cubic-bezier(.08, .72, .12, 1) both;
}

.box-ball.spin::before {
  animation: ringSpin .42s linear infinite;
}

#boxBall::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 13px;
  height: 13px;
  background: #f4d7bd;
  transform: translate(-50%, -50%);
  image-rendering: pixelated;
  filter: drop-shadow(0 8px 0 rgba(80, 59, 48, .16));
  box-shadow:
    -52px -78px #6b4636, -39px -78px #6b4636, 39px -78px #6b4636, 52px -78px #6b4636,
    -65px -65px #6b4636, -52px -65px #f0b7a7, -39px -65px #f0b7a7, -26px -65px #6b4636, 26px -65px #6b4636, 39px -65px #f0b7a7, 52px -65px #f0b7a7, 65px -65px #6b4636,
    -65px -52px #6b4636, -52px -52px #f0b7a7, -39px -52px #f0b7a7, -26px -52px #6b4636, -13px -52px #6b4636, 0 -52px #6b4636, 13px -52px #6b4636, 26px -52px #6b4636, 39px -52px #f0b7a7, 52px -52px #f0b7a7, 65px -52px #6b4636,
    -39px -39px #6b4636, -26px -39px #6b4636, -13px -39px #6b4636, 0 -39px #6b4636, 13px -39px #6b4636, 26px -39px #6b4636, 39px -39px #6b4636,
    -52px -26px #6b4636, -39px -26px #f4d7bd, -26px -26px #f4d7bd, -13px -26px #f4d7bd, 0 -26px #f4d7bd, 13px -26px #f4d7bd, 26px -26px #f4d7bd, 39px -26px #f4d7bd, 52px -26px #6b4636,
    -65px -13px #6b4636, -52px -13px #f4d7bd, -39px -13px #2b1c19, -26px -13px #f4d7bd, -13px -13px #f4d7bd, 0 -13px #f4d7bd, 13px -13px #f4d7bd, 26px -13px #f4d7bd, 39px -13px #2b1c19, 52px -13px #f4d7bd, 65px -13px #6b4636,
    -65px 0 #6b4636, -52px 0 #f4d7bd, -39px 0 #f4d7bd, -26px 0 #f4d7bd, -13px 0 #2b1c19, 0 0 #f4d7bd, 13px 0 #2b1c19, 26px 0 #f4d7bd, 39px 0 #f4d7bd, 52px 0 #f4d7bd, 65px 0 #6b4636,
    -52px 13px #6b4636, -39px 13px #f4d7bd, -26px 13px #f4d7bd, -13px 13px #f2a7a0, 0 13px #f2a7a0, 13px 13px #f2a7a0, 26px 13px #f4d7bd, 39px 13px #f4d7bd, 52px 13px #6b4636,
    -39px 26px #6b4636, -26px 26px #f4d7bd, -13px 26px #f4d7bd, 0 26px #f2a7a0, 13px 26px #f4d7bd, 26px 26px #f4d7bd, 39px 26px #6b4636,
    -26px 39px #6b4636, -13px 39px #6b4636, 0 39px #6b4636, 13px 39px #6b4636, 26px 39px #6b4636,
    -13px 52px #6b4636, 13px 52px #6b4636;
}

#boxBall.spin::after {
  animation: pixelMouseBlink .42s steps(2, end) infinite;
}

.detail-card {
  animation: detailPop .14s cubic-bezier(.18, 1.05, .22, 1) both;
}

.detail-hero img,
.detail-fallback {
  box-shadow: 0 18px 40px rgba(80, 59, 48, .14);
}

.confetti-front-layer {
  z-index: 100000;
}

.confetti-front-layer span:nth-child(3n) {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.confetti-front-layer span:nth-child(4n) {
  width: 8px;
  height: 28px;
  border-radius: 999px;
}

@keyframes selectedTabPulse {
  0% { transform: translateY(0) scale(.98); }
  60% { transform: translateY(-3px) scale(1.04); }
  100% { transform: translateY(0) scale(1); }
}

@keyframes underlineSlide {
  from { opacity: 0; transform: translateX(-50%) scaleX(.3); }
  to { opacity: 1; transform: translateX(-50%) scaleX(1); }
}

@keyframes welcomeBreath {
  0%, 100% { filter: drop-shadow(0 14px 22px rgba(80, 59, 48, .08)); }
  50% { filter: drop-shadow(0 20px 30px rgba(150, 59, 53, .16)); }
}

@keyframes cardPopIn {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes franticMouseSpin {
  0% { transform: rotate(0deg) scale(1); filter: saturate(1); }
  14% { transform: rotate(540deg) scale(1.08); }
  30% { transform: rotate(1260deg) scale(1.16); filter: saturate(1.2); }
  50% { transform: rotate(2340deg) scale(1.1); }
  72% { transform: rotate(3420deg) scale(1.18); }
  88% { transform: rotate(4140deg) scale(.96); }
  100% { transform: rotate(4320deg) scale(1); filter: saturate(1); }
}

@keyframes pixelMouseBlink {
  0%, 100% { filter: drop-shadow(0 8px 0 rgba(80, 59, 48, .16)) brightness(1); }
  50% { filter: drop-shadow(0 10px 0 rgba(80, 59, 48, .2)) brightness(1.08); }
}

@keyframes prizeHalo {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.box-stage::before {
  transform-origin: center;
}

@keyframes ringSpin {
  to { transform: rotate(360deg); }
}

@keyframes detailPop {
  from { transform: translateY(10px) scale(.985); }
  to { transform: translateY(0) scale(1); }
}

@keyframes voicePulse {
  from { transform: scale(.96); }
  to { transform: scale(1.04); }
}

@media (max-width: 700px) {
  .shell {
    padding: 12px;
  }

  .hall-card {
    overflow: visible;
    padding: 12px;
  }

  .hall-card .hall-paged-grid,
  .companion-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
    padding: 0 0 58px;
    overflow: visible;
  }

  .hall-card .hall-paged-grid .companion-card,
  .companion-card {
    display: grid;
    grid-template-columns: minmax(108px, 38vw) 1fr;
    align-items: stretch;
    min-height: 158px;
    max-height: 190px;
    border-radius: 18px;
  }

  .card-img {
    height: 100%;
    min-height: 158px;
    aspect-ratio: auto;
    border-radius: 16px 0 0 16px;
  }

  .card-img img {
    object-fit: cover;
  }

  .game-tag,
  .online {
    top: 8px;
    padding: 4px 7px;
    max-width: calc(100% - 16px);
    font-size: 11px;
  }

  .online {
    top: auto;
    right: auto;
    left: 8px;
    bottom: 8px;
  }

  .card-info {
    min-width: 0;
    padding: 12px 12px 10px;
  }

  .card-info h3 {
    margin-bottom: 6px;
    font-size: 18px;
    line-height: 1.15;
  }

  .badge {
    margin-bottom: 6px;
    padding: 3px 8px;
    font-size: 12px;
  }

  .card-info p {
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 13px;
    line-height: 1.35;
  }

  .price {
    font-size: 18px;
  }

  .box-stage {
    min-height: calc(100svh - 190px);
    display: grid;
    align-content: center;
  }

  .box-stage::before {
    width: min(320px, 84vw);
  }

  .box-ball {
    width: 210px;
    height: 210px;
    margin: 18px auto;
    font-size: 104px;
  }

  .draw-btn {
    padding: 15px 22px;
    border-width: 3px;
    border-radius: 28px;
    font-size: 24px;
  }

  .detail-card {
    width: min(94vw, 420px);
    max-height: 84svh;
    border-radius: 24px;
  }

  .detail-hero {
    gap: 14px;
  }

  .detail-art,
  .detail-hero img,
  .detail-fallback {
    height: 220px;
    border-radius: 18px;
  }
}

@media (max-width: 380px) {
  .hall-card .hall-paged-grid .companion-card,
  .companion-card {
    grid-template-columns: 118px 1fr;
  }

  .card-img {
    min-height: 150px;
  }

  .card-info h3 {
    font-size: 16px;
  }
}

/* clean5: use the native mouse-face emoji for the blind-box mascot. */
#boxBall {
  color: #8f3832;
  font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Microsoft YaHei", sans-serif;
  font-size: 176px;
  line-height: 1;
}

#boxBall::after {
  display: none;
}

@media (max-width: 700px) {
  #boxBall {
    font-size: 104px;
  }
}

/* clean8: mobile hall cards are image-only; desktop keeps full info cards. */
@media (max-width: 700px) {
  .hall-card {
    overflow: hidden;
  }

  .hall-card .hall-paged-grid,
  .companion-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    place-items: center;
    min-height: min(76vh, 620px);
    padding: 12px 0 0;
    overflow: visible;
  }

  .hall-card .hall-paged-grid .companion-card,
  .companion-card {
    display: block;
    width: min(76vw, 340px);
    min-width: 0;
    min-height: 0;
    max-height: none;
    aspect-ratio: 3 / 4;
    border-radius: 28px;
    overflow: hidden;
    background: #fffaf6;
    box-shadow: 0 18px 36px rgba(80, 59, 48, .16);
  }

  .hall-card .hall-paged-grid .companion-card:hover,
  .companion-card:hover {
    transform: none;
  }

  .hall-card .hall-paged-grid .card-img,
  .card-img {
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    border-radius: 0;
  }

  .hall-card .hall-paged-grid .card-img img,
  .card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .hall-card .hall-paged-grid .card-info,
  .card-info {
    display: none;
  }

  .game-tag,
  .online {
    top: 12px;
    padding: 6px 10px;
    max-width: calc(100% - 24px);
    border-radius: 999px;
    font-size: 13px;
  }

  .online {
    top: auto;
    right: auto;
    left: 12px;
    bottom: 12px;
  }

  .hall-pagination {
    margin: 18px auto 0;
  }
}

/* resilience1: welcome content remains visible even when animation or app boot fails. */
.welcome-screen::before {
  opacity: 1;
  animation: welcomeLogoIntroResilient .9s ease .15s both;
  z-index: 3;
}

.welcome-character-img {
  left: 50%;
  top: 45%;
  width: min(630px, 54vw);
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%);
  animation: characterIntroResilient 1.25s cubic-bezier(.16,.84,.25,1) .25s both;
  pointer-events: none;
  z-index: 2;
}

.welcome-title {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%);
  animation:
    titleIntroResilient .75s cubic-bezier(.2,1.1,.3,1) .1s both,
    welcomeBreath 2.8s ease-in-out .95s infinite;
  pointer-events: auto;
  z-index: 4;
}

html.app-init-error #welcome {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

html.app-init-error .welcome-screen::before,
html.app-init-error .welcome-character-img,
html.app-init-error .welcome-title {
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
}

html.app-init-error .welcome-character-img {
  transform: translate(-50%, -50%) !important;
}

html.app-init-error .welcome-title {
  transform: translateX(-50%) !important;
}

@keyframes characterIntroResilient {
  from {
    opacity: 1;
    transform: translate(-50%, calc(-50% + 26px)) scale(.92);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes welcomeLogoIntroResilient {
  from {
    opacity: 1;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes titleIntroResilient {
  from {
    opacity: 1;
    transform: translateX(-50%) translateY(14px) scale(.94);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .welcome-character-img {
    top: 42%;
    width: min(465px, 100vw);
  }
}

/* Life-circle interactions. */
.post-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(198, 164, 139, .48);
}

.post-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 92px;
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #765f52;
  font-size: 14px;
  font-weight: 800;
  transition: color .18s ease, background .18s ease, border-color .18s ease, transform .18s ease;
}

.post-action:hover {
  color: #963b35;
  background: rgba(241, 224, 211, .68);
  border-color: rgba(198, 164, 139, .55);
  transform: translateY(-1px);
}

.post-action:disabled {
  cursor: wait;
  opacity: .62;
}

.post-action.liked {
  color: #a33135;
  background: rgba(244, 215, 209, .64);
  border-color: rgba(180, 93, 91, .35);
}

.post-action-icon {
  width: 20px;
  font-size: 20px;
  line-height: 1;
}

.post-action-icon.comment-icon {
  position: relative;
  width: 17px;
  height: 14px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.post-action-icon.comment-icon::after {
  content: "";
  position: absolute;
  left: 2px;
  bottom: -5px;
  width: 6px;
  height: 6px;
  border-left: 2px solid currentColor;
  transform: skewY(-38deg);
}

.post-action b {
  min-width: 16px;
  font-size: 13px;
  text-align: left;
}

.post-comments {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(198, 164, 139, .35);
}

.post-comment-list {
  display: grid;
  max-height: 320px;
  overflow-y: auto;
}

.post-comment {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr) max-content;
  align-items: start;
  gap: 9px;
  padding: 9px 2px;
  border-bottom: 1px solid rgba(198, 164, 139, .22);
  line-height: 1.55;
}

.post-comment b {
  max-width: 120px;
  overflow: hidden;
  color: #6c4335;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.post-comment span {
  min-width: 0;
  color: #4f3d34;
  overflow-wrap: anywhere;
}

.post-comment time {
  color: #aa9384;
  font-size: 12px;
  white-space: nowrap;
}

.comment-empty {
  margin: 4px 0 12px;
  color: #9a8576;
  font-size: 14px;
}

.post-comment-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 12px;
}

.post-comment-form input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #d8bca8;
  border-radius: 8px;
  color: #4f392e;
  background: rgba(255, 255, 255, .88);
  font: inherit;
}

.post-comment-form input:focus {
  border-color: #a94a43;
  outline: 2px solid rgba(169, 74, 67, .16);
  outline-offset: 1px;
}

.post-comment-form button {
  min-width: 70px;
  height: 42px;
  padding: 0 16px;
  border-radius: 8px;
  color: #fff;
  background: #963b35;
  font-weight: 800;
}

.post-comment-form button:disabled {
  cursor: wait;
  opacity: .58;
}

@media (max-width: 700px) {
  .post {
    padding: 14px;
  }

  .post-head {
    flex-wrap: wrap;
    gap: 8px;
  }

  .post-actions {
    justify-content: space-between;
  }

  .post-action {
    flex: 1;
    min-width: 0;
  }

  .post-comment {
    grid-template-columns: max-content minmax(0, 1fr);
  }

  .post-comment time {
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-screen::before,
  .welcome-character-img,
  .welcome-title,
  .view-enter,
  .card-pop-in {
    animation: none !important;
  }

  .welcome-screen::before,
  .welcome-character-img,
  .welcome-title {
    opacity: 1 !important;
    visibility: visible !important;
  }

  .welcome-character-img {
    transform: translate(-50%, -50%) !important;
  }

  .welcome-title {
    transform: translateX(-50%) !important;
  }
}

.compliance-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  margin: 18px 0;
}

.compliance-admin-grid label {
  display: grid;
  gap: 8px;
  font-weight: 800;
}

.compliance-preview {
  min-height: 54px;
  display: flex;
  align-items: end;
}

.compliance-preview img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.site-compliance {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 20px;
  padding: 12px 22px;
  color: #8b756b;
  background: rgba(255, 250, 247, 0.92);
  border-top: 1px solid rgba(118, 72, 55, 0.16);
  font-size: 13px;
}

.site-compliance a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}

.site-compliance a:hover { color: #a33d36; }
.site-compliance img { width: 16px; height: 16px; object-fit: contain; }

@media (max-width: 720px) {
  .compliance-admin-grid { grid-template-columns: 1fr; }
  .site-compliance { font-size: 12px; gap: 8px 14px; }
}

/* price2: compact navigation, guided AI matching, and the price-and-rights hub. */
.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.topbar {
  height: 88px;
  gap: 16px;
}

.brand {
  width: 220px;
  height: 78px;
  flex: 0 0 220px;
}

.nav {
  min-width: 0;
  align-self: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 0;
  overflow: visible;
}

.nav-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #5d4b43;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
}

.nav-item::before,
.nav-item.active::after {
  display: none !important;
  content: none !important;
}

.nav-item svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.nav-item:hover {
  color: #8f302d;
  border-color: rgba(150, 59, 53, .2);
  background: rgba(255, 250, 246, .7);
}

.nav-item.active {
  color: #fff;
  border-color: #8f302d;
  background: #963b35;
  box-shadow: 0 8px 18px rgba(112, 38, 36, .18);
}

.login-pill {
  min-width: 164px;
  margin-top: 0;
  padding: 13px 18px;
  font-size: 16px;
  white-space: nowrap;
}

.section-kicker {
  display: block;
  margin-bottom: 10px;
  color: #d8ad67;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 1.6px;
}

.ai-assistant-shell,
.pricing-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 30px 0 70px;
}

.ai-assistant-hero,
.pricing-hero {
  position: relative;
  min-height: 230px;
  overflow: hidden;
  border: 1px solid #4d3c36;
  border-left: 8px solid #a33432;
  border-radius: 18px;
  color: #fffaf6;
  background: #2b2523;
  box-shadow: 0 18px 46px rgba(43, 37, 35, .18);
}

.ai-hero-copy,
.pricing-hero-copy {
  position: relative;
  z-index: 2;
  width: min(850px, 72%);
  padding: 36px 42px;
}

.ai-assistant-hero h1,
.pricing-hero h1 {
  margin: 0;
  color: #fff;
  font-size: clamp(36px, 4.3vw, 64px);
  line-height: 1.1;
  letter-spacing: 0;
}

.ai-assistant-hero p,
.pricing-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: #e3d6ce;
  font-size: 18px;
  line-height: 1.75;
}

.ai-hero-character,
.pricing-hero > img {
  position: absolute;
  z-index: 1;
  right: 38px;
  bottom: -52px;
  width: 300px;
  max-height: 300px;
  object-fit: contain;
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, .24));
}

.ai-trust-row,
.pricing-legend,
.pricing-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin-top: 22px;
}

.ai-trust-row span,
.pricing-legend span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #f6ece6;
  font-size: 14px;
  font-weight: 800;
}

.ai-trust-row svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: #e0b46c;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.ai-assistant-layout {
  display: grid;
  grid-template-columns: minmax(330px, 420px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}

.ai-needs-panel,
.ai-chat-panel {
  border: 1px solid #ddc8ba;
  border-radius: 12px;
  background: rgba(255, 250, 246, .94);
  box-shadow: 0 12px 30px rgba(80, 59, 48, .09);
}

.ai-needs-panel {
  padding: 24px;
}

.ai-panel-heading,
.ai-chat-header > div {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-badge,
.panel-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  color: #fff;
  background: #963b35;
  font-size: 12px;
  font-weight: 900;
}

.ai-panel-heading h2,
.ai-chat-header h2 {
  margin: 0;
  color: #3e302b;
  font-size: 22px;
  letter-spacing: 0;
}

.ai-panel-heading p,
.ai-chat-header p {
  margin: 5px 0 0;
  color: #8f786b;
  font-size: 13px;
  line-height: 1.55;
}

.ai-choice-group {
  min-width: 0;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.ai-choice-group legend {
  margin-bottom: 10px;
  color: #58443b;
  font-size: 14px;
  font-weight: 900;
}

.ai-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ai-choice {
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid #ddc9bc;
  border-radius: 7px;
  color: #6a554a;
  background: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.ai-choice:hover {
  color: #8f302d;
  border-color: #b86b62;
}

.ai-choice.active {
  color: #fff;
  border-color: #8f302d;
  background: #963b35;
  box-shadow: inset 0 -2px rgba(0, 0, 0, .12);
}

.ai-needs-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 24px;
}

.ai-primary-action,
.pricing-order-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  background: #963b35;
  font-weight: 900;
  box-shadow: 0 10px 20px rgba(132, 45, 42, .18);
}

.ai-primary-action svg,
.pricing-order-button svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.ai-reset-action {
  padding: 10px 4px;
  color: #836d61;
  font-size: 13px;
  font-weight: 800;
}

.ai-chat-panel {
  min-height: 700px;
  padding: 24px;
  display: flex;
  flex-direction: column;
}

.ai-chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e5d3c7;
}

.ai-online {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-top: 7px;
  color: #6c5a50;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ai-online i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #55a565;
  box-shadow: 0 0 0 4px rgba(85, 165, 101, .12);
}

.ai-chat-panel .chat-messages {
  min-height: 350px;
  max-height: 480px;
  margin: 18px 0 12px;
  padding: 18px;
  overflow: auto;
  border: 1px solid #ead9cf;
  border-radius: 10px;
  background: #f7f1ed;
}

.ai-chat-panel .message {
  max-width: 90%;
  margin: 0 0 12px;
  padding: 13px 15px;
  border: 1px solid #e4d2c5;
  border-radius: 9px;
  color: #4d3a32;
  background: #fffaf6;
  line-height: 1.65;
}

.ai-chat-panel .message.user {
  margin-left: auto;
  color: #fff;
  border-color: #8f302d;
  background: #963b35;
}

.ai-welcome-message {
  display: grid;
  gap: 6px;
}

.ai-welcome-message b {
  color: #8f302d;
}

.ai-welcome-message span {
  color: #715d52;
}

.ai-chat-panel .message.bot > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.message.bot .mini-card.ai-result-card {
  display: flex;
  width: auto;
  min-width: 0;
  margin-top: 0;
  padding: 12px;
  flex-direction: column;
  align-items: stretch;
  gap: 7px;
  border: 1px solid #d9c3b6;
  border-radius: 8px;
  text-align: left;
  background: #fff;
}

.ai-result-card:hover {
  border-color: #a34a45;
  box-shadow: 0 9px 20px rgba(80, 59, 48, .1);
}

.ai-result-top,
.ai-result-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ai-result-top b {
  min-width: 0;
  overflow: hidden;
  color: #3f302a;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-result-top i {
  color: #4f915c;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.ai-result-meta,
.ai-result-skill {
  overflow: hidden;
  color: #826d61;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-result-reasons {
  display: block;
  overflow: hidden;
  color: #963b35;
  font-size: 11px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message.bot .ai-answer-keyword {
  color: #b32621;
  font-weight: 950;
}

.ai-result-bottom {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid #eee0d7;
}

.ai-result-bottom strong {
  color: #963b35;
  font-size: 17px;
}

.ai-result-bottom small {
  font-size: 10px;
}

.ai-result-bottom em {
  color: #8f302d;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.ai-quick-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.ai-quick-prompts button {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid #dbc7ba;
  border-radius: 6px;
  color: #755f54;
  background: rgba(255, 255, 255, .8);
  font-size: 12px;
  font-weight: 800;
}

.ai-quick-prompts button:hover {
  color: #8f302d;
  border-color: #b96b63;
}

.ai-chat-panel .chat-form {
  display: flex;
  min-height: 58px;
  padding: 7px;
  border: 1px solid #d7bfb0;
  border-radius: 10px;
  background: #fff;
}

.ai-chat-panel .chat-form input {
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.ai-chat-panel .send-btn {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border-radius: 8px;
}

.ai-chat-panel .send-btn svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.ai-privacy-note {
  margin: 9px 0 0;
  color: #9b8679;
  font-size: 11px;
  text-align: center;
}

#boxBall {
  display: grid;
  place-items: center;
  color: #8f3832;
  font-family: "Segoe UI Emoji", "Segoe UI Symbol", "Microsoft YaHei", sans-serif;
  font-size: 176px;
  line-height: 1;
}

@media (max-width: 700px) {
  #boxBall {
    font-size: 104px;
  }
}

.pricing-hero > img {
  bottom: -82px;
  width: 396px;
  max-height: 408px;
}

.pricing-legend b {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid #d8ad67;
  border-radius: 50%;
  color: #d8ad67;
  font-size: 11px;
}

.pricing-content {
  margin-top: 20px;
}

.pricing-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 6px;
  border: 1px solid #dec8ba;
  border-radius: 12px;
  background: rgba(255, 250, 246, .9);
  box-shadow: 0 10px 28px rgba(80, 59, 48, .08);
}

.pricing-tab {
  min-height: 50px;
  padding: 10px 14px;
  border: 1px solid transparent;
  border-radius: 7px;
  color: #705b50;
  font-size: 15px;
  font-weight: 900;
  white-space: nowrap;
}

.pricing-tab:hover {
  color: #8f302d;
  border-color: rgba(150, 59, 53, .22);
}

.pricing-tab.active {
  color: #fff;
  border-color: #8f302d;
  background: #963b35;
}

.pricing-status-strip {
  justify-content: center;
  margin: 16px 0 0;
  padding: 13px 18px;
  border-top: 1px solid #ddc8ba;
  border-bottom: 1px solid #ddc8ba;
  color: #624e45;
  background: rgba(255, 250, 246, .56);
}

.pricing-status-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 900;
}

.pricing-status-strip svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #963b35;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.5;
}

.pricing-panels {
  margin-top: 18px;
}

.pricing-panel {
  animation: viewEnter .26s ease both;
}

.panel-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 18px;
  padding: 24px 2px 20px;
  border-bottom: 2px solid #3d302b;
}

.panel-intro > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.panel-intro h2 {
  margin: 0;
  color: #3d302b;
  font-size: 30px;
  letter-spacing: 0;
}

.panel-intro p {
  max-width: 650px;
  margin: 4px 0 0;
  color: #7f6a5f;
  line-height: 1.7;
  text-align: right;
}

@media (min-width: 1100px) {
  #pricePanelRights .panel-intro p {
    max-width: none;
    white-space: nowrap;
  }
}

.price-section,
.special-offer,
.rights-highlight-grid > div,
.rights-rules,
.rights-proof,
.about-flow > div,
.about-promise {
  border: 1px solid #ddc8ba;
  border-radius: 8px;
  background: rgba(255, 250, 246, .94);
  box-shadow: 0 10px 26px rgba(80, 59, 48, .07);
}

.price-section {
  margin-bottom: 16px;
  overflow: hidden;
}

.price-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  color: #fff;
  background: #3a302c;
}

.price-section-head h3 {
  margin: 0;
  font-size: 19px;
}

.price-section-head span {
  color: #e1c49b;
  font-size: 12px;
  font-weight: 800;
}

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

.price-table {
  width: 100%;
  border-collapse: collapse;
  color: #4c3b34;
}

.price-table th,
.price-table td {
  padding: 15px 18px;
  border-bottom: 1px solid #eadbd2;
  text-align: center;
}

.price-table thead th {
  color: #7e2928;
  background: #f4e6de;
  font-size: 13px;
}

.price-table tbody th {
  text-align: center;
}

.price-table td {
  color: #963b35;
  font-size: 19px;
  font-weight: 900;
}

.price-two-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.price-rows,
.fun-price-list {
  display: grid;
}

.price-row,
.fun-price-list > div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) max-content max-content;
  align-items: center;
  gap: 14px;
  min-height: 54px;
  padding: 12px 18px;
  border-bottom: 1px solid #eadbd2;
}

.price-row:last-child,
.fun-price-list > div:last-child {
  border-bottom: 0;
}

.price-row span,
.fun-price-list span {
  min-width: 0;
  color: #57443c;
  font-weight: 800;
}

.price-row strong,
.fun-price-list strong {
  color: #963b35;
  font-size: 18px;
  white-space: nowrap;
}

.price-row em,
.fun-price-list em {
  color: #806a5d;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

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

.fun-price-list > div:nth-child(odd) {
  border-right: 1px solid #eadbd2;
}

.compact-rows .price-row {
  grid-template-columns: minmax(110px, 1fr) max-content;
}

.compact-rows .price-row em {
  grid-column: 1 / -1;
  margin-top: -7px;
}

.pricing-note {
  padding: 15px 18px;
  border-left: 5px solid #963b35;
  color: #624e45;
  background: #f1e4dc;
  line-height: 1.7;
}

.pricing-poster-view {
  position: relative;
  display: block;
  margin-bottom: 18px;
  overflow: hidden;
  border: 1px solid #d7bfb1;
  border-radius: 8px;
  background: #fffaf6;
  box-shadow: 0 14px 34px rgba(80, 59, 48, .1);
}

.pricing-poster-view img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 1100px;
  object-fit: contain;
  background: #fffaf6;
}

.pricing-poster-view > span {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 9px 12px;
  border-radius: 6px;
  color: #fff;
  background: rgba(52, 43, 40, .9);
  font-size: 12px;
  font-weight: 900;
}

.pricing-image-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.pricing-image-card {
  overflow: hidden;
  border: 1px solid #d7bfb1;
  border-radius: 8px;
  background: #fffaf6;
  box-shadow: 0 14px 34px rgba(80, 59, 48, .1);
}

.pricing-image-titlebar,
.admin-poster-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 14px 18px;
  border-bottom: 1px solid #d8ad67;
  background: #2b2523;
  color: #e4bd77;
}

.pricing-image-titlebar {
  min-height: 48px;
  padding: 10px 13px;
  gap: 10px;
}

.pricing-image-titlebar h3 {
  min-width: 0;
  margin: 0;
  color: #e4bd77;
  font-size: 15px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pricing-image-titlebar span,
.admin-poster-titlebar span {
  flex: 0 0 auto;
  color: #d8ad67;
  font-size: 12px;
  font-weight: 900;
}

.pricing-image-trigger {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fffaf6;
  cursor: zoom-in;
}

.pricing-image-card img {
  display: block;
  width: 100%;
  height: clamp(220px, 24vw, 340px);
  object-fit: contain;
  background: #fffaf6;
}

.pricing-image-open {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 9px 12px;
  border: 1px solid rgba(228, 189, 119, .55);
  border-radius: 6px;
  color: #e4bd77;
  background: rgba(43, 37, 35, .94);
  font-size: 12px;
  font-weight: 900;
}

.pricing-image-dialog {
  box-sizing: border-box;
  width: min(1180px, 96vw);
  max-width: none;
  overflow: hidden;
  padding: 0;
}

.pricing-image-dialog::backdrop {
  background: rgba(29, 23, 21, .78);
}

.pricing-image-dialog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  height: 94vh;
  max-height: 94vh;
  overflow: hidden;
  padding: 58px 18px 18px;
  border: 1px solid #d8ad67;
  border-radius: 8px;
  background: #2b2523;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .42);
}

.pricing-image-dialog-card h2 {
  position: absolute;
  top: 16px;
  left: 20px;
  right: 68px;
  margin: 0;
  overflow: hidden;
  color: #e4bd77;
  font-size: 18px;
  line-height: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pricing-image-viewport {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow: auto;
  border-radius: 4px;
  outline: none;
  background: #fffaf6;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.pricing-image-viewport:focus-visible {
  box-shadow: inset 0 0 0 2px #d8ad67;
}

.pricing-image-viewport img {
  display: block;
  max-width: none;
  max-height: none;
  margin: 0 auto;
  border-radius: 4px;
  background: #fffaf6;
  user-select: none;
  -webkit-user-drag: none;
}

.pricing-image-viewport.is-zoomed {
  cursor: grab;
}

.pricing-image-viewport.is-panning {
  cursor: grabbing;
}

.pricing-image-dialog-close {
  top: 8px;
  right: 15px;
  color: #e4bd77;
}

@media (max-width: 1100px) {
  .pricing-image-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .pricing-image-gallery {
    grid-template-columns: 1fr;
  }

  .pricing-image-card img {
    height: min(72vh, 520px);
  }

  .pricing-image-dialog-card {
    width: 100%;
    padding: 54px 10px 10px;
  }
}

.special-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.special-offer {
  padding: 22px;
}

.special-offer.accent {
  border-top: 5px solid #963b35;
}

.special-offer.wide-offer {
  grid-column: 1 / -1;
}

.offer-label {
  color: #963b35;
  font-size: 12px;
  font-weight: 900;
}

.special-offer h3 {
  margin: 8px 0 14px;
  color: #3f302a;
  font-size: 22px;
}

.special-offer p {
  margin: 13px 0 0;
  color: #796459;
  line-height: 1.7;
}

.offer-price {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid #eddfd7;
}

.offer-price strong {
  color: #963b35;
  font-size: 24px;
}

.offer-price span {
  color: #6f5a50;
  font-size: 13px;
  font-weight: 800;
}

.offer-inline-list {
  display: grid;
  gap: 9px;
  color: #604c43;
  line-height: 1.6;
}

.offer-inline-list b {
  color: #963b35;
}

.rights-highlight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.rights-highlight-grid > div {
  min-height: 170px;
  padding: 20px;
  border-top: 4px solid #963b35;
}

.rights-highlight-grid b {
  color: #b49a88;
  font-size: 12px;
}

.rights-highlight-grid h3 {
  margin: 8px 0;
  color: #3e302b;
  font-size: 19px;
}

.rights-highlight-grid p {
  margin: 0;
  color: #7b675c;
  line-height: 1.65;
}

.rights-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 16px;
  margin-bottom: 16px;
}

.rights-rules,
.rights-proof {
  padding: 22px;
}

.rights-rules h3,
.rights-proof h3 {
  margin: 0 0 14px;
  color: #3f302a;
  font-size: 21px;
}

.rights-rules ol {
  margin: 0;
  padding-left: 22px;
  color: #635047;
  line-height: 1.75;
}

.rights-rules li + li {
  margin-top: 8px;
}

.rights-proof {
  align-content: start;
  color: #fff;
  background: #342b28;
}

.rights-proof > svg {
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  fill: none;
  stroke: #d8ad67;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.rights-proof h3 {
  color: #fff;
}

.rights-proof p {
  color: #e0d3cc;
  line-height: 1.75;
}

.rights-proof strong {
  display: block;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #675149;
  color: #e3bd7b;
  line-height: 1.6;
}

.rights-compensation {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid #ddc8ba;
  border-radius: 8px;
  background: rgba(255, 250, 246, .94);
  box-shadow: 0 10px 26px rgba(80, 59, 48, .07);
}

.rights-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 17px 20px;
  color: #fff;
  background: #3a302c;
}

.rights-section-heading span {
  font-size: 20px;
  font-weight: 900;
}

.rights-section-heading p {
  margin: 0;
  color: #e1c49b;
  font-size: 12px;
  font-weight: 800;
}

.rights-compensation-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 36px;
  margin: 0;
  padding: 20px 42px;
  color: #635047;
  line-height: 1.75;
}

.rights-compensation-list li {
  padding: 7px 0;
  border-bottom: 1px solid #eadbd2;
}

.rights-standard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid #ddc8ba;
}

.rights-standard-grid > section {
  padding: 24px;
}

.rights-standard-grid > section + section {
  border-left: 1px solid #ddc8ba;
}

.rights-standard-label {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  border-radius: 5px;
  color: #fff;
  background: #963b35;
  font-size: 13px;
  font-weight: 900;
}

.rights-standard-grid h3 {
  margin: 7px 0;
  color: #3f302a;
  font-size: 18px;
}

.rights-standard-grid p {
  margin: 0 0 14px;
  color: #6f5a50;
  line-height: 1.75;
}

.rights-standard-grid strong {
  display: block;
  padding-top: 14px;
  border-top: 1px solid #eadbd2;
  color: #963b35;
  line-height: 1.65;
}

.rights-final-note {
  margin-bottom: 16px;
  padding: 15px 18px;
  border-left: 5px solid #963b35;
  color: #624e45;
  background: #f1e4dc;
  line-height: 1.7;
}

.pricing-order-button {
  min-width: 240px;
}

.about-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.about-flow > div {
  min-height: 190px;
  padding: 20px;
}

.about-flow > div > span {
  color: #b69d8c;
  font-size: 30px;
  font-weight: 900;
}

.about-flow h3 {
  margin: 14px 0 8px;
  color: #3e302b;
  font-size: 19px;
}

.about-flow p {
  margin: 0;
  color: #7b675c;
  line-height: 1.65;
}

.about-promise {
  display: grid;
  grid-template-columns: minmax(250px, .8fr) minmax(320px, 1.2fr) auto;
  align-items: center;
  gap: 24px;
  padding: 26px;
  border-left: 6px solid #963b35;
}

.about-promise h3 {
  margin: 0;
  color: #3f302a;
  font-size: 24px;
}

.about-promise p {
  margin: 0;
  color: #735f54;
  line-height: 1.7;
}

.pricing-poster-admin .admin-section-head h2 {
  margin: 0 0 6px;
}

.pricing-poster-admin .admin-section-head p {
  margin: 0 0 18px;
}

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

.admin-poster-grid > section {
  min-width: 0;
  padding: 18px;
  border: 1px solid #ddc8ba;
  border-radius: 8px;
  background: #fffaf6;
}

.admin-poster-grid h3 {
  margin: 0 0 12px;
  color: #3f302a;
}

.admin-poster-preview {
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #c9aa99;
  border-radius: 7px;
  color: #846f63;
  background: #f7eee8;
  text-align: center;
}

.admin-poster-preview img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: contain;
}

.admin-poster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-poster-actions button {
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 7px;
  font-weight: 900;
}

.admin-poster-actions .ghost-btn {
  border: 1px solid #b99481;
  color: #6c5146;
  background: #fffaf6;
}

.admin-poster-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-poster-item {
  overflow: hidden;
  border: 1px solid #d7bfb1;
  border-radius: 8px;
  background: #fffaf6;
}

.admin-poster-titlebar {
  min-height: 50px;
  padding: 11px 14px;
}

.admin-poster-titlebar strong {
  min-width: 0;
  color: #e4bd77;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.admin-poster-item > img {
  display: block;
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  background: #f7eee8;
}

.admin-poster-item-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid #eadbd2;
}

.admin-poster-item-actions button {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 900;
}

.admin-poster-item-actions .ghost-btn {
  border: 1px solid #b99481;
  color: #6c5146;
  background: #fffaf6;
}

.admin-poster-item-actions .delete {
  border: 1px solid #b95b54;
  color: #963b35;
  background: #fffaf6;
}

.admin-poster-item-actions button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

@media (max-width: 1180px) {
  .topbar {
    height: auto;
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px 14px;
  }

  .brand {
    width: 190px;
    height: 66px;
    flex-basis: auto;
  }

  .login-pill {
    grid-column: 2;
    grid-row: 1;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding: 5px 0 7px;
    scrollbar-width: thin;
  }

  .ai-assistant-layout {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
  }

  .ai-chat-panel .message.bot > div {
    grid-template-columns: 1fr;
  }

  .rights-highlight-grid,
  .about-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-promise {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .ai-assistant-shell,
  .pricing-shell {
    padding-top: 20px;
  }

  .ai-hero-copy,
  .pricing-hero-copy {
    width: 78%;
    padding: 30px;
  }

  .ai-hero-character,
  .pricing-hero > img {
    right: -12px;
    width: 230px;
    opacity: .58;
  }

  .pricing-hero > img {
    width: 276px;
  }

  .ai-assistant-layout,
  .rights-detail-layout,
  .admin-poster-grid {
    grid-template-columns: 1fr;
  }

  .ai-chat-panel {
    min-height: 620px;
  }

  .fun-price-list,
  .special-grid {
    grid-template-columns: 1fr;
  }

  .fun-price-list > div:nth-child(odd) {
    border-right: 0;
  }

  .special-offer.wide-offer {
    grid-column: auto;
  }
}

@media (max-width: 700px) {
  .shell {
    padding: 12px;
  }

  .topbar {
    gap: 4px 10px;
  }

  .brand {
    width: 156px;
    height: 56px;
  }

  .login-pill {
    min-width: 0;
    padding: 10px 12px;
    font-size: 13px;
  }

  .nav {
    gap: 4px;
  }

  .nav-item {
    min-height: 40px;
    padding: 8px 9px;
    font-size: 13px;
  }

  .nav-item svg {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .ai-assistant-hero,
  .pricing-hero {
    min-height: 250px;
    border-left-width: 5px;
    border-radius: 12px;
  }

  .ai-hero-copy,
  .pricing-hero-copy {
    width: 100%;
    padding: 24px 20px 118px;
  }

  .ai-assistant-hero h1,
  .pricing-hero h1 {
    font-size: 34px;
  }

  .ai-assistant-hero p,
  .pricing-hero p {
    font-size: 15px;
    line-height: 1.65;
  }

  .ai-hero-character,
  .pricing-hero > img {
    right: -4px;
    bottom: -58px;
    width: 180px;
    max-height: 210px;
    opacity: .78;
  }

  .ai-trust-row,
  .pricing-legend {
    gap: 9px 14px;
  }

  .ai-trust-row span,
  .pricing-legend span {
    font-size: 12px;
  }

  .ai-needs-panel,
  .ai-chat-panel {
    padding: 18px;
  }

  .ai-choice-grid {
    gap: 7px;
  }

  .ai-choice {
    min-height: 40px;
    padding: 7px 6px;
    font-size: 12px;
  }

  .ai-needs-actions {
    grid-template-columns: 1fr;
  }

  .ai-reset-action {
    min-height: 38px;
  }

  .ai-chat-header {
    display: grid;
  }

  .ai-online {
    padding-left: 46px;
  }

  .ai-chat-panel .chat-messages {
    min-height: 340px;
    max-height: 55vh;
    padding: 12px;
  }

  .ai-chat-panel .message {
    max-width: 96%;
  }

  .pricing-tabs {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 5px;
  }

  .pricing-tab {
    min-width: 86px;
    flex: 1 0 86px;
    min-height: 44px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .pricing-status-strip {
    justify-content: flex-start;
    gap: 8px 14px;
  }

  .panel-intro {
    display: grid;
    gap: 12px;
    padding-top: 18px;
  }

  .panel-intro h2 {
    font-size: 25px;
  }

  .panel-intro p {
    margin: 0;
    font-size: 14px;
    text-align: left;
  }

  .price-two-column,
  .rights-highlight-grid,
  .rights-compensation-list,
  .rights-standard-grid,
  .about-flow {
    grid-template-columns: 1fr;
  }

  .rights-section-heading {
    display: grid;
  }

  .rights-standard-grid > section + section {
    border-top: 1px solid #ddc8ba;
    border-left: 0;
  }

  .price-table {
    min-width: 520px;
  }

  .price-row,
  .fun-price-list > div {
    grid-template-columns: minmax(0, 1fr) max-content;
    gap: 8px;
    padding: 12px 14px;
  }

  .price-row em,
  .fun-price-list em {
    grid-column: 1 / -1;
  }

  .special-offer,
  .rights-highlight-grid > div,
  .rights-rules,
  .rights-proof,
  .about-flow > div,
  .about-promise {
    padding: 18px;
  }

  .pricing-order-button {
    width: 100%;
    min-width: 0;
  }
}

/* Keep the persistent service entry useful without covering product content. */
.enterprise-qr {
  left: auto;
  right: 22px;
  bottom: 22px;
  display: block;
  padding: 0;
  border-radius: 8px;
  background: #9f2f2b;
  box-shadow: 0 12px 28px rgba(55, 28, 24, .22);
}

.enterprise-qr:hover,
.enterprise-qr:focus-visible {
  transform: translateY(-2px);
  background: #84241f;
}

.enterprise-qr:focus-visible {
  outline: 3px solid rgba(159, 47, 43, .3);
  outline-offset: 4px;
}

.enterprise-qr img {
  display: none;
}

.enterprise-qr-bubble {
  max-width: none;
  padding: 12px 16px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  font-size: 14px;
  line-height: 1;
  box-shadow: none;
  text-shadow: none;
}

.qr-label-compact {
  display: none;
}

@media (max-width: 700px) {
  .nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
    padding-bottom: 8px;
  }

  .nav-item {
    grid-column: span 2;
    width: 100%;
    min-width: 0;
    justify-content: center;
    gap: 5px;
    padding: 8px 5px;
    font-size: 12px;
  }

  .nav-item:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .nav-item:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .pricing-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
  }

  .pricing-tab {
    grid-column: span 2;
    width: 100%;
    min-width: 0;
    padding: 8px 5px;
    font-size: 12px;
  }

  .pricing-tab:nth-child(4) {
    grid-column: 2 / span 2;
  }

  .pricing-tab:nth-child(5) {
    grid-column: 4 / span 2;
  }

  .pricing-legend {
    display: grid;
    width: 170px;
    gap: 6px;
  }

.pricing-hero > img {
    right: 4px;
    bottom: -34px;
    width: 158px;
    opacity: .88;
  }

  .enterprise-qr {
    right: 12px;
    bottom: 12px;
  }

  .enterprise-qr-bubble {
    padding: 11px 13px;
    font-size: 13px;
  }

  .qr-label-wide {
    display: none;
  }

  .qr-label-compact {
    display: inline;
  }
}

/* Compact trial hall: keep the browsing area dense even when only a few cards exist. */
.hall-view .page-hero {
  display: none;
}

.hall-view .page-hero h1 {
  font-size: 52px;
}

.hall-view .page-hero p {
  margin: 10px 0 0;
  font-size: 21px;
}

.hall-view .hall-layout {
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.hall-view .left-panel {
  gap: 12px;
}

.hall-view .category-panel {
  min-height: 0;
  padding: 16px 14px;
}

.hall-view .category-panel h3 {
  margin-bottom: 8px;
  font-size: 19px;
}

.hall-view .category {
  min-height: 34px;
  padding: 7px 10px;
  border-left: 3px solid transparent;
  border-radius: 7px;
  font-size: 15px;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}

.hall-view .category.active,
.hall-view .category:hover {
  border-left-color: #963b35;
  color: #963b35;
  background: #f1e3da;
  font-weight: 900;
}

.hall-view .hall-demand-card {
  min-height: 158px;
  padding: 17px 14px;
}

.hall-view .hall-demand-card::after {
  right: 2px;
  bottom: -10px;
  width: 94px;
  height: 116px;
}

.hall-view .hall-demand-card > div {
  max-width: 132px;
}

.hall-view .hall-demand-card h3 {
  margin-bottom: 8px;
  font-size: 24px;
}

.hall-view .hall-demand-card p {
  margin: 0 0 9px;
  font-size: 12px;
  line-height: 1.45;
}

.hall-view .hall-demand-card .brown-btn {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 7px;
}

.hall-view .hall-card {
  min-height: 0;
  padding: 14px;
  border-radius: 12px;
}

.hall-view .filters {
  display: grid;
  grid-template-columns: max-content repeat(3, minmax(150px, 180px));
  gap: 8px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid #e6d0c2;
  border-radius: 8px;
  background: rgba(247, 238, 232, .72);
}

.hall-view .filters select,
.hall-view .filters button {
  width: 100%;
  min-width: 0;
  height: 42px;
  border-radius: 7px;
}

.hall-view .filters select {
  padding: 0 34px 0 14px;
  line-height: 40px;
}

.hall-view .filters select:last-child {
  margin-left: 0;
}

.hall-view .hall-card .hall-paged-grid {
  grid-template-columns: repeat(var(--hall-cols, 1), minmax(0, 280px));
  grid-auto-flow: row;
  min-height: 0;
  padding-right: 0;
  justify-content: center;
  align-items: stretch;
  gap: 12px;
  overflow: visible;
}

.hall-view .companion-card {
  display: grid;
  grid-template-rows: 230px 1fr;
  overflow: hidden;
  border-radius: 10px;
}

.hall-view .card-img {
  height: 230px;
}

.hall-view .card-info {
  display: grid;
  grid-template-rows: auto auto minmax(42px, auto) auto auto;
  align-content: start;
  padding: 11px 12px 12px;
}

.hall-view .card-info h3 {
  margin-bottom: 5px;
  font-size: 19px;
}

.hall-view .card-info .badge {
  justify-self: start;
  margin-bottom: 6px;
  padding: 3px 8px;
  font-size: 12px;
}

.hall-view .card-skill {
  display: -webkit-box;
  min-height: 42px;
  margin: 0 0 7px;
  overflow: hidden;
  color: #654f44;
  font-size: 13px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.hall-view .card-price-line {
  margin: 0 0 5px;
  font-size: 13px;
}

.hall-view .card-price-line .price {
  font-size: 20px;
}

.hall-view .card-meta {
  margin: 0;
  color: #8b7467;
  font-size: 13px;
}

.hall-view .hall-footer {
  margin-top: 14px;
}

@media (min-width: 701px) {
  .hall-view .hall-footer {
    margin-bottom: 48px;
  }

  .hall-view .hall-footer .footer-char {
    bottom: -48px;
  }
}

@media (max-width: 1200px) {
  .hall-view .page-hero {
    margin-left: 0;
  }

  .hall-view .hall-card .hall-paged-grid {
    grid-template-columns: repeat(var(--hall-cols, 1), minmax(0, 1fr));
    padding-right: 0;
  }

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

@media (max-width: 1100px) {
  .hall-view .hall-layout {
    grid-template-columns: 1fr;
  }

  .hall-view .left-panel {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .hall-view .page-hero {
    margin: 18px 0 14px;
  }

  .hall-view .page-hero h1 {
    font-size: 38px;
  }

  .hall-view .page-hero p {
    font-size: 15px;
  }

  .hall-view .hall-card .hall-paged-grid {
    grid-template-columns: 1fr;
    padding-bottom: 58px;
  }

  .hall-view .left-panel {
    grid-template-columns: 1fr;
  }

  .hall-view .companion-card {
    grid-template-columns: minmax(108px, 38vw) 1fr;
    grid-template-rows: 1fr;
    min-height: 158px;
    max-height: 190px;
  }

  .hall-view .card-img {
    height: 100%;
    min-height: 158px;
  }

  .hall-view .card-info {
    grid-template-rows: auto auto minmax(34px, auto) auto auto;
    padding: 12px 12px 10px;
  }

  .hall-view .card-info h3 {
    font-size: 19px;
  }

  .hall-view .card-skill {
    min-height: 34px;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.35;
  }

  .hall-view .card-meta {
    font-size: 11px;
  }
}

/* Companion profile facts: compact to edit, easy to scan, and reusable by AI matching. */
.profile-fields-grid,
.admin-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 12px 0;
}

.modal-card {
  box-sizing: border-box;
}

.modal-card .profile-field {
  min-width: 0;
  margin: 0;
  gap: 6px;
  color: #654f44;
  font-size: 13px;
}

.modal-card .profile-field span {
  font-weight: 850;
}

.modal-card .profile-field input,
.modal-card .profile-field select,
.modal-card .profile-field textarea,
.admin-edit-grid input,
.admin-edit-grid select,
.admin-edit-grid textarea {
  width: 100%;
  min-width: 0;
  margin: 0;
}

.profile-field-wide,
.admin-edit-grid textarea {
  grid-column: 1 / -1;
}

.hall-view .card-info {
  grid-template-rows: none;
  grid-auto-rows: auto;
  gap: 0;
}

.hall-view .card-skill,
.hall-view .card-feature {
  min-height: 0;
  margin: 0 0 7px;
}

.hall-view .card-skill b,
.hall-view .card-feature b {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 6px;
  border-radius: 4px;
  color: #963b35;
  background: #f4e6df;
  font-size: 11px;
  line-height: 1.3;
}

.hall-view .card-traits {
  display: flex;
  min-width: 0;
  gap: 5px;
  margin: 0 0 7px;
  overflow: hidden;
}

.hall-view .card-traits span {
  min-width: 0;
  padding: 3px 6px;
  overflow: hidden;
  border: 1px solid #ead7cb;
  border-radius: 4px;
  color: #715d52;
  background: #fffaf7;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hall-view .card-traits b {
  margin-right: 3px;
  color: #a13d37;
}

.hall-view .card-feature {
  display: -webkit-box;
  overflow: hidden;
  color: #715d52;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ai-result-profile,
.ai-result-feature {
  display: block;
  overflow: hidden;
  color: #826d61;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ai-result-feature {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

@media (max-width: 700px) {
  .modal-card {
    width: 100%;
    max-width: 100%;
    padding: 20px;
    border-radius: 18px;
  }

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

  .login-tabs .tab {
    min-width: 0;
    padding: 8px 4px;
    font-size: 13px;
    white-space: nowrap;
  }

  .profile-fields-grid,
  .admin-edit-grid {
    grid-template-columns: 1fr;
  }

  .profile-field-wide,
  .admin-edit-grid textarea {
    grid-column: auto;
  }

  .hall-view .hall-card .hall-paged-grid .companion-card {
    display: grid;
    grid-template-columns: minmax(112px, 39%) minmax(0, 1fr);
    grid-template-rows: 1fr;
    width: 100%;
    min-height: 196px;
    max-height: 228px;
    aspect-ratio: auto;
    border-radius: 10px;
  }

  .hall-view .hall-card .hall-paged-grid .card-img {
    width: 100%;
    height: 100%;
    min-height: 196px;
    border-radius: 0;
  }

  .hall-view .hall-card .hall-paged-grid .card-info {
    display: grid;
    grid-template-rows: none;
    padding: 10px;
  }

  .hall-view .card-info h3 {
    font-size: 17px;
  }

  .hall-view .card-traits {
    flex-wrap: wrap;
    max-height: 44px;
  }

  .hall-view .card-feature {
    -webkit-line-clamp: 1;
  }

  .hall-view .card-meta {
    display: none;
  }
}

/* Responsive welcome stage: keep the brand, character, value copy, and CTA collision-free. */
#welcome::before {
  left: 3.5vw;
  top: 5vh;
  width: min(390px, 35vw);
  height: 150px;
}

#welcome .welcome-stage {
  position: absolute;
  z-index: 4;
  inset: clamp(42px, 5vh, 72px) 0 clamp(92px, 12vh, 150px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 0;
  box-sizing: border-box;
  pointer-events: none;
}

#welcome .welcome-character-img {
  position: relative;
  z-index: 2;
  left: auto;
  top: auto;
  flex: 0 1 auto;
  width: auto;
  height: min(52vh, 700px);
  max-width: min(520px, 48vw);
  max-height: 62%;
  object-fit: contain;
  opacity: 1;
  visibility: visible;
  transform: none;
  animation: welcomeStageCharacterIntro 1s cubic-bezier(.16,.84,.25,1) .12s both;
  pointer-events: none;
}

#welcome .welcome-copy {
  position: relative;
  z-index: 4;
  left: auto;
  bottom: auto;
  flex: 0 0 auto;
  width: min(760px, 86vw);
  margin-top: clamp(-30px, -2.5vh, -14px);
  color: #4a372f;
  text-align: center;
  transform: none;
  animation: welcomeStageCopyIntro .72s ease .18s both;
  pointer-events: none;
}

#welcome .welcome-kicker,
#welcome .welcome-proof {
  margin: 0;
}

#welcome .welcome-kicker {
  color: #9c7959;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.35;
}

#welcome .welcome-offering {
  margin: 4px 0 0;
  font-size: 48px;
  font-weight: 900;
  line-height: 1.08;
}

#welcome .welcome-proof {
  margin-top: 7px;
  color: #80685d;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.4;
}

#welcome .welcome-title {
  position: relative;
  z-index: 4;
  left: auto;
  bottom: auto;
  flex: 0 0 auto;
  width: min(650px, 62vw);
  min-width: 0;
  height: 90px;
  margin-top: 14px;
  padding: 0;
  border-width: 4px;
  box-shadow: 0 6px 0 #fff, 0 14px 26px rgba(80, 59, 48, .12);
  font-size: 46px;
  opacity: 1;
  visibility: visible;
  transform: none;
  animation:
    welcomeStageTitleIntro .72s cubic-bezier(.2,1.1,.3,1) .1s both,
    welcomeBreath 2.8s ease-in-out .9s infinite;
  pointer-events: auto;
}

#welcome .welcome-title:hover {
  transform: scale(1.025);
  box-shadow: 0 6px 0 #fff, 0 16px 28px rgba(80, 59, 48, .16);
}

#welcome .welcome-title:active {
  transform: scale(.98);
}

html.app-init-error #welcome .welcome-character-img,
html.app-init-error #welcome .welcome-copy,
html.app-init-error #welcome .welcome-title {
  opacity: 1 !important;
  visibility: visible !important;
  animation: none !important;
  transform: none !important;
}

@keyframes welcomeStageCharacterIntro {
  from { opacity: 1; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes welcomeStageCopyIntro {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes welcomeStageTitleIntro {
  from { opacity: 1; transform: translateY(12px) scale(.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (min-width: 901px) and (max-width: 1200px) {
  #welcome::before {
    left: 28px;
    top: 28px;
    width: 260px;
    height: 110px;
  }

  #welcome .welcome-offering {
    font-size: 42px;
  }

  #welcome .welcome-title {
    height: 80px;
    font-size: 40px;
  }
}

@media (max-width: 900px) {
  #welcome::before {
    left: 18px;
    top: 18px;
    width: 190px;
    height: 80px;
  }

  #welcome .welcome-stage {
    inset: 96px 0 max(62px, 8vh);
  }

  #welcome .welcome-character-img {
    height: min(46vh, 560px);
    max-width: min(450px, 78vw);
    max-height: 62%;
  }

  #welcome .welcome-copy {
    width: 90vw;
    margin-top: -18px;
  }

  #welcome .welcome-kicker {
    font-size: 16px;
  }

  #welcome .welcome-offering {
    font-size: 36px;
  }

  #welcome .welcome-proof {
    font-size: 15px;
  }

  #welcome .welcome-title {
    width: 86vw;
    height: 72px;
    margin-top: 12px;
    font-size: 34px;
  }
}

@media (max-width: 480px) and (orientation: portrait) {
  #welcome::before {
    left: 14px;
    top: 12px;
    width: 150px;
    height: 66px;
  }

  #welcome .welcome-stage {
    inset: 82px 0 52px;
  }

  #welcome .welcome-character-img {
    height: min(42vh, 380px);
    max-width: 82vw;
    max-height: 64%;
  }

  #welcome .welcome-copy {
    width: 92vw;
    margin-top: -12px;
  }

  #welcome .welcome-kicker {
    font-size: 14px;
  }

  #welcome .welcome-offering {
    font-size: 30px;
  }

  #welcome .welcome-proof {
    font-size: 13px;
  }

  #welcome .welcome-title {
    width: 88vw;
    height: 60px;
    margin-top: 8px;
    border-width: 3px;
    font-size: 30px;
  }
}

@media (max-width: 900px) and (max-height: 560px) and (orientation: landscape) {
  #welcome::before {
    left: 12px;
    top: 10px;
    width: 150px;
    height: 60px;
  }

  #welcome .welcome-stage {
    inset: 10px 12px 70px clamp(150px, 22vw, 190px);
    display: grid;
    grid-template-columns: minmax(105px, .65fr) minmax(220px, 1.35fr);
    grid-template-rows: 1fr auto;
    gap: 8px 12px;
  }

  #welcome .welcome-character-img {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    height: min(75vh, 310px);
    max-width: 100%;
    max-height: 92%;
  }

  #welcome .welcome-copy {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    width: 100%;
    margin: 0;
  }

  #welcome .welcome-kicker {
    font-size: 13px;
  }

  #welcome .welcome-offering {
    font-size: 30px;
  }

  #welcome .welcome-proof {
    font-size: 13px;
  }

  #welcome .welcome-title {
    grid-column: 2;
    grid-row: 2;
    width: min(460px, 100%);
    height: 56px;
    margin: 0;
    border-width: 3px;
    font-size: 28px;
  }
}

/* Trial-hall filters step down cleanly without clipping labels. */
.hall-view .filters {
  align-items: center;
}

.hall-view .filters select {
  overflow: visible;
  font-size: 15px;
  text-overflow: clip;
}

@media (max-width: 700px) {
  .hall-view .filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 430px) {
  .hall-view .filters {
    grid-template-columns: 1fr;
  }
}

/* Ultra-wide and zoomed-out desktops: keep four cards readable and use the viewport. */
@media (min-width: 1800px) {
  .hall-view .hall-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
  }

  .hall-view .hall-card {
    min-height: 620px;
    padding: 18px;
  }

  .hall-view .filters {
    grid-template-columns: 150px repeat(3, minmax(210px, 260px));
    gap: 12px;
    padding: 10px;
  }

  .hall-view .filters select,
  .hall-view .filters button {
    height: 46px;
    font-size: 16px;
  }

  .hall-view .hall-card .hall-paged-grid {
    grid-template-columns: repeat(var(--hall-cols, 1), minmax(0, 370px));
    gap: 18px;
  }

  .hall-view .companion-card {
    grid-template-rows: 300px 1fr;
  }

  .hall-view .card-img {
    height: 300px;
  }

  .hall-view .card-info {
    padding: 15px 16px 16px;
  }

  .hall-view .card-info h3 {
    font-size: 22px;
  }

  .hall-view .card-skill,
  .hall-view .card-price-line,
  .hall-view .card-meta {
    font-size: 14px;
  }

  .hall-view .card-price-line .price {
    font-size: 24px;
  }

  .hall-view .category-panel {
    padding: 19px 17px;
  }

  .hall-view .category-panel h3 {
    font-size: 21px;
  }

  .hall-view .category {
    min-height: 38px;
    font-size: 16px;
  }
}

@media (min-width: 1800px) and (min-height: 1000px) {
  .hall-view .hall-card {
    min-height: clamp(680px, 62vh, 850px);
  }

  .hall-view .hall-card .hall-paged-grid {
    grid-auto-rows: clamp(560px, 52vh, 650px);
  }

  .hall-view .companion-card {
    height: 100%;
    grid-template-rows: clamp(330px, 30vh, 390px) minmax(0, 1fr);
  }

  .hall-view .card-img {
    height: clamp(330px, 30vh, 390px);
  }

  .hall-view .hall-footer {
    min-height: 140px;
    margin-top: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #welcome .welcome-character-img,
  #welcome .welcome-copy,
  #welcome .welcome-title {
    opacity: 1 !important;
    visibility: visible !important;
    animation: none !important;
    transform: none !important;
  }
}
