:root {
  --bottom-bar-height: 59px;
}
html {
  background-color: #2d5488;
  scrollbar-gutter: stable;
}
.hero,
.site-footer,
.desktop-warning {
  overflow-anchor: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background-color: #2d5488;
  color: #152657;
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
}
yu-header {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  min-height: 52px;
}
body {
  padding-top: 52px;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  flex: 1;
  background: #8bd7e8 url("../images/bg-mb.png") center top / 100% 100%
    no-repeat;
}

.hero::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 568px;
  aspect-ratio: 1125 / 476;
  background: url("../images/bg-deco.png") center top / contain no-repeat;
  mix-blend-mode: soft-light;
  opacity: 0.5;
  pointer-events: none;
  z-index: -1;
}
.hero-content {
  width: 100%;
  max-width: 590px;
  margin: 0 auto;
  padding: 36px 26px 55px;
}
.hero-title {
  display: block;
  width: 100%;
  max-width: 306px;
  height: auto;
  margin: 0 auto;
}
.hero-subtitle {
  display: block;
  width: 188px;
  max-width: 75%;
  height: auto;
  margin: 25px auto 34px;
}
.reward-panel {
  position: relative;
  isolation: isolate;
  max-width: 321px;
  margin: 0 auto;
  padding: 31px 24px 30px;
}

.panel-surface {
  position: absolute;
  inset: 1px;
  z-index: -2;
  pointer-events: none;
  background-color: rgba(212, 247, 255, 0.52);
  clip-path: polygon(
    12px 0,
    calc(100% - 12px) 0,
    100% 12px,
    100% calc(100% - 12px),
    calc(100% - 12px) 100%,
    12px 100%,
    0 calc(100% - 12px),
    0 12px
  );
  border: 1px solid rgba(255, 255, 255, 0.65);
}
.panel-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
        135deg,
        transparent calc(50% - 0.6px),
        rgba(255, 255, 255, 0.65) 50%,
        transparent calc(50% + 0.6px)
      )
      top left / 12px 12px no-repeat,
    linear-gradient(
        45deg,
        transparent calc(50% - 0.6px),
        rgba(255, 255, 255, 0.65) 50%,
        transparent calc(50% + 0.6px)
      )
      top right / 12px 12px no-repeat,
    linear-gradient(
        45deg,
        transparent calc(50% - 0.6px),
        rgba(255, 255, 255, 0.65) 50%,
        transparent calc(50% + 0.6px)
      )
      bottom left / 12px 12px no-repeat,
    linear-gradient(
        135deg,
        transparent calc(50% - 0.6px),
        rgba(255, 255, 255, 0.65) 50%,
        transparent calc(50% + 0.6px)
      )
      bottom right / 12px 12px no-repeat;
}
.reward-panel::before,
.reward-panel::after {
  content: "";
  position: absolute;
  inset: -7px;
  pointer-events: none;
  z-index: -1;
  background: #fff;
}
.reward-panel::before {
  clip-path: polygon(
    0 16px,
    16px 0,
    38% 0,
    calc(38% + 18px) 8px,
    20px 8px,
    8px 20px,
    8px 38%,
    0 calc(38% + 14px)
  );
}
.reward-panel::after {
  clip-path: polygon(
    100% calc(62% - 14px),
    100% calc(100% - 16px),
    calc(100% - 16px) 100%,
    62% 100%,
    calc(62% - 18px) calc(100% - 8px),
    calc(100% - 20px) calc(100% - 8px),
    calc(100% - 8px) calc(100% - 20px),
    calc(100% - 8px) 62%
  );
}
.finish-art {
  display: block;
  width: 100%;
  height: auto;
}
.start-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 56px;
  margin: 22px auto 0;
  border: 0;
  border-radius: 8px;
  background: #ff7f00;
  cursor: pointer;
  transition:
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
@media (hover: hover) {
  .start-button:hover img {
    transform: scale(1.1);
  }
}
.start-button:active {
  transform: translateY(1px);
}
.start-button img {
  width: 80px;
  height: auto;
  transition: transform 0.2s ease;
}
.site-footer {
  display: block;
  background: #345383;
  color: white;
  padding: 16px 20px
    calc(16px + var(--bottom-bar-height) + env(safe-area-inset-bottom));
  font-size: 11px;
  line-height: 17px;
}
.footer-content {
  max-width: 1200px;
  margin: auto;
}
.bottom-actions {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
  background: #2d5488;
}
.bottom-actions button {
  width: 50%;
  min-height: var(--bottom-bar-height);
  border: 0;
  color: white;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
}
.bottom-actions button:first-child {
  background: #232f93;
}
.bottom-actions button:last-child {
  background: #087fe7;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #ffb552;
  outline-offset: -4px;
}
.preview-status {
  position: fixed;
  z-index: 110;
  left: 50%;
  bottom: calc(var(--bottom-bar-height) + 16px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100% - 32px);
  background: #152657;
  color: white;
  padding: 12px 18px;
  border-radius: 8px;
  font-size: 18px;
}
.desktop-rules-button {
  display: none;
}
@media (min-width: 768px) {
  .hero::before {
    display: none;
  }
  yu-header {
    min-height: 60px;
  }
  body {
    padding-top: 60px;
  }
  .hero {
    flex: none;
    min-height: 764px;
    background-image: url("../images/bg-pc.png");
    background-size: cover;
    background-position: center bottom;
  }
  .hero-content {
    max-width: 732px;
    padding-top: 80px;
    padding-bottom: 87px;
  }
  .hero-title {
    width: 440px;
    max-width: 100%;
  }
  .hero-subtitle {
    width: 232px;
    margin-top: 40px;
    margin-bottom: 35px;
  }
  .reward-panel {
    max-width: 666px;
    padding: 49px 36px;
  }
  .finish-art {
    width: 85%;
    margin: 0 auto;
  }
  .start-button {
    width: 164px;
    height: 50px;
    margin-top: 30px;
  }
  .start-button img {
    width: 74px;
  }
  .bottom-actions {
    display: none;
  }
  .desktop-rules-button {
    display: block;
    position: fixed;
    right: 24px;
    top: 40%;
    transform: translateY(-50%);
    z-index: 50;
    border: 0;
    border-radius: 12px;
    background: #2549ad;
    color: #fff;
    padding: 18px 14px;
    writing-mode: vertical-rl;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 4px;
    cursor: pointer;
  }
  .desktop-rules-button:hover {
    background: #2d58c2;
  }
  .site-footer {
    background: #152657;
    font-size: 13px;
    line-height: 24px;
    text-align: center;
    padding: 24px 32px;
  }
  .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 12px;
    max-width: 1500px;
  }
  .preview-status {
    bottom: 24px;
  }
}
@media (max-width: 359px) {
  .hero-content {
    padding-left: 20px;
    padding-right: 20px;
  }
  .reward-panel {
    padding-left: 20px;
    padding-right: 20px;
  }
  .site-footer {
    padding-left: 14px;
    padding-right: 14px;
    font-size: 10px;
  }
}

