:root {
  --bg: #02040a;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --gold: #c8a64c;
  --gold-soft: rgba(218, 181, 86, 0.62);
  --violet: #6674ef;
  --nav: #302e45;
  --aqua: #18c5c9;
  --blue: #188af5;
  --title-font: "Valky", "Cormorant", Georgia, "Times New Roman", serif;
  --zh-title-font: "Noto Serif TC", "PingFang TC", "Noto Sans TC", serif;
  --tabbar-height: 97px;
  --tabbar-bottom: 0px;
  --tabbar-safe-bg: #161f34;
  --tabbar-content-bottom: calc(var(--tabbar-height) + 28px + env(safe-area-inset-bottom));
  --detail-card-width: min(calc(100% - 46px), 315px);
}

@font-face {
  font-family: "Valky";
  src: url("assets/fonts/valkyregular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  min-height: 100%;
  background: #05070d;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  height: 100%;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #05070d;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Segoe UI", sans-serif;
  overflow: hidden;
  overflow-x: hidden;
  overscroll-behavior: none;
}

.app-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  background: #02040a;
  transition: opacity 620ms ease, visibility 620ms ease;
}

.app-loader.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.page-transition[hidden] {
  display: none;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 920;
  background: #000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.page-transition.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.app-loader img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  animation: loaderSpin 1.5s linear infinite;
}

.app-loader span {
  color: #fff;
  font-family: var(--title-font);
  font-size: 18px;
  letter-spacing: 0;
  animation: loaderPulse 1.4s ease-in-out infinite;
}

.app-loader small {
  display: block;
  margin-top: -6px;
  color: #fff;
  font-family: "Noto Sans TC", "PingFang TC", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  animation: loaderPulse 1.4s ease-in-out infinite;
}

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

@keyframes loaderPulse {
  0%,
  100% {
    opacity: 0.42;
  }

  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-transition,
  .screen.screen-fade-in,
  .screen.screen-fade-out,
  .draw-choice-modal,
  .draw-reveal {
    transition-duration: 1ms;
    animation-duration: 1ms;
  }
}

button {
  border: 0;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.phone-shell {
  position: relative;
  width: 100%;
  max-width: 402px;
  height: 100dvh;
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: scroll;
  overscroll-behavior: none;
  scrollbar-gutter: stable;
  background: #02040a;
  -webkit-overflow-scrolling: auto;
}

.phone-shell::before,
.phone-shell::after {
  position: absolute;
  inset: 0;
  content: "";
  pointer-events: none;
}

.phone-shell::before {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 0;
  display: block;
  width: min(100vw, 402px);
  transform: translateX(-50%);
  background: #02040a url("assets/images/bg.jpg") center top / cover no-repeat;
}

.phone-shell::after {
  position: fixed;
  top: auto;
  right: auto;
  bottom: 0;
  left: 50%;
  z-index: 29;
  display: none;
  width: min(100vw, 402px);
  height: calc(env(safe-area-inset-bottom) + 2px);
  background: var(--tabbar-safe-bg);
  transform: translateX(-50%);
}

.phone-shell:has(.screen.active .bottom-nav)::after {
  display: block;
}

.screen {
  position: relative;
  z-index: 1;
  display: none;
  min-height: 100svh;
  padding: calc(max(env(safe-area-inset-top), 0px) + 18px) 20px var(--tabbar-content-bottom);
}

.screen.active {
  display: block;
}

.screen.screen-fade-in {
  animation: none;
}

.screen.screen-fade-in > :not(.bottom-nav) {
  animation: screenFadeIn 280ms ease-out both;
}

.screen.screen-fade-out {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  min-height: 100%;
  pointer-events: none;
  animation: none;
}

.screen.screen-fade-out > :not(.bottom-nav) {
  animation: screenFadeOut 220ms ease-in both;
}

.screen.screen-fade-out > .bottom-nav {
  display: none;
}

[data-screen="home-empty"],
[data-screen="home-picked"] {
  min-height: 100dvh;
  padding-bottom: var(--tabbar-content-bottom);
}

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

.home-title {
  margin-top: 0;
  margin-bottom: 14px;
}

.home-title h1 {
  font-family: var(--title-font);
  color: #8985d7;
  font-size: 24px;
  font-weight: 500;
}

h1 {
  margin: 0;
  font-family: var(--title-font);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
}

.page-title p,
.detail-header p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: min(calc(100% - 46px), 314px);
  height: 37px;
  margin: 0 auto 17px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("assets/images/seg_right.png?v=20260716-segmented") center / 100% 100% no-repeat;
  box-shadow: none;
}

.segmented:has(.segment:first-child.active) {
  background-image: url("assets/images/seg_left.png?v=20260716-segmented");
}

.segment {
  display: grid;
  place-items: center;
  min-width: 0;
  padding: 0 12px 2px;
  border-radius: 0;
  background: transparent;
  font-size: 15px;
  line-height: 1;
}

.segment.active {
  background: transparent;
  box-shadow: none;
}

.tarot-card {
  position: relative;
  width: calc(100% - 46px);
  aspect-ratio: 315 / 503;
  margin: 0 auto;
  overflow: hidden;
  border: 0;
  border-radius: 17px;
  background: rgba(3, 8, 12, 0.36);
}

[data-screen="home-empty"] .tarot-card,
[data-screen="home-picked"] .tarot-card {
  --home-card-height: clamp(300px, calc(100svh - 330px - env(safe-area-inset-bottom)), 400px);
  --home-card-height: clamp(300px, calc(100dvh - 330px - env(safe-area-inset-bottom)), 400px);
  width: min(calc(100% - 46px), calc(var(--home-card-height) * 315 / 503));
}

.card-line {
  position: absolute;
  pointer-events: none;
  border-color: var(--gold-soft);
}

.line-a {
  inset: -3px 14px -3px 14px;
  border: 1.4px solid var(--gold-soft);
  border-top-left-radius: 18px;
  border-top-right-radius: 140px;
  border-bottom-right-radius: 9px;
  border-bottom-left-radius: 155px;
}

