@import url("https://fonts.googleapis.com/css2?family=Prompt:wght@300;400;500;600;700&display=swap");

:root {
  --bg: #f7efe6;
  --bg-soft: #fbf7f1;
  --panel: rgba(255, 253, 248, 0.94);
  --panel-strong: #fffdf8;
  --ink: #211a22;
  --muted: #6f6471;
  --line: #e8ddd1;
  --accent: #a96035;
  --accent-strong: #7a3f23;
  --teal: #006f73;
  --rose: #b24763;
  --gold: #c68a2b;
  --danger: #b43d4c;
  --success: #247554;
  --shadow: 0 18px 54px rgba(66, 43, 28, 0.14);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  padding: 32px 18px;
  color: var(--ink);
  font-family: "Prompt", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.92), rgba(238, 248, 246, 0.82)),
    repeating-linear-gradient(90deg, rgba(198, 138, 43, 0.08) 0 1px, transparent 1px 88px),
    var(--bg);
}

body.app-page {
  align-items: flex-start;
}

a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}

a:hover {
  color: var(--teal);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.15;
}

h2 {
  margin-bottom: 10px;
  font-size: 1.45rem;
  line-height: 1.25;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
  line-height: 1.35;
}

p {
  color: var(--muted);
  line-height: 1.8;
}

hr {
  width: 100%;
  border: 0;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

label {
  display: block;
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 600;
}

input,
select,
textarea {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 48px;
  margin-bottom: 18px;
  padding: 12px 14px;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

textarea {
  min-height: 104px;
  resize: vertical;
}

input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
}

.date-input-shell {
  position: relative;
  margin-bottom: 18px;
}

.date-input-shell input {
  margin-bottom: 0;
}

.date-input-shell input.is-empty {
  color: transparent;
}

.date-input-placeholder {
  position: absolute;
  top: 50%;
  left: 14px;
  max-width: calc(100% - 56px);
  color: var(--ink);
  line-height: 1.4;
  pointer-events: none;
  transform: translateY(-50%);
}

.date-input-shell:not(.is-empty) .date-input-placeholder,
.date-input-shell:focus-within:not(.is-empty) .date-input-placeholder {
  display: none;
}

.date-input-shell.is-disabled .date-input-placeholder {
  color: var(--muted);
}

input::placeholder,
textarea::placeholder {
  color: #9a909c;
}

input:disabled,
select:disabled,
textarea:disabled {
  color: var(--muted);
  background: #fff7ed;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 111, 115, 0.12);
}

button,
.btn {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  color: #fff;
  font: inherit;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  background: var(--accent-strong);
  border: 1px solid var(--accent-strong);
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}

button:hover,
.btn:hover {
  color: #fff;
  background: #65321b;
  box-shadow: 0 12px 26px rgba(122, 63, 35, 0.18);
  transform: translateY(-1px);
}

button:disabled,
.btn[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
  box-shadow: none;
}

.btn.secondary,
button.secondary {
  color: var(--accent-strong);
  background: #fff7ed;
  border-color: #e7c7a2;
}

.btn.secondary:hover,
button.secondary:hover {
  color: var(--ink);
  background: #ffefd8;
}

.btn.ghost,
button.ghost {
  color: var(--ink);
  background: transparent;
  border-color: var(--line);
}

.btn.ghost:hover,
button.ghost:hover {
  color: var(--teal);
  background: rgba(0, 111, 115, 0.07);
}

.btn.danger,
button.danger {
  background: var(--danger);
  border-color: var(--danger);
}

.center {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.container,
.card,
.fortune-card,
.mini-card,
.reading-card,
.admin-panel {
  background: var(--panel);
  border: 1px solid rgba(232, 221, 209, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.container {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 40px);
}

.container.wide,
.daily-container {
  width: min(1080px, 100%);
}

.container.compact,
.card.login-card {
  width: min(480px, 100%);
}

.card {
  padding: clamp(22px, 4vw, 34px);
}

.site-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.home-shell {
  min-height: calc(100vh - 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 28px;
  align-items: center;
}

.home-copy {
  padding: clamp(10px, 3vw, 24px) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--teal);
  font-size: 0.92rem;
  font-weight: 700;
}

.lead {
  max-width: 620px;
  margin-bottom: 26px;
  color: #564b58;
  font-size: 1.08rem;
}

.home-actions,
.button-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.home-visual {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  padding: 24px;
  color: #fffdf8;
  background:
    linear-gradient(150deg, rgba(33, 26, 34, 0.96), rgba(88, 55, 42, 0.9)),
    #211a22;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.home-visual::before {
  content: "";
  position: absolute;
  inset: 16px;
  border: 1px solid rgba(255, 253, 248, 0.18);
  border-radius: var(--radius);
  pointer-events: none;
}

.tarot-preview {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 26px;
}

.brand-mark,
.logo {
  font-size: 3.2rem;
  line-height: 1;
}

.logo {
  margin-bottom: 12px;
  text-align: center;
}

.preview-card-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}

.preview-card {
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  color: #ffe1b4;
  font-size: 2.6rem;
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.1), rgba(255, 253, 248, 0.02)),
    #2a202b;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: var(--radius);
}

