/* Joyland web app: the look of the designed screens (walkthrough/preevent/screens.py), made responsive for real phones. */
@font-face { font-family: PopX; src: url(/fonts/poppins-800.woff) format('woff'); font-display: swap; }
@font-face { font-family: PopS; src: url(/fonts/poppins-600.woff) format('woff'); font-display: swap; }
@font-face { font-family: Mont; src: url(/fonts/montserrat.woff) format('woff'); font-weight: 100 900; font-display: swap; }
:root {
  --navy: #172894; --ink: #0B1C62; --grey: #5B6080; --purple: #8A6FD0; --ivory: #FBF3E6; --cream: #FFFDF9; --beige: #F1DFC2;
  --gold: #C9A45C; --gold2: #E6C88F; --goldd: #9A6B17; --rose: #E3A9B8; --rose2: #F6DCE2; --lav: #B9A6D6; --lav2: #E6DDF2; --line: #EFE2CA;
  --safe-b: env(safe-area-inset-bottom, 0px); --safe-t: env(safe-area-inset-top, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body { background: #EFE7D8; color: var(--ink); font-family: Mont, system-ui, sans-serif; font-weight: 600; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.app { position: relative; max-width: 480px; min-height: 100vh; min-height: 100dvh; margin: 0 auto; background: linear-gradient(180deg, #FFFCF6 0%, #FBF2E2 100%);
  box-shadow: 0 0 60px rgba(120, 90, 30, .12); overflow-x: hidden; }
.app.dark { background: #0E1440; color: #fff; }
.testbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 8px; padding: calc(6px + var(--safe-t)) 14px 6px; background: #2B2F55; color: #fff;
  font-family: PopS; font-size: 12px; }
.testbar b { color: var(--gold2); font-weight: normal; }
.testbar button { margin-left: auto; border: 0; border-radius: 10px; padding: 4px 10px; background: var(--gold2); color: var(--ink); font-family: PopS; font-size: 12px; cursor: pointer; }
.hdr { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 64px; padding: 8px 16px;
  background: rgba(255, 252, 246, .94); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid transparent; }
.has-test .hdr { top: 31px; }
.app.dark .hdr { background: rgba(14, 20, 64, .94); }
.hdr .brand img { height: 42px; width: auto; }
.hdr .brand img.logo { height: 50px; }
.hdr .back { display: flex; align-items: center; gap: 6px; background: none; border: 0; padding: 4px 0; cursor: pointer; }
.hdr .back .t2 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 56vw; }
.body { padding: 6px 16px calc(110px + var(--safe-b)); }
.notab .body { padding-bottom: calc(40px + var(--safe-b)); }
.card { background: #fff; border: 1.5px solid var(--line); border-radius: 20px; padding: 14px 16px; box-shadow: 0 8px 20px rgba(150, 110, 40, .08); }
.card + .card, .card + .row-cards, .mt { margin-top: 10px; }
.navycard { position: relative; overflow: hidden; border-radius: 22px; padding: 16px 18px; color: #fff; background: linear-gradient(135deg, #172894, #0B1C62); }
.lab { font-family: PopS; font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--goldd); }
.navycard .lab { color: var(--gold2); }
.t1 { font-family: PopX; font-size: 25px; line-height: 1.12; color: var(--ink); }
.t2 { font-family: PopX; font-size: 17px; line-height: 1.22; color: var(--ink); }
.t3 { font-family: PopS; font-size: 14.5px; line-height: 1.3; color: var(--ink); }
.app.dark .t1, .app.dark .t2, .app.dark .t3, .navycard .t1, .navycard .t2, .navycard .t3 { color: #fff; }
.p { font-family: Mont; font-weight: 600; font-size: 13px; line-height: 1.45; color: var(--grey); }
.navycard .p { color: #D9DBF0; }
.small { font-size: 12px; }
.center { text-align: center; }
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 50px; border: 0; border-radius: 15px; background: var(--navy);
  color: #fff; font-family: PopS; font-size: 15px; cursor: pointer; padding: 0 16px; transition: transform .08s, opacity .2s; }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.g { background: linear-gradient(180deg, #F2DA9E, #D3AF63); color: var(--ink); }
.btn.o { background: #fff; color: var(--navy); border: 1.5px solid var(--line); }
.btn.sm { width: auto; min-height: 36px; padding: 0 14px; font-size: 13px; border-radius: 11px; }
.pill { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line);
  font-family: PopS; font-size: 13px; color: var(--ink); white-space: nowrap; }
.pill .u { color: var(--grey); font-size: 11px; }
.chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: 12px; font-family: PopS; font-size: 10.5px; letter-spacing: .5px;
  background: var(--ivory); color: var(--goldd); white-space: nowrap; }
.chip.navy { background: var(--navy); color: #fff; }
.chip.live { background: #E0475E; color: #fff; }
.chip.rose { background: var(--rose2); color: var(--navy); }
.chip.ghost { background: #fff; border: 1.5px solid var(--line); color: var(--grey); }
.row { display: flex; align-items: center; gap: 12px; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.sep { height: 1px; background: var(--line); margin: 10px 0; }
.ico { width: 46px; height: 46px; flex: none; border-radius: 14px; background: var(--ivory); display: flex; align-items: center; justify-content: center; }
.ico.round { border-radius: 50%; }
.ico.navy { background: var(--navy); }
.ic { display: inline-flex; line-height: 0; }
.input { width: 100%; height: 52px; border-radius: 14px; background: #fff; border: 1.5px solid var(--gold2); padding: 0 16px; font-family: PopS; font-size: 16px;
  color: var(--ink); outline: none; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(230, 200, 143, .35); }
.input.code { letter-spacing: 8px; text-align: center; font-size: 22px; }
.inrow { display: flex; align-items: center; gap: 8px; height: 52px; border-radius: 14px; background: #fff; border: 1.5px solid var(--gold2); padding: 0 6px 0 14px; }
.inrow input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-family: PopS; font-size: 15px; height: 100%; }
select.input { appearance: none; -webkit-appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239A6B17' stroke-width='2.4'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 16px center; }
.dashed { background: linear-gradient(135deg, #FFFDF8, #F7ECD9); border-style: dashed; border-color: var(--gold2); }
.tab { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 25; width: 100%; max-width: 480px; display: flex; justify-content: space-around;
  padding: 8px 4px calc(8px + var(--safe-b)); background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line); }
.tab a { display: flex; flex-direction: column; align-items: center; gap: 3px; width: 66px; font-family: PopS; font-size: 10.5px; color: #9AA0B8; }
.tab a.on { color: var(--navy); }
.count { display: flex; gap: 16px; margin-top: 6px; font-family: PopX; font-size: 38px; line-height: 1; }
.count small { display: block; font-family: PopS; font-size: 10px; letter-spacing: 1.5px; color: var(--gold2); margin-top: 5px; }
.emojis { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }
.emojis span { width: 68px; height: 68px; border-radius: 18px; background: #fff; border: 1.5px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 38px; box-shadow: 0 6px 14px rgba(150, 110, 40, .08); }
.opt { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 0 16px; margin-top: 9px; border-radius: 15px; font-family: PopS; font-size: 15px;
  background: #fff; color: var(--ink); border: 1.5px solid var(--line); cursor: pointer; text-align: left; }
.opt .dot { width: 22px; height: 22px; flex: none; border-radius: 50%; border: 2px solid #C9C3B2; display: inline-flex; align-items: center; justify-content: center; }
.opt.sel { background: var(--navy); color: #fff; border-color: var(--navy); }
.opt.sel .dot { border-color: var(--gold2); }
.opt.sel .dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--gold2); }
.opt.right { border-color: #3BA776; box-shadow: inset 0 0 0 1.5px #3BA776; }
.opt.wrong { opacity: .55; }
.bar { height: 10px; border-radius: 5px; background: #F1E7D6; overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--gold2), var(--gold)); transition: width .4s; }
.bar.lav > i { background: linear-gradient(90deg, #DCD3EC, #B9A6D6); }
.tabs { display: flex; gap: 8px; }
.tabs button { border: 1.5px solid var(--line); background: #fff; color: var(--grey); border-radius: 12px; height: 30px; padding: 0 12px; font-family: PopS; font-size: 12px; cursor: pointer; }
.tabs button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); row-gap: 14px; margin-top: 14px; }
.stamp { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stamp .s { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: PopX; font-size: 16px; }
.stamp .s.got { background: #FFFBF2; border: 2.5px solid var(--gold); box-shadow: inset 0 0 0 4px #FFFBF2, inset 0 0 0 5.5px var(--gold2); color: var(--navy); }
.stamp .s.no { border: 2px dashed #CFC3A8; color: #CFC3A8; font-size: 18px; }
.stamp .l { font-family: PopS; font-size: 9.5px; color: var(--grey); text-align: center; width: 64px; line-height: 1.2; }
.timeline .it { display: flex; gap: 12px; position: relative; padding-bottom: 14px; }
.timeline .tm { width: 62px; flex: none; font-family: PopS; font-size: 12.5px; color: var(--goldd); padding-top: 11px; text-align: right; }
.timeline .dot { position: relative; width: 40px; flex: none; display: flex; justify-content: center; }
.timeline .dot > span { width: 40px; height: 40px; border-radius: 50%; background: #fff; border: 2px solid var(--gold2); display: flex; align-items: center; justify-content: center; z-index: 2; }
.timeline .it.on .dot > span { background: var(--navy); border-color: var(--navy); }
.timeline .dot::after { content: ''; position: absolute; top: 40px; bottom: -14px; width: 2px; background: var(--line); }
.timeline .it:last-child .dot::after { display: none; }
.acc .q { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 0; cursor: pointer; }
.acc .a { display: none; padding: 0 0 12px; }
.acc .item.open .a { display: block; }
.acc .item + .item { border-top: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.toast { position: fixed; left: 50%; bottom: calc(100px + var(--safe-b)); transform: translate(-50%, 20px); z-index: 60; max-width: 88vw; padding: 12px 16px; border-radius: 14px;
  background: var(--ink); color: #fff; font-family: PopS; font-size: 13.5px; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transition: all .25s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.sheet-bg { position: fixed; inset: 0; z-index: 70; background: rgba(11, 28, 98, .35); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: 100%; max-width: 480px; max-height: 86vh; overflow: auto; background: #FFFCF6; border-radius: 24px 24px 0 0; padding: 18px 16px calc(22px + var(--safe-b)); }
.sheet .opt { margin-top: 7px; min-height: 46px; }
.ticket { position: relative; border-radius: 24px; overflow: hidden; background: #fff; border: 1.5px solid var(--line); box-shadow: 0 12px 28px rgba(150, 110, 40, .12); }
.ticket .top { padding: 16px 18px; background: linear-gradient(135deg, #172894, #0B1C62); color: #fff; }
.ticket .mid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; padding: 14px 18px; }
.ticket .mid .v { font-family: PopX; font-size: 18px; color: var(--navy); }
.ticket .cut { position: relative; height: 0; border-top: 2px dashed var(--line); margin: 0 18px; }
.ticket .cut::before, .ticket .cut::after { content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: #FBF2E2; }
.ticket .cut::before { left: -30px; } .ticket .cut::after { right: -30px; }
.ticket .qr { display: flex; align-items: center; gap: 14px; padding: 14px 18px 16px; }
.ticket .qr .box { width: 96px; height: 96px; flex: none; }
.ticket .qr svg { width: 100%; height: 100%; display: block; }
.scan { position: fixed; inset: 0; z-index: 40; background: #181715; color: #fff; }
.scan video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan .frame { position: absolute; left: 50%; top: 42%; width: 70vw; max-width: 300px; aspect-ratio: 1; transform: translate(-50%, -50%); }
.scan .frame i { position: absolute; width: 44px; height: 44px; border-color: var(--gold2); border-style: solid; border-width: 0; }
.scan .frame i:nth-child(1) { left: 0; top: 0; border-left-width: 5px; border-top-width: 5px; border-radius: 14px 0 0 0; }
.scan .frame i:nth-child(2) { right: 0; top: 0; border-right-width: 5px; border-top-width: 5px; border-radius: 0 14px 0 0; }
.scan .frame i:nth-child(3) { left: 0; bottom: 0; border-left-width: 5px; border-bottom-width: 5px; border-radius: 0 0 0 14px; }
.scan .frame i:nth-child(4) { right: 0; bottom: 0; border-right-width: 5px; border-bottom-width: 5px; border-radius: 0 0 14px 0; }
.scan .bar2 { position: absolute; left: 10px; right: 10px; top: 50%; height: 3px; background: linear-gradient(90deg, transparent, var(--gold2), transparent); animation: sweep 2s ease-in-out infinite; }
@keyframes sweep { 0%, 100% { top: 12%; } 50% { top: 88%; } }
.scan .top { position: absolute; left: 16px; right: 16px; top: calc(16px + var(--safe-t)); display: flex; justify-content: space-between; align-items: center; }
.scan .rnd { width: 42px; height: 42px; border-radius: 50%; background: rgba(0, 0, 0, .4); display: flex; align-items: center; justify-content: center; border: 0; cursor: pointer; }
.scan .msg { position: absolute; left: 20px; right: 20px; top: calc(42% + min(35vw, 150px) + 26px); text-align: center; font-family: PopS; font-size: 14px; }
.scan .result { position: absolute; left: 16px; right: 16px; bottom: calc(24px + var(--safe-b)); border-radius: 20px; background: #fff; color: var(--ink); padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.scratch { position: relative; width: 100%; max-width: 340px; aspect-ratio: 330 / 210; margin: 18px auto 0; border-radius: 20px; overflow: hidden; background: #FFFDF8;
  border: 2px solid var(--gold2); touch-action: none; }
.scratch .under { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.scratch .under img { width: 78%; }
.scratch canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
.quiz .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.quiz .o { min-height: 96px; border-radius: 18px; border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 8px; color: var(--ink);
  cursor: pointer; transition: transform .1s, opacity .2s; }
.quiz .o b { font-family: PopX; font-size: 26px; font-weight: normal; }
.quiz .o span { font-family: PopS; font-size: 14px; text-align: center; }
.quiz .o.sel { box-shadow: 0 0 0 4px #fff, 0 0 0 7px var(--navy); }
.quiz .o.dim { opacity: .35; }
.quiz .o.right { box-shadow: 0 0 0 4px #fff, 0 0 0 7px #3BA776; }
.stage { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(ellipse at 50% 30%, #2A2450, #0B0B1C 75%); overflow: hidden; }
.stage iframe, .stage video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: #000; }
.chat .m { display: flex; gap: 8px; margin-top: 10px; }
.chat .av { width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--rose2); display: flex; align-items: center; justify-content: center; font-family: PopS; font-size: 10px; }
.react { width: 44px; height: 44px; flex: none; border-radius: 50%; background: #fff; border: 1.5px solid var(--line); font-size: 20px; cursor: pointer; }
.oval { position: relative; width: 240px; height: 290px; margin: 22px auto 0; border-radius: 120px; background: linear-gradient(180deg, #F4ECDE, #E9DCC6); border: 4px solid var(--gold2);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.oval img { width: 100%; height: 100%; object-fit: cover; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid var(--navy); display: flex; align-items: center; justify-content: center; margin: 22px auto 0; cursor: pointer; background: none; }
.shutter i { width: 58px; height: 58px; border-radius: 50%; background: var(--navy); }
.menu a { display: flex; align-items: center; gap: 12px; padding: 13px 0; }
.menu a + a { border-top: 1px solid var(--line); }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.lock-screen { padding: 30px 6px; text-align: center; }
.fade { animation: fade .2s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--gold); animation: rot 1s linear infinite; margin: 40px auto; }
@keyframes rot { to { transform: rotate(360deg); } }
@media (min-width: 520px) { body { padding: 0; } }
.has-test .scan .top { top: calc(44px + var(--safe-t)); }
