:root {
  color-scheme: light;
  --page-bg: linear-gradient(135deg, #FFF8EC 0%, #FFF2D8 48%, #EAF7EF 100%);
  --panel-bg: rgba(255, 253, 247, 0.92);
  --panel-border: #F2DEC0;
  --page: #fff7e8;
  --stage: #fffdf6;
  --ink: #332a22;
  --muted: #75685d;
  --line: rgba(232, 214, 188, 0.92);
  --orange: #f49b35;
  --orange-deep: #d96f18;
  --green: #46ad73;
  --green-deep: #2f8757;
  --green-soft: #eaf8ed;
  --cream: #fff8e8;
  --shadow: 0 18px 50px rgba(139, 94, 52, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

button {
  border: 0;
}

.entry-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
}

.entry-stage-shell {
  position: relative;
  width: 1200px;
  height: 900px;
}

.entry-stage {
  width: 1200px;
  height: 900px;
  overflow: hidden;
  border: 1px solid var(--panel-border);
  border-radius: 24px;
  background: var(--panel-bg);
  box-shadow: var(--shadow);
  transform-origin: top left;
}

.brand-kicker {
  margin: 0 0 10px;
  color: var(--orange-deep);
  font-size: 18px;
  line-height: 1.2;
  font-weight: 900;
}

.login-stage {
  display: grid;
  grid-template-columns: 48% 52%;
  background:
    radial-gradient(circle at 22% 18%, rgba(255, 224, 153, 0.4), transparent 30%),
    var(--panel-bg);
}

.login-hero {
  display: grid;
  place-items: center;
  padding: 58px 34px 58px 56px;
}

.login-hero img {
  width: min(100%, 430px);
  height: auto;
  display: block;
  filter: drop-shadow(0 18px 24px rgba(139, 92, 38, 0.16));
}

.login-panel {
  display: grid;
  align-content: center;
  gap: 48px;
  padding: 48px 50px 48px 20px;
}

.login-copy h1 {
  margin: 0;
  color: var(--green);
  font-size: 72px;
  line-height: 1.04;
  letter-spacing: 0;
}

.login-copy h1 .highlight {
  color: var(--orange-deep);
}

.login-subtitle {
  margin: 18px 0 0;
  color: #4e4137;
  font-size: 28px;
  line-height: 1.35;
  font-weight: 800;
}

.login-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 24px;
}

.fact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 6px 0;
}

.fact-icon {
  font-size: 24px;
  line-height: 1;
  flex: 0 0 auto;
}

.fact-text {
  color: #594b40;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.3;
}

.phone-card {
  display: grid;
  gap: 16px;
  width: min(100%, 480px);
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 253, 246, 0.96);
  box-shadow: 0 12px 30px rgba(116, 78, 34, 0.1);
}

.phone-card h2 {
  margin: 0;
  color: var(--orange-deep);
  font-size: 30px;
  line-height: 1.2;
}

.phone-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.45;
  font-weight: 800;
}

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

.phone-field span {
  color: #5b4b3f;
  font-size: 15px;
  font-weight: 900;
}

.phone-field input {
  width: 100%;
  height: 54px;
  border: 1px solid rgba(232, 214, 188, 0.98);
  border-radius: 15px;
  padding: 0 16px;
  background: #fffaf0;
  color: var(--ink);
  font-size: 18px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.phone-field input::placeholder {
  color: #8d7764;
  opacity: 1;
}

.phone-field input:focus {
  border-color: rgba(70, 173, 115, 0.84);
  background: #fffdf6;
  box-shadow: 0 0 0 4px rgba(70, 173, 115, 0.13);
}

.phone-field input.is-invalid {
  border-color: rgba(214, 107, 96, 0.58);
  background: #fff8f5;
}

.phone-field input.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(214, 107, 96, 0.12);
}

.form-message {
  min-height: 20px;
  color: #c9786e;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 900;
}