.preview-card:nth-child(2) {
  min-height: 310px;
  color: #9ae3de;
}

.preview-note {
  margin: 0;
  color: rgba(255, 253, 248, 0.78);
}

.subtitle {
  margin-bottom: 28px;
  color: var(--muted);
  text-align: center;
}

body.login-page {
  min-height: 100vh;
  padding: 32px 18px;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(135deg, rgba(255, 250, 242, 0.94), rgba(255, 247, 237, 0.9)),
    repeating-linear-gradient(90deg, rgba(198, 138, 43, 0.08) 0 1px, transparent 1px 88px),
    var(--bg);
}

body.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 16% 20%, rgba(169, 96, 53, 0.13) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 18%, rgba(198, 138, 43, 0.16) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 76%, rgba(178, 71, 99, 0.09) 0 1px, transparent 2px);
  background-size: 170px 170px, 230px 230px, 210px 210px;
  opacity: 0.8;
  pointer-events: none;
}

.login-stage {
  position: relative;
  min-height: calc(100vh - 64px);
  width: min(1160px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(360px, 460px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  margin: 0 auto;
  padding: 0;
}

.login-scene {
  position: relative;
  min-height: min(650px, 82vh);
  overflow: hidden;
  border: 1px solid rgba(232, 221, 209, 0.9);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.96), rgba(255, 247, 237, 0.9)),
    radial-gradient(ellipse at 34% 86%, rgba(198, 138, 43, 0.18), transparent 48%);
  box-shadow: var(--shadow), inset 0 0 70px rgba(169, 96, 53, 0.08);
}

.login-card-check {
  position: absolute;
  z-index: 3;
  top: 18px;
  right: 18px;
  width: auto;
  min-height: 38px;
  padding: 8px 14px;
  color: var(--accent-strong);
  font-size: 0.88rem;
  background: rgba(255, 253, 248, 0.9);
  border-color: #e7c7a2;
  box-shadow: 0 10px 24px rgba(66, 43, 28, 0.08);
}

.login-card-check:hover {
  color: var(--ink);
  background: #fff7ed;
  box-shadow: 0 12px 24px rgba(66, 43, 28, 0.12);
}

.login-card-check.is-loading {
  min-width: 136px;
  display: grid;
  gap: 5px;
  padding-bottom: 7px;
}

.login-card-check.is-loading::after {
  content: "";
  width: 100%;
  height: 5px;
  display: block;
  overflow: hidden;
  background:
    linear-gradient(90deg, transparent, var(--gold), var(--teal), transparent) 0 0 / 55% 100% no-repeat,
    #f1dfc7;
  border-radius: 999px;
  animation: buttonProgress 1.05s ease-in-out infinite;
}

.stage-lamp {
  position: absolute;
  top: 0;
  left: 24%;
  width: 112px;
  height: 130px;
  transform: translateX(-50%);
}

.stage-lamp::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 5px;
  height: 82px;
  background: linear-gradient(#7a3f23, #c68a2b);
  transform: translateX(-50%);
}

