/* Top-page shortcuts and mini games. */
html {
  scroll-behavior: smooth;
}

.page-wrapper > section[id] {
  scroll-margin-top: 80px;
}

#minigame .bottle-cards {
  position: relative;
  gap: 16px;
  padding-inline: 20px;
  scroll-padding-inline: 20px;
}

#minigame .bottle-card {
  flex-basis: calc(100% - 32px);
  min-width: 0;
  opacity: 1;
  transform: none;
  transition: none;
  padding-block: 20px 18px;
}

#minigame [data-mini-game="match"] {
  display: flex;
  flex-direction: column;
}

#minigame [data-mini-game="match"] .game-title {
  margin-bottom: 6px;
}

#minigame [data-mini-game="match"] .game-hint {
  line-height: 1.5;
}

#minigame [data-mini-game="match"] .slot-reels {
  margin-top: auto;
}

#minigame [data-mini-game="match"] #slotBtn {
  margin-top: auto;
}

#minigame [data-mini-game="hide"] {
  flex-basis: calc(100% - 20px);
  padding-inline: 8px;
}

#minigame [data-mini-game="hide"] .hide-seek-target {
  flex-direction: row;
  justify-content: center;
  gap: 8px;
  margin-bottom: 12px;
}

#minigame [data-mini-game="hide"] .hide-seek-target img {
  width: 40px;
  height: 40px;
}

#minigame [data-mini-game="hide"] .door-grid {
  width: min(100%, 252px);
  aspect-ratio: 1;
  margin-inline: auto;
  gap: 2px;
  border-radius: 8px;
  overflow: hidden;
}

#minigame [data-mini-game="hide"] .door-item {
  border: 0;
  border-radius: 0;
}

#minigame [data-mini-game="hide"] .door-item.win-door {
  outline: 2px solid #f5c842;
  outline-offset: -2px;
}

#minigame img[data-twidol-id="default:7"] {
  background-color: #fff;
}

#minigame .twidol-election-link {
  display: block;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  color: #4a9e3f;
  text-decoration: none;
  line-height: 1.5;
}

#minigame [data-mini-game="hide"] .twidol-election-link {
  color: #d4748a;
}

#minigame .twidol-election-caption {
  display: block;
  color: #7d827b;
  font-size: 9px;
}

#minigame .twidol-election-action {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 600;
}

#minigame .twidol-election-link:hover .twidol-election-action {
  text-decoration: underline;
  text-underline-offset: 3px;
}

#minigame .twidol-election-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 4px;
}

#minigame .card-dots {
  gap: 0;
  margin-top: 12px;
}

#minigame .card-dots .dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

#minigame .card-dots .dot::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ccc;
}

#minigame .card-dots .dot.active::before { background: #4a9e3f; }
#minigame .card-dots .dot:focus-visible { outline: 2px solid #4a9e3f; border-radius: 50%; }



.hero-tags {
  position: absolute;
  top: max(260px, calc(18svh + 126px));
  right: -6px;
  z-index: 4;
  display: grid;
  grid-auto-rows: 38px;
  width: 108px;
  filter: drop-shadow(-1px 3px 2px rgba(30, 74, 24, 0.13));
}

.hero-tag {
  --ticket-paper: #f0f4ee;
  --ticket-ink: #315c2a;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 44px;
  color: var(--ticket-ink);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.035em;
  text-decoration: none;
  white-space: nowrap;
  animation: ticketSlideIn 650ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 180ms;
  transition: transform 0.2s ease;
}

.hero-ticket {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 32px;
  padding: 6px 25px 6px 10px;
  border-radius: 4px 0 0 4px;
  background: var(--ticket-paper);
  -webkit-mask-image: radial-gradient(circle at 0 50%, transparent 4px, #000 4.5px);
  mask-image: radial-gradient(circle at 0 50%, transparent 4px, #000 4.5px);
}

.hero-ticket::before {
  content: '';
  position: absolute;
  inset: 4px 21px 4px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  opacity: 0.18;
  pointer-events: none;
}

.hero-ticket-stub {
  position: absolute;
  top: 3px;
  right: 6px;
  bottom: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  border-left: 1px dashed currentColor;
  color: var(--ticket-ink);
  font-size: 7px;
  font-weight: 400;
  letter-spacing: 0.04em;
  opacity: 0.55;
}

.hero-tag--contents { --ticket-paper: #fae2eb; --ticket-ink: #7b415c; animation-delay: 260ms; }
.hero-tag--drink { --ticket-paper: #fff0ca; --ticket-ink: #785626; animation-delay: 340ms; }
.hero-tag--two { --ticket-paper: #e9e0f7; --ticket-ink: #5b447d; animation-delay: 420ms; }
.hero-tag--solo { --ticket-paper: #def4f5; --ticket-ink: #2e626a; animation-delay: 500ms; }

@keyframes ticketSlideIn {
  from { translate: 100% 0; }
  to { translate: 0 0; }
}

@media (hover: hover) {
  .hero-tag:hover { transform: translateX(-4px); }
}

.hero-tag:active { transform: translateX(-3px); }
.hero-tag:focus-visible {
  outline: none;
}

.hero-tag:focus-visible .hero-ticket {
  box-shadow: inset 0 0 0 3px var(--ticket-ink);
}

@media (max-height: 740px) {
  .hero { min-height: 740px; }
  .hero-text { top: 195px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-tag { animation: none; transition: none; }
}
