* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  font-family: "Noto Sans TC", sans-serif;
  background: #b71c1c;
  color: #fff;
  overflow: hidden;
  overflow-x: hidden;
  font-size: clamp(15px, 1.15vw + 0.5vh, 20px);
}

.container {
  display: flex;
  width: 100%;
  max-width: 100%;
  height: calc(100vh - 2em);
  padding: 2.6em 1em 0;
  gap: 1em;
  box-sizing: border-box;
  min-height: 0;
  overflow-x: hidden;
}

.back-link {
  position: fixed;
  top: 0.6em;
  left: 0.8em;
  z-index: 20;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff8e1;
  text-decoration: none;
  font-size: 0.95em;
  border: 1px solid rgba(255, 235, 59, 0.6);
}

.back-link:hover,
.back-link:focus {
  background: rgba(0, 0, 0, 0.55);
}

.left-column {
  flex: 1 1 33.333%;
  padding: 1.2em;
  box-sizing: border-box;
  overflow: auto;
  min-height: 0;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.right-column {
  flex: 2 1 66.666%;
  padding: 1.2em;
  box-sizing: border-box;
  overflow: auto;
  min-height: 0;
  min-width: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.left-column::-webkit-scrollbar,
.right-column::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.panel {
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.18);
  border: 2px solid rgba(255, 235, 59, 0.5);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
}

.left-column h1 {
  font-size: 1.55em;
  margin: 0 0 0.15em 0;
  color: #ffeb3b;
}

.left-column p {
  font-size: 0.9em;
  line-height: 1.35em;
  margin: 0.3em 0;
}

.left-column ul {
  list-style: none;
  padding: 0;
  margin: 0.4em 0;
}

.flow-cards {
  display: flex;
  gap: 0.8em;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.2em;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.flow-cards::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.flow-cards li {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 90%;
  padding: 0.65em 0.75em;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 235, 59, 0.4);
  display: flex;
  align-items: flex-start;
  font-size: 0.9em;
  line-height: 1.35em;
  scroll-snap-align: start;
}

.flow-card {
  flex: 0 0 auto;
}

.flow-text {
  display: block;
}

.step-num {
  display: inline-block;
  width: 1.5em;
  height: 1.5em;
  line-height: 1.5em;
  text-align: center;
  font-size: 0.9em;
  font-weight: bold;
  color: #b71c1c;
  background: #ff9800;
  border-radius: 50%;
  margin-right: 0.5em;
  flex: 0 0 auto;
  animation: none;
}

.right-column h1 {
  font-size: 1.7em;
  margin: 0 0 0.15em 0;
  color: #ffeb3b;
}

.prize-section {
  display: flex;
  align-items: stretch;
  margin-bottom: 0.4em;
  min-width: 0;
}

.section-header {
  width: 3em;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.1em 0;
  margin-right: 0.2em;
  border-right: 1px solid #ffeb3b;
}

.section-title-vertical {
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-size: 1.25em;
  color: #ffeb3b;
}

.section-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.section-note {
  font-size: 0.9em;
  color: #ffeb3b;
  margin-bottom: 0.2em;
  line-height: 1.3em;
  min-height: 1.3em;
}

.carousel-wrapper {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.carousel-large {
  min-height: 14vh;
}

.carousel-small {
  min-height: 16vh;
}

.carousel-wrapper-side {
  display: flex;
  align-items: center;
  gap: 0.5em;
  flex: 1;
  min-height: 0;
  min-width: 0;
  max-width: 100%;
}

.carousel-wrapper-side .flow-cards,
.carousel-wrapper-side .carousel-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
}

.carousel-btn {
  flex: 0 0 1.8em;
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
  background: rgba(255, 235, 59, 0.2);
  border: 1.5px solid rgba(255, 235, 59, 0.6);
  color: #ffeb3b;
  font-size: 1.25em;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.carousel-btn:hover {
  background: rgba(255, 235, 59, 0.35);
  border-color: #ffeb3b;
}

.carousel-btn:active {
  transform: scale(0.95);
}

.carousel-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.carousel-content {
  display: flex;
  gap: 0.8em;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.2em;
  scrollbar-width: none;
  -ms-overflow-style: none;
  min-width: 0;
  max-width: 100%;
}

.carousel-content::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.carousel-large-content {
  animation-duration: 25s;
}

.carousel-small-content {
  animation-duration: 35s;
}

@keyframes scrollUp {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }
}

.prize-card {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 90%;
  padding: 0.65em 0.75em;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 235, 59, 0.4);
  scroll-snap-align: start;
  min-width: 0;
}

.item-title {
  font-size: 1.25em;
  font-weight: bold;
  color: #ffeb3b;
}

.item-text {
  margin-left: 0.3em;
  line-height: 1.3em;
  font-size: 0.95em;
}

.holy-cup-only {
  display: inline-block;
  padding: 0.1em 0.45em;
  margin-left: 0.25em;
  border-radius: 999px;
  border: 1px solid rgba(255, 235, 59, 0.7);
  background: rgba(255, 235, 59, 0.2);
  color: #ffeb3b;
  font-weight: 700;
  font-size: 0.9em;
  white-space: nowrap;
}

.carousel-small .item-text {
  font-size: 1em;
}

.marquee-container {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2em;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 10;
}

.marquee {
  font-size: 1.05em;
  white-space: nowrap;
  color: #fff8e1;
  display: inline-block;
  line-height: 2em;
}

@media (max-width: 1200px) {
  html,
  body {
    font-size: 17px;
  }

  .container {
    height: auto;
    padding: 3.2em 1em 3.5em;
    overflow: auto;
  }

  .left-column,
  .right-column {
    flex: unset;
  }

  .carousel-large,
  .carousel-small {
    height: auto;
  }
}

@media (min-width: 1600px) {
  html,
  body {
    font-size: 19px;
  }

  .left-column h1 {
    font-size: 1.65em;
  }

  .right-column h1 {
    font-size: 1.8em;
  }

  .section-title-vertical {
    font-size: 1.3em;
  }

  .item-title {
    font-size: 1.3em;
  }
}

@media (min-width: 2000px) {
  html,
  body {
    font-size: 20px;
  }
}

@media (max-width: 720px) {
  .container {
    gap: 1.2em;
  }

  .left-column,
  .right-column {
    padding: 1em;
  }

  .prize-section {
    flex-direction: column;
  }

  .section-header {
    width: 100%;
    flex-direction: row;
    justify-content: flex-start;
    border-right: 0;
    border-bottom: 1px solid #ffeb3b;
    margin-right: 0;
    padding: 0 0 0.35em 0;
    margin-bottom: 0.45em;
  }

  .section-title-vertical {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    font-size: 1em;
  }

  .section-content {
    width: 100%;
  }
}

@media (orientation: portrait) {
  .container {
    flex-direction: column;
    height: calc(100dvh - 2em);
  }

  .left-column {
    flex: 0 0 33.333%;
  }

  .right-column {
    flex: 0 0 66.666%;
  }
}

@media (orientation: landscape) {
  .container {
    flex-direction: column;
    height: calc(100dvh - 2em);
  }

  .left-column {
    flex: 0 0 33.333%;
  }

  .right-column {
    flex: 0 0 66.666%;
  }
}