.stage-lamp span {
  position: absolute;
  right: 10px;
  bottom: 0;
  left: 10px;
  height: 52px;
  background: linear-gradient(180deg, #7a3f23, #4e2a1a);
  border: 1px solid rgba(233, 198, 128, 0.5);
  border-bottom: 6px solid #e9c680;
  border-radius: 46% 46% 10px 10px;
  box-shadow: 0 8px 24px rgba(198, 138, 43, 0.34);
  clip-path: polygon(26% 0, 74% 0, 100% 100%, 0 100%);
}

.spotlight {
  position: absolute;
  top: 116px;
  left: 24%;
  width: min(460px, 78%);
  height: 76%;
  transform: translateX(-50%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, rgba(233, 198, 128, 0.42), rgba(198, 138, 43, 0.16) 44%, rgba(198, 138, 43, 0));
  filter: blur(0.2px);
  opacity: 0.88;
  animation: spotlightPulse 4.8s ease-in-out infinite;
}

.spotlight-tarot-card {
  position: absolute;
  left: 24%;
  bottom: 98px;
  width: min(180px, 36%);
  min-height: 0;
  aspect-ratio: 2 / 3;
  display: block;
  overflow: hidden;
  padding: 0;
  background: #120d15;
  border: 1px solid rgba(255, 228, 178, 0.6);
  border-radius: var(--radius);
  box-shadow: 0 0 28px rgba(198, 138, 43, 0.34), 0 24px 64px rgba(66, 43, 28, 0.2);
  cursor: pointer;
  transform: translateX(-50%);
  animation: tarotFloat 4.2s ease-in-out infinite;
}

.spotlight-tarot-card:hover,
.spotlight-tarot-card:focus-visible {
  background: #120d15;
  border-color: rgba(233, 198, 128, 0.9);
  box-shadow: 0 0 34px rgba(198, 138, 43, 0.48), 0 24px 64px rgba(66, 43, 28, 0.22);
}

.spotlight-tarot-card:disabled {
  cursor: wait;
  opacity: 0.82;
}

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

.login-card-insight {
  position: absolute;
  right: 24px;
  bottom: 24px;
  left: 24px;
  min-height: 52px;
  margin: 0;
  padding: 12px 14px;
  color: #3f3542;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.65;
  text-align: center;
  background: rgba(255, 253, 248, 0.86);
  border: 1px solid rgba(232, 221, 209, 0.92);
  border-radius: var(--radius);
  box-shadow: 0 14px 36px rgba(66, 43, 28, 0.1);
}

.login-card-insight.is-limited {
  color: var(--accent-strong);
  background: rgba(255, 247, 237, 0.9);
  border-color: #e7c7a2;
}

.constellation {
  position: absolute;
  width: 5px;
  height: 5px;
  background: #f8d48b;
  border-radius: 50%;
  box-shadow: 0 0 16px rgba(248, 212, 139, 0.85);
}

.constellation.one {
  top: 18%;
  right: 22%;
}

.constellation.two {
  top: 36%;
  right: 44%;
  background: #b24763;
}

.constellation.three {
  right: 15%;
  bottom: 22%;
}

.cinematic-login {
  position: relative;
  z-index: 1;
  padding: clamp(22px, 3vw, 32px);
  color: var(--ink);
  background: var(--panel);
  border-color: rgba(232, 221, 209, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.cinematic-login h1 {
  margin-bottom: 6px;
  color: var(--ink);
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  letter-spacing: 0;
}

.cinematic-login .subtitle,
.cinematic-login .mb-20 {
  color: var(--muted);
}

.cinematic-login .subtitle {
  margin-bottom: 18px;
}

.login-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 10px;
  border: 2px solid rgba(233, 198, 128, 0.8);
  border-radius: 50%;
  background:
    linear-gradient(135deg, transparent 43%, rgba(233, 198, 128, 0.9) 44% 51%, transparent 52%),
    radial-gradient(circle at 62% 38%, #f5cf79 0 7px, transparent 8px),
    radial-gradient(circle at 42% 56%, rgba(198, 138, 43, 0.52), transparent 16px),
    #2a202b;
  box-shadow: 0 0 28px rgba(198, 138, 43, 0.24);
}

.cinematic-login label {
  color: var(--ink);
}

.cinematic-login input {
  min-height: 44px;
  margin-bottom: 12px;
  color: var(--ink);
  background: #ffffff;
  border-color: var(--line);
}

.cinematic-login input::placeholder {
  color: #9a909c;
}

.cinematic-login input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(198, 138, 43, 0.14);
}

.password-field {
  position: relative;
  margin-bottom: 12px;
}

.password-field input {
  margin-bottom: 0;
  padding-right: 52px;
}

.cinematic-login .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
  transform: translateY(-50%);
}

.cinematic-login .password-toggle:hover {
  color: var(--accent-strong);
  background: rgba(198, 138, 43, 0.1);
  box-shadow: none;
  transform: translateY(-50%);
}

.password-toggle::before {
  content: "";
  width: 22px;
  height: 14px;
  display: block;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.password-toggle::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  background: currentColor;
  border-radius: 50%;
}

.password-toggle.is-visible::after {
  width: 18px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transform: rotate(-35deg);
}

.cinematic-login button {
  color: #ffffff;
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: none;
}

.cinematic-login button:hover {
  color: #ffffff;
  background: #65321b;
}

.cinematic-login .btn.secondary {
  color: var(--accent-strong);
  background: #fff7ed;
  border-color: #e7c7a2;
}

.cinematic-login .auth-links {
  margin: -4px 0 14px;
}

.cinematic-login .mb-20 {
  margin-bottom: 12px;
}

.cinematic-login .btn.secondary:hover {
  color: var(--ink);
  background: #ffefd8;
}

.cinematic-login a {
  color: var(--accent-strong);
}

.cinematic-login hr {
  margin: 14px 0;
  border-top-color: var(--line);
}

.cinematic-login #msg {
  color: var(--accent-strong);
}

