:root {
  color-scheme: light;
  --ink: #12335b;
  --muted: #42617d;
  --cyan: #087f99;
  --coral: #bc4265;
  --night: #e9f8ff;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #dceff9;
  color: var(--ink);
  font-family:
    system-ui,
    -apple-system,
    "Hiragino Kaku Gothic ProN",
    sans-serif;
}
.page {
  max-width: 800px;
  min-height: 100vh;
  margin: auto;
  overflow: hidden;
  background: linear-gradient(180deg, #f5fcff, #eaf9ff 70%);
}
header {
  height: 68px;
  padding: 0 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #55bcd14d;
  background: #f6fcffcc;
  backdrop-filter: blur(12px);
}
.brand,
.eyebrow {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.brand span {
  color: var(--coral);
  padding: 0 4px;
}
select {
  font: inherit;
  font-size: 12px;
  border: 1px solid #65aebe;
  border-radius: 24px;
  padding: 8px 25px 8px 12px;
  background: #ffffffdf;
  color: var(--ink);
}
main {
  text-align: center;
  padding: 0 24px;
}
.masthead {
  padding-top: 30px;
  text-shadow:
    0 1px 12px white,
    0 1px 4px white;
}
.eyebrow {
  color: var(--cyan);
}
.masthead .eyebrow {
  color: var(--ink);
}
.masthead h1 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: clamp(36px, 9vw, 54px);
  letter-spacing: 0.12em;
  margin: 12px 0;
}
.masthead > p:last-child {
  font-size: 13px;
  letter-spacing: 0.08em;
}
.hero {
  position: relative;
  width: min(100%, 440px, 48vh);
  aspect-ratio: 1;
  margin: 0 auto;
  overflow: hidden;
  isolation: isolate;
  border-radius: 8px;
  background: url("../assets/shibuya/cyber-shrine-daylight.png") center 55% / cover
    no-repeat;
}
.hero-glow {
  position: absolute;
  left: 50%;
  bottom: 14%;
  width: 30%;
  height: 4%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #173a4b55;
  filter: blur(3px);
}
.hero img {
  position: absolute;
  left: 50%;
  bottom: 15%;
  height: 37%;
  max-width: 85%;
  transform: translateX(-50%);
  object-fit: contain;
  filter: drop-shadow(0 3px 4px #173a4b55);
}
.caption,
.footnote {
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-shadow:
    0 1px 6px white,
    0 1px 3px white;
}
.invitation {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 16px;
  line-height: 1.9;
  margin: 22px auto;
  max-width: 440px;
  text-shadow:
    0 1px 8px white,
    0 1px 4px white;
}
button {
  font: inherit;
  cursor: pointer;
}
button:focus-visible,
select:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 3px;
}
.primary {
  width: min(100%, 340px);
  border: 1px solid #1d64bd;
  border-radius: 3px;
  background: linear-gradient(120deg, #1266c0, #087fba);
  color: #fff;
  font-weight: 800;
  padding: 18px 20px;
  letter-spacing: 0.06em;
  box-shadow: 0 6px 24px #247fc449;
}
.footnote {
  margin: 13px 0 35px;
}
.screen[hidden] {
  display: none;
}
.sanctuary {
  min-height: 460px;
  padding: 45px 18px 20px;
  margin: 16px auto 0;
  max-width: 560px;
  background: #f8fdffdf;
  border: 1px solid #a6dbe8;
  border-radius: 8px;
}
.screen h2 {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  font-size: 21px;
  line-height: 1.7;
}
.waiting-mark {
  width: 110px;
  height: 110px;
  margin: 55px auto 50px;
  border: 1px solid #188da866;
  border-top: 2px solid #087f99;
  border-radius: 50%;
  box-shadow:
    0 0 30px #55dfea44,
    inset 0 0 30px #55dfea22;
  animation: spin 2.5s linear infinite;
}
.waiting p {
  font-size: 13px;
  color: var(--muted);
}
.result {
  padding-top: 32px;
}
.fortune-card {
  margin: 24px auto 18px;
  max-width: 440px;
  background: #ffffffed;
  border: 1px solid #67bed0;
  padding: 22px 28px 27px;
  box-shadow:
    0 0 30px #50cfe61a,
    inset 0 0 40px #b5e6f433;
}
.card-top {
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.18em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--cyan);
}
.card-top span {
  color: var(--coral);
  font-size: 18px;
}
.rank {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  color: var(--coral);
  font-weight: 700;
  font-size: clamp(30px, 8vw, 44px);
  margin: 25px 0;
}
.rule {
  border-top: 1px solid #55b5c9;
}
.message {
  font-family: "Yu Mincho", "Hiragino Mincho ProN", serif;
  line-height: 2;
  overflow-wrap: anywhere;
  margin: 25px 0;
}
.action-label {
  font-size: 10px;
  letter-spacing: 0.18em;
  font-weight: 800;
  color: var(--cyan);
}
.action {
  font-size: 14px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
time {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 25px;
}
.result-actions {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: auto;
}
.result-actions button {
  flex: 1;
  padding: 14px 8px;
  border: 1px solid #65aec2;
  background: #ffffffdf;
  color: var(--ink);
  font-weight: 700;
}
.notice {
  min-height: 20px;
  font-size: 12px;
}
.notice:empty {
  display: none;
}
.text-button {
  display: block;
  margin: 20px auto 35px;
  border: 0;
  background: none;
  text-decoration: underline;
  color: var(--muted);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
footer {
  border-top: 1px solid #79bed04d;
  background: #eaf9ff;
  display: flex;
  justify-content: space-between;
  padding: 22px 24px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 500px) {
  .masthead {
    padding-top: 24px;
  }
}
@media (max-height: 740px) {
  .masthead {
    padding-top: 16px;
  }
  .masthead h1 {
    margin: 6px 0;
  }
  .invitation {
    margin: 12px auto;
  }
  .sanctuary {
    padding-top: 20px;
    min-height: 390px;
  }
  .cta-dock {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(100%, 800px);
    z-index: 2;
    padding: 10px 24px max(10px, env(safe-area-inset-bottom));
    background: linear-gradient(0deg, #eaf9ff 65%, #eaf9fff0 85%, transparent);
  }
  #ready {
    padding-bottom: 100px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

@media (max-height: 600px) {
  .sanctuary {
    padding-top: 10px;
    padding-inline: 10px;
    margin-top: 0;
  }
  .sanctuary h2 {
    font-size: 19px;
  }
  .sanctuary .invitation {
    font-size: 14px;
    line-height: 1.7;
  }
}

:lang(en) .masthead h1 {
  font-size: clamp(27px, 7.5vw, 43px);
  letter-spacing: 0.02em;
}
:lang(ko) .masthead h1 {
  font-size: clamp(29px, 8vw, 46px);
  letter-spacing: 0.03em;
}
