@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;900&family=Noto+Sans+TC:wght@400;500;700;900&display=swap');

:root {
  --brand-green: #23963f;
  --brand-green-dark: #23963f;
  --brand-cream: #fffdf3;
  --brand-card: #fff9d8;
  --brand-yellow: #ffe25a;
  --brand-text: #243222;
  --brand-soft: #f3f0df;
}

body,
body.font-sans {
  font-family: 'Inter', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei UI', sans-serif;
  background: #ffffff;
}

html,
body,
body.font-sans,
button,
input,
select,
textarea,
option,
.font-sans {
  font-family: 'Inter', 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei UI', sans-serif !important;
}

*,
*::before,
*::after {
  font-family: inherit;
}

.page:not(.hidden) {
  animation: page-enter 320ms ease-out both;
}

.campaign-home.page:not(.hidden) {
  animation: none;
}

@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.campaign-home {
  background: #ffffff;
  color: var(--brand-text);
}

.campaign-home-shell {
  width: 100%;
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  box-shadow: 0 18px 48px rgba(88, 78, 36, 0.18);
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}

.campaign-home-shell.is-logging-out {
  opacity: 0.72;
  transform: translateY(8px);
  filter: saturate(0.85);
  pointer-events: none;
}

body.menu-open {
  overflow: hidden;
}

.home-header {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 5;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 18px 16px 0;
}

.home-header-menu {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0;
  transition: background 180ms ease;
}

.home-header-menu span {
  display: block;
  width: 16px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.home-header-menu[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.9);
}

.home-header-menu[aria-expanded="true"] span {
  background: #243222;
}

.home-header-menu[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.home-header-menu[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.home-header-menu[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

.home-header-backdrop {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: rgba(25, 31, 24, 0.22);
}

.home-header-panel {
  position: absolute;
  inset: 0;
  z-index: 4;
  width: 100%;
  height: 100%;
  min-height: 100vh;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: none;
  overflow-y: auto;
}

.home-header-nav {
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 88px 24px 28px;
}

.home-header-nav a {
  width: 100%;
  padding: 18px 0;
  border-bottom: 1px solid rgba(36, 50, 34, 0.08);
  color: #243222;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  transition: color 180ms ease, transform 180ms ease;
}

.home-header-nav a:last-child {
  border-bottom: 0;
}

.home-header-nav a:hover {
  color: #23963f;
  transform: translateX(4px);
}

.hero-panel {
  position: relative;
  padding: 0;
  z-index: 0;
  height: 560px;
  overflow: visible;
}

.hero-main-image {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: calc(100% + 80px);
  object-fit: cover;
  object-position: top center;
}

.home-overlay {
  position: relative;
  z-index: 1;
  margin-top: -50px;
  padding-bottom: calc(126px + env(safe-area-inset-bottom));
}

.home-info-stack {
  padding: 0 16px;
  margin-top: 28px;
}

.home-info-card {
  background: var(--brand-card);
  border-radius: 0;
  padding: 15px 15px 14px;
  margin-bottom: 10px;
  box-shadow: inset 0 0 0 1px rgba(208, 191, 112, 0.08);
}

.home-info-card-muted {
  background: #f1f5f0;
}

.home-info-card h2 {
  color: var(--brand-green);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.home-info-card p,
.home-info-card li,
.home-info-card span,
.home-info-card a:not(.home-rule-toggle) {
  color: #4f5948;
  font-size: 14px;
  line-height: 1.75;
  letter-spacing: 0.01em;
}

.home-time-row {
  display: block;
}

.home-time-row span:first-child {
  font-weight: 700;
}

.home-time-note {
  margin-top: 2px;
}

.home-time-note span {
  display: block;
  color: #4f5948;
  font-size: 13px;
  line-height: 1.55;
}

.home-info-card ol {
  padding-left: 0;
  margin-left: 0;
  text-align: left;
  list-style: none;
}

.home-info-card li {
  text-align: left;
  padding-left: 1.2em;
  text-indent: -1.2em;
}

.home-rule-link {
  text-align: right;
  margin-top: 10px;
}

.home-rule-link .home-rule-toggle,
.home-rule-link .home-rule-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #f08500;
}

.home-rule-toggle {
  border: 0;
  padding: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.home-rule-link .home-rule-toggle {
  font-size: 13px;
  font-weight: 700;
}

.home-rule-link .home-rule-toggle .home-rule-link-arrow {
  font-size: 5px;
  line-height: 1;
  color: #f08500;
  transform-origin: center;
  transition: transform 180ms ease;
}

.home-rule-toggle[aria-expanded="true"] .home-rule-link-arrow {
  transform: rotate(180deg);
}

.home-rule-detail {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(79, 89, 72, 0.14);
}

.home-rule-detail p {
  color: #4f5948;
  font-size: 13px;
  line-height: 1.75;
}

.home-rule-detail p + p {
  margin-top: 8px;
}

.prize-section {
  padding: 12px 16px 0;
  background: transparent;
}

.prize-title {
  text-align: center;
  color: var(--brand-green);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.1em;
  margin-bottom: 14px;
}

.prize-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 12px;
}

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

.prize-card-featured {
  width: 100%;
  margin-bottom: 24px;
}

.prize-visual-featured {
  width: 100%;
  aspect-ratio: auto;
  height: 184px;
}

.prize-visual {
  aspect-ratio: 1 / 1;
  border-radius: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
  margin-bottom: 15px;
  box-shadow: none;
  filter: none;
}

.prize-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  box-shadow: none;
  filter: none;
}

.prize-card-featured .prize-art {
  height: 100%;
}

.prize-label {
  margin-top: 8px;
  color: #717171;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
}

.prize-name {
  color: #717171;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.4;
  margin-top: 4px;
}

.home-login-wrap {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 2;
  width: min(100%, 430px);
  transform: translateX(-50%);
  padding: 14px 16px calc(24px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: #ffffff;
}

.home-login-note {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: center;
  color: var(--brand-green);
  font-size: 14px;
  line-height: 1.4;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 0;
  cursor: default;
}

.home-login-note.is-action {
  cursor: pointer;
}

.home-login-note:disabled {
  cursor: wait;
  opacity: 0.75;
}

.home-login-primary {
  width: 100%;
  min-height: 54px;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, #23963f, #23963f);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  box-shadow: none;
}

.home-login-primary:disabled {
  cursor: not-allowed;
  background: #d8e1d9;
  color: #6f8374;
  box-shadow: none;
  filter: none;
}

.home-login-primary.is-disabled {
  background: #d8e1d9;
  color: #6f8374;
  opacity: 1;
  pointer-events: none;
}

/* Custom checkbox checkmark */
input[type="checkbox"]:checked::after {
  content: '✓';
  color: white;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 12px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
.no-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.no-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 1ms !important;
  }
}