.primary-button {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 13px 28px;
  background: linear-gradient(180deg, #69c58b, var(--green));
  color: #fff;
  box-shadow: 0 8px 0 var(--green-deep), 0 14px 28px rgba(47, 135, 87, 0.18);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.primary-button .button-spinner {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  border: 2px solid rgba(255, 255, 255, 0.58);
  border-top-color: #fff;
  border-radius: 999px;
  animation: button-spin 820ms linear infinite;
}

@keyframes button-spin {
  to {
    transform: rotate(360deg);
  }
}

.primary-button:hover,
.logout-button:hover,
.entry-theme-card:hover,
.entry-scene-type:hover,
.carousel-arrow:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.primary-button:active,
.logout-button:active,
.entry-theme-card:active,
.entry-scene-type:active,
.carousel-arrow:active {
  transform: translateY(1px);
}

.primary-button:disabled,
.carousel-arrow:disabled {
  cursor: default;
  filter: saturate(0.7);
  opacity: 0.48;
  transform: none;
}

.primary-button:disabled {
  background: linear-gradient(180deg, #b8d7c3, #99bea9);
  box-shadow: 0 6px 0 #7da08c, 0 10px 22px rgba(75, 96, 84, 0.12);
}

.select-stage {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 12px;
  padding: 26px 46px 30px;
  background:
    radial-gradient(circle at 50% 20%, rgba(255, 237, 204, 0.35), transparent 50%),
    var(--panel-bg);
}

.logout-button {
  position: absolute;
  top: 26px;
  right: 48px;
  z-index: 10;
  min-width: 76px;
  min-height: 34px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffad49, var(--orange));
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 4px 0 #d8791f, 0 9px 16px rgba(216, 111, 24, 0.16);
  transition: transform 150ms ease, filter 150ms ease;
}

.theme-section,
.scene-type-section {
  display: grid;
  gap: 14px;
}

.theme-section {
  gap: 18px;
}

.scene-type-section {
  gap: 10px;
  margin-top: 8px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
}

.step-badge {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffb84d, #f28a22);
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 4px 10px rgba(242, 138, 34, 0.25);
}

.section-heading-text h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 900;
  color: #5a3a1e;
}

.entry-theme-grid {
  display: grid;
  grid-template-columns: repeat(5, 160px);
  justify-content: center;
  gap: 18px;
}

.entry-theme-card {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  aspect-ratio: 1;
  border: 1px solid rgba(232, 214, 188, 0.86);
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 253, 246, 0.72);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(116, 78, 34, 0.06);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.entry-theme-card.is-active {
  border-color: rgba(70, 173, 115, 0.86);
  background: var(--green-soft);
  box-shadow: inset 0 0 0 2px rgba(70, 173, 115, 0.22), 0 10px 22px rgba(70, 173, 115, 0.12);
  transform: scale(1.07);
  z-index: 4;
}

.entry-theme-card.is-active:hover {
  transform: scale(1.07) translateY(-2px);
}

.entry-theme-card.is-active::after {
  content: "✓";
  position: absolute;
  top: 9px;
  right: 9px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.entry-theme-card img {
  width: 68px;
  height: 68px;
  display: block;
  object-fit: contain;
}

.entry-theme-card strong {
  color: #4c4037;
  font-size: 20px;
  line-height: 1.15;
}

.entry-scene-types {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.entry-scene-type {
  min-width: 156px;
  min-height: 50px;
  border: 1px solid rgba(232, 214, 188, 0.96);
  border-radius: 15px;
  background: var(--cream);
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(116, 78, 34, 0.06);
  transition: transform 150ms ease, background 150ms ease, color 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}

.entry-scene-type.is-active {
  border-color: transparent;
  background: linear-gradient(180deg, #68c58b, var(--green));
  color: #fff;
  box-shadow: 0 8px 16px rgba(70, 173, 115, 0.22);
}

.carousel-section {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto auto;
  gap: 10px;
  padding-top: 0;
}

.scene-carousel {
  position: relative;
  min-height: 390px;
}

.scene-track {
  position: absolute;
  inset: 0 70px 0;
  overflow: hidden;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}

.scene-track.is-dragging {
  cursor: grabbing;
}

.scene-card {
  position: absolute;
  top: 50%;
  left: 50%;
  width: var(--card-width);
  height: var(--card-height);
  overflow: hidden;
  border: 1px solid rgba(232, 214, 188, 0.9);
  border-radius: 18px;
  background: #f8ead7;
  box-shadow: 0 14px 30px rgba(116, 78, 34, 0.14);
  opacity: var(--card-opacity);
  transform: translate(-50%, -50%) translateX(calc(var(--x) + var(--drag-x, 0px)));
  transition:
    transform 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    width 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    height 220ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 180ms ease;
  pointer-events: none;
}

.scene-track.is-dragging .scene-card {
  transition-duration: 0ms;
}

.scene-card.is-current {
  box-shadow: 0 18px 36px rgba(116, 78, 34, 0.18);
}

.scene-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.scene-card-title {
  position: absolute;
  left: 50%;
  top: 50%;
  max-width: calc(100% - 28px);
  min-width: 430px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  padding: 14px 30px 17px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.96), rgba(255, 242, 211, 0.86));
  box-shadow: 0 16px 34px rgba(95, 59, 24, 0.18), inset 0 -5px 0 rgba(244, 180, 67, 0.2);
  font-size: 62px;
  font-weight: 900;
  line-height: 1.02;
  text-align: center;
  text-shadow: 0 4px 0 rgba(255, 255, 255, 0.96), 0 12px 18px rgba(80, 51, 21, 0.2);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  pointer-events: none;
}

.scene-card-title::after {
  content: "";
  position: absolute;
  left: 15%;
  right: 15%;
  bottom: -9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(223, 132, 46, 0.42);
  filter: blur(0.2px);
}

.scene-card:not(.is-current) .scene-card-title {
  min-width: 130px;
  max-width: calc(100% - 22px);
  padding: 7px 10px 8px;
  border-width: 2px;
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 253, 246, 0.92), rgba(255, 242, 211, 0.78));
  box-shadow: 0 8px 16px rgba(80, 51, 21, 0.12), inset 0 -3px 0 rgba(244, 180, 67, 0.16);
  font-size: 20px;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.94), 0 7px 10px rgba(80, 51, 21, 0.14);
}