.line-b {
  inset: -42px 21px 9px 8px;
  border-right: 1.4px solid var(--gold-soft);
  border-bottom: 1.4px solid var(--gold-soft);
  border-radius: 0 160px 15px 135px;
}

.line-c {
  top: 0;
  bottom: 0;
  left: 25px;
  width: 1.4px;
  background: var(--gold-soft);
}

.empty-card {
  background: rgba(3, 8, 12, 0.12);
  will-change: opacity, filter;
  transform: translateZ(0);
}

.draw-fade-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 17px;
}

.draw-card-back {
  opacity: 1;
  will-change: opacity, filter;
  transform: translateZ(0);
}

.draw-card-front {
  opacity: 0;
  pointer-events: none;
  will-change: opacity, filter;
  transform: translateZ(0);
}

.star-seal {
  position: absolute;
  top: 35.5%;
  left: 50%;
  width: 145px;
  aspect-ratio: 1;
  transform: translateX(-50%);
  border: 1px solid var(--gold);
  border-radius: 50%;
}

.star-seal::before,
.star-seal::after,
.star-seal span {
  position: absolute;
  inset: 9px;
  content: "";
  background:
    linear-gradient(90deg, transparent 49.5%, var(--gold) 50%, transparent 50.5%),
    linear-gradient(30deg, transparent 49.5%, var(--gold) 50%, transparent 50.5%),
    linear-gradient(60deg, transparent 49.5%, var(--gold) 50%, transparent 50.5%),
    linear-gradient(120deg, transparent 49.5%, var(--gold) 50%, transparent 50.5%),
    linear-gradient(150deg, transparent 49.5%, var(--gold) 50%, transparent 50.5%);
  clip-path: polygon(50% 0, 61% 37%, 100% 50%, 61% 63%, 50% 100%, 39% 63%, 0 50%, 39% 37%);
}

.star-seal::after {
  transform: rotate(22.5deg);
}

.star-seal span {
  transform: rotate(45deg);
  opacity: 0.8;
}

.art-card {
  background: #071226;
  overflow: visible;
}

.screen.is-drawing .draw-card-back {
  animation: drawCardBackFade 1120ms ease-in-out forwards;
}

.screen.is-drawing .draw-card-front {
  animation: drawCardFrontFade 1120ms ease-in-out forwards;
}

.screen.is-drawing .empty-card::after {
  position: absolute;
  inset: -18%;
  z-index: 5;
  content: "";
  background: linear-gradient(110deg, transparent 34%, rgba(255, 244, 190, 0.86) 46%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 208, 101, 0.38) 55%, transparent 66%);
  filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-72%) rotate(8deg);
  animation: drawCardFadeShine 960ms ease-out 160ms forwards;
}

.home-draw-shine {
  position: absolute;
  inset: -18%;
  z-index: 5;
  display: block;
  content: "";
  background: linear-gradient(110deg, transparent 34%, rgba(255, 244, 190, 0.86) 46%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 208, 101, 0.38) 55%, transparent 66%);
  filter: blur(1px);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-72%) rotate(8deg);
  will-change: opacity, transform;
}

.home-draw-shine.run {
  animation: drawCardFadeShine 960ms ease-out 160ms forwards;
}

.screen.is-drawing .draw-button {
  pointer-events: none;
}

