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

:root {
  --paper: #fff1c9;
  --paper2: #fffdf5;
  --ink: #403632;
  --muted: #76675e;
  --red: #e94962;
  --red2: #ffc2bd;
  --green: #4abf8a;
  --line: #efd89b;
  --gold: #ffc629;
  --shadow: 0 6px 0 #d7b66e, 0 12px 22px #76511e22;
}

body {
  background-color: #fff1c9;
  background-image: repeating-linear-gradient(135deg, #fff5d9 0 12px, #ffefc7 12px 24px);
  color: var(--ink);
  font-family: 'Noto Sans TC', 'Noto Sans JP', sans-serif;
  font-weight: 500;
}
.topbar {
  background: #fff;
  border-bottom: 3px solid #ed4761;
  box-shadow: 0 4px 0 #e4bf63;
}
.brand { color: #453a34; font-weight: 900; text-shadow: 1px 2px 0 #f9c53b; }
.brand-mark {
  background: #e6425c;
  color: #fff;
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 3px #f4bd2d, 0 4px 0 #cb9e48;
}
.brand small { color: #de405a; font-weight: 900; }
.private-tag { color: #269773; font-weight: 800; }
.admin-link { color: #5e5149; font-weight: 800; }
.admin-link:hover { color: #e6425c; }
main { max-width: 1240px; }
.hero {
  min-height: 330px;
  margin: 24px 0 8px;
  padding: 44px clamp(22px, 6vw, 78px);
  border: 0;
  border-radius: 9px;
  background-color: #e94d8b;
  background-image: radial-gradient(#ffffff26 2px, transparent 2.5px), linear-gradient(90deg, #e94d8b, #ee5b9a);
  background-size: 22px 22px, auto;
  box-shadow: 0 7px 0 #c64570, 0 12px 22px #7d40221f;
}
.hero:after {
  content: 'どきどき';
  z-index: 0;
  position: absolute;
  top: 28px;
  right: 8%;
  width: 145px;
  height: 145px;
  display: grid;
  place-items: center;
  color: #516047;
  background: #fff9df;
  border: 4px solid #fff;
  border-radius: 48% 52% 45% 55%;
  box-shadow: 0 0 0 4px #ffcf32, 0 7px 0 #cf9d3c;
  font-size: 25px;
  font-weight: 900;
  transform: rotate(7deg);
  opacity: 1;
}
.hero-copy { position: relative; z-index: 1; }
.eyebrow {
  display: inline-block;
  padding: 5px 10px;
  color: #604b39;
  background: #ffe56b;
  border: 2px solid #fff;
  border-radius: 4px;
  box-shadow: 2px 3px 0 #ca6b55;
  font: 900 10px 'Noto Sans JP', sans-serif;
  letter-spacing: .14em;
}
.hero h1 {
  color: #fff;
  font-weight: 900;
  line-height: 1.35;
  letter-spacing: .02em;
  text-shadow: 2px 3px 0 #bd4968, -1px -1px 0 #bd4968, 1px -1px 0 #bd4968, -1px 1px 0 #bd4968, 0 6px 0 #b23d65;
}
.hero h1 em {
  color: #fff36b;
  font-style: normal;
  text-shadow: 2px 3px 0 #bf4567, -1px -1px 0 #bf4567, 1px -1px 0 #bf4567, -1px 1px 0 #bf4567, 0 6px 0 #b23d65;
}
.hero-note { color: #fff; font-weight: 700; text-shadow: 1px 2px 0 #ab4566; }
.hero-stamp {
  z-index: 2;
  border: 4px solid #fff;
  background: #ffcf32;
  color: #e74760;
  box-shadow: 0 0 0 4px #39ae82, 0 7px 0 #317858;
  font-weight: 900;
}
.hero-stamp small { color: #3e8166; font-weight: 900; }
.year-section {
  margin: 27px 0 40px;
  padding: 28px clamp(18px, 3vw, 38px) 34px;
  background-color: #70d99e;
  background-image: radial-gradient(#ffffff20 2px, transparent 2.5px), linear-gradient(135deg, #75dfa4, #59ca90);
  background-size: 22px 22px, auto;
  border: 4px solid #fff;
  border-radius: 9px;
  box-shadow: 0 0 0 3px #4eb879, 0 8px 0 #33865c;
}
.section-heading h2 { color: #fff; font-weight: 900; text-shadow: 2px 3px 0 #3d9e70; }
.section-heading .muted { color: #326b52; font-weight: 800; }
.year-card {
  min-height: 150px;
  padding: 20px 15px;
  color: #59453b;
  background: #fff9dd;
  border: 3px solid #fff;
  border-top: 3px solid #fff;
  border-radius: 9px;
  box-shadow: 0 0 0 3px #f1bd39, 0 6px 0 #bd9140;
  transform: rotate(-1deg);
}
.year-card:nth-child(even) { background: #ffb6c8; box-shadow: 0 0 0 3px #ec678e, 0 6px 0 #ad4964; transform: rotate(1deg); }
.year-card:nth-child(3n) { background: #a9dafa; box-shadow: 0 0 0 3px #4ba6d4, 0 6px 0 #347aa8; }
.year-card:hover, .year-card.active { transform: translateY(-5px) rotate(0); border-color: #fff; box-shadow: 0 0 0 4px #ed4e69, 0 10px 0 #b44860, 0 15px 22px #72512c30; }
.year-card .year-num { color: #e44762; font-weight: 900; }
.year-card strong { color: #51433a; font-weight: 900; text-shadow: 1px 2px #fff; }
.year-card .mode { color: #5c5148; font-weight: 700; }
.year-card .count { color: #e44762; font-weight: 900; }
.year-card:after { color: #e44762; font-weight: 900; }
.collection { border-color: #e8c966; }
.year-tabs { border-color: #e7ca72; }
.back-home { color: #d94360; font-weight: 900; }
.year-tab {
  color: #53463f;
  background: #fffdf4;
  border: 2px solid #fff;
  box-shadow: 0 3px 0 #d6bc77;
  font-weight: 900;
}
.year-tab small { color: #e24961; font-weight: 900; }
.year-tab.active { color: #fff; background: #e94962; border-color: #fff; box-shadow: 0 3px 0 #b84259; }
.year-tab.active small { color: #ffe86a; }
.year-tab:hover:not(.active) { color: #cf3d5a; border-color: #f1bb3f; }
.collection-top h2 { color: #4d4038; font-weight: 900; text-shadow: 1px 2px #fff; }
.collection-top p { color: #76675e; }
.progress { color: #246c50; background: #d6f1b7; font-weight: 900; border: 2px solid #fff; box-shadow: 0 3px 0 #82bd6b; }
.prize-board {
  padding: 28px;
  background-color: #71d69b;
  background-image: radial-gradient(#ffffff20 2px, transparent 2.5px), linear-gradient(135deg, #77dfa3, #5cc58c);
  background-size: 19px 19px, auto;
  border: 4px solid #fff;
  border-radius: 9px;
  box-shadow: 0 0 0 3px #4dae79, 0 8px 0 #377e58;
}
.board-title { color: #fffdf0; font-weight: 900; text-shadow: 1px 2px #449a70; }
.prize-grid { gap: 12px; }
.prize {
  color: #57443b;
  min-height: 82px;
  background: #fff7d2;
  border: 3px solid #fff;
  border-radius: 5px;
  box-shadow: 0 4px 0 #d4b258;
}
.prize:nth-child(4n+2) { background: #ffcad4; box-shadow: 0 4px 0 #ca7a8a; }
.prize:nth-child(4n+3) { background: #b9e4fa; box-shadow: 0 4px 0 #6ba9cb; }
.prize:nth-child(4n) { background: #fff; box-shadow: 0 4px 0 #cfc4a9; }
.prize:hover { transform: translateY(-3px); box-shadow: 0 7px 0 #bf8e55; }
.prize .prize-label { color: #df415e; font: 900 14px 'Noto Sans JP', sans-serif; text-shadow: 1px 1px #fff; }
.prize .prize-caption { color: #61534a; font-weight: 700; text-shadow: none; }
.prize.opened { border-style: solid; filter: saturate(.8); }
.prize.opened:after { color: #288862; font-weight: 900; text-shadow: 1px 1px #fff; }
.draw-panel {
  color: #574237;
  background: #ffe982;
  border: 4px solid #fff;
  border-radius: 9px;
  box-shadow: 0 0 0 3px #ef9f43, 0 8px 0 #bd7541;
}
.draw-panel p { color: #604b3c; font-weight: 900; }
.draw-box {
  border: 5px solid #fff;
  border-radius: 8px;
  box-shadow: 0 0 0 4px #efb933, 0 7px 0 #b93c52;
}
.primary-btn {
  border: 3px solid #fff;
  border-radius: 5px;
  background: #e94962;
  color: #fff;
  font-weight: 900;
  text-shadow: 1px 1px #ad3550;
  box-shadow: 0 4px 0 #b43d56, 0 0 0 2px #ffd33d;
}
.primary-btn:hover { background: #f26779; box-shadow: 0 3px 0 #b43d56, 0 0 0 2px #ffd33d; }
.box-art {
  background: linear-gradient(145deg, #ffe775 0 48%, #ffb4c7 48% 100%);
  border: 4px solid #fff;
  border-radius: 7px;
  box-shadow: 0 0 0 3px #48b785, 0 7px 0 #328361;
}
.blind-box:nth-child(3n+2) .box-art { background: linear-gradient(145deg, #a7dff8 0 48%, #bce8cc 48%); box-shadow: 0 0 0 3px #f1b935, 0 7px 0 #a47a2a; }
.blind-box:nth-child(3n) .box-art { background: linear-gradient(145deg, #ffaec3 0 48%, #ffd77b 48%); box-shadow: 0 0 0 3px #fff, 0 7px 0 #ba6474; }
.box-art:before { inset: 9px; border: 2px solid #fff9; }
.box-art .box-icon { filter: drop-shadow(1px 2px 0 #80624830); }
.box-art .box-label { color: #fff; background: #e94962; border: 2px solid #fff; font-weight: 900; }
.blind-box.opened .box-art { background: linear-gradient(145deg, #ffdf72 0 50%, #f5a5ba 50%); border-color: #fff; }
.box-index { color: #d94661; font-weight: 900; }
.box-state { color: #4e765f; font-weight: 900; }
.last-prize-card { background: #fff2b4; border: 4px solid #fff; box-shadow: 0 0 0 4px #edaa31, 0 7px 0 #bd7541; }
.last-prize-card .prize-label { color: #d94360; text-shadow: 1px 1px #fff; }
.last-prize-question { background: #f17885; color: #fff379; border: 3px solid #fff; }
.surprise-box .box-art { background: radial-gradient(circle, #fff59b, #f387a2 74%); box-shadow: 0 0 0 4px #f5bd37, 0 8px 0 #b97b34; }
.modal-backdrop { background: #45372e88; }
.modal {
  color: #51443b;
  background: #fffdf5;
  border: 4px solid #fff;
  border-radius: 10px;
  box-shadow: 0 0 0 4px #e94f70, 0 0 0 8px #ffd348, 0 20px 60px #4e362c55;
}
.modal h3 { color: #dc435f; font-weight: 900; text-shadow: 1px 1px #fff; }
.modal .muted, .modal-date { color: #77695f; }
.modal-close { color: #e34a63; font-weight: 900; }
.memory-text { color: #51443b; }
.memory-media, .last-prize-image { background: #fff3cf; border: 3px solid #fff; box-shadow: 0 0 0 3px #efbd44; }
.paper-tear { background: #ffe97f; border: 3px dashed #e35268; color: #51443b; box-shadow: 0 0 0 3px #fff; }
.paper-tear .tear-cover { color: #d84661; font-weight: 900; text-shadow: 1px 1px #fff; }
.paper-tear small { color: #705a48; font-weight: 700; }
.admin-tabs { border-color: #ead7a9; }
.tab-btn { color: #72645b; font-weight: 900; }
.tab-btn.active { color: #df4862; border-color: #df4862; }
.field label { color: #5d4f45; font-weight: 900; }
.field input, .field textarea, .field select { color: #4f4239; background: #fffefa; border: 2px solid #e7d8b7; border-radius: 4px; }
.field input::placeholder, .field textarea::placeholder { color: #aa9b8d; }
.field input:focus, .field textarea:focus { border-color: #e94f70; }
.note-box { color: #665342; background: #fff0bf; border-left: 5px solid #e94f70; }
.record-row, .year-setting-row { color: #51443b; background: #fffefa; border-color: #ead9b2; }
.record-row small { color: #806e60; }
.secondary-btn { color: #66574c; border: 2px solid #d7c69d; border-radius: 4px; font-weight: 900; }
.secondary-btn:hover { border-color: #e94f70; color: #d84360; }
.empty-note { color: #7d6d60; }
.reset-progress-note { margin-top: 22px; }
footer { color: #725f50; border-color: #e3ca80; font-weight: 900; }
.banner-hero {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1708 / 921;
  min-height: 0;
  margin: 22px auto 12px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 10px;
  background: transparent;
  box-shadow: 0 7px 0 #d2a849, 0 12px 22px #76511e22;
}
.banner-hero:after { display: none; }
.home-banner { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.banner-characters { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.banner-character {
  position: absolute;
  bottom: 0;
  width: 29%;
  height: 55%;
  opacity: 0;
  transform: translateY(115%) scale(.84);
  animation: characterPop .95s cubic-bezier(.2, 1.35, .35, 1) forwards;
}
.banner-character img { display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 4px 1px #8d374537); animation: characterBob 2.2s ease-in-out 1.05s infinite; }
.character-boy { left: -5%; width: 40%; height: 66%; animation-delay: .12s; }
.character-girl { right: 2.2%; animation-delay: .28s; }
@keyframes characterPop { 0% { opacity: 0; transform: translateY(115%) scale(.84); } 65% { opacity: 1; transform: translateY(-7%) scale(1.06); } 82% { opacity: 1; transform: translateY(3%) scale(.98); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes characterBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.year-setting-row { grid-template-columns: 1.3fr 1fr .55fr auto; align-items: end; }
.year-row-controls { display: flex; gap: 5px; align-items: center; padding-bottom: 1px; }
.year-row-controls .secondary-btn { min-width: 34px; min-height: 36px; padding: 5px 8px; }
.year-row-controls .delete-year { color: #cb3f5a; border-color: #ec9e9e; }
.year-row-controls button:disabled { opacity: .35; cursor: not-allowed; }
@media (prefers-reduced-motion: reduce) { .banner-character { opacity: 1; transform: none; animation: none; } .banner-character img { animation: none; } }

@media (max-width: 800px) {
  .hero { margin-inline: 5px; }
  .hero:after { right: 5%; width: 112px; height: 112px; font-size: 20px; }
}
@media (max-width: 560px) {
  .hero { min-height: 0; padding: 34px 22px; margin-top: 15px; }
  .hero:after { top: auto; bottom: 18px; right: 18px; width: 82px; height: 82px; font-size: 15px; }
  .hero h1 { font-size: 33px; }
  .hero-stamp { width: 88px; height: 88px; right: 34%; bottom: 25px; }
  .banner-character { width: 33%; height: 66%; }
  .character-boy { left: -6.5%; width: 44.4%; height: 79.2%; }
  .character-girl { right: 1%; }
  .year-card { min-height: 132px; }
  .banner-hero {
    width: 100%;
    aspect-ratio: 0.94 / 1;
    margin-top: 14px;
    /* Continue the banner's hot-pink burst behind the jumping characters. */
    background-color: #f20e62;
    background-image:
      radial-gradient(ellipse at 50% 46%, #ff3d76 0 8%, transparent 58%),
      repeating-conic-gradient(from -12deg at 50% 46%, #f62970 0deg 8deg, #df0753 8deg 16deg);
  }
  .home-banner { height: 58%; object-fit: contain; object-position: center top; z-index: 1; }
  .banner-characters { inset: 0; z-index: 2; }
  .banner-character { bottom: 0; height: 53%; }
  .character-boy { left: -3%; width: 51%; height: 60%; }
  .character-girl { right: 0; width: 45%; height: 48%; }
  .prize-board { padding: 23px 15px; }
  .prize-grid { gap: 8px; }
  .prize { min-height: 70px; border-width: 2px; }
  .box-art { box-shadow: 0 0 0 3px #48b785, 0 6px 0 #328361; }
  .box-art .box-label { padding: 3px 5px; font-size: 7px; }
  .modal { border-width: 3px; }
  .year-row-controls { grid-column: 1 / -1; }
}

/* Homepage year choices are illustrated buttons, not cards. */
.year-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 30px; align-items: start; }
.year-card, .year-card:nth-child(even), .year-card:nth-child(3n) {
  display: flex; flex-direction: column; align-items: stretch; gap: 0; min-height: 0; padding: 0;
  color: #51433a; background: transparent; border: 0; border-radius: 0; box-shadow: none;
  text-align: center; transform: none; transition: transform .22s ease; overflow: visible;
}
.year-card:hover, .year-card.active, .year-card:nth-child(even):hover, .year-card:nth-child(3n):hover {
  background: transparent; border: 0; box-shadow: none; transform: translateY(-5px);
}
.year-card:after { display: none; }
.year-art { display: block; width: 100%; height: clamp(225px, 25vw, 315px); position: relative; }
.year-art img { width: 100%; height: 100%; display: block; object-fit: contain; filter: drop-shadow(0 8px 0 #36865d) drop-shadow(0 10px 10px #31533924); transition: transform .22s ease, filter .22s ease; }
.year-card:hover .year-art img, .year-card.active .year-art img { transform: scale(1.035); filter: drop-shadow(0 8px 0 #d14a62) drop-shadow(0 14px 14px #31533930); }
.year-art-title, .year-art-year { position: absolute; left: 22%; width: 56%; display: block; pointer-events: none; font-weight: 900; line-height: 1.15; }
.year-art-title { top: 8%; font-size: clamp(14px, 1.6vw, 21px); color: #fff; -webkit-text-stroke: 1px #b52e40; paint-order: stroke fill; text-shadow: 1px 2px 0 #9c273a, 0 0 4px #fff8; }
.year-art-year { top: 14%; font: 900 clamp(10px, 1.1vw, 14px) 'Noto Sans JP', sans-serif; color: #fff7db; text-shadow: 1px 2px #a22c3c; }
.year-card-blind .year-art-title { top: 15%; color: #684732; -webkit-text-stroke: 0; text-shadow: 1px 1px #fff; }
.year-card-blind .year-art-year { top: 21%; color: #8c5637; text-shadow: 1px 1px #fff; }
.year-meta { display: block; position: relative; margin: 2px auto 0; width: min(100%, 300px); padding: 4px 2px 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
.year-meta .year-num { display: inline-block; position: static; color: #d94360; font: 900 10px 'Noto Sans JP', sans-serif; letter-spacing: .1em; }
.year-meta .count { position: static; display: inline-block; margin-left: 8px; padding: 2px 9px; color: #286e50; background: #d6f1b7; border: 1px solid #fff; border-radius: 99px; font: 900 10px 'Noto Sans JP', sans-serif; }
.year-meta strong { display: block; margin: 3px 0 1px; color: #51433a; font-size: 20px; font-weight: 900; text-shadow: 1px 2px #fff; }
.year-meta .mode { display: block; color: #63564a; font-size: 11px; font-weight: 800; }
@media (max-width: 800px) { .year-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 18px; } .year-art { height: clamp(190px, 34vw, 280px); } }
@media (max-width: 560px) { .year-card { min-height: 0; } .year-art { height: clamp(155px, 48vw, 210px); } .year-meta { padding: 7px 7px 10px; } .year-meta strong { font-size: 16px; } .year-meta .mode { font-size: 9px; } .year-art-title { font-size: 13px; } .year-art-year { font-size: 9px; } }

/* Couple avatar replaces the flower mark; keep the wordmark clean and flat. */
.brand { text-shadow: none; }
.brand small { text-shadow: none; }
img.brand-mark { display: block; flex: 0 0 auto; width: 58px; height: 58px; padding: 0; object-fit: contain; background: transparent; border: 0; border-radius: 0; box-shadow: none; }
@media (max-width: 560px) { img.brand-mark { width: 46px; height: 46px; } }

/* Physical ticket tear and reveal. */
.ticket-tear-modal { width: min(900px, 100%); padding: 26px clamp(18px, 4vw, 34px) 24px; }
.ticket-tear-modal h3 { margin-bottom: 14px; }
.ticket-tear-stage {
  position: relative; width: min(100%, 640px); height: min(56vh, 480px); aspect-ratio: 4 / 3;
  margin: 0 auto; overflow: hidden; isolation: isolate; border-radius: 10px;
  background: #fff0ca; box-shadow: 0 0 0 4px #fff, 0 0 0 7px #efbd3b, 0 10px 0 #b74d4d;
}
.ticket-reveal-underlay { position: absolute; inset: 0; display: grid; grid-template-columns: 40% 60%; opacity: 0; transition: opacity .3s ease .1s; background: #fff8e6; }
.ticket-jump-art { position: relative; overflow: hidden; background: radial-gradient(circle at 50% 30%, #fff0a1, transparent 52%), linear-gradient(145deg, #f45c70, #f88987); }
.ticket-jump-art:after { content: '✦'; position: absolute; top: 11%; left: 43%; color: #fff5a4; font-size: clamp(20px, 3vw, 38px); text-shadow: 0 2px #d95a61; }
.ticket-jump-art img { position: absolute; bottom: -4%; height: 77%; width: 62%; object-fit: contain; filter: drop-shadow(0 4px 0 #9f344244); animation: none; }
.ticket-jump-art .ticket-boy { left: -4%; z-index: 1; }
.ticket-jump-art .ticket-girl { right: -5%; height: 73%; z-index: 2; }
.ticket-prize-result { min-width: 0; padding: clamp(12px, 2.2vw, 24px); display: flex; flex-direction: column; align-items: stretch; overflow: hidden; background: #fff8e6; }
.ticket-prize-result .eyebrow { align-self: flex-start; margin: 0 0 6px; padding: 3px 8px; font-size: 9px; }
.ticket-prize-result h4 { margin: 0 0 4px; color: #d83e5d; font-size: clamp(22px, 3.6vw, 38px); font-weight: 900; line-height: 1.1; text-shadow: 1px 2px #fff; }
.ticket-memory-heading { margin: 2px 0 0; color: #51443b; font-size: 13px; font-weight: 900; }
.ticket-prize-result .modal-date { margin: 2px 0 6px; font-size: 10px; }
.ticket-memory-media { display: block; width: 100%; height: clamp(78px, 16vh, 140px); margin: 0 auto 5px; object-fit: contain; background: #f4e8d0; border: 2px solid #fff; border-radius: 6px; box-shadow: 0 2px 0 #e7bf57; }
.ticket-prize-result:has(img.ticket-memory-media:nth-of-type(2)) .ticket-memory-media { display: inline-block; vertical-align: top; width: 31.5%; height: 82px; margin-right: 1%; }
.ticket-prize-result:has(video.ticket-memory-media) .ticket-memory-media { display: block; width: 100%; height: clamp(88px, 17vh, 145px); }
.ticket-memory-empty { display: grid; place-items: center; min-height: 90px; padding: 10px; background: #fff0c5; border: 2px dashed #e76574; border-radius: 6px; color: #776558; font-size: 11px; text-align: center; }
.ticket-memory-text { color: #6e5b4b; font-size: 11px; line-height: 1.45; white-space: pre-wrap; overflow: auto; max-height: 48px; }
.ticket-cover { position: absolute; inset: 0; z-index: 2; cursor: pointer; perspective: 900px; }
.ticket-half { position: absolute; top: 0; bottom: 0; width: 50%; background-image: url('kuji-ticket-outside.png'); background-repeat: no-repeat; background-size: 200% 100%; filter: drop-shadow(0 3px 3px #774a3520); }
.ticket-half-left { left: 0; background-position: left center; clip-path: polygon(0 0,100% 0,97% 6%,100% 13%,96% 20%,100% 27%,97% 34%,100% 42%,96% 49%,100% 57%,97% 64%,100% 72%,96% 79%,100% 87%,97% 94%,100% 100%,0 100%); transform-origin: right center; }
.ticket-half-right { right: 0; background-position: right center; clip-path: polygon(0 0,100% 0,100% 100%,0 100%,3% 94%,0 87%,4% 79%,0 72%,3% 64%,0 57%,4% 49%,0 42%,3% 34%,0 27%,4% 20%,0 13%,3% 6%); transform-origin: left center; }
.ticket-rip-hint { position: absolute; z-index: 3; left: 50%; top: 50%; transform: translate(-50%,-50%); padding: 9px 15px; border: 2px solid #fff; border-radius: 99px; color: #fff; background: #df4d63; box-shadow: 0 3px 0 #a93b50; font-size: 12px; font-weight: 900; white-space: nowrap; transition: opacity .2s; }
.ticket-cover:hover .ticket-rip-hint { transform: translate(-50%,-50%) scale(1.06); }
.ticket-stage.is-ripping .ticket-half-left { animation: ticketRipLeft .82s cubic-bezier(.55,.06,.7,.35) forwards; }
.ticket-stage.is-ripping .ticket-half-right { animation: ticketRipRight .82s cubic-bezier(.55,.06,.7,.35) forwards; }
.ticket-stage.is-ripping .ticket-rip-hint { opacity: 0; }
.ticket-stage.is-revealed .ticket-cover { display: none; }
.ticket-stage.is-revealed .ticket-reveal-underlay { opacity: 1; }
.ticket-stage.is-revealed .ticket-jump-art img { animation: ticketCharacterPop .7s cubic-bezier(.2,1.35,.35,1) both; }
.ticket-stage.is-revealed .ticket-jump-art .ticket-girl { animation-delay: .12s; }
.ticket-help { margin: 14px 0 3px; text-align: center; }
@keyframes ticketRipLeft { 0% { transform: translateX(0) rotateY(0) rotate(0); opacity: 1; } 20% { transform: translateX(-4%) rotateY(8deg) rotate(-2deg); } 100% { transform: translateX(-115%) rotateY(18deg) rotate(-12deg); opacity: .15; } }
@keyframes ticketRipRight { 0% { transform: translateX(0) rotateY(0) rotate(0); opacity: 1; } 20% { transform: translateX(4%) rotateY(-8deg) rotate(2deg); } 100% { transform: translateX(115%) rotateY(-18deg) rotate(12deg); opacity: .15; } }
@keyframes ticketCharacterPop { 0% { opacity: 0; transform: translateY(55%) scale(.84); } 70% { opacity: 1; transform: translateY(-7%) scale(1.04); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@media (max-width: 560px) { .ticket-tear-modal { padding: 22px 14px 19px; } .ticket-tear-stage { width: 100%; height: auto; aspect-ratio: 4/3; } .ticket-prize-result { padding: 8px; } .ticket-prize-result h4 { font-size: 20px; } .ticket-prize-result .eyebrow { font-size: 7px; margin-bottom: 4px; } .ticket-memory-heading { font-size: 9px; } .ticket-prize-result .modal-date { font-size: 8px; } .ticket-memory-media { height: 82px; margin-bottom: 3px; } .ticket-memory-text { font-size: 8px; max-height: 28px; } .ticket-memory-empty { min-height: 55px; font-size: 8px; } .ticket-jump-art img { height: 65%; } .ticket-jump-art .ticket-girl { height: 61%; } .ticket-rip-hint { font-size: 10px; padding: 6px 10px; } }
@media (prefers-reduced-motion: reduce) { .ticket-stage.is-ripping .ticket-half-left, .ticket-stage.is-ripping .ticket-half-right, .ticket-stage.is-revealed .ticket-jump-art img { animation-duration: .01ms; } }

/* The peel follows the inset perforation on the supplied ticket art. */
.ticket-cover { perspective: 1100px; }
.ticket-cover-panel {
  position: absolute; left: 12.6%; right: 7.4%; top: 12.4%; bottom: 8.8%; overflow: hidden;
  background: #e95b45; transform-origin: 96% 50%; filter: drop-shadow(0 3px 4px #57302555);
}
.ticket-tear-stage { border-radius: 0; background: #e95b45 url('kuji-ticket-cover.png') center / 100% 100% no-repeat; }
.ticket-reveal-underlay { clip-path: inset(12.4% 7.4% 8.8% 12.6%); }
.ticket-cover-panel img { position: absolute; width: 126.6%; height: 128.2%; max-width: none; left: -16.5%; top: -16.6%; object-fit: fill; user-select: none; pointer-events: none; }
.ticket-rip-hint { left: 52%; top: 51%; color: #fff; background: #e65348; border: 2px dashed #fff7df; box-shadow: 0 3px 0 #a93b50; }
.ticket-stage.is-ripping .ticket-cover-panel { animation: ticketPerforationPeel .82s cubic-bezier(.55,.06,.7,.35) forwards; }
.ticket-stage.is-ripping .ticket-rip-hint { opacity: 0; }
.ticket-award-stub {
  flex: 0 0 auto; display: grid; grid-template-rows: auto 1fr auto; min-height: 94px; margin: 0 0 8px;
  color: #fff; background: #08111d; border: 2px solid #f4f2e9; border-radius: 7px; overflow: hidden;
  box-shadow: 0 3px 0 #7c9ab8;
}
.ticket-stub-header, .ticket-stub-footer { display: block; padding: 4px 8px; color: #18354b; background: #b8d0e6; font-size: clamp(8px, 1.2vw, 11px); font-weight: 800; text-align: center; }
.ticket-stub-header { background: #f6f4ec; }
.ticket-award-stub strong { align-self: center; justify-self: center; padding: 0 8px; color: #fff; font-size: clamp(30px, 5vw, 52px); font-weight: 900; line-height: 1.04; letter-spacing: .06em; }
.ticket-stub-footer { padding-top: 3px; padding-bottom: 3px; }
@keyframes ticketPerforationPeel {
  0% { transform: translate(0,0) rotateY(0) rotate(0); opacity: 1; }
  18% { transform: translate(-1%,1%) rotateY(-7deg) rotate(-1deg); }
  100% { transform: translate(115%,-7%) rotateY(-28deg) rotate(8deg); opacity: 0; }
}
@media (max-width: 560px) {
  .ticket-award-stub { min-height: 68px; margin-bottom: 5px; border-width: 1px; }
  .ticket-stub-header, .ticket-stub-footer { padding: 2px 4px; font-size: 7px; }
}
@media (prefers-reduced-motion: reduce) { .ticket-stage.is-ripping .ticket-cover-panel { animation-duration: .01ms; } }

/* A keepsake ticket on the left, with a perforated prize stub on the right. */
.ticket-tear-stage { width: min(100%, 680px); height: auto; max-height: 290px; aspect-ratio: 2.35 / 1; overflow: visible; border: 4px solid #fff7e7; border-radius: 8px; background: #f2eee5; box-shadow: 0 0 0 2px #efbd3b, 0 8px 0 #b74d4d; }
.ticket-reveal-underlay { inset: 0; display: grid; grid-template-columns: 55% 45%; clip-path: none; opacity: 0; background: #fff8e6; overflow: hidden; border-radius: 5px; }
.ticket-keepsake-art { position: relative; overflow: hidden; background: radial-gradient(circle at 20% 30%,#ffdf9a 0 5%,transparent 6%),linear-gradient(145deg,#ff846b,#e44d43); }
.ticket-keepsake-art:before { content: ''; position: absolute; inset: 7px; border: 2px dashed #fff3d7; border-right: 0; opacity: .88; }
.ticket-keepsake-art img { position: absolute; bottom: -12%; width: 53%; height: 112%; object-fit: contain; filter: drop-shadow(0 2px 1px #66342255); }
.ticket-keepsake-art .ticket-boy { left: 6%; z-index: 1; }
.ticket-keepsake-art .ticket-girl { right: 2%; z-index: 2; }
.ticket-prize-result { min-width: 0; padding: 8px 10px; justify-content: flex-start; overflow: auto; background: #fff8e6; }
.ticket-award-stub { min-height: 75px; margin: 0 0 5px; border: 0; border-radius: 2px; box-shadow: none; clip-path: polygon(0 0,100% 0,100% 91%,96% 100%,90% 96%,84% 100%,78% 96%,72% 100%,66% 96%,60% 100%,54% 96%,48% 100%,42% 96%,36% 100%,30% 96%,24% 100%,18% 96%,12% 100%,6% 96%,0 100%); }
.ticket-stub-header, .ticket-stub-footer { padding: 3px 5px; font-size: clamp(7px, 1vw, 9px); }
.ticket-stub-header { color: #fff; background: #034661; }
.ticket-stub-footer { color: #263c4a; background: #9dbbd6; }
.ticket-award-stub strong { font-size: clamp(27px, 4vw, 42px); }
.ticket-memory-heading { font-size: 11px; }
.ticket-prize-result .modal-date { margin: 0 0 3px; font-size: 9px; }
.ticket-memory-media { height: 82px; margin-bottom: 3px; }
.ticket-memory-text { max-height: 24px; font-size: 9px; }
.ticket-memory-empty { min-height: 45px; font-size: 9px; }
.ticket-cover { inset: 0; display: block; perspective: 1000px; }
.ticket-cover-left { position: absolute; left: 0; top: 0; bottom: 0; width: 55%; overflow: hidden; background: linear-gradient(145deg,#ff846b,#e44d43); clip-path: polygon(0 0,100% 0,98% 4%,100% 8%,97% 13%,100% 18%,98% 23%,100% 28%,97% 34%,100% 40%,98% 46%,100% 52%,97% 58%,100% 64%,98% 70%,100% 76%,97% 82%,100% 88%,98% 94%,100% 100%,0 100%); }
.ticket-cover-left:before { content: ''; position: absolute; inset: 7px; border: 2px dashed #fff3d7; border-right: 0; opacity: .9; }
.ticket-cover-left:after { content: ''; position: absolute; z-index: 4; top: 0; bottom: 0; right: -2px; width: 7px; background: repeating-linear-gradient(180deg,#fff4dd 0 3px,transparent 3px 8px); clip-path: polygon(50% 0,100% 4%,20% 8%,100% 13%,10% 18%,100% 23%,10% 28%,100% 33%,15% 38%,100% 43%,10% 48%,100% 53%,10% 58%,100% 63%,15% 68%,100% 73%,10% 78%,100% 83%,15% 88%,100% 93%,50% 100%); }
.ticket-cover-left img { position: absolute; bottom: -12%; width: 53%; height: 112%; object-fit: contain; filter: drop-shadow(0 2px 1px #66342255); }
.ticket-cover-left .ticket-boy { left: 6%; z-index: 1; }
.ticket-cover-left .ticket-girl { right: 2%; z-index: 2; }
.ticket-stub-cover { position: absolute; left: 54.5%; right: 0; top: 0; bottom: 0; z-index: 2; display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; color: #fff; background: #06121d; transform-origin: left center; filter: drop-shadow(2px 3px 3px #24374855); clip-path: polygon(3% 0,100% 0,100% 92%,95% 100%,89% 96%,83% 100%,77% 96%,71% 100%,65% 96%,59% 100%,53% 96%,47% 100%,41% 96%,35% 100%,29% 96%,23% 100%,17% 96%,11% 100%,5% 96%,0 100%,2% 94%,0 88%,3% 82%,0 76%,2% 70%,0 64%,3% 58%,0 52%,2% 46%,0 40%,3% 34%,0 28%,2% 22%,0 16%,3% 10%,0 4%); }
.ticket-stub-cover:before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 20%; background: #034661; border-bottom: 3px solid #fff; }
.ticket-stub-cover:after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 19%; background: #9dbbd6; border-top: 3px solid #fff; }
.ticket-stub-cover strong { z-index: 1; align-self: center; justify-self: center; font-size: clamp(45px, 7vw, 70px); line-height: 1; }
.ticket-stub-cover .ticket-stub-header,.ticket-stub-cover .ticket-stub-footer { z-index: 1; color: #fff; background: transparent; font-size: clamp(8px,1.1vw,11px); }
.ticket-stub-cover .ticket-stub-footer { color: #243744; }
.ticket-rip-hint { top: auto; left: 53%; bottom: 6px; transform: translateX(-50%); padding: 4px 9px; font-size: 10px; color: #51443b; background: #fff8df; border: 1px dashed #bd4a45; box-shadow: 0 2px 0 #bd4a4544; }
.ticket-cover:hover .ticket-rip-hint { transform: translateX(-50%) scale(1.04); }
.ticket-stage.is-ripping .ticket-stub-cover { animation: stubTearAway .82s cubic-bezier(.28,.76,.2,1) forwards; }
.ticket-stage.is-ripping .ticket-cover-left { animation: leftTicketTug .35s ease-in-out 2 alternate; }
.ticket-stage.is-ripping .ticket-rip-hint { opacity: 0; }
.ticket-stage.is-revealed .ticket-cover { pointer-events: none; }
.ticket-stage.is-revealed .ticket-stub-cover { display: none; }
.ticket-stage.is-revealed .ticket-reveal-underlay { opacity: 1; }
.ticket-stage.is-revealed .ticket-keepsake-art img { animation: ticketCharacterPop .7s cubic-bezier(.2,1.35,.35,1) both; }
.ticket-stage.is-revealed .ticket-keepsake-art .ticket-girl { animation-delay: .12s; }
.ticket-stage.is-revealed .ticket-cover-left:after { opacity: .95; filter: drop-shadow(2px 0 #fff); }
.ticket-help { margin-top: 14px; }
@keyframes stubTearAway { 0% { transform: translateX(0) rotateY(0) rotate(0); opacity: 1; } 12% { transform: translateX(-2%) rotateY(-8deg) rotate(-1deg); } 30% { transform: translateX(4%) rotateY(12deg) rotate(2deg); } 100% { transform: translateX(112%) rotateY(-22deg) rotate(5deg); opacity: .08; } }
@keyframes leftTicketTug { from { transform: translateX(0); } to { transform: translateX(-3px); } }
@media (max-width: 560px) {
  .ticket-tear-stage { height: auto; aspect-ratio: 2.05 / 1; width: 100%; }
  .ticket-prize-result { padding: 5px; }
  .ticket-award-stub { min-height: 56px; margin-bottom: 3px; }
  .ticket-stub-header,.ticket-stub-footer { padding: 2px; font-size: 6px; }
  .ticket-award-stub strong { font-size: 25px; }
  .ticket-memory-heading { font-size: 8px; }
  .ticket-prize-result .modal-date { font-size: 7px; }
  .ticket-memory-media { height: 55px; }
  .ticket-memory-text { font-size: 7px; max-height: 18px; }
  .ticket-memory-empty { min-height: 30px; font-size: 7px; }
  .ticket-cover-left img { height: 95%; }
  .ticket-stub-cover .ticket-stub-header,.ticket-stub-cover .ticket-stub-footer { font-size: 6px; }
  .ticket-rip-hint { bottom: 3px; font-size: 7px; padding: 2px 5px; }
}
@media (prefers-reduced-motion: reduce) { .ticket-stage.is-ripping .ticket-stub-cover,.ticket-stage.is-ripping .ticket-cover-left,.ticket-stage.is-revealed .ticket-keepsake-art img { animation-duration: .01ms; } }

/* Static Ichiban-kuji memory reveal: one cover photo beside the award, media below. */
.memory-reveal-modal { width: min(860px,100%); }
.reveal-ticket-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(200px,.9fr); gap: 14px; align-items: stretch; }
.reveal-cover-photo { min-height: 250px; overflow: hidden; display: grid; place-items: center; background: #f8d6c2; border: 5px solid #fff; outline: 2px solid #e65b4d; box-shadow: 0 5px 0 #c84f46; }
.reveal-cover-photo img { display: block; width: 100%; height: 100%; min-height: 250px; max-height: 360px; object-fit: cover; }
.reveal-cover-empty { width: 100%; min-height: 250px; display: grid; place-items: center; padding: 18px; color: #775f51; background: repeating-linear-gradient(135deg,#fff4e6 0 12px,#f9e5d2 12px 24px); font-size: 14px; font-weight: 800; }
.reveal-award-side { min-width: 0; overflow: hidden; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; background: #fffaf0; border: 2px solid #e8bd52; box-shadow: 0 5px 0 #d87855; }
.reveal-stub-top,.reveal-stub-bottom { display: block; padding: 8px 10px; color: #fff; background: #07516c; font-size: 12px; font-weight: 900; letter-spacing: .06em; text-align: center; }
.reveal-stub-bottom { color: #263b4b; background: #a9c6df; }
.reveal-award-value { flex: 1; min-height: 145px; display: grid; place-items: center; padding: 12px; color: #fff; background: #07131f; font-size: clamp(34px,6vw,62px); font-weight: 900; line-height: 1.15; text-align: center; }
.reveal-award-side h4 { margin: 12px 12px 2px; color: #51443b; font-size: 16px; }
.reveal-award-side .modal-date { margin: 0 12px 12px; color: #77695f; font-size: 12px; }
.reveal-memory-content { margin-top: 22px; padding-top: 14px; border-top: 2px dashed #e5c67b; }
.reveal-memory-content h4 { margin: 0 0 10px; color: #bd5945; font-size: 14px; }
.reveal-memory-content .reveal-media { display: inline-block; vertical-align: top; width: min(31.8%,260px); height: 170px; margin: 0 1% 10px 0; object-fit: contain; background: #f5eee2; border: 3px solid #fff; box-shadow: 0 0 0 2px #efbd44; }
.reveal-memory-content video.reveal-media { width: 100%; max-height: 340px; }
.reveal-memory-content .memory-text { white-space: pre-wrap; }
.cover-upload-preview { min-height: 120px; margin: 8px 0; display: grid; place-items: center; overflow: hidden; color: #78685a; background: #fff6e7; border: 2px dashed #deb75a; border-radius: 8px; }
.cover-upload-preview img { display: block; width: 100%; max-height: 260px; object-fit: contain; background: #f6eee2; }
@media (max-width: 600px) {
  .reveal-ticket-layout { grid-template-columns: 1fr; gap: 10px; }
  .reveal-cover-photo,.reveal-cover-photo img,.reveal-cover-empty { min-height: 190px; }
  .reveal-award-value { min-height: 95px; font-size: 40px; }
  .reveal-stub-top,.reveal-stub-bottom { padding: 5px; font-size: 10px; }
  .reveal-memory-content .reveal-media { width: 48%; height: 120px; }
}

/* Ticket artwork follows the user's connected left-photo / right-prize reference. */
.reveal-ticket-layout { display: flex; align-items: stretch; gap: 0; min-height: 220px; padding: 10px 8px; filter: drop-shadow(0 5px 0 #d8b785); }
.reveal-cover-photo { position: relative; flex: 0 0 56%; min-width: 0; min-height: 220px; overflow: hidden; display: block; background: #f15b49; border: 0; outline: 0; box-shadow: none; }
.reveal-cover-photo img { position: absolute; z-index: 1; inset: 14px 8px; width: calc(100% - 16px); height: calc(100% - 28px); min-height: 0; max-height: none; object-fit: cover; }
.reveal-cover-empty { position: absolute; inset: 14px 8px; z-index: 1; min-height: 0; display: grid; place-items: center; padding: 12px; color: #765a49; background: repeating-linear-gradient(135deg,#fff4e6 0 12px,#f9e5d2 12px 24px); font-size: 13px; text-align: center; }
.reveal-cover-photo:before,.reveal-cover-photo:after { content: ''; position: absolute; z-index: 2; left: 0; right: 0; height: 15px; background: radial-gradient(circle at 8px 8px,#f15b49 0 7px,transparent 7.5px) repeat-x; background-size: 16px 15px; pointer-events: none; }
.reveal-cover-photo:before { top: 0; }
.reveal-cover-photo:after { bottom: 0; transform: rotate(180deg); }
.ticket-peel-strip { position: absolute; z-index: 3; left: 12px; top: 24px; bottom: 24px; width: 16px; background: #fff7e9; border-radius: 99px; box-shadow: 0 0 0 2px #f5c9ac; }
.reveal-award-side { position: relative; z-index: 4; flex: 1 1 44%; min-width: 0; min-height: 220px; margin-left: -7px; overflow: hidden; display: flex; flex-direction: column; justify-content: stretch; background: #07131f; border: 2px solid #e7bd58; border-radius: 12px 18px 14px 4px / 10px 9px 9px 8px; box-shadow: none; clip-path: polygon(3% 0,95% 0,100% 8%,100% 92%,95% 100%,4% 100%,0 92%,1.5% 82%,0 72%,1.5% 62%,0 52%,1.5% 42%,0 32%,1.5% 22%,0 12%); }
.reveal-stub-top { flex: 0 0 20%; display: grid; place-items: center; padding: 6px 10px; color: white; background: #07516c; font-size: 12px; }
.reveal-award-value { flex: 1; min-height: 130px; margin: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 14px; color: white; background: #07131f; font-size: clamp(34px,5.2vw,58px); }
.reveal-stub-bottom { flex: 0 0 20%; display: grid; place-items: center; padding: 6px 8px; color: #243b4c; background: #a9c6df; font-size: 12px; }
.reveal-memory-heading { margin: 14px 0 0; color: #51443b; font-size: 20px; font-weight: 900; }
.reveal-memory-heading span { display: inline-block; margin-left: 8px; color: #77695f; font-size: 13px; font-weight: 500; }
.reveal-memory-content { margin-top: 18px; }
@media(max-width:600px) {
  .reveal-ticket-layout { min-height: 150px; padding: 6px 4px; }
  .reveal-cover-photo,.reveal-award-side { min-height: 150px; }
  .reveal-cover-photo img,.reveal-cover-empty { inset: 11px 6px; width: calc(100% - 12px); height: calc(100% - 22px); }
  .ticket-peel-strip { left: 9px; top: 19px; bottom: 19px; width: 11px; }
  .reveal-stub-top,.reveal-stub-bottom { font-size: 8px; padding: 3px; }
  .reveal-award-value { min-height: 90px; gap: 4px; padding: 5px; font-size: 30px; }
  .reveal-memory-heading { font-size: 16px; }
}

/* Ichiban-kuji result board: opened scenes are for replay; drawing happens from the ticket at right. */
.lottery-layout { grid-template-columns: minmax(0,1fr) 250px; gap: 20px; align-items: stretch; }
.prize-board { padding: 24px; color: #fff; background: radial-gradient(circle,#ffffff30 0 3px,transparent 4px) 0 0/20px 20px,linear-gradient(145deg,#56d99f,#36bf83); border: 4px solid #fff; border-radius: 14px; box-shadow: 0 0 0 3px #43a878,0 8px 0 #3b8f68; }
.board-title { color: #fffef0; text-shadow: 0 2px #2e9f70; font-size: 14px; }
.prize-grid { grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; }
.prize { position: relative; min-width: 0; min-height: 138px; aspect-ratio: 1.16 / 1; padding: 0; overflow: hidden; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.prize.opened { cursor: pointer; filter: none; background: #f6e9cc; box-shadow: 0 5px 0 #2e9f70; }
.prize.opened:hover { transform: translateY(-3px); box-shadow: 0 8px 0 #2e9f70; }
.prize-scene { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.prize.opened .prize-label { position: absolute; z-index: 2; left: 12%; right: 12%; bottom: 5px; display: block; padding: 5px 7px; color: #fffdf0; background: #102b47; border: 2px solid #fff; border-radius: 999px; box-shadow: 0 2px 0 #b08a4a; font: 900 15px 'Noto Sans JP',sans-serif; text-align: center; text-shadow: 0 1px #07131f; }
.prize.unopened { display: grid; place-items: center; cursor: default; background: #ffd514; border: 3px solid #e9aa19; clip-path: polygon(3% 0,92% 0,100% 12%,98% 24%,100% 76%,96% 100%,5% 100%,0 88%,2% 72%,0 24%); box-shadow: inset 0 0 0 3px #ffe872,0 5px 0 #2e9f70; }
.prize.unopened:disabled { opacity: 1; }
.prize-slot-mark { position: absolute; right: 11%; top: 50%; transform: translateY(-50%); writing-mode: vertical-rl; color: #33240d; font: 900 14px 'Noto Sans JP',sans-serif; letter-spacing: .04em; }
.prize.unopened:hover { transform: none; box-shadow: inset 0 0 0 3px #ffe872,0 5px 0 #2e9f70; }
.prize.opened:after { content: none; }
.draw-panel { min-height: 100%; padding: 25px 18px; background: #ffe77d; border: 4px solid #fff; border-radius: 12px; box-shadow: 0 0 0 3px #eca140,0 8px 0 #ca8146; }
.draw-ticket-preview { width: min(100%,220px); margin: 0 auto 16px; display: grid; place-items: center; }
.draw-ticket-preview img { display: block; width: 100%; height: auto; max-height: 190px; object-fit: contain; filter: drop-shadow(0 5px 0 #a9473d55); }
.draw-panel p { margin: 0 0 14px; color: #665344; font-size: 12px; line-height: 1.8; }
.draw-panel .primary-btn { font-size: 14px; padding: 12px 18px; }
@media(max-width:800px) {
  .lottery-layout { grid-template-columns: 1fr; }
  .draw-panel { grid-row: 1; min-height: 230px; }
  .draw-ticket-preview { width: min(48%,220px); }
  .prize-board { grid-row: 2; padding: 18px 12px; }
  .prize-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
  .prize { min-height: 108px; }
}
@media(max-width:560px) {
  .prize-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
  .prize { min-height: 94px; }
  .prize.opened .prize-label { left: 8%; right: 8%; bottom: 3px; padding: 3px; font-size: 11px; }
  .prize-slot-mark { font-size: 11px; }
  .draw-ticket-preview { width: min(55%,190px); }
}

/* Loose, sticker-like prize display inspired by the illustrated lineup reference. */
.lottery-layout .prize-board { padding: clamp(18px,2.4vw,34px); }
.lottery-layout .prize-grid {
  display: grid;
  grid-template-columns: repeat(12,minmax(0,1fr));
  grid-auto-rows: 38px;
  grid-auto-flow: dense;
  align-items: center;
  gap: 10px 8px;
}
.lottery-layout .prize {
  grid-column: span 3;
  grid-row: span 5;
  min-height: 0;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  justify-self: center;
  transition: transform .18s ease, filter .18s ease;
}
.lottery-layout .prize:nth-child(5n + 2) { grid-column: span 4; grid-row: span 5; }
.lottery-layout .prize:nth-child(5n + 3) { grid-column: span 2; grid-row: span 4; }
.lottery-layout .prize:nth-child(5n + 4) { grid-column: span 3; grid-row: span 4; }
.lottery-layout .prize:nth-child(5n + 5) { grid-column: span 3; grid-row: span 5; }
.lottery-layout .prize.opened {
  overflow: visible;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 5px 0 #16895e99);
  clip-path: none;
}
.lottery-layout .prize.opened::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -3px;
  background: #fff9df;
  clip-path: polygon(8% 4%,33% 0,61% 3%,82% 0,97% 13%,100% 41%,96% 68%,100% 91%,77% 100%,48% 96%,21% 100%,2% 86%,0 56%,4% 28%);
  filter: drop-shadow(0 3px 0 #e9a72a);
}
.lottery-layout .prize:nth-child(3n + 2).opened { transform: rotate(-2deg) scale(1.04); }
.lottery-layout .prize:nth-child(3n).opened { transform: rotate(1.7deg) scale(.96); }
.lottery-layout .prize.opened:hover { transform: translateY(-5px) rotate(0) scale(1.06); filter: drop-shadow(0 8px 0 #16895e99); }
.lottery-layout .prize-scene {
  z-index: 1;
  inset: 3px;
  width: calc(100% - 6px);
  height: calc(100% - 6px);
  object-fit: cover;
  clip-path: polygon(8% 4%,33% 0,61% 3%,82% 0,97% 13%,100% 41%,96% 68%,100% 91%,77% 100%,48% 96%,21% 100%,2% 86%,0 56%,4% 28%);
}
.lottery-layout .prize.opened .prize-label {
  left: 14%; right: 14%; bottom: 1px;
  padding: 5px 8px;
  color: #fff;
  background: #102b47;
  border: 3px solid #fff9df;
  border-radius: 999px;
  box-shadow: 0 3px 0 #bd8432;
  font-size: clamp(12px,1.15vw,18px);
}
.lottery-layout .prize.unopened {
  display: grid;
  place-items: center;
  overflow: visible;
  background: linear-gradient(145deg,#ffdf36,#ffc900 72%);
  border: 0;
  clip-path: polygon(13% 0,87% 0,100% 14%,100% 86%,87% 100%,13% 100%,0 86%,0 14%);
  filter: drop-shadow(0 5px 0 #2e9f70) drop-shadow(0 0 2px #db8b00);
}
.lottery-layout .prize.unopened::before {
  content: "";
  position: absolute;
  inset: 5px;
  z-index: 0;
  background: linear-gradient(135deg,#ffe76b,#ffd21a);
  clip-path: polygon(13% 0,87% 0,100% 14%,100% 86%,87% 100%,13% 100%,0 86%,0 14%);
  box-shadow: inset 0 0 0 2px #fff09a;
}
.lottery-layout .prize.unopened:nth-child(4n + 2) { transform: rotate(-1deg) scale(.98); }
.lottery-layout .prize.unopened:nth-child(4n) { transform: rotate(1.1deg) scale(1.02); }
.lottery-layout .prize-slot-mark { z-index: 1; right: 12%; }
.lottery-layout .prize.unopened:hover { transform: none; }
@media(max-width:800px) {
  .lottery-layout .prize-grid { grid-template-columns: repeat(8,minmax(0,1fr)); grid-auto-rows: 34px; gap: 8px 6px; }
  .lottery-layout .prize { grid-column: span 2; grid-row: span 4; }
  .lottery-layout .prize:nth-child(5n + 2) { grid-column: span 3; grid-row: span 5; }
  .lottery-layout .prize:nth-child(5n + 3) { grid-column: span 2; grid-row: span 4; }
  .lottery-layout .prize:nth-child(5n + 4) { grid-column: span 3; grid-row: span 4; }
  .lottery-layout .prize:nth-child(5n + 5) { grid-column: span 2; grid-row: span 4; }
}
@media(max-width:560px) {
  .lottery-layout .prize-grid { grid-template-columns: repeat(6,minmax(0,1fr)); grid-auto-rows: 29px; gap: 7px 5px; }
  .lottery-layout .prize { grid-column: span 2; grid-row: span 4; }
  .lottery-layout .prize:nth-child(5n + 2) { grid-column: span 3; grid-row: span 5; }
  .lottery-layout .prize:nth-child(5n + 3) { grid-column: span 2; grid-row: span 4; }
  .lottery-layout .prize:nth-child(5n + 4) { grid-column: span 2; grid-row: span 4; }
  .lottery-layout .prize:nth-child(5n + 5) { grid-column: span 3; grid-row: span 4; }
  .lottery-layout .prize.opened .prize-label { left: 9%; right: 9%; bottom: 0; padding: 3px 5px; font-size: 11px; }
  .lottery-layout .prize-slot-mark { font-size: 11px; }
}

/* Rebuild the lineup as one fixed illustrated prize poster, following the reference's 5×4 positions. */
.lottery-layout .prize-board { padding: clamp(14px,2.2vw,30px); }
.lottery-layout .prize-grid {
  display: grid;
  grid-template-columns: repeat(5,minmax(0,1fr));
  grid-template-rows: repeat(4,clamp(104px,13vw,166px));
  grid-auto-flow: row;
  gap: clamp(2px,.8vw,10px);
  align-items: center;
  justify-items: center;
  overflow: visible;
}
.lottery-layout .prize {
  position: relative;
  grid-column: auto;
  grid-row: auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  aspect-ratio: auto;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  transform: none;
  z-index: 1;
}
.lottery-layout .prize:nth-child(1) { grid-area: 1 / 1; }
.lottery-layout .prize:nth-child(2) { grid-area: 1 / 2; }
.lottery-layout .prize:nth-child(3) { grid-area: 1 / 3; }
.lottery-layout .prize:nth-child(4) { grid-area: 1 / 4; }
.lottery-layout .prize:nth-child(5) { grid-area: 1 / 5; }
.lottery-layout .prize:nth-child(6) { grid-area: 2 / 1; }
.lottery-layout .prize:nth-child(7) { grid-area: 2 / 2; }
.lottery-layout .prize:nth-child(8) { grid-area: 2 / 3; }
.lottery-layout .prize:nth-child(9) { grid-area: 2 / 4; }
.lottery-layout .prize:nth-child(10) { grid-area: 2 / 5; }
.lottery-layout .prize:nth-child(11) { grid-area: 3 / 1; }
.lottery-layout .prize:nth-child(12) { grid-area: 3 / 2; }
.lottery-layout .prize:nth-child(13) { grid-area: 3 / 3; }
.lottery-layout .prize:nth-child(14) { grid-area: 3 / 4; }
.lottery-layout .prize:nth-child(15) { grid-area: 3 / 5; }
.lottery-layout .prize:nth-child(16) { grid-area: 4 / 1; }
.lottery-layout .prize:nth-child(17) { grid-area: 4 / 2; }
.lottery-layout .prize:nth-child(18) { grid-area: 4 / 3; }
.lottery-layout .prize:nth-child(19) { grid-area: 4 / 4; }
.lottery-layout .prize:nth-child(20) { grid-area: 4 / 5; }
.lottery-layout .prize.opened {
  width: 122%;
  height: 125%;
  margin: -10% -11%;
  overflow: visible;
  cursor: pointer;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 5px 1px #16794f88);
  z-index: 3;
  clip-path: none;
}
.lottery-layout .prize.opened:nth-child(3n + 1) { transform: rotate(-2.5deg) translateY(-2%); }
.lottery-layout .prize.opened:nth-child(3n + 2) { transform: rotate(2deg) translateY(2%); }
.lottery-layout .prize.opened:nth-child(3n) { transform: rotate(-1deg) translateY(-3%); }
.lottery-layout .prize.opened:hover { transform: translateY(-5px) rotate(0) scale(1.04); filter: drop-shadow(0 8px 2px #16794f88); z-index: 6; }
.lottery-layout .prize.opened::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: -4px -3px 12px;
  background: #fff8df;
  clip-path: polygon(4% 18%,14% 8%,35% 5%,44% 0,56% 5%,78% 4%,94% 13%,100% 31%,97% 49%,100% 69%,91% 88%,70% 94%,52% 100%,31% 94%,12% 98%,2% 82%,0 60%,3% 41%);
}
.lottery-layout .prize-scene {
  z-index: 1;
  inset: 0 0 12px;
  width: 100%;
  height: calc(100% - 12px);
  object-fit: cover;
  clip-path: polygon(4% 18%,14% 8%,35% 5%,44% 0,56% 5%,78% 4%,94% 13%,100% 31%,97% 49%,100% 69%,91% 88%,70% 94%,52% 100%,31% 94%,12% 98%,2% 82%,0 60%,3% 41%);
}
.lottery-layout .prize.opened .prize-label {
  left: 11%; right: 11%; bottom: 2px;
  display: block;
  padding: 4px 6px;
  color: #fffdf0;
  background: #102b47;
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 3px 0 #c28d3b;
  font: 900 clamp(12px,1.35vw,20px) 'Noto Sans JP',sans-serif;
  text-align: center;
  text-shadow: 0 1px #07131f;
  white-space: nowrap;
}
.lottery-layout .prize.unopened {
  display: grid;
  place-items: center;
  width: 94%;
  height: 88%;
  min-height: 0;
  overflow: visible;
  cursor: default;
  background: linear-gradient(145deg,#ffdc2e,#ffc400 72%);
  border: 0;
  border-radius: 0;
  clip-path: polygon(13% 0,87% 0,100% 14%,100% 86%,87% 100%,13% 100%,0 86%,0 14%);
  box-shadow: none;
  filter: drop-shadow(0 4px 0 #b78424) drop-shadow(0 0 2px #db9e0c);
  z-index: 1;
}
.lottery-layout .prize.unopened::before {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 5px;
  background: linear-gradient(145deg,#ffe66a,#ffd21a);
  clip-path: polygon(13% 0,87% 0,100% 14%,100% 86%,87% 100%,13% 100%,0 86%,0 14%);
  box-shadow: inset 0 0 0 2px #fff09a;
}
.lottery-layout .prize-slot-mark {
  z-index: 1;
  right: 10%;
  top: 50%;
  transform: translateY(-50%);
  color: #342609;
  font-size: clamp(12px,1.25vw,18px);
  font-weight: 900;
  letter-spacing: .03em;
}
.lottery-layout .prize.unopened:nth-child(even) { transform: rotate(1deg); }
.lottery-layout .prize.unopened:nth-child(odd) { transform: rotate(-.8deg); }
.lottery-layout .prize.unopened:hover { transform: none; }
@media(max-width:800px) {
  .lottery-layout .prize-grid { grid-template-columns: repeat(5,minmax(0,1fr)); grid-template-rows: repeat(4,clamp(75px,15vw,118px)); gap: 3px; }
  .lottery-layout .prize.opened { width: 128%; height: 124%; margin: -10% -14%; }
  .lottery-layout .prize.opened .prize-label { font-size: clamp(10px,2.3vw,15px); border-width: 2px; }
  .lottery-layout .prize-slot-mark { font-size: clamp(9px,1.8vw,13px); }
}
@media(max-width:560px) {
  .lottery-layout .prize-board { padding: 12px 7px; }
  .lottery-layout .prize-grid { grid-template-columns: repeat(5,minmax(0,1fr)); grid-template-rows: repeat(4,clamp(61px,19vw,96px)); gap: 2px; }
  .lottery-layout .prize.opened { width: 136%; height: 126%; margin: -11% -18%; }
  .lottery-layout .prize.opened .prize-label { left: 5%; right: 5%; bottom: 0; padding: 2px 4px; font-size: clamp(9px,2.8vw,12px); }
  .lottery-layout .prize.unopened { width: 95%; height: 87%; }
  .lottery-layout .prize-slot-mark { right: 8%; font-size: clamp(9px,2.5vw,11px); }
}

/* Real scene-shaped sticker art; each award stays inside its own poster slot. */
.lottery-layout .prize-grid {
  grid-template-rows: repeat(4,clamp(112px,14vw,172px));
  gap: clamp(7px,1.1vw,14px);
  overflow: visible;
}
.lottery-layout .prize.opened {
  width: 100%; height: 100%; margin: 0;
  padding: 0 2px 25px;
  overflow: visible;
  transform: none;
  filter: none;
  z-index: 2;
  display: grid;
  place-items: center;
  align-content: center;
}
.lottery-layout .prize.opened::before { content: none; }
.lottery-layout .prize-scene {
  position: relative;
  inset: auto;
  display: block;
  width: 100%;
  height: calc(100% - 4px);
  object-fit: contain;
  clip-path: none;
  filter: drop-shadow(0 3px 2px #27714b44);
}
.lottery-layout .prize.opened .prize-label {
  left: 8%; right: 8%; bottom: 0;
  padding: 4px 5px;
  font-size: clamp(12px,1.25vw,18px);
  border-width: 2px;
  z-index: 2;
}
.lottery-layout .prize.opened:nth-child(3n + 1),
.lottery-layout .prize.opened:nth-child(3n + 2),
.lottery-layout .prize.opened:nth-child(3n) { transform: none; }
.lottery-layout .prize.opened:hover {
  transform: translateY(-3px);
  filter: none;
  z-index: 3;
}
.lottery-layout .prize.unopened { width: 96%; height: 88%; }
@media(max-width:800px) {
  .lottery-layout .prize-grid { grid-template-rows: repeat(4,clamp(79px,15vw,120px)); gap: 5px 3px; }
  .lottery-layout .prize.opened { width: 100%; height: 100%; margin: 0; padding-bottom: 21px; }
  .lottery-layout .prize.opened .prize-label { font-size: clamp(10px,2.3vw,15px); }
}
@media(max-width:560px) {
  .lottery-layout .prize-grid { grid-template-rows: repeat(4,clamp(65px,19vw,98px)); gap: 4px 2px; }
  .lottery-layout .prize.opened { padding: 0 1px 18px; }
  .lottery-layout .prize.opened .prize-label { left: 4%; right: 4%; padding: 2px 3px; font-size: clamp(9px,2.7vw,12px); }
  .lottery-layout .prize.unopened { width: 96%; height: 87%; }
}

/* Keep the year-end surprise on its own full-width row beneath the 20 prize tickets. */
.lottery-layout .prize-grid .last-prize-card {
  grid-column: 1 / -1;
  grid-row: 5;
  display: grid;
  grid-template-columns: minmax(90px,1fr) minmax(70px,120px) minmax(120px,1fr);
  align-items: center;
  justify-items: center;
  gap: 14px;
  width: 100%;
  height: auto;
  min-height: 102px;
  padding: 8px 18px;
  overflow: visible;
  aspect-ratio: auto;
  border: 3px solid #fff;
  border-radius: 12px;
  background: #fff2b4;
  box-shadow: 0 0 0 3px #edaa31,0 6px 0 #bd7541;
  text-align: center;
  transform: none;
  z-index: 2;
}
.lottery-layout .last-prize-card .prize-label,
.lottery-layout .last-prize-card .prize-caption {
  position: static;
  display: block;
  width: auto;
  margin: 0;
  padding: 0;
  color: #d94360;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 15px;
  font-weight: 900;
  text-shadow: 1px 1px #fff;
  white-space: normal;
}
.lottery-layout .last-prize-card .last-prize-gift {
  display: block;
  width: min(100%,108px);
  height: 88px;
  object-fit: contain;
  filter: drop-shadow(0 3px 2px #8f574044);
}
@media(max-width:560px) {
  .lottery-layout .prize-grid .last-prize-card {
    grid-template-columns: 1fr 72px 1fr;
    min-height: 78px;
    gap: 5px;
    padding: 6px;
  }
  .lottery-layout .last-prize-card .prize-label,
  .lottery-layout .last-prize-card .prize-caption { font-size: 11px; }
  .lottery-layout .last-prize-card .last-prize-gift { width: 68px; height: 62px; }
}

/* Prevent sticker art/pill padding from extending into the secret-surprise row. */
.lottery-layout .prize-grid { row-gap: clamp(18px,2vw,28px); }
.lottery-layout .prize { box-sizing: border-box; }
.lottery-layout .prize.opened {
  box-sizing: border-box;
  padding: 0 2px 25px;
  overflow: hidden;
}
.lottery-layout .prize-scene {
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}
.lottery-layout .prize.opened .prize-label {
  bottom: 0;
  max-width: 100%;
}
.lottery-layout .prize-grid .last-prize-card {
  margin-top: 8px;
  position: relative;
  z-index: 4;
}
@media(max-width:800px) {
  .lottery-layout .prize-grid { row-gap: 17px; }
  .lottery-layout .prize.opened { padding-bottom: 21px; }
}
@media(max-width:560px) {
  .lottery-layout .prize-grid { row-gap: 14px; }
  .lottery-layout .prize.opened { padding-bottom: 18px; }
}


/* The Ichiban-kuji secret surprise is a lone clickable gift sticker at the board's lower-left. */
.lottery-layout .prize-grid .last-prize-card {
  grid-column: 1;
  grid-row: 5;
  justify-self: start;
  align-self: start;
  display: grid;
  place-items: center;
  width: clamp(70px,8vw,106px);
  height: clamp(70px,8vw,106px);
  min-height: 0;
  margin: 0;
  padding: 2px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 4px 2px #7d563344);
  cursor: pointer;
}
.lottery-layout .last-prize-card .last-prize-gift {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform .18s ease;
}
.lottery-layout .last-prize-card:hover .last-prize-gift { transform: translateY(-4px) scale(1.04); }


/* Unopened blind-box slots are only the illustrated package, without any card behind it. */
.blind-box:not(.opened) .box-art {
  display: block;
  width: 100%;
  aspect-ratio: auto;
  overflow: visible;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  transform: none;
}
.blind-box:not(.opened) .box-art::before { content: none; }
.blind-box:not(.opened) .blind-box-package {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 3px #56432e35);
  transition: transform .18s ease;
}
.blind-box:not(.opened):hover .blind-box-package { transform: translateY(-5px) rotate(-1deg); }

/* Opened blind boxes show only the transparent scene figurine, no color card behind it. */
.blind-box.opened .box-art {
  display: block;
  width: 100%;
  aspect-ratio: auto;
  overflow: visible;
  background: transparent !important;
  border: 0;
  border-radius: 0;
  box-shadow: none !important;
  transform: none;
}
.blind-box.opened .box-art::before { content: none; }
.blind-box.opened .blindbox-figure {
  display: block;
  width: 100%;
  height: auto;
  max-height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 4px 3px #56432e25);
}
.blind-box.opened:hover .blindbox-figure { transform: translateY(-3px); }
.blind-box.opened .box-icon,
.blind-box.opened .box-label { display: none; }

.blind-box.opened .box-art .box-icon { display: grid; place-items: center; width: 100%; min-height: 100px; background: transparent; font-size: clamp(46px,6vw,72px); filter: drop-shadow(0 3px 2px #56432e25); }

.admin-icon-button { width: 40px; height: 40px; display: grid; place-items: center; padding: 8px; border: 2px solid #ead7a9; border-radius: 50%; background: #fffaf1; color: #5e5149; transition: color .18s ease, background .18s ease, transform .18s ease; }
.admin-icon-button img { width: 31px; height: 31px; object-fit: contain; }
.admin-icon-button:hover { color: #e6425c; background: #fff1d2; transform: rotate(18deg); }
.admin-icon-button:focus-visible { outline: 3px solid #e6425c; outline-offset: 3px; }

/* Keep the admin gear at the top right without a circular button background. */
.admin-icon-button { width: 40px; height: 40px; padding: 2px; border: 0; border-radius: 0; background: transparent; box-shadow: none; display: grid; place-items: center; }
.admin-icon-button img { width: 36px; height: 36px; display: block; object-fit: contain; }
.admin-icon-button:hover { background: transparent; transform: rotate(18deg); }

/* Homepage year names are centered in the blank header area of each box illustration. */
.year-art-year { top: 19%; left: 25%; width: 50%; height: 15%; display: flex; align-items: center; justify-content: center; text-align: center; font: 900 clamp(13px, 1.45vw, 19px) 'Noto Sans JP', sans-serif; color: #fff7db; text-shadow: 1px 2px #a22c3c; }
.year-card-blind .year-art-year { top: 17%; color: #8c5637; text-shadow: 1px 1px #fff; }
.year-meta .mode { display: none; }

/* Place each year label inside its own sign area, clear of the characters. */
.year-card-ichiban .year-art-year { top: 3%; left: 27%; width: 46%; height: 17%; color: #fff7db; font-size: clamp(13px, 1.45vw, 19px); text-shadow: 1px 2px #a22c3c; }
.year-card-blind .year-art-year { top: 17%; left: 28%; width: 44%; height: 15%; color: #8c5637; text-shadow: 1px 1px #fff; }

.blindbox-memory-figure { display: block; width: min(100%, 420px); height: clamp(150px, 34vh, 290px); margin: 0 auto 14px; object-fit: contain; background: transparent !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.blindbox-memory-media { display: grid; gap: 12px; margin: 14px 0; }
.blindbox-memory-media:has(.memory-media) { padding-top: 14px; border-top: 1px solid #ead7a9; }
.blindbox-memory-media .memory-media { max-width: 100%; height: auto; max-height: 52vh; object-fit: contain; }

/* Mystery surprise badge: matching gift plus pink vertical label in both games. */
.lottery-layout .prize-grid .last-prize-card { display: flex; align-items: center; justify-content: flex-start; gap: 10px; width: clamp(118px, 15vw, 170px); height: clamp(78px, 9vw, 112px); min-height: 0; padding: 0; background: transparent; border: 0; border-radius: 0; box-shadow: none; filter: drop-shadow(0 4px 2px #7d563344); }
.lottery-layout .last-prize-card .last-prize-gift { flex: 1 1 auto; width: 0; height: 100%; object-fit: contain; }
.mystery-label { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; min-height: 86px; padding: 8px 10px; color: #fff; background: #ec4762; border: 3px solid #fff; box-shadow: 0 0 0 2px #edb935; font-weight: 900; font-size: 14px; line-height: 1.45; writing-mode: vertical-rl; letter-spacing: .08em; white-space: nowrap; }
.surprise-box .box-art { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 116px; aspect-ratio: auto; padding: 8px; background: transparent !important; border: 0; border-radius: 0; box-shadow: none !important; overflow: visible; }
.surprise-box .last-prize-gift { width: min(64%, 145px); height: 118px; object-fit: contain; filter: drop-shadow(0 4px 3px #56432e25); }
.surprise-box .mystery-label { min-height: 92px; font-size: clamp(11px, 1.1vw, 14px); }
.surprise-box .box-state { margin-top: 2px; }
@media (max-width: 560px) { .lottery-layout .prize-grid .last-prize-card { width: 112px; height: 76px; gap: 5px; } .lottery-layout .last-prize-card .mystery-label { min-height: 64px; padding: 5px; font-size: 10px; border-width: 2px; } .surprise-box .box-art { min-height: 82px; padding: 4px; gap: 4px; } .surprise-box .last-prize-gift { height: 82px; } .surprise-box .mystery-label { min-height: 62px; padding: 4px; font-size: 9px; border-width: 2px; } }

/* Mystery surprise labels sit horizontally beneath each gift. */
.lottery-layout .prize-grid .last-prize-card { flex-direction: column; justify-content: center; gap: 3px; width: clamp(88px, 10vw, 128px); height: auto; min-height: 0; }
.lottery-layout .last-prize-card .last-prize-gift { flex: 0 0 auto; width: 100%; height: clamp(64px, 7vw, 86px); }
.mystery-label { writing-mode: horizontal-tb; min-height: 0; padding: 4px 10px; font-size: 13px; line-height: 1.25; letter-spacing: .06em; }
.surprise-box .box-art { flex-direction: column; gap: 3px; }
.surprise-box .last-prize-gift { width: min(78%, 138px); height: clamp(72px, 9vw, 105px); }
.surprise-box .mystery-label { min-height: 0; padding: 4px 12px; font-size: clamp(11px, 1vw, 14px); }
@media (max-width: 560px) {
  .lottery-layout .prize-grid .last-prize-card { width: 92px; height: auto; gap: 2px; }
  .lottery-layout .last-prize-card .last-prize-gift { height: 62px; }
  .lottery-layout .last-prize-card .mystery-label { min-height: 0; padding: 3px 7px; font-size: 9px; }
  .surprise-box .box-art { gap: 2px; }
  .surprise-box .last-prize-gift { height: 72px; }
  .surprise-box .mystery-label { min-height: 0; padding: 3px 8px; font-size: 9px; }
}

/* Keep admin controls clear of fixed hosting badges. */
.admin-modal .admin-actions { justify-content: flex-start; gap: 12px; flex-wrap: wrap; }

.otp-code { max-width: 320px; text-align: center; letter-spacing: .45em; font-family: ui-monospace, monospace !important; font-weight: 900; }