.info-modal {
  width: calc(100% - 40px);
  max-width: 590px;
  max-height: 75vh;
  margin: auto;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
  color: #000;
}
.info-modal::backdrop {
  background: rgba(0, 0, 0, 0.55);
}
.modal-frame {
  position: relative;
  height: 75vh;
  max-height: 75vh;
  padding: 8px;
  filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.8));
}
.modal-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #fff;
  clip-path: polygon(
    5% 0,
    38% 0,
    42% 1.5%,
    95% 1.5%,
    100% 5%,
    100% 94%,
    95% 100%,
    64% 100%,
    61% 98.5%,
    5% 98.5%,
    0 95%,
    0 4%
  );
}
.modal-inner {
  position: relative;
  height: 100%;
  padding: 30px 24px 22px;
  background: #d4f7ff;
  clip-path: polygon(
    4% 0,
    95% 0,
    100% 4%,
    100% 95%,
    95% 100%,
    4% 100%,
    0 96%,
    0 4%
  );
  display: flex;
  flex-direction: column;
}
.modal-title {
  flex: none;
  margin: 0 0 22px;
  color: #0600ff;
  text-align: center;
  font-family: "Noto Serif TC", "Songti TC", serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 3.64px;
  line-height: 1.4;
}
.modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 2;
}
.modal-close,
.modal-close:focus,
.modal-close:focus-visible,
.modal-close:active {
  outline: none;
  box-shadow: none;
  -webkit-tap-highlight-color: transparent;
}
.modal-close::before,
.modal-close::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 6px;
  width: 24px;
  height: 2px;
  background: #111;
  transform: rotate(45deg);
}
.modal-close::after {
  transform: rotate(-45deg);
}
.modal-reading {
  position: relative;
  flex: 1;
  min-height: 0;
}
.modal-scroll {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: 1.4px;
  overflow-wrap: anywhere;
  padding-right: 3px;
}
.modal-scroll p {
  margin: 0 0 12px;
}
.modal-scroll p:has(> strong:only-child) {
  margin-bottom: 4px;
}
.modal-scroll ul {
  list-style-type: disc;
  margin: 0 0 18px;
  padding-left: 21px;
}
.modal-scroll li {
  margin-bottom: 4px;
}
#rules-content ul {
  list-style: none;
}
#rules-content li {
  position: relative;
}
#rules-content li::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0.75em;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  transform: translateY(-50%);
}
.modal-scroll a {
  text-decoration: underline;
}
#warning-content {
  font-size: 18px;
  letter-spacing: 1.2px;
}
#warning-content p:first-child,
#warning-content p:last-child {
  font-size: 18px;
  font-weight: 700;
}
.modal-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, rgba(212, 247, 255, 0), #d4f7ff);
  pointer-events: none;
  transition: opacity 0.2s;
}
.modal-fade.is-hidden {
  opacity: 0;
}
@media (max-width: 359px) {
  .modal-inner {
    padding-left: 18px;
    padding-right: 18px;
  }
  .modal-title {
    font-size: 26px;
  }
}

.entrance-pending .hero-title,
.entrance-pending .hero-subtitle,
.entrance-pending .finish-art,
.entrance-pending .start-button {
  visibility: hidden;
}

@media (max-width: 767px) {
  .info-modal {
    max-height: 68vh;
  }
  .modal-frame {
    height: 68vh;
    max-height: 68vh;
  }
}

.preview-status,
.scroll-hint {
  font-size: 18px;
}
.explanation,
.hero-content .explanation {
  color: #fff;
}
.explanation-heading::before,
.explanation-heading::after {
  background: currentColor;
}
@media (min-width: 768px) {
  .preview-status,
  .scroll-hint {
    font-size: 18px;
  }
}
.start-button {
  width: 220px;
  height: 64px;
  max-width: 100%;
}
.start-button img {
  width: 94px;
}
@media (min-width: 768px) {
  .start-button {
    width: 260px;
    height: 68px;
  }
  .start-button img {
    width: 104px;
  }
}
.preview-status,
.scroll-hint,
.declaration-read-prompt {
  font-size: 16px;
}
@media (min-width: 768px) {
  .preview-status,
  .scroll-hint,
  .declaration-read-prompt {
    font-size: 18px;
  }
}