.card-frame,
.card-image,
.card-deco {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.card-frame,
.card-deco {
  z-index: 2;
  object-fit: contain;
  pointer-events: none;
}

.card-image {
  z-index: 1;
  object-fit: cover;
  border: 2px solid #aa955d;
  border-radius: 18px;
  box-shadow: 0 10px 25px 0 rgba(0, 0, 0, 0.9);
}

.rarity-img {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 3;
  display: block;
  width: 48px;
  height: 48px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.card-actions {
  position: absolute;
  z-index: 4;
  bottom: 17px;
  left: 18px;
  display: flex;
  gap: 8px;
}

.home-card-detail-link {
  cursor: pointer;
}

[data-screen="home-picked"] .card-actions {
  display: none;
}

.card-actions.single {
  bottom: 17px;
  left: 20px;
}

.round-action {
  position: relative;
  width: 37px;
  height: 37px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: -4px 4px 12px rgba(0, 0, 0, 0.42);
}

.round-action img {
  display: block;
  width: 37px;
  height: 37px;
  pointer-events: none;
}

.round-action.story-locked {
  opacity: 0.34;
}

.draw-row {
  display: grid;
  place-items: center;
  width: calc(100% - 46px);
  min-height: 90px;
  margin: 17px auto 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.draw-button {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 90px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
}

.draw-button > span {
  display: flex;
  place-items: center;
  align-items: center;
  justify-content: center;
  gap: 5px;
  box-sizing: border-box;
  width: 100%;
  min-height: 74px;
  padding-bottom: 20px;
  background: url("assets/images/draw_button.svg?v=20260715-draw-ui-separated") center / 100% 100% no-repeat;
  font-size: 18px;
  font-weight: 900;
}

.draw-free-text {
  font-family: var(--title-font);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}

.draw-button em {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 18px auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 178px;
  min-height: 37px;
  margin-top: -21px;
  padding: 0 20px;
  background: url("assets/images/mypoint.svg?v=20260715-draw-ui-separated") center / 178px 37px no-repeat;
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.draw-button em strong,
.draw-button em span {
  font-size: 13px;
  line-height: 1;
}

.draw-button em .coin-icon {
  width: 18px;
  height: 18px;
}

.draw-button.disabled {
  color: rgba(255, 255, 255, 0.72);
}

@keyframes drawCardBackFade {
  0% {
    opacity: 1;
    filter: brightness(1);
  }
  42% {
    opacity: 0.72;
    filter: brightness(1.08);
  }
  100% {
    opacity: 0;
    filter: brightness(1.2);
  }
}

@keyframes screenFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes screenFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes drawCardFrontFade {
  0% {
    opacity: 0;
    filter: brightness(0.9) saturate(0.92);
  }
  30% {
    opacity: 0.16;
  }
  72% {
    opacity: 0.86;
    filter: brightness(1.12) saturate(1.08);
  }
  100% {
    opacity: 1;
    filter: brightness(1) saturate(1);
  }
}

@keyframes drawCardFadeShine {
  0% {
    opacity: 0;
    transform: translateX(-72%) rotate(8deg);
  }
  28% {
    opacity: 0.9;
  }
  100% {
    opacity: 0;
    transform: translateX(72%) rotate(8deg);
  }
}

.gem-count {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
}

.point-bonus {
  position: fixed;
  z-index: 80;
  min-width: 30px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f0c94f;
  color: #332203;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  opacity: 0;
  transform: translateY(5px) scale(0.94);
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.28);
}

.point-bonus.show {
  animation: pointBonusPop 920ms ease-out both;
}

@keyframes pointBonusPop {
  0% {
    opacity: 0;
    transform: translateY(5px) scale(0.94);
  }
  22% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  72% {
    opacity: 1;
    transform: translateY(-5px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-9px) scale(0.98);
  }
}

.coin-icon {
  display: block;
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.bottom-nav {
  position: fixed;
  right: auto;
  bottom: calc(var(--tabbar-bottom) + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100vw, 402px);
  height: var(--tabbar-height);
  padding: 25px 30px 16px;
  overflow: visible;
  border-radius: 0;
  background: url("assets/images/tabbar.svg?v=20260715-tabbar") center bottom / 100% 100% no-repeat;
  box-shadow: none;
  isolation: isolate;
  transform: translateX(-50%);
}

.bottom-nav::before {
  position: absolute;
  inset: 31px 0 0;
  z-index: -1;
  background: var(--tabbar-safe-bg);
  content: "";
  pointer-events: none;
}

.nav-item {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  background: transparent;
  color: rgba(255, 255, 255, 0.86);
  font-size: 12px;
  line-height: 1.1;
}

.nav-item.active {
  color: #fff;
}

.nav-icon {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  opacity: 0.92;
  background: #504a78;
  background-image: none;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.nav-item.active .nav-icon {
  opacity: 1;
  background: linear-gradient(180deg, #aaa6fd 0%, #8380c4 100%);
}

.home-icon {
  -webkit-mask: url("assets/images/tab_home.svg") center / contain no-repeat;
  mask: url("assets/images/tab_home.svg") center / contain no-repeat;
}

.book-icon::before,
.book-icon::after {
  display: none;
}

.book-icon {
  -webkit-mask: url("assets/images/tab_collection.svg") center / contain no-repeat;
  mask: url("assets/images/tab_collection.svg") center / contain no-repeat;
}

.card-icon {
  -webkit-mask: url("assets/images/tab_card.svg") center / contain no-repeat;
  mask: url("assets/images/tab_card.svg") center / contain no-repeat;
}

.wing-icon {
  -webkit-mask: url("assets/images/tab_guardians.svg") center / contain no-repeat;
  mask: url("assets/images/tab_guardians.svg") center / contain no-repeat;
}

.save-icon {
  -webkit-mask: url("assets/images/lsicon_save-as-filled.svg") center / contain no-repeat;
  mask: url("assets/images/lsicon_save-as-filled.svg") center / contain no-repeat;
}

@supports (-webkit-touch-callout: none) {
  @media (display-mode: browser) and (hover: none) and (pointer: coarse) and (max-width: 600px) {
    :root {
      --tabbar-bottom: 74px;
      --tabbar-content-bottom: calc(var(--tabbar-height) + 102px + env(safe-area-inset-bottom));
    }

    .phone-shell:has(.screen.active .bottom-nav)::after {
      height: calc(var(--tabbar-bottom) + env(safe-area-inset-bottom) + 2px);
    }
  }
}

.detail-screen {
  padding-bottom: 22px;
}

.draw-screen {
  padding-bottom: calc(var(--tabbar-height) + 78px + env(safe-area-inset-bottom));
}

.draw-header {
  margin: 0 0 26px;
}

.draw-header h1 {
  margin: 0 0 6px;
  font-family: var(--title-font);
  color: #8985d7;
  font-size: 24px;
  font-weight: 500;
  line-height: 1;
}

.draw-header p {
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
}

.draw-points {
  display: grid;
  grid-template-columns: 79px 22px 1fr;
  align-items: center;
  width: 178px;
  min-height: 37px;
  margin-top: 10px;
  padding: 0 15px 0 28px;
  background: url("assets/images/mypoint.svg?v=20260715-draw-ui") center / 178px 37px no-repeat;
}

.draw-points strong {
  font-size: 13px;
  font-weight: 900;
  text-align: left;
}

.draw-points .coin-icon {
  width: 18px;
  height: 18px;
}

.draw-points [data-draw-points-value] {
  min-width: 0;
  padding-left: 8px;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: left;
}

.draw-section {
  margin: 0 0 28px;
}

.draw-section h2 {
  margin: 0 0 13px;
  color: #fff;
  font-family: var(--title-font);
  font-size: 18px;
  font-weight: 400;
}

.draw-ready-panel h2,
#draw-choice-title {
  font-family: var(--title-font);
}

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

.series-pack {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 14px;
  align-items: center;
  min-height: 104px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background: rgba(10, 12, 18, 0.58);
  text-align: left;
}

.series-pack.selected {
  border-color: #6674ef;
  box-shadow: 0 0 0 2px rgba(102, 116, 239, 0.34);
}

.series-pack img {
  display: block;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  object-fit: cover;
}

.series-pack span {
  display: grid;
  gap: 5px;
}

.series-pack strong {
  font-size: 17px;
  font-weight: 800;
}

.series-pack small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
}

.series-pack em {
  color: #e6c27b;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.journey-list {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}

.journey-list::-webkit-scrollbar {
  display: none;
}

.journey-person {
  display: grid;
  flex: 0 0 76px;
  justify-items: center;
  gap: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
}

.journey-person img {
  display: block;
  width: 68px;
  height: 68px;
  border: 2px solid transparent;
  border-radius: 50%;
  object-fit: cover;
}

.journey-person.selected img {
  border-color: #dc8d2b;
  box-shadow: 0 0 0 2px rgba(220, 141, 43, 0.28);
}

.journey-empty {
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
}

.draw-action-dock {
  position: fixed;
  right: max(20px, calc((100vw - 402px) / 2 + 20px));
  bottom: calc(108px + env(safe-area-inset-bottom));
  left: max(20px, calc((100vw - 402px) / 2 + 20px));
  z-index: 9;
}

.draw-primary-action {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 90px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
  box-shadow: none;
}

.draw-primary-action > span {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 74px;
  padding-bottom: 20px;
  background: url("assets/images/draw_button.svg?v=20260715-draw-ui-separated") center / 100% 100% no-repeat;
  font-size: 18px;
  font-weight: 900;
}

.draw-primary-action em {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 18px auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 178px;
  min-height: 37px;
  margin-top: -21px;
  padding: 0 20px;
  background: url("assets/images/mypoint.svg?v=20260715-draw-ui-separated") center / 178px 37px no-repeat;
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
}

.draw-primary-action em span {
  font-size: 13px;
  line-height: 1;
  text-align: left;
}

.draw-primary-action em .coin-icon {
  width: 18px;
  height: 18px;
}

.draw-primary-action:disabled {
  color: rgba(255, 255, 255, 0.58);
  opacity: 0.58;
  box-shadow: none;
  cursor: default;
}

.detail-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  margin: 0 0 14px;
  padding: 0 38px;
  text-align: center;
}

.detail-header > div {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: 100%;
}

.detail-header h1 {
  color: #8985d7;
  font-size: 16px;
  line-height: 24px;
  white-space: nowrap;
}

.message-header h1 {
  font-size: 22px;
}

.story-header h1 {
  margin-top: 0;
  color: #8985d7;
  font-family: var(--zh-title-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
}

.story-header p {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 700;
}

.back-button {
  position: relative;
  width: 32px;
  height: 32px;
  margin-top: 0;
  background: transparent url("assets/images/ic_sharp-arrow-back-ios.svg") center / 24px 24px no-repeat;
}

.detail-header .back-button,
.plain-header .back-button {
  position: absolute;
  top: 0;
  left: 0;
}

.back-button::before {
  content: "";
}

.detail-card {
  width: var(--detail-card-width);
  margin-top: 8px;
}

.message-box {
  width: min(calc(100% - 46px), 315px);
  aspect-ratio: 315 / 140;
  margin: 17px auto 0;
  min-height: 0;
  padding: 31px 26px 22px;
  border: 0;
  background: url("assets/images/frame_message.svg?v=20260715-frame-message-gradient") center / 100% 100% no-repeat;
  color: #fff;
  display: grid;
  align-items: center;
}

.message-box-text {
  display: -webkit-box;
  overflow: hidden;
  width: 100%;
  font-size: 13px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: 1px;
  text-align: center;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.story-copy {
  width: var(--detail-card-width);
  margin: 29px auto 0;
  color: #fff;
  font-size: 15.5px;
  font-weight: 500;
  line-height: 1.54;
  white-space: pre-line;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.story-copy p {
  margin: 0 0 3px;
}

.story-copy h2 {
  margin: 21px 0 16px;
  color: #85a3d7;
  font-family: var(--title-font);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.story-copy h2.whisper-heading {
  color: #7ba990;
}

.story-whisper-box {
  display: grid;
  align-items: center;
  width: 100%;
  aspect-ratio: 315 / 140;
  min-height: 0;
  margin: 0 auto;
  padding: 31px 26px 22px;
  background: url("assets/images/frame_message.svg?v=20260716-whisper-frame-match-message") center / 100% 100% no-repeat;
}

.story-whisper-box .collection-card-body,
.collection-whisper-box .collection-card-body {
  text-align: center;
}

.guardians-screen,
.edit-guardian-screen {
  padding-bottom: var(--tabbar-content-bottom);
}

.guardians-title {
  margin-top: 0;
  margin-bottom: 21px;
}

.guardians-title h1 {
  font-family: var(--title-font);
  color: #8985d7;
  font-size: 24px;
  font-weight: 500;
}

.guardian-detail-title {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  margin-top: 0;
}

.guardian-detail-title h1 {
  grid-column: 2;
}

.guardian-detail-title .back-button {
  grid-column: 1;
  margin-top: 0;
  justify-self: start;
}

.plain-header {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  margin: 0 0 23px;
  padding: 0 38px;
  text-align: center;
}

.plain-header h1 {
  justify-self: center;
  font-family: var(--zh-title-font);
  font-size: 24px;
  font-weight: 700;
  line-height: 32px;
}

.guardian-filter-area {
  position: relative;
  z-index: 5;
  min-height: 30px;
  margin: 0 12px 17px;
}

.filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-button,
.clear-filter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 16px;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
}

.filter-button {
  gap: 8px;
  padding: 0;
}

.filter-button.selected-origin {
  align-items: flex-start;
  min-height: 40px;
}

.filter-selected-label {
  display: grid;
  gap: 2px;
  line-height: 1.18;
}

.filter-selected-label strong {
  font: inherit;
}

.clear-filter {
  padding: 0 17px;
  background: linear-gradient(135deg, #7777e4, #5d5fc8);
}

.filter-icon {
  display: block;
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.filter-menu {
  position: absolute;
  top: 35px;
  left: 0;
  display: grid;
  min-width: 126px;
  padding: 11px 0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.35);
}

.filter-menu button {
  justify-content: flex-start;
  min-height: 32px;
  padding: 0 20px;
  background: transparent;
  color: #111;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.filter-menu button:disabled {
  color: rgba(17, 17, 17, 0.32);
  cursor: default;
}

.guardian-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  row-gap: 22px;
  column-gap: 14px;
  padding: 0 12px;
}

.guardian-person {
  display: grid;
  justify-items: center;
  gap: 9px;
  min-width: 0;
  background: transparent;
}

.guardian-avatar-wrap {
  position: relative;
  display: block;
  width: 78px;
  height: 78px;
  border-radius: 50%;
}

.guardian-avatar {
  display: block;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
}

.guardian-person.selected .guardian-avatar,
.guardian-profile-avatar.selected img {
  border: 4px solid #dc8d2b;
}

.guardian-name {
  max-width: 90px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}

.today-badge,
.default-badge {
  position: absolute;
  right: -10px;
  bottom: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 55px;
  height: 27px;
  padding: 0 11px;
  border-radius: 14px;
  background: #db8d2c;
  color: #fff;
  font-size: 12px !important;
  font-weight: 800;
  line-height: 1;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.today-badge {
  min-width: 41px;
  height: 25px;
  padding: 0 7px;
  font-size: 11px !important;
}

.guardian-primary-action,
.guardian-wide-button {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 57px;
  border: 0;
  border-radius: 0;
  background: transparent url("assets/images/button_orange.svg") center / 100% 100% no-repeat;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.guardian-primary-action {
  position: fixed;
  right: max(32px, calc((100vw - 402px) / 2 + 32px));
  bottom: calc(121px + env(safe-area-inset-bottom));
  left: max(32px, calc((100vw - 402px) / 2 + 32px));
  z-index: 8;
}

.guardian-primary-action:disabled {
  color: rgba(255, 255, 255, 0.35);
  background: transparent url("assets/images/button_orange.svg") center / 100% 100% no-repeat;
  filter: grayscale(0.45) brightness(0.72);
  opacity: 0.62;
  cursor: default;
}

.guardians-screen .bottom-nav,
.detail-guardian-screen .bottom-nav {
  position: fixed;
  right: auto;
  bottom: calc(var(--tabbar-bottom) + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 30;
}

.guardian-profile {
  display: grid;
  grid-template-columns: 105px 1fr;
  gap: 22px;
  align-items: center;
  width: calc(100% - 24px);
  margin: 30px auto 18px;
}

.guardian-profile-avatar {
  position: relative;
  width: 96px;
  height: 96px;
}

.guardian-profile-avatar img {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
}

.guardian-profile-copy h2 {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 800;
}

.guardian-profile-copy p {
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.7;
}

.guardian-wide-button {
  width: calc(100% - 24px);
  max-width: 333px;
  margin: 0 auto 15px;
}

.guardian-card-grid,
.image-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 17px 15px;
  padding: 0 12px;
}

.image-choice-grid {
  padding-bottom: 92px;
}

.image-tile {
  position: relative;
  aspect-ratio: 102 / 164;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.image-tile.selected {
  border: 2px solid #dc8d2b;
  box-shadow: none;
}

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

.image-tile .default-badge {
  right: 0;
  bottom: 0;
  min-width: 70px;
  border-radius: 8px 0 0 0;
}

.collection-screen {
  padding-bottom: var(--tabbar-content-bottom);
}

.collection-detail-screen,
.collection-card-detail-screen {
  padding-bottom: 28px;
}

.collection-title {
  margin-top: 0;
  margin-bottom: 24px;
  text-align: left;
}

.collection-title h1 {
  font-family: var(--title-font);
  color: #8985d7;
  font-size: 24px;
  font-weight: 500;
}

.collection-detail-title {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  margin-bottom: 28px;
  text-align: center;
}

.collection-detail-title h1 {
  grid-column: 2;
}

.collection-detail-title .back-button {
  grid-column: 1;
  margin-top: 0;
}

.collection-segmented {
  width: min(100%, 314px);
  margin-bottom: 20px;
}

.collection-toolbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  margin: 0 0 20px;
}

.collection-filter-wrap {
  position: relative;
  min-width: 128px;
}

.collection-filter-row {
  margin: 0;
}

.collection-filter-menu {
  z-index: 6;
}

.collection-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.collection-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.collection-toggle i {
  position: relative;
  display: block;
  width: 43px;
  height: 27px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, 0.22);
}

.collection-toggle i::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  content: "";
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  transition: transform 160ms ease, background 160ms ease;
}

.collection-toggle input:checked + i {
  background: linear-gradient(135deg, #7777e4, #5d5fc8);
}

.collection-toggle input:checked + i::before {
  transform: translateX(16px);
}

.collection-character-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px 14px;
}

.collection-character {
  display: grid;
  justify-items: center;
  gap: 9px;
  min-width: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.2;
}

.collection-avatar-wrap,
.collection-avatar-wrap img,
.collection-locked-avatar {
  display: block;
  width: 78px;
  height: 78px;
  border-radius: 50%;
}

.collection-avatar-wrap img {
  object-fit: cover;
}

.collection-locked-avatar {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.32);
  background: rgba(1, 18, 17, 0.72);
}

.collection-locked-avatar img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  opacity: 0.32;
}

.theme-toolbar {
  margin-bottom: 15px;
}

.theme-all-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  background: transparent;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.theme-all-icon {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.collection-theme {
  margin-bottom: 16px;
}

.collection-theme-header {
  display: grid;
  grid-template-columns: 27px 1fr auto 18px;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 0;
  background: transparent;
  color: #fff;
  text-align: left;
}

.collection-theme-header strong {
  font-size: 20px;
  font-weight: 800;
}

.collection-theme-header em {
  font-size: 15px;
  font-style: normal;
  font-weight: 500;
}

.theme-mark {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.theme-arrow {
  display: block;
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.collection-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 12px;
}

.theme-card-grid {
  margin-top: 12px;
}

.collection-card-tile {
  position: relative;
  aspect-ratio: 102 / 164;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 6px;
  background: rgba(5, 6, 13, 0.46);
}

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

.collection-card-tile.locked {
  background: rgba(4, 5, 12, 0.64);
}

.collection-card-status {
  position: absolute;
  z-index: 2;
  left: 8px;
  bottom: 8px;
  display: inline-flex;
  gap: 5px;
  align-items: center;
  pointer-events: none;
}

.collection-card-status-icon {
  display: block;
  width: 17px !important;
  height: 17px !important;
  object-fit: contain !important;
}

.collection-card-status-icon.is-locked {
  opacity: 0.4;
}

.collection-card-back {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.collection-card-back img {
  width: 100%;
  max-width: none;
  height: 100%;
  object-fit: contain;
}

.collection-profile {
  position: relative;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 25px;
  align-items: center;
  margin: 0 12px 29px;
  padding-bottom: 18px;
}

.collection-profile::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: rgba(255, 255, 255, 0.33);
}

.collection-profile-avatar,
.collection-profile-avatar > img,
.collection-profile .collection-locked-avatar {
  display: block;
  width: 96px;
  height: 96px;
  border-radius: 50%;
}

.collection-profile-avatar > img {
  object-fit: cover;
}

.collection-profile .collection-locked-avatar {
  display: grid;
}

.collection-profile .collection-locked-avatar > img {
  width: 24px !important;
  height: 24px !important;
  max-width: 24px;
  max-height: 24px;
  border-radius: 0;
  object-fit: contain;
}

.collection-profile h2 {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 800;
}

.collection-profile .collection-profile-origin {
  margin: 0 0 8px;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 20px;
}

.collection-profile p {
  margin: 0;
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}

.collection-detail-toggle-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 12px 21px;
}

.collection-card-header h1 {
  justify-self: center;
  font-family: var(--zh-title-font);
  font-size: 18px;
  font-weight: 700;
  line-height: 24px;
  color: #8985d7;
  text-align: center;
}

.collection-card-header > div {
  display: grid;
  justify-items: center;
  gap: 7px;
  width: 100%;
}

.collection-card-header p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Noto Sans TC", "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.1;
}

.collection-card-detail-art {
  position: relative;
  width: var(--detail-card-width);
  margin: 7px auto 22px;
  aspect-ratio: 315 / 503;
  overflow: hidden;
  border: 2px solid #aa955d;
  border-radius: 18px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.75);
}

.collection-card-detail-art > img:first-child {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.collection-card-deco {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.collection-card-detail-art .rarity-img {
  z-index: 3;
}

.collection-card-copy {
  width: var(--detail-card-width);
  margin: 0 auto;
  padding-bottom: 20px;
}

.collection-card-kicker {
  display: none;
}

.collection-card-copy h2 {
  margin: 21px 0 16px;
  color: #85a3d7;
  font-family: var(--title-font);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
}

.collection-card-copy h2.whisper-heading {
  color: #7ba990;
}

.collection-card-divider {
  width: 100%;
  height: 1px;
  margin: 22px 0 23px;
  border: 0;
  background: linear-gradient(90deg, transparent, rgba(200, 162, 115, 0.86) 18%, rgba(200, 162, 115, 0.86) 82%, transparent);
}

.collection-card-copy p {
  margin: 0;
  color: #fff;
  font-size: 14px;
  line-height: 1.62;
}

.collection-card-body {
  white-space: pre-line;
}

.story-body {
  font-size: 16px !important;
  line-height: 1.62;
}

.collection-whisper-box {
  display: grid;
  align-items: center;
  width: 100%;
  aspect-ratio: 315 / 140;
  min-height: 0;
  margin: 0 auto;
  padding: 31px 26px 22px;
  background: url("assets/images/frame_message.svg?v=20260716-whisper-frame-match-message") center / 100% 100% no-repeat;
}

.collection-story-title {
  margin: -5px 0 23px;
  color: #fff;
  font-family: var(--zh-title-font);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.story-end {
  margin-top: 20px !important;
  color: rgba(255, 255, 255, 0.72);
  font-family: var(--title-font);
  font-size: 16px !important;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  white-space: normal;
}

.collection-story-empty {
  color: rgba(255, 255, 255, 0.46) !important;
  font-family: var(--zh-title-font);
  text-align: center;
}

.card-detail-characters {
  width: 100%;
  margin: 28px auto 0;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.33);
}

.card-detail-characters h2 {
  margin: 0 0 16px;
  color: #fff;
  font-family: var(--title-font);
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
}

.card-detail-character-list {
  display: grid;
  grid-template-columns: repeat(3, 78px);
  justify-content: center;
  gap: 18px;
}

.card-detail-character-list.is-two {
  grid-template-columns: repeat(2, 78px);
}

.card-detail-character {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.card-detail-character img {
  display: block;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  object-fit: cover;
}

.scroll-top-button {
  position: fixed;
  z-index: 20;
  display: grid;
  place-items: center;
  right: max(24px, calc((100vw - 402px) / 2 + 24px));
  bottom: calc(24px + env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(29, 31, 42, 0.88);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.scroll-top-button::before {
  content: "";
  width: 16px;
  height: 16px;
  background: #fff;
  clip-path: polygon(50% 0, 100% 50%, 76% 50%, 76% 100%, 24% 100%, 24% 50%, 0 50%);
}

.scroll-top-button::after {
  content: none;
}

.collection-screen .bottom-nav,
.draw-screen .bottom-nav {
  position: fixed;
  right: auto;
  bottom: calc(var(--tabbar-bottom) + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 30;
}

.edit-save-action {
  bottom: calc(36px + env(safe-area-inset-bottom));
}

.save-data-screen {
  padding-bottom: var(--tabbar-content-bottom);
}

.save-data-panel {
  display: grid;
  gap: 14px;
  width: calc(100% - 24px);
  margin: 42px auto 0;
}

.save-data-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 57px;
  border-radius: 0;
  background: url("assets/images/button.svg?v=20260715-save-button") center / 100% 100% no-repeat;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.save-data-action:nth-of-type(2) {
  background: url("assets/images/button.svg?v=20260715-save-button") center / 100% 100% no-repeat;
}

.save-data-action.danger {
  background: url("assets/images/button.svg?v=20260715-save-button") center / 100% 100% no-repeat;
}

.save-data-action.salmon {
  background: url("assets/images/button.svg?v=20260715-save-button") center / 100% 100% no-repeat;
}

.save-data-status {
  min-height: 22px;
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.save-data-status.is-error {
  color: #ffbd9e;
}

.draw-choice-modal[hidden] {
  display: none;
}

.draw-choice-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: end center;
  padding: 20px 24px calc(34px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  transition: opacity 240ms ease;
}

.draw-choice-modal.is-visible {
  opacity: 1;
}

.draw-choice-modal.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.draw-choice-modal[data-draw-ready-modal] {
  place-items: center;
}

.draw-choice-panel {
  width: min(100%, 354px);
  padding: 22px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(22, 22, 28, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.48);
}

.draw-choice-panel h2 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.25;
}

#draw-choice-title {
  font-family: var(--title-font);
  font-weight: 400;
}

.draw-choice-panel p {
  margin: 0 0 18px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  line-height: 1.6;
}

.draw-choice-card-thumb {
  display: block;
  width: 72px;
  aspect-ratio: 315 / 503;
  margin: 0 auto 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  object-fit: cover;
}

.draw-choice-card-thumb[hidden] {
  display: none;
}

.locked-card-info {
  display: grid;
  gap: 12px;
  margin: 14px 0 18px;
}

.story-unlocked-card {
  display: block;
  width: 96px;
  aspect-ratio: 315 / 503;
  margin: 4px auto 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 9px;
  object-fit: cover;
}

.story-unlocked-panel p {
  color: #fff;
  font-weight: 800;
  text-align: center;
}

.story-unlocked-panel [data-story-available-copy] {
  font-size: 18px;
}

.story-unlocked-panel .story-guardian-message {
  margin: -2px 0 14px;
  color: #f2d89c;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.55;
  text-align: center;
  white-space: pre-line;
}

.story-unlocked-panel .story-guardian-message[hidden] {
  display: none;
}

.locked-card-info div {
  display: grid;
  grid-template-columns: 78px 1fr;
  gap: 12px;
  align-items: start;
}

.locked-card-info dt {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.locked-card-info dd {
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.45;
}

.draw-choice-actions {
  display: grid;
  gap: 10px;
}

.draw-choice-actions button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 57px;
  padding: 0 22px;
  border-radius: 0;
  background: url("assets/images/button_orange.svg?v=20260716-modal-buttons") center / 100% 100% no-repeat;
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.draw-choice-actions button.is-primary {
  background-image: url("assets/images/button_orange.svg?v=20260716-modal-buttons");
}

.draw-choice-actions button.is-secondary {
  background-image: url("assets/images/button_gray.svg?v=20260716-modal-buttons");
}

.draw-choice-actions button.is-emerald {
  background-image: url("assets/images/button_orange-1.svg?v=20260716-modal-buttons");
}

.draw-ready-panel {
  position: relative;
  display: grid;
  justify-items: center;
  width: min(100%, 354px);
  padding: 22px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(12, 14, 22, 0.96);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.5);
}

.draw-ready-panel h2 {
  margin: 0 34px 18px;
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.3;
  text-align: center;
}

.draw-ready-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.draw-ready-close::before,
.draw-ready-close::after {
  position: absolute;
  top: 14px;
  left: 8px;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.88);
  content: "";
}

.draw-ready-close::before {
  transform: rotate(45deg);
}

.draw-ready-close::after {
  transform: rotate(-45deg);
}

.draw-ready-card {
  width: min(68vw, 238px);
  aspect-ratio: 315 / 503;
  margin: 0 0 18px;
}

.draw-ready-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.draw-ready-action {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 90px;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #fff;
}

.draw-ready-action > span {
  display: grid;
  place-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 74px;
  padding-bottom: 20px;
  background: url("assets/images/draw_button.svg?v=20260715-draw-ui-separated") center / 100% 100% no-repeat;
  font-size: 18px;
  font-weight: 900;
}

.draw-ready-action em {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: auto 18px auto;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 178px;
  min-height: 37px;
  margin-top: -21px;
  padding: 0 20px;
  background: url("assets/images/mypoint.svg?v=20260715-draw-ui-separated") center / 178px 37px no-repeat;
  color: #fff;
  font-size: 13px;
  font-style: normal;
  font-weight: 900;
}

.draw-ready-action em strong,
.draw-ready-action em span {
  font-size: 13px;
  line-height: 1;
  text-align: left;
}

.draw-ready-action .coin-icon {
  width: 18px;
  height: 18px;
}

.points-alert-panel h2 {
  font-size: 16px;
}

.points-alert-panel p {
  font-size: 14px;
  line-height: 1.65;
}

.self-destruct-panel h2 {
  color: #ffbd9e;
}

.self-destruct-panel .draw-choice-actions button.danger {
  background-image: url("assets/images/button_orange.svg?v=20260716-modal-buttons");
}

.salmon-panel h2 {
  color: #ffc0a8;
}

.salmon-password {
  width: 100%;
  min-height: 44px;
  margin: 0 0 10px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}

.salmon-password::placeholder {
  color: rgba(255, 255, 255, 0.48);
}

.salmon-status {
  min-height: 20px;
  margin: 0 0 12px;
  color: #ffbd9e;
  font-size: 13px;
  text-align: center;
}

.draw-reveal[hidden] {
  display: none;
}

.draw-reveal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: grid;
  place-items: center;
  padding: calc(24px + env(safe-area-inset-top)) 26px calc(30px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 228, 166, 0.22), transparent 30%),
    rgba(1, 3, 10, 0.94);
  opacity: 0;
  transition: opacity 260ms ease;
}

.draw-reveal.is-visible {
  opacity: 1;
}

.draw-reveal.is-hiding {
  opacity: 0;
  pointer-events: none;
}

.draw-reveal-stage {
  display: grid;
  justify-items: center;
  width: min(100%, 354px);
  animation: revealStageIn 520ms ease-out both;
}

.draw-reveal-card {
  position: relative;
  width: min(72vw, 258px);
  aspect-ratio: 315 / 503;
  margin: 0 0 18px;
  animation: revealCardIn 1180ms cubic-bezier(0.2, 0.76, 0.18, 1) both;
}

.draw-reveal-back,
.draw-reveal-front {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 2px solid #aa955d;
  border-radius: 18px;
  background: rgba(3, 8, 15, 0.9);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.65);
}

.draw-reveal-back {
  z-index: 3;
  display: grid;
  place-items: center;
  animation: revealBackFade 1180ms ease-in-out both;
}

.draw-reveal-back img,
.draw-reveal-image,
.draw-reveal-deco {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.draw-reveal-front {
  opacity: 0;
  animation: revealFrontFade 1180ms ease-in-out both;
}

.draw-reveal-deco {
  position: absolute;
  inset: 0;
  z-index: 2;
  object-fit: contain;
  pointer-events: none;
}

.draw-reveal-front .rarity-img {
  z-index: 3;
}

.draw-reveal-copy {
  width: 100%;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(16, 17, 24, 0.72);
  text-align: left;
}

.draw-reveal-copy p {
  margin: 0 0 5px;
  color: #e6c27b;
  font-size: 13px;
  font-weight: 900;
}

.draw-reveal-copy h2,
.draw-reveal-copy h3 {
  margin: 0;
}

.draw-reveal-copy h2 {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.35;
}

.draw-reveal-copy h3 {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  font-weight: 800;
}

.draw-reveal-copy blockquote {
  margin: 14px 0 0;
  padding: 13px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.62;
}

.draw-reveal-continue {
  width: 100%;
  min-height: 57px;
  margin-top: 14px;
  border-radius: 0;
  background: url("assets/images/button_orange.svg?v=20260716-modal-buttons") center / 100% 100% no-repeat;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
}

.draw-reveal.is-resetting .draw-reveal-stage,
.draw-reveal.is-resetting .draw-reveal-card,
.draw-reveal.is-resetting .draw-reveal-back,
.draw-reveal.is-resetting .draw-reveal-front {
  animation: none;
}

@keyframes revealStageIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes revealCardIn {
  0% {
    opacity: 0;
    transform: scale(0.78);
    filter: brightness(0.7);
  }
  38% {
    opacity: 1;
    transform: scale(1.04);
    filter: brightness(1.5);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes revealBackFade {
  0%,
  42% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes revealFrontFade {
  0%,
  32% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.today-guardian-panel {
  width: min(calc(100% - 46px), 313px);
  margin: 0 auto;
}

.today-guardian-panel:has(.guardian-empty-state) {
  display: grid;
  align-items: center;
  min-height: calc(100svh - 255px - env(safe-area-inset-bottom));
}

.today-guardian-card,
.guardian-empty-state {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(8, 10, 16, 0.58);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}

.today-guardian-card {
  position: relative;
  width: 100%;
  aspect-ratio: 315 / 503;
}

.today-guardian-image,
.today-guardian-deco {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.today-guardian-image {
  object-fit: cover;
  border: 2px solid #aa955d;
  border-radius: 18px;
}

.today-guardian-deco {
  z-index: 2;
  object-fit: contain;
  pointer-events: none;
}

.today-guardian-copy {
  position: absolute;
  bottom: 0;
  left: 50%;
  z-index: 3;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 100%;
  aspect-ratio: 313 / 140;
  min-height: 0;
  padding: 34px 42px 22px;
  background: url("assets/images/guardian_message.svg?v=20260721-today-guardian-message") center bottom / 100% 100% no-repeat;
  text-align: center;
  transform: translateX(-50%);
}

.today-guardian-card h2 {
  display: none;
  margin: 0 0 11px;
  font-size: 22px;
}

.today-guardian-card h2 {
  font-size: 18px;
}

.today-guardian-card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  line-height: 21px;
  letter-spacing: 1px;
  text-align: center;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.guardian-empty-state {
  display: grid;
  justify-items: center;
  width: 100%;
  margin: 0 auto;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #fff;
  text-align: center;
}

.guardian-empty-state h2 {
  margin: 0 0 31px;
  font-size: 23px;
  font-weight: 800;
  line-height: 1.38;
}

.guardian-empty-state img,
.guardian-empty-copy img {
  display: block;
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.guardian-empty-state p {
  margin: 36px 0 0;
  color: #fff;
  font-size: 15px;
  line-height: 1.75;
}

.guardian-empty-state button {
  width: min(333px, 86%);
  height: 57px;
  margin-top: 28px;
  padding: 0 26px;
  border: 0;
  border-radius: 0;
  background: transparent url("assets/images/button_orange.svg") center / 100% 100% no-repeat;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
}

.guardian-empty-copy {
  grid-column: 1 / -1;
  display: grid;
  align-content: center;
  justify-items: center;
  width: 100%;
  min-height: calc(100svh - 307px - env(safe-area-inset-bottom));
  margin: 0 auto;
  color: #fff;
}

.guardian-empty-copy h2 {
  margin: 0 0 34px;
  font-size: 22px;
  font-weight: 800;
  line-height: 1.42;
  text-align: center;
}

.guardian-empty-copy p {
  width: min(244px, 76%);
  margin: 38px auto 0;
  font-size: 16px;
  line-height: 1.52;
  text-align: left;
}

@media (max-height: 760px) {
  .home-title {
    margin-top: 9px;
    margin-bottom: 11px;
  }

  .segmented {
    margin-bottom: 13px;
  }

  .tarot-card {
    width: calc(100% - 52px);
  }

  .draw-row {
    margin-top: 16px;
    width: calc(100% - 52px);
  }

  .bottom-nav {
    height: var(--tabbar-height);
  }

  .today-guardian-panel:has(.guardian-empty-state) {
    min-height: calc(100svh - 238px - env(safe-area-inset-bottom));
  }

  .guardian-empty-copy {
    min-height: calc(100svh - 286px - env(safe-area-inset-bottom));
  }

  .guardian-empty-state h2,
  .guardian-empty-copy h2 {
    margin-bottom: 22px;
  }

  .guardian-empty-state p,
  .guardian-empty-copy p {
    margin-top: 24px;
    line-height: 1.48;
  }

  .guardian-empty-state img,
  .guardian-empty-copy img {
    width: 70px;
    height: 70px;
  }

  .detail-card,
  .story-copy,
  .collection-card-detail-art,
  .collection-card-copy {
    width: min(calc(100% - 46px), 315px);
  }

  .message-box {
    width: min(calc(100% - 46px), 315px);
  }
}

@media (max-width: 360px) {
  .screen {
    padding-right: 14px;
    padding-left: 14px;
  }

  .detail-header h1 {
    font-size: 18px;
  }
}