.cinematic-login #msg.error {
  color: var(--danger);
}

@keyframes spotlightPulse {
  0%,
  100% {
    opacity: 0.72;
  }

  50% {
    opacity: 0.96;
  }
}

@keyframes tarotFloat {
  0%,
  100% {
    transform: translate(-50%, 0) rotate(-2deg);
  }

  50% {
    transform: translate(-50%, -12px) rotate(2deg);
  }
}

.auth-links {
  display: flex;
  justify-content: flex-end;
  margin: -8px 0 18px;
  font-size: 0.95rem;
}

.helper-text {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: left;
}

.booking-rule {
  min-height: 24px;
  margin: -4px 0 14px;
  color: var(--accent-strong);
  font-weight: 600;
}

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

.mb-20 {
  margin-bottom: 20px;
}

.mt-20 {
  margin-top: 20px;
}

.hidden {
  display: none !important;
}

.status,
#msg,
#adminMsg,
#dailyStatus,
#profileMsg,
#callMsg,
#sheetConfigMsg {
  min-height: 28px;
  margin: 12px 0 0;
  color: var(--teal);
  font-weight: 600;
  text-align: center;
}

.is-loading {
  display: grid;
  gap: 8px;
}

.progress-label {
  display: block;
}

.progress-track {
  position: relative;
  width: min(280px, 100%);
  height: 8px;
  display: block;
  overflow: hidden;
  margin: 0 auto;
  background: #f1dfc7;
  border: 1px solid #e7c7a2;
  border-radius: 999px;
}

.progress-fill {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 46%;
  background: linear-gradient(90deg, var(--accent), var(--gold), var(--teal));
  border-radius: inherit;
  animation: progressSweep 1.16s ease-in-out infinite;
}

.loading-state {
  display: grid;
  gap: 10px;
}

.status.error,
#msg.error,
#adminMsg.error,
#dailyStatus.error,
#profileMsg.error,
#callMsg.error,
#sheetConfigMsg.error {
  color: var(--danger);
}

@keyframes progressSweep {
  0% {
    transform: translateX(-120%);
  }

  55% {
    transform: translateX(90%);
  }

  100% {
    transform: translateX(230%);
  }
}

@keyframes buttonProgress {
  0% {
    background-position: -70% 0, 0 0;
  }

  100% {
    background-position: 170% 0, 0 0;
  }
}

.alert {
  padding: 14px 16px;
  color: #7c1f2a;
  background: #fff0f2;
  border: 1px solid #f2bcc5;
  border-radius: var(--radius);
}

.app-header,
.daily-header,
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 24px;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-title .brand-mark,
.app-title .logo {
  margin: 0;
  font-size: 2.5rem;
}

.app-title p,
.page-header p,
.daily-header p {
  margin: 0;
}

.app-header > .btn,
.page-header > .btn {
  width: auto;
  min-width: 148px;
}

.profile {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 28px;
  padding: 18px;
  background: #fff7ed;
  border: 1px solid #ead4bd;
  border-radius: var(--radius);
}