.scene-card.is-current .scene-card-title.is-title-long {
  font-size: 56px;
}

.scene-card.is-current .scene-card-title.is-title-extra-long {
  font-size: 52px;
}

.scene-card:not(.is-current) .scene-card-title.is-title-long {
  font-size: 16px;
}

.scene-card:not(.is-current) .scene-card-title.is-title-extra-long {
  font-size: 14px;
}

.scene-card:not(.is-current) .scene-card-title::after {
  bottom: -5px;
  height: 5px;
}

.scene-title-char {
  display: inline-block;
  -webkit-text-stroke: 0;
  filter: drop-shadow(0 2px 0 rgba(255, 255, 255, 0.92));
}

.scene-title-char.color-0 {
  color: #d65332;
}

.scene-title-char.color-1 {
  color: #f0892c;
}

.scene-title-char.color-2 {
  color: #e7a620;
}

.scene-title-char.color-3 {
  color: #4d9c59;
}

.carousel-arrow {
  position: absolute;
  top: 44%;
  z-index: 8;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #fffdf6;
  color: #d86b1f;
  cursor: pointer;
  font-size: 36px;
  line-height: 1;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(116, 78, 34, 0.12);
  transition: transform 150ms ease, filter 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.carousel-arrow:hover {
  background: #fff6e8;
  box-shadow: 0 10px 20px rgba(116, 78, 34, 0.14);
}

.carousel-arrow:active {
  background: #ffefd8;
}

.carousel-arrow-left {
  left: 2px;
}

.carousel-arrow-right {
  right: 2px;
}

.empty-carousel {
  align-self: center;
  justify-self: center;
  margin: 0;
  padding: 18px 24px;
  border: 1px dashed rgba(244, 155, 53, 0.55);
  border-radius: 16px;
  background: #fff9ee;
  color: var(--muted);
  font-size: 17px;
  font-weight: 900;
}

.start-button {
  justify-self: center;
  min-width: 210px;
}

/* Scene card access labels */
.scene-access-label {
  position: absolute;
  top: 6px;
  right: 8px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.6;
  z-index: 10;
  pointer-events: none;
}

.scene-access-label.access-trial {
  background: rgba(255, 193, 7, 0.88);
  color: #5d4037;
}

.scene-access-label.access-locked {
  background: rgba(158, 158, 158, 0.82);
  color: #fff;
}