.profile h2 {
  margin-bottom: 4px;
}

.profile p {
  margin: 0;
}

.badge,
.zodiac-badge {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 14px;
  color: #3d2d11;
  font-weight: 700;
  background: #f6d28c;
  border: 1px solid #e1b567;
  border-radius: var(--radius);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 26px;
}

.menu-card {
  min-height: 136px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  color: var(--ink);
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 24px rgba(66, 43, 28, 0.08);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.menu-card:hover {
  color: var(--ink);
  border-color: rgba(0, 111, 115, 0.35);
  box-shadow: 0 14px 28px rgba(0, 111, 115, 0.12);
  transform: translateY(-2px);
}

.menu-icon {
  font-size: 2rem;
  line-height: 1;
}

.menu-card span {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
}

.menu-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.6;
}

#logout {
  grid-column: 1 / -1;
  margin-top: 0;
}

.daily-container {
  margin: 0 auto;
}

.daily-header {
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.daily-header h1 {
  margin-bottom: 4px;
}

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

.fortune-card {
  padding: 22px;
  margin-bottom: 14px;
}

.fortune-card h2 {
  color: var(--accent-strong);
}

.fortune-card p {
  margin: 0;
  color: #3f3542;
}

.fortune-card.warning {
  background: #fff7f8;
  border-color: #efc0c7;
}

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

.mini-card {
  padding: 22px;
  text-align: center;
}

.mini-card h3 {
  color: var(--teal);
}

.mini-card p {
  margin: 0;
  color: var(--ink);
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1.4;
}

.back-btn {
  display: inline-flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  color: var(--ink);
  font-weight: 700;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.back-btn:hover {
  color: var(--teal);
  background: rgba(0, 111, 115, 0.07);
}

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

.admin-grid > *,
.form-grid > * {
  min-width: 0;
}

.admin-grid .full,
.form-grid .full {
  grid-column: 1 / -1;
}

.account-toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: end;
}

.account-toolbar input {
  margin-bottom: 0;
}

.account-toolbar button {
  width: auto;
  min-width: 150px;
}

.account-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.account-card {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 320px);
  gap: 14px;
  align-items: center;
  padding: 16px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.account-card h3 {
  margin-bottom: 2px;
}

.account-card p,
.account-card small {
  display: block;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.account-actions select,
.account-actions button {
  margin: 0;
}

.reading-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(0, 1.1fr);
  gap: 18px;
  align-items: start;
}

.reading-card {
  min-height: 220px;
  padding: 20px;
}

.draw-result {
  display: grid;
  gap: 12px;
}

.tarot-summary {
  padding: 16px;
  background: #fff7ed;
  border: 1px solid #ead4bd;
  border-radius: var(--radius);
}

.tarot-summary h3 {
  color: var(--accent-strong);
}

.tarot-summary p {
  margin: 0;
  color: #3f3542;
}

.tarot-card {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 18px;
  align-items: start;
  padding: 16px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.tarot-face {
  width: 108px;
  height: 162px;
  align-self: start;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffe4bb;
  font-size: 2rem;
  background: #2a202b;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 14px 28px rgba(42, 32, 43, 0.18);
}

.tarot-image-button {
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  display: block;
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
  cursor: zoom-in;
}

.tarot-image-button:hover {
  background: transparent;
  box-shadow: none;
  transform: none;
}

.tarot-image-button:focus-visible {
  outline: 3px solid rgba(0, 111, 115, 0.36);
  outline-offset: 3px;
}

.tarot-face img,
.tarot-image-button img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.tarot-image-viewer[hidden] {
  display: none;
}

.tarot-image-viewer {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(18, 13, 20, 0.72);
  backdrop-filter: blur(6px);
}

.tarot-image-modal {
  position: relative;
  width: min(360px, 92vw);
  display: grid;
  gap: 12px;
  padding: 18px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}

.tarot-image-modal img {
  width: 100%;
  aspect-ratio: 2 / 3;
  max-height: min(78vh, 760px);
  object-fit: contain;
  background: #18111b;
  border-radius: var(--radius);
}

.tarot-image-modal h3 {
  margin: 0;
  color: var(--ink);
  text-align: center;
}

.tarot-image-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 38px;
  min-height: 38px;
  padding: 0;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
}

.tarot-image-close::before,
.tarot-image-close::after {
  content: "";
  position: absolute;
  top: 18px;
  left: 10px;
  width: 16px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.tarot-image-close::before {
  transform: rotate(45deg);
}

.tarot-image-close::after {
  transform: rotate(-45deg);
}

.tarot-image-close:hover {
  background: #fff7ed;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.16);
  transform: none;
}

body.viewer-open {
  overflow: hidden;
}

.tarot-card h3 {
  margin-bottom: 2px;
}

.tarot-card .position {
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 0.88rem;
  font-weight: 700;
}

.payment-panel {
  margin-top: 18px;
  padding: 16px;
  background: #fff7ed;
  border: 1px solid #e7c7a2;
  border-radius: var(--radius);
}

.payment-panel p {
  margin-bottom: 12px;
}

.payment-qr {
  width: min(180px, 100%);
  aspect-ratio: 1;
  display: block;
  margin: 0 auto 14px;
  object-fit: contain;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.payment-warning {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 700;
  text-align: center;
}

.empty-state {
  padding: 18px;
  color: var(--muted);
  background: rgba(255, 253, 248, 0.76);
  border: 1px dashed #d7c7b6;
  border-radius: var(--radius);
  text-align: center;
}

.history-list {
  display: grid;
  gap: 12px;
}

.history-item {
  padding: 18px;
  background: #fffdf8;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.history-item time {
  display: block;
  margin-bottom: 8px;
  color: var(--teal);
  font-size: 0.9rem;
  font-weight: 700;
}

.history-item p {
  margin-bottom: 8px;
}

.profile-detail {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr);
  gap: 12px;
  margin-bottom: 20px;
}

.detail-box {
  min-width: 0;
  padding: 14px;
  background: #fff7ed;
  border: 1px solid #ead4bd;
  border-radius: var(--radius);
}

.detail-box span {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
}

.detail-box strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.35;
}

@media (max-width: 900px) {
  body {
    padding: 24px 14px;
  }

  body.login-page {
    padding: 24px 14px;
  }

  .login-stage {
    grid-template-columns: 1fr;
    gap: 22px;
    padding: 0;
  }

  .login-scene {
    min-height: 320px;
  }

  .stage-lamp,
  .spotlight,
  .spotlight-tarot-card {
    left: 50%;
  }

  .spotlight-tarot-card {
    bottom: 54px;
    width: 130px;
  }

  .login-card-insight {
    right: 18px;
    bottom: 16px;
    left: 18px;
    font-size: 0.86rem;
  }

  .home-shell,
  .reading-layout {
    grid-template-columns: 1fr;
  }

  .home-visual {
    min-height: 360px;
  }

  .menu-grid,
  .fortune-grid,
  .profile-detail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  body {
    padding: 16px 10px;
  }

  body.login-page {
    padding: 16px 10px;
  }

  .login-stage {
    padding: 0;
  }

  .login-scene {
    min-height: 250px;
  }

  .stage-lamp {
    width: 92px;
    height: 104px;
  }

  .stage-lamp span {
    height: 42px;
  }

  .spotlight {
    top: 94px;
    width: 82%;
  }

  .spotlight-tarot-card {
    bottom: 74px;
    width: 96px;
  }

  .container,
  .card,
  .daily-header,
  .fortune-card,
  .mini-card,
  .reading-card {
    padding: 18px;
  }

  .home-actions,
  .button-row,
  .menu-grid,
  .fortune-grid,
  .mini-grid,
  .admin-grid,
  .form-grid,
  .profile,
  .profile-detail,
  .account-toolbar,
  .account-card {
    grid-template-columns: 1fr;
  }

  .app-header,
  .daily-header,
  .page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-header > .btn,
  .page-header > .btn,
  .account-toolbar button {
    width: 100%;
  }

  .preview-card-stack {
    grid-template-columns: repeat(3, minmax(76px, 1fr));
  }

  .preview-card {
    min-height: 178px;
  }

  .preview-card:nth-child(2) {
    min-height: 218px;
  }

  .tarot-card {
    grid-template-columns: 1fr;
  }

  .tarot-face {
    width: min(150px, 64vw);
    height: min(225px, 96vw);
    margin: 0 auto;
  }
}
