/* CollegePay student app. Built on /shared/tokens.css; designed for 375×812 and scales up to a 440px phone column. */

body.student-app { min-height: 100dvh; background: linear-gradient(160deg, #E3F8EE 0%, #CFF3E2 55%, #BDEDD6 100%); background-attachment: fixed; }
body.student-app.theme-dark { background: var(--brand-900); }
.phone { position: relative; max-width: 440px; min-height: 100dvh; margin: 0 auto; background: linear-gradient(180deg, #E5F8EE 0, #F2FAF6 300px, #F5F9F7 100%); }
body.theme-dark .phone { background: radial-gradient(130% 55% at 50% 0%, var(--brand-700) 0%, var(--brand-900) 62%, var(--brand-950) 100%); }
@media (min-width: 520px) {
  body.student-app { background: radial-gradient(900px 600px at 15% 10%, #E6FAF0, transparent 60%), linear-gradient(135deg, #CBF2DE, #9FE3C2 60%, #84D7B0); }
  .phone { box-shadow: 0 0 0 1px rgba(6, 46, 34, 0.08), 0 40px 90px -30px rgba(6, 46, 34, 0.45); }
}
main, main:focus, main:focus-visible { outline: none; }
.screen { padding: 0 var(--s4) var(--s6); animation: screen-in 240ms var(--ease-out); }
body.has-tabbar .screen { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
.screen:has(.cta-bar) { padding-bottom: calc(112px + env(safe-area-inset-bottom)); }
body.has-tabbar .screen:has(.cta-bar) { padding-bottom: calc(184px + env(safe-area-inset-bottom)); }
.screen.is-dark { color: #fff; }
.boot { min-height: 100dvh; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } }
.small { font-size: var(--t-sm); }
.btn:active:not(:disabled) { transform: scale(0.95); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.08); }
.input[type="search"] { appearance: none; -webkit-appearance: none; }
.input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* ---- Header ---------------------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s2);
  min-height: 60px; margin: 0 calc(-1 * var(--s4)); padding: env(safe-area-inset-top) var(--s3) 0;
  background: color-mix(in srgb, #EAF9F1 84%, transparent); backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
}
.topbar > :first-child { justify-self: start; }
.topbar-right { justify-self: end; display: flex; align-items: center; }
.topbar-title { font-size: 18px; text-align: center; white-space: nowrap; }
.topbar.is-dark { background: color-mix(in srgb, var(--brand-900) 80%, transparent); color: #fff; }
.topbar.is-dark .icon-btn { color: #fff; }
.topbar.is-dark .icon-btn:hover { background: rgba(255, 255, 255, 0.1); }
.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--ink); text-decoration: none; transition: background var(--fast), transform 120ms var(--spring);
}
.icon-btn:hover { background: rgba(14, 90, 65, 0.08); }
.icon-btn:active { transform: scale(0.92); }
.icon-btn-spacer { display: block; width: 44px; height: 44px; }
.avatar-btn .avatar { width: 36px; height: 36px; box-shadow: 0 0 0 2px #fff; }
.bell .dot { position: absolute; top: 9px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: #EF4444; box-shadow: 0 0 0 2px #EAF9F1; }
.logo { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.logo-word { font-size: 22px; font-weight: 800; letter-spacing: -0.03em; color: var(--brand-900); line-height: 1; }
.logo-word b { font-weight: 800; color: var(--brand-500); }
.topbar.is-dark .logo-word, .theme-dark .topbar .logo-word { color: #fff; }

/* ---- Status banner ------------------------------------------------------------------------------ */
.banner { display: flex; gap: var(--s3); align-items: flex-start; padding: var(--s3) 14px; margin: 0 0 var(--s4); border-radius: var(--r-lg); font-size: var(--t-sm); }
.banner b { display: block; font-size: var(--t-md); }
.banner .ic { margin-top: 1px; }
.banner-pending { background: var(--warn-bg); color: var(--warn); }
.banner-flagged { background: var(--info-bg); color: var(--info); }
.banner-suspended { background: var(--danger-bg); color: var(--danger); }

/* ---- Home ----------------------------------------------------------------------------------------- */
.hello { display: grid; grid-template-columns: auto 1fr auto; gap: var(--s3); align-items: center; margin: var(--s2) 0 var(--s4); }
.hello .avatar-lg { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--brand-300); }
.hello h2 { font-size: var(--t-xl); }
.hello p { font-size: var(--t-md); color: var(--ink-2); line-height: 1.35; }
.hello .tagline { margin-top: 2px; color: var(--brand-600); font-weight: 700; font-size: var(--t-sm); }
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 1.6s 400ms ease-in-out 1; }
@keyframes wave { 15%, 45% { transform: rotate(16deg); } 30%, 60% { transform: rotate(-8deg); } 75% { transform: rotate(0); } }
.role-chip { align-self: start; display: inline-flex; align-items: center; gap: var(--s1); padding: 5px 10px; border-radius: var(--r-full); background: #fff; color: var(--brand-700); font-size: 12px; font-weight: 700; box-shadow: var(--shadow-1); white-space: nowrap; }

/* Premium surfaces (balance card, virtual card): 3-stop dark gradient, 8% pattern, 1px rim at 28% white, 18% glare, two shadows. */
.premium {
  --gx: 30%; --gy: 0%;
  position: relative; overflow: hidden; isolation: isolate; color: #fff;
  background: linear-gradient(135deg, #0F5C42 0%, #0A3D2D 48%, #052A1F 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 8px 16px -10px rgba(6, 46, 34, 0.5), 0 30px 50px -24px rgba(6, 46, 34, 0.6);
}
.pc-pattern { position: absolute; inset: 0; z-index: -1; opacity: 0.08; pointer-events: none;
  background-image: repeating-radial-gradient(circle at 105% -15%, #fff 0 1px, transparent 1.5px 16px); }
.pc-glare { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: radial-gradient(circle at var(--gx) var(--gy), rgba(255, 255, 255, 0.18), transparent 55%); }
.balance-card { padding: var(--s5); border-radius: 24px; min-height: 172px; }
.bc-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.bc-label { font-size: 15px; font-weight: 600; color: var(--brand-200); }
.eye-toggle { position: relative; width: 44px; height: 44px; border: 0; border-radius: 14px; background: rgba(255, 255, 255, 0.14); color: #fff; }
.eye-toggle span { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity 200ms var(--ease-out), transform 300ms var(--spring); }
.eye-toggle .eye-off { opacity: 0; transform: scale(0.6) rotate(-20deg); }
.eye-toggle.is-hidden .eye-on { opacity: 0; transform: scale(0.6) rotate(20deg); }
.eye-toggle.is-hidden .eye-off { opacity: 1; transform: none; }
.bc-amount { position: relative; z-index: 1; margin: var(--s2) 0 var(--s4); font-size: 38px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; white-space: nowrap; }
.bc-amount .cur { margin-right: 6px; font-size: 24px; color: var(--brand-200); }
.bc-card-link { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: var(--s2); min-height: 40px; padding: 0 var(--s3); border-radius: var(--r-full); background: rgba(255, 255, 255, 0.12); color: #fff; font-size: var(--t-sm); font-weight: 600; text-decoration: none; }
.bc-card-link .pill { height: 20px; padding: 0 8px; font-size: 11px; }
.bc-minicard {
  position: absolute; right: -16px; bottom: -22px; z-index: 0; width: 132px; height: 86px; padding: 10px 12px; border-radius: 14px; transform: rotate(-12deg);
  display: flex; flex-direction: column; justify-content: space-between; font-size: 10px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #3AD08D, #179563 55%, #0E5A41); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3), 0 10px 22px rgba(0, 0, 0, 0.3);
}
.bc-minicard b { align-self: flex-end; font-size: 15px; font-style: italic; }

.quick { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--s2); margin: var(--s4) 0; }
.quick-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 92px; padding: var(--s3) 2px 10px; border-radius: 18px;
  background: linear-gradient(180deg, #FFFFFF, #ECFAF2); border: 1px solid var(--line); color: var(--ink); text-decoration: none; text-align: center;
  box-shadow: var(--shadow-1); transition: transform 140ms var(--spring), box-shadow var(--fast);
}
.quick-tile:active { transform: scale(0.95); }
.qi { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: var(--brand-700); }
.quick-tile:nth-child(2) .qi { color: #fff; background: var(--brand-500); border-radius: 50%; }
.ql { font-size: 12px; font-weight: 700; line-height: 1.2; }
.ql small { font: inherit; }

.promo {
  position: relative; display: grid; grid-template-columns: 1fr 108px; align-items: center; gap: var(--s2); padding: var(--s4); overflow: hidden;
  border-radius: 22px; border: 1px solid var(--line); background: linear-gradient(120deg, #FFFFFF 0%, #DDF6E9 100%); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1);
}
.promo-copy b { display: block; font-size: 18px; line-height: 1.2; letter-spacing: -0.02em; }
.promo-copy > span { display: block; margin-top: var(--s1); font-size: var(--t-sm); color: var(--ink-2); }
.promo-copy .promo-stats { margin-top: var(--s2); font-size: 12px; font-weight: 700; color: var(--brand-600); }
.promo-art { width: 108px; }
.promo-go { position: absolute; right: 12px; bottom: 12px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand-700); color: #fff; box-shadow: var(--shadow-1); }
.ticket-strip { display: flex; align-items: center; gap: 10px; margin-top: var(--s3); padding: var(--s3) 14px; border-radius: var(--r-lg); background: var(--brand-100); color: var(--brand-800); font-size: var(--t-md); text-decoration: none; }
.ticket-strip span { flex: 1; }

.section { margin-top: var(--s5); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin: var(--s5) 0 10px; }
.section-head h2 { font-size: var(--t-lg); }
.section .section-head { margin-top: 0; }
.see-all { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; color: var(--brand-600); font-size: var(--t-md); font-weight: 700; text-decoration: none; }
.sub-label { margin: var(--s5) 4px var(--s2); font-size: var(--t-sm); font-weight: 700; color: var(--muted); letter-spacing: 0; }

/* ---- Lists and rows ------------------------------------------------------------------------------------ */
.list { overflow: hidden; padding: var(--s1) 0; border-radius: var(--r-xl); }
.list > * + * { border-top: 1px solid var(--line); }
.txn, .contact, .notif, .req-row {
  display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: var(--s3); width: 100%; min-height: 66px; padding: var(--s3) 14px;
  border: 0; background: transparent; color: inherit; text-align: left; text-decoration: none; transition: background var(--fast);
}
button.txn:hover, button.contact:hover:not(:disabled), .notif:hover { background: var(--surface-2); }
.contact:disabled { opacity: 0.55; cursor: default; }
.txn-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-100); color: var(--brand-700); }
.txn-ic.tone-in { background: #D7F5E6; color: var(--success); }
.txn-ic.big { width: 64px; height: 64px; border-radius: 20px; }
.txn-main { display: grid; min-width: 0; }
.txn-main b { overflow: hidden; font-size: 15px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }
.txn-main small { overflow: hidden; font-size: var(--t-sm); color: var(--muted); white-space: nowrap; text-overflow: ellipsis; }
.txn-side { display: grid; justify-items: end; gap: 2px; }
.txn-side b { font-size: 15px; font-weight: 800; white-space: nowrap; }
.txn-side small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.is-in { color: var(--success); }
.is-muted { color: var(--muted); text-decoration: line-through; }
.txn-detail { display: grid; justify-items: center; gap: 6px; padding: var(--s2) 0 var(--s4); text-align: center; }
.txn-detail-amt { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.03em; }
.txn-detail-title { font-weight: 700; color: var(--ink-2); }
.notif.is-unread { background: var(--brand-50); }
.notif.is-unread b { font-weight: 800; }
.notif .txn-main b, .notif .txn-main small { white-space: normal; }
.notif-time { display: grid; justify-items: end; gap: 6px; font-size: 12px; color: var(--muted); }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand-500); }

.kv { margin: 0; padding: var(--s1) var(--s4); }
.kv > div { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s3) 0; }
.kv > div + div { border-top: 1px solid var(--line); }
.kv dt { font-size: var(--t-md); color: var(--muted); }
.kv dd { min-width: 0; margin: 0; font-size: var(--t-md); font-weight: 700; text-align: right; overflow-wrap: anywhere; }
.copy { display: inline-flex; align-items: center; gap: 6px; padding: var(--s1) 0; border: 0; background: transparent; color: var(--brand-700); font: inherit; font-weight: 700; cursor: pointer; }

.month-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: var(--s2); }
.ms { padding: 14px; border-radius: 18px; border: 1px solid var(--line); background: #fff; }
.ms span { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.ms b { display: block; margin-top: var(--s1); font-size: var(--t-lg); font-weight: 800; }
.ms.in .ic { color: var(--success); }
.ms.out .ic { color: var(--danger); }
.ms-caption { margin: 6px 2px 14px; font-size: 12px; color: var(--muted); }
.day-label { margin: 18px 4px var(--s2); font-size: var(--t-sm); font-weight: 700; color: var(--muted); }
.seg-full { display: flex; width: 100%; margin: 0 0 var(--s4); }
.seg-full button { flex: 1 1 auto; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 10px; white-space: nowrap; }
.seg-full button:disabled { opacity: 0.45; cursor: not-allowed; }

/* ---- Search, chips, heroes --------------------------------------------------------------------------- */
.search-row { display: flex; gap: 10px; margin: 0 0 var(--s3); }
.grow { flex: 1; }
.search-row .input, .merchant-search .input { border-radius: var(--r-full); background: #fff; box-shadow: var(--shadow-1); }
.search-row .btn-icon { border-radius: 14px; }
.chips { display: flex; gap: var(--s2); margin: 0 calc(-1 * var(--s4)) var(--s1); padding: 2px var(--s4) 10px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips .chip { flex: none; min-height: 40px; scroll-snap-align: start; }
.hero {
  position: relative; display: grid; grid-template-columns: 1fr 112px; align-items: center; gap: var(--s2); margin: var(--s1) 0 var(--s4); padding: var(--s4);
  overflow: hidden; border-radius: 24px; border: 1px solid var(--line); background: linear-gradient(135deg, #FFFFFF 0%, #DDF6E9 100%); box-shadow: var(--shadow-1);
}
.hero-title { display: flex; align-items: center; gap: 10px; }
.hero-badge { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-700); color: #fff; }
.hero h1 { font-size: 22px; line-height: 1.15; }
.hero .hl { color: var(--brand-500); }
.hustle-hero .hl { display: inline-block; padding: 0 8px; border-radius: 8px; background: var(--brand-500); color: #fff; }
.hero-sub { margin-top: 10px; font-size: 19px; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.vibes-hero .hero-sub { font-size: 15px; font-weight: 700; color: var(--ink-2); letter-spacing: 0; margin-bottom: var(--s3); }
.hero-note { margin-top: 6px; font-size: var(--t-sm); color: var(--ink-2); }
.hero-art { position: relative; }
.hero-art-svg { width: 100%; }
.uca-badge { position: absolute; right: -6px; bottom: -10px; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 12px; background: #fff; color: var(--brand-800); font-size: 9px; line-height: 1.1; box-shadow: var(--shadow-2); }
.uca-badge b { display: block; font-size: 15px; }

/* ---- Job cards ----------------------------------------------------------------------------------------- */
.job-card { display: grid; grid-template-columns: 64px 1fr; gap: var(--s3); margin-bottom: var(--s3); padding: 14px; border-radius: var(--r-xl); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-1); cursor: pointer; transition: transform 160ms var(--ease-out), box-shadow var(--fast); }
.job-card:hover { box-shadow: var(--shadow-2); }
.jc-thumb svg { border-radius: 14px; }
.jc-main { min-width: 0; }
.jc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s2); }
.jc-top h3 { font-size: 17px; line-height: 1.25; }
.jc-title { padding: 0; border: 0; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.jc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.verified, .cat-tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: var(--r-full); font-size: 12px; font-weight: 700; }
.verified { background: var(--brand-100); color: var(--brand-700); }
.cat-tag { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.jc-partner { font-size: var(--t-sm); font-weight: 600; color: var(--muted); }
.jc-summary { display: -webkit-box; margin: var(--s1) 0 var(--s2); overflow: hidden; font-size: var(--t-md); color: var(--ink-2); -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.jc-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.jc-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.jc-meta .ic { color: var(--brand-600); }
.jc-pay b { font-size: 15px; color: var(--ink); }
.jc-pay small { margin-left: 3px; color: var(--muted); }
.jc-actions { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s3); }
.jc-actions .btn:not(.btn-sm) { flex: 1; }
.heart { display: grid; flex: none; place-items: center; width: 44px; height: 44px; margin: -10px -10px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--brand-700); }
.heart:hover { background: var(--surface-2); }
.heart.is-on { color: #E11D48; }
.heart.is-on svg { fill: #E11D48; }
.heart.pop { animation: pop 320ms var(--spring); }
@keyframes pop { 45% { transform: scale(1.28); } }
.ec-actions .heart, .topbar .heart { margin: 0; }

.job-detail h4 { margin: var(--s4) 0 6px; font-size: 15px; }
.job-detail .kv { padding: 0; }
.job-detail p { font-size: 15px; color: var(--ink-2); }
.jd-head { display: grid; grid-template-columns: 72px 1fr; align-items: center; gap: 14px; }
.jd-head svg { border-radius: 16px; }
.jd-head h3 { font-size: var(--t-lg); }
.jd-head p { font-size: var(--t-md); color: var(--muted); }
.jd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin: var(--s4) 0 var(--s2); }
.jd-stats > div { padding: 10px; border-radius: 14px; background: var(--surface-2); }
.jd-stats small { display: block; font-size: 12px; color: var(--muted); }
.jd-stats b { display: block; font-size: var(--t-base); }
.jd-stats span { font-size: 12px; color: var(--ink-2); }
.jd-mine { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: var(--s1); font-size: var(--t-sm); }
.sheet-job { display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: var(--s3); margin-bottom: var(--s4); padding: 10px; border-radius: 14px; background: var(--surface-2); }
.sheet-job svg { border-radius: 12px; }
.sheet-job b { display: block; }
.sheet-job small { font-size: var(--t-sm); color: var(--muted); }
.apply-form, .parent-form, .stack { display: grid; gap: 14px; }

.earn-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); margin-bottom: 14px; }
.earn-strip > div { padding: 10px var(--s3); border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; }
.earn-strip small { display: block; font-size: 12px; color: var(--muted); }
.earn-strip b { font-size: var(--t-base); font-weight: 800; }
.app-card { margin-bottom: var(--s3); padding: 14px; border-radius: var(--r-xl); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-1); }
.app-top { display: grid; grid-template-columns: 52px 1fr auto; align-items: center; gap: var(--s3); }
.app-top svg { border-radius: 12px; }
.app-main { min-width: 0; }
.app-main b { display: block; font-size: 15px; line-height: 1.25; }
.app-main small { font-size: var(--t-sm); color: var(--muted); }
.progress-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s1); margin: 14px 0 6px; padding: 0; list-style: none; }
.progress-steps li { position: relative; padding-top: 14px; font-size: 11.5px; font-weight: 700; text-align: center; color: var(--muted); }
.progress-steps li::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 6px; border-radius: var(--r-full); background: var(--surface-3); }
.progress-steps li.done { color: var(--brand-700); }
.progress-steps li.done::before { background: var(--brand-500); }
.progress-steps li.waiting { color: var(--purple); }
.progress-steps li.waiting::before { background: repeating-linear-gradient(90deg, var(--brand-300) 0 6px, var(--brand-100) 6px 12px); background-size: 24px 6px; animation: crawl 1s linear infinite; }
@keyframes crawl { to { background-position: 24px 0; } }
.app-foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: var(--s2); }
.app-foot small { font-size: 12px; color: var(--muted); }

/* ---- Event cards & detail --------------------------------------------------------------------------- */
.event-card { display: grid; grid-template-columns: 116px 1fr; gap: var(--s3); margin-bottom: 14px; padding: var(--s3); border-radius: 22px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-1); }
.ec-poster { position: relative; display: block; aspect-ratio: 5 / 6; overflow: hidden; border-radius: var(--r-lg); }
.ec-poster > svg, .ev-hero > svg, .co-poster > svg, .et-poster > svg, .tc-poster > svg { width: 100%; height: 100%; }
.ec-soldout { position: absolute; left: 8px; top: 8px; padding: 3px 8px; border-radius: var(--r-full); background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; }
.ec-body { display: grid; align-content: start; gap: var(--s1); min-width: 0; }
.ec-body h3 { font-size: 17px; line-height: 1.25; }
.ec-body h3 a { color: inherit; text-decoration: none; }
.ec-meta { display: flex; align-items: flex-start; gap: 6px; font-size: var(--t-sm); color: var(--ink-2); }
.ec-meta .ic { margin-top: 2px; color: var(--brand-600); }
.ec-price { margin-top: 2px; font-size: var(--t-md); color: var(--brand-700); }
.ec-price b { font-size: 19px; font-weight: 800; }
.ec-actions { grid-column: 1 / -1; display: flex; align-items: center; gap: var(--s2); }
.ec-actions .btn { flex: 1; padding: 0 10px; }
.ev-badge { display: inline-flex; align-items: center; gap: 5px; justify-self: start; height: 26px; padding: 0 10px 0 8px; border-radius: var(--r-full); background: var(--brand-700); color: #fff; font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.ev-badge.is-official .ic { color: #FACC15; }
.ev-badge.is-endorsed { background: var(--brand-100); color: var(--brand-800); }
.ev-badge.is-endorsed .ic { color: var(--brand-600); }
.ev-badge.is-verified { background: var(--info-bg); color: var(--info); }
.ev-hero { position: relative; aspect-ratio: 4 / 3; overflow: hidden; margin-top: var(--s1); border-radius: 24px; box-shadow: var(--shadow-2); }
.ev-hero-badge { position: absolute; left: 12px; bottom: 12px; }
.ev-hero .ev-badge { background: rgba(255, 255, 255, 0.95); color: var(--brand-800); box-shadow: var(--shadow-1); }
.ev-info h1 { margin-top: var(--s4); font-size: var(--t-xl); }
.ev-tagline { margin-top: var(--s1); font-size: var(--t-base); font-weight: 700; }
.ev-desc { margin-top: var(--s2); font-size: 15px; color: var(--ink-2); }
.ev-facts { display: grid; gap: 10px; margin: var(--s4) 0; padding: 0; list-style: none; }
.ev-facts li { display: flex; align-items: center; gap: var(--s3); font-weight: 600; }
.ev-facts .ic { color: var(--brand-600); }
.ev-info .ticket-strip { margin: 0 0 var(--s4); }
.ev-tab-body { margin-bottom: var(--s4); }
.price-list { margin: 0; padding: var(--s1) 0; list-style: none; }
.price-list li { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); padding: var(--s3) var(--s4); }
.price-list li + li { border-top: 1px solid var(--line); }
.price-list b { display: block; }
.price-list small { display: block; font-size: var(--t-sm); color: var(--muted); }
.price-col { display: grid; justify-items: end; white-space: nowrap; }
.addon-line { display: flex; align-items: center; gap: var(--s3); }
.addon-ic { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-100); color: var(--brand-700); }
.is-danger { color: var(--danger) !important; }
.is-warn { color: var(--warn) !important; }
.pad { padding: var(--s4); }
.pad-top { margin-top: var(--s4); padding: 0 var(--s4); }
.ev-tab-body > p.muted:last-child { padding: 0 var(--s4) var(--s4); }

/* ---- Ticket selection & checkout ------------------------------------------------------------------- */
.flow-title { margin: var(--s1) 0 var(--s3); font-size: 22px; text-align: center; }
.flow-sub { margin: var(--s5) 0 10px; font-size: 18px; }
.flow-sub .muted { font-weight: 600; font-size: var(--t-md); }
.stepper { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 0 var(--s2); padding: 0; list-style: none; }
.stepper li { display: flex; align-items: center; gap: 6px; font-size: var(--t-sm); font-weight: 700; color: var(--muted); }
.stepper li + li::before { content: ''; width: 20px; height: 2px; margin-right: 2px; border-radius: 2px; background: var(--line-strong); }
.step-dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-3); font-size: 12px; }
.stepper li.current { color: var(--ink); }
.stepper li.current .step-dot { background: var(--brand-700); color: #fff; }
.stepper li.done { color: var(--brand-700); }
.stepper li.done .step-dot { background: var(--brand-500); color: #fff; }

.options { display: grid; gap: 10px; margin: var(--s4) 0; padding: 0; border: 0; }
.options legend { margin-bottom: 10px; padding: 0; }
.flow-sub + .options { margin-top: 0; }
.opt {
  position: relative; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3); padding: 14px;
  border-radius: var(--r-lg); border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: border-color var(--fast), background var(--fast), box-shadow var(--fast);
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) { border-color: var(--brand-500); background: var(--brand-50); box-shadow: 0 0 0 3px var(--brand-100); }
.opt:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--brand-400) 70%, transparent); outline-offset: 2px; }
.opt.is-disabled { opacity: 0.55; cursor: not-allowed; }
.radio { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); }
.radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-600); transform: scale(0); transition: transform 200ms var(--spring); }
.opt:has(input:checked) .radio { border-color: var(--brand-600); }
.opt:has(input:checked) .radio::after { transform: scale(1); }
.opt-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--brand-100); color: var(--brand-700); }
.opt-ic.wallet-ic { background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); color: #fff; }
.opt-ic.visa { background: #1A1F71; color: #fff; font-size: 12px; font-weight: 800; font-style: italic; letter-spacing: 0.02em; }
.opt-main b { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.opt-main small { display: block; font-size: var(--t-sm); color: var(--muted); }
.opt-price { font-size: var(--t-base); font-weight: 800; white-space: nowrap; }
.crown { display: inline-flex; color: #D4A017; }
.addon-opt { display: block; padding: 0; cursor: default; }
.addon-label { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: var(--s3); padding: 14px; cursor: pointer; }
.addon-opt.is-disabled .addon-label { cursor: not-allowed; }
.check { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line-strong); color: transparent; transition: background var(--fast), border-color var(--fast); }
.addon-opt:has(input:checked) .check { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.size-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: 0 14px 14px 48px; }
.size-row .label { margin-right: var(--s1); }
.size-chip { justify-content: center; min-width: 44px; }
.qty-row { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-top: var(--s1); padding: var(--s3) 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; }
.qty-row b { display: block; }
.qty-row small { font-size: var(--t-sm); color: var(--muted); }
.qty { display: flex; align-items: center; gap: var(--s3); }
.qty output { min-width: 24px; font-size: 18px; font-weight: 800; text-align: center; }
.qty .btn-icon { border-radius: 12px; }
.summary { margin: var(--s4) 0; padding: 6px var(--s4); }
.summary > div { display: flex; justify-content: space-between; gap: var(--s3); padding: 10px 0; font-size: 15px; }
.summary > div + div { border-top: 1px solid var(--line); }
.summary .summary-total { margin: var(--s1) -10px 6px; padding: var(--s3) 10px; border-top: 0; border-radius: var(--r-md); background: var(--brand-100); font-size: 17px; font-weight: 800; }
.summary-total b { font-size: var(--t-lg); color: var(--brand-800); }
.line-ic { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); }
.line-ic .ic { color: var(--brand-600); }
.line-ic small { width: 100%; padding-left: 26px; font-size: 12px; color: var(--muted); }
.secure-tag { display: flex; align-items: center; gap: 6px; font-size: 11px; line-height: 1.15; color: var(--brand-700); }
.secure-tag b { display: block; font-size: 12px; }
.secure-tag small { display: block; color: var(--muted); }
.co-event { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: var(--s3); margin-top: var(--s2); padding: 10px; }
.co-poster { aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; }
.co-event b { display: block; font-size: var(--t-base); line-height: 1.25; }
.co-event small { display: block; font-size: var(--t-sm); color: var(--muted); }
.link-row { display: flex; align-items: center; gap: 10px; margin: var(--s4) 0; padding: var(--s3) 14px; border-radius: var(--r-lg); border: 1px dashed var(--brand-300); background: var(--brand-50); color: var(--brand-800); font-size: var(--t-md); text-decoration: none; }
.link-row span { flex: 1; }
.link-row.small { margin: 0; }
.sandbox-note { display: flex; align-items: flex-start; gap: var(--s2); margin: var(--s3) 0; padding: 10px var(--s3); border-radius: var(--r-md); background: var(--surface-2); font-size: var(--t-sm); color: var(--muted); }
.sandbox-note .ic { flex: none; margin-top: 2px; }

/* Sticky bottom call to action (sits above the tab bar when it is shown). */
.cta-bar {
  position: fixed; z-index: 40; left: 50%; bottom: 0; width: min(440px, 100%); transform: translateX(-50%);
  padding: var(--s3) var(--s4) calc(var(--s3) + env(safe-area-inset-bottom)); background: linear-gradient(to top, #F5F9F7 72%, rgba(245, 249, 247, 0));
}
body.has-tabbar .cta-bar { bottom: calc(72px + env(safe-area-inset-bottom)); padding-bottom: var(--s2); }
.theme-dark .cta-bar { background: linear-gradient(to top, var(--brand-950) 72%, transparent); }

/* ---- Money flows ----------------------------------------------------------------------------------- */
.recipient-chip { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3); margin-top: var(--s2); padding: var(--s3); border-radius: 18px; border: 1px solid var(--line); background: #fff; }
.amount-entry { margin: var(--s6) 0 var(--s4); text-align: center; }
.amount-display { display: flex; align-items: baseline; justify-content: center; gap: 6px; font-weight: 800; }
.amount-display .cur { font-size: 24px; color: var(--muted); }
.amt { font-size: 52px; line-height: 1.1; letter-spacing: -0.03em; }
.amt.is-empty { color: var(--line-strong); }
.amount-avail { font-size: var(--t-sm); color: var(--muted); }
.amount-error { margin-top: var(--s1); font-size: var(--t-sm); font-weight: 700; color: var(--danger); }
.note-field { margin: var(--s2) 0 var(--s3); }
.pay-method { margin: var(--s2) 0 0; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2); }
.key { height: 58px; border: 0; border-radius: var(--r-lg); background: #fff; color: var(--ink); font-size: 24px; font-weight: 700; box-shadow: var(--shadow-1); transition: transform 120ms var(--spring), background var(--fast); display: grid; place-items: center; }
.key:active { transform: scale(0.95); background: var(--brand-100); }
.contact-list { min-height: 120px; }
.add-balance { display: flex; align-items: center; justify-content: space-between; margin: var(--s2) 0 var(--s4); padding: 14px var(--s4); border-radius: 18px; background: linear-gradient(135deg, var(--brand-800), var(--brand-700)); color: #fff; }
.add-balance span { font-size: var(--t-md); color: var(--brand-200); }
.add-balance b { font-size: var(--t-lg); }
.preset-row { display: flex; flex-wrap: wrap; gap: var(--s2); }
.preset-row .chip { flex: 1 1 calc(25% - 8px); justify-content: center; min-width: 72px; padding: 0 var(--s2); }
.money-input { display: flex; align-items: center; gap: var(--s2); margin-top: 10px; }
.money-input span { font-size: var(--t-lg); font-weight: 800; color: var(--muted); }
.money-input .input { font-size: 22px; font-weight: 800; }
.hint.is-error { color: var(--danger); font-weight: 600; }
.parent-card { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); padding: 14px; border-radius: var(--r-lg); border: 1px solid var(--brand-200); background: var(--brand-50); color: var(--brand-800); }
.parent-card b { display: block; }
.parent-card span { font-size: var(--t-md); }
.req-row .pill { justify-self: end; }
.confirm-head { display: grid; justify-items: center; gap: 10px; margin: var(--s1) 0 var(--s3); text-align: center; }
.confirm-head p { font-size: 18px; }
.success-panel { display: grid; justify-items: center; gap: var(--s2); padding: var(--s6) 4px; text-align: center; }
.success-tick { color: var(--brand-500); }
.success-tick .tick { width: 84px; height: 84px; }
.success-panel h2 { font-size: 22px; }
.success-amount { font-size: var(--t-3xl); font-weight: 800; letter-spacing: -0.03em; }
.success-panel .kv { width: 100%; margin-top: var(--s2); border-radius: 18px; border: 1px solid var(--line); background: #fff; text-align: left; }
.success-actions { display: grid; gap: 10px; width: 100%; margin-top: var(--s3); }
.scan-hero { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 14px; width: 100%; margin: var(--s2) 0 var(--s4); padding: 18px; border: 0; border-radius: 22px; background: linear-gradient(135deg, var(--brand-800), var(--brand-600)); color: #fff; text-align: left; box-shadow: var(--shadow-2); transition: transform 140ms var(--spring); }
.scan-hero:active { transform: scale(0.97); }
.scan-hero-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: rgba(255, 255, 255, 0.14); }
.scan-hero b { display: block; font-size: 18px; }
.scan-hero small { font-size: var(--t-sm); color: var(--brand-200); }
/* Till (POS) payment request review */
.charge-skeleton { height: 320px; margin-top: var(--s2); border-radius: var(--r-xl); }
.charge-review { margin-top: var(--s2); padding: var(--s4); }
.charge-merchant { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: var(--s3); padding-bottom: var(--s3); border-bottom: 1px solid var(--line); }
.charge-lines { margin: 0; padding: var(--s2) 0; list-style: none; }
.charge-lines li { display: flex; justify-content: space-between; gap: var(--s4); padding: var(--s2) 0; font-size: var(--t-md); }
.charge-lines li span:first-child { min-width: 0; overflow-wrap: anywhere; }
.charge-lines li span:last-child { flex: none; font-weight: 700; }
.charge-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--s3); border-top: 1px solid var(--line); font-weight: 700; }
.charge-total b { font-size: var(--t-2xl); letter-spacing: -0.02em; }
.charge-code { margin-top: var(--s2); font-size: var(--t-sm); }
.charge-expiry { margin: var(--s3) 0 var(--s2); font-size: var(--t-sm); font-weight: 700; color: var(--muted); text-align: center; }
.charge-expiry.is-late { color: var(--warn); }
.charge-state { display: flex; align-items: center; gap: var(--s2); margin-top: var(--s4); padding: var(--s3) var(--s4); border-radius: var(--r-lg); background: var(--info-bg); color: var(--info); font-weight: 700; font-size: var(--t-md); }
.code-form { margin-bottom: var(--s1); }
.scan-row { display: flex; gap: var(--s2); margin-top: 6px; }
.scan-row .input { flex: 1; }
.merchant-search { margin-bottom: var(--s3); }
.scanner { display: grid; gap: var(--s4); }
.scan-view { position: relative; display: grid; place-items: center; aspect-ratio: 1; overflow: hidden; border-radius: 20px; background: var(--brand-950); color: #fff; }
.scan-view video { width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 18%; border-radius: 20px; border: 3px solid var(--brand-300); box-shadow: 0 0 0 999px rgba(4, 36, 26, 0.45); }
.scan-msg { position: absolute; left: 0; right: 0; bottom: 12px; font-size: var(--t-md); font-weight: 700; text-align: center; }
.scan-view.is-off { aspect-ratio: auto; gap: var(--s2); padding: var(--s6); background: var(--surface-2); color: var(--ink-2); text-align: center; }
.scan-view.is-off video, .scan-view.is-off .scan-frame { display: none; }
.scan-view.is-off .scan-msg { position: static; }
.myqr { display: grid; justify-items: center; gap: 6px; margin-top: var(--s2); padding: var(--s6) var(--s5); text-align: center; }
.qr-frame { width: 220px; margin: var(--s3) 0; padding: var(--s3); border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--line), var(--shadow-2); }
.qr-frame > svg { width: 100%; height: auto; }
.myqr-actions { display: flex; gap: 10px; margin-top: var(--s3); }

/* ---- Cards --------------------------------------------------------------------------------------------- */
.card-stage { margin: var(--s2) 0 10px; }
.vcard { display: grid; grid-template-rows: auto auto 1fr auto; aspect-ratio: 1.586; padding: 18px 20px; border-radius: 20px; }
.vc-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: var(--s2); font-size: 17px; font-weight: 800; letter-spacing: -0.02em; }
.vc-brand b { color: var(--brand-300); }
.vc-brand .logo-mark path:nth-of-type(1), .vc-brand .logo-mark path:nth-of-type(2) { fill: #fff; }
.vc-kind { margin-left: auto; padding: 3px 8px; border-radius: var(--r-full); background: rgba(255, 255, 255, 0.14); font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.vc-chip { position: relative; z-index: 1; width: 44px; margin-top: 14px; }
.vc-number { position: relative; z-index: 1; align-self: end; font-size: 20px; font-weight: 700; letter-spacing: 0.08em; }
.vc-bottom { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: 18px; margin-top: 10px; }
.vc-bottom small { display: block; font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-200); }
.vc-bottom b { font-size: var(--t-sm); letter-spacing: 0.04em; }
.vc-visa { margin-left: auto; font-size: 24px; font-weight: 800; font-style: italic; letter-spacing: -0.02em; }
.vcard.is-frozen { filter: saturate(0.4); }
.vc-frost { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 6px; background: rgba(214, 238, 255, 0.32); color: #fff; font-size: var(--t-base); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.card-caption { margin-bottom: var(--s4); font-size: var(--t-sm); text-align: center; color: var(--muted); }
.settings-list, .menu-list { overflow: hidden; padding: var(--s1) 0; }
.set-row { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: var(--s3); width: 100%; min-height: 64px; padding: var(--s3) 14px; border: 0; background: transparent; color: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background var(--fast); }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row.is-static { cursor: default; }
.set-row:not(.is-static):hover { background: var(--surface-2); }
.set-ic { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--brand-100); color: var(--brand-700); }
.set-main { min-width: 0; }
.set-main b { display: block; font-size: 15px; }
.set-main small { display: block; font-size: var(--t-sm); color: var(--muted); }
.set-row.is-danger { color: var(--danger); }
.set-row.is-danger .set-ic { background: var(--danger-bg); color: var(--danger); }
.meter { display: block; height: 6px; margin-top: var(--s2); overflow: hidden; border-radius: var(--r-full); background: var(--surface-3); }
.meter span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--brand-400), var(--brand-600)); }

/* ---- Profile -------------------------------------------------------------------------------------- */
.profile-card { display: grid; justify-items: center; gap: var(--s1); margin-top: var(--s2); padding: var(--s6) var(--s4); text-align: center; }
.profile-card .avatar-xl { margin-bottom: var(--s2); box-shadow: 0 0 0 4px #fff, 0 0 0 6px var(--brand-300); }
.profile-card h2 { font-size: 22px; }
.profile-card .pill { margin-top: var(--s2); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: var(--s4) 0; }
.stat { padding: var(--s3); border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; text-align: center; }
.stat b { display: block; font-size: 18px; font-weight: 800; white-space: nowrap; }
.stat small { font-size: 12px; color: var(--muted); }
.fineprint { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: var(--s4); font-size: 12px; text-align: center; color: var(--muted); }
.pin-input { font-size: 22px; letter-spacing: 0.4em; }

/* ---- Login ------------------------------------------------------------------------------------------ */
.screen.login { padding-top: calc(var(--s6) + env(safe-area-inset-top)); }
.login-hero { padding: var(--s4) 4px var(--s5); }
.login-hero .logo-word { font-size: 28px; }
.login-hero h1 { margin-top: var(--s5); font-size: var(--t-2xl); line-height: 1.1; }
.login-hero h1 span { color: var(--brand-500); }
.login-hero p { margin-top: 10px; color: var(--ink-2); }
.login-card { display: grid; gap: var(--s4); padding: var(--s5); }
.pin-dots { display: flex; justify-content: center; gap: 14px; padding: 6px 0; }
.pin-dots span { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--brand-600); transition: background var(--fast), transform 200ms var(--spring); }
.pin-dots span.on { background: var(--brand-600); transform: scale(1.12); }
.pin-pad .key { height: 50px; }
.login-card .error { font-size: var(--t-md); font-weight: 700; color: var(--danger); text-align: center; }
.shake { animation: shake 360ms var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.divider { display: flex; align-items: center; gap: var(--s3); margin: var(--s6) 0 var(--s3); font-size: var(--t-sm); color: var(--muted); }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line-strong); }
.demo-list { display: grid; gap: var(--s2); }
.demo-student { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s3); min-height: 60px; padding: 10px 14px; border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; text-align: left; transition: transform 140ms var(--spring); }
.demo-student:active { transform: scale(0.97); }
.demo-student.is-featured { border-color: var(--brand-400); box-shadow: 0 0 0 3px var(--brand-100); }
.demo-student b { display: block; }
.demo-student small { font-size: var(--t-sm); color: var(--muted); }

/* ---- Dark screens: payment success & e-ticket ------------------------------------------------------------- */
.success-top { display: grid; justify-items: center; gap: 6px; padding: calc(var(--s6) + env(safe-area-inset-top)) 0 18px; text-align: center; }
.success-tick.light { color: var(--brand-300); }
.success-top h1 { font-size: 26px; }
.success-top p { color: var(--brand-200); }
.success-actions.dark { margin-top: var(--s4); }
.eticket {
  position: relative; padding: 14px var(--s4) var(--s4); border-radius: 26px; background: #fff; color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28), 0 8px 16px -10px rgba(0, 0, 0, 0.35), 0 30px 60px -24px rgba(0, 0, 0, 0.6);
}
.screen.is-dark .topbar + .eticket { margin-top: var(--s2); }
.et-head { display: flex; align-items: center; justify-content: space-between; }
.et-head .logo-word { font-size: 18px; color: var(--brand-900); }
.et-poster { aspect-ratio: 16 / 9; overflow: hidden; margin: var(--s3) -4px 0; border-radius: 18px; }
.et-title { display: grid; justify-items: center; gap: 6px; margin-top: var(--s3); text-align: center; }
.et-title h2 { font-size: 22px; }
.et-title .ev-badge { justify-self: center; }
.et-cat { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: var(--brand-50); }
.et-cat small { display: block; font-size: 12px; color: var(--muted); }
.et-cat b { display: flex; align-items: center; gap: 6px; font-size: var(--t-lg); }
.et-qr { position: relative; width: 220px; margin: var(--s4) auto 0; padding: 14px; }
.et-qr > svg { width: 100%; height: auto; }
.qr-corners {
  --c: var(--brand-400);
  position: absolute; inset: 0; pointer-events: none; border-radius: 6px; background-repeat: no-repeat;
  background:
    linear-gradient(var(--c), var(--c)) 0 0 / 30px 4px no-repeat, linear-gradient(var(--c), var(--c)) 0 0 / 4px 30px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 0 / 30px 4px no-repeat, linear-gradient(var(--c), var(--c)) 100% 0 / 4px 30px no-repeat,
    linear-gradient(var(--c), var(--c)) 0 100% / 30px 4px no-repeat, linear-gradient(var(--c), var(--c)) 0 100% / 4px 30px no-repeat,
    linear-gradient(var(--c), var(--c)) 100% 100% / 30px 4px no-repeat, linear-gradient(var(--c), var(--c)) 100% 100% / 4px 30px no-repeat;
}
.et-qr.is-dim > svg { opacity: 0.22; filter: grayscale(1); }
.qr-stamp { position: absolute; left: 50%; top: 50%; display: inline-flex; align-items: center; gap: 6px; padding: var(--s2) 14px; border-radius: 12px; background: var(--brand-700); color: #fff; font-size: var(--t-md); font-weight: 800; white-space: nowrap; transform: translate(-50%, -50%) rotate(-8deg); }
.qr-stamp.is-bad { background: var(--danger); }
.et-pager { display: flex; align-items: center; justify-content: center; gap: var(--s2); font-size: var(--t-sm); font-weight: 700; color: var(--muted); }
.et-ref { margin-top: var(--s2); text-align: center; }
.et-ref small { display: block; color: var(--muted); }
.ref-chip { margin-top: 6px; padding: 10px var(--s4); border-radius: 14px; background: var(--brand-100); color: var(--brand-900); font-size: 17px; font-weight: 800; letter-spacing: 0.02em; }
.et-perf { position: relative; height: 0; margin: 18px calc(-1 * var(--s4)); border-top: 2px dashed var(--line-strong); }
.et-perf::before, .et-perf::after { content: ''; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-900); }
.et-perf::before { left: -11px; }
.et-perf::after { right: -11px; }
.et-facts { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.et-facts li { display: flex; align-items: flex-start; gap: 10px; }
.et-facts .ic { margin-top: 2px; color: var(--brand-600); }
.et-facts b { display: block; font-size: 15px; }
.et-facts small { font-size: var(--t-sm); color: var(--muted); }
.et-grid { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: var(--s2); margin-top: 14px; padding: var(--s3); border-radius: 14px; background: var(--surface-2); }
.et-grid small { display: block; font-size: 11.5px; color: var(--muted); }
.et-grid b { display: block; font-size: var(--t-sm); line-height: 1.3; }
.et-grid .total { font-size: var(--t-base); color: var(--brand-700); }
.et-paid { display: flex; align-items: center; gap: 10px; margin-top: var(--s3); padding: var(--s3); border-radius: 14px; background: var(--brand-100); color: var(--brand-800); }
.et-paid .ic { color: var(--brand-600); }
.et-paid b { display: block; }
.et-paid small { font-size: 12.5px; color: var(--ink-2); }
.et-instructions { display: flex; gap: 10px; margin-top: var(--s3); padding: var(--s3); border-radius: 14px; border: 1px solid var(--line); font-size: var(--t-sm); }
.et-instructions .ic { flex: none; margin-top: 2px; color: var(--brand-600); }
.et-instructions ul { margin: var(--s1) 0 0; padding-left: 18px; color: var(--ink-2); }
.brightness-tip { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: var(--t-sm); color: var(--brand-200); }

/* My Tickets list */
.ticket-card { display: block; margin-bottom: 14px; overflow: hidden; border-radius: 22px; border: 1px solid var(--line); background: #fff; color: inherit; text-decoration: none; box-shadow: var(--shadow-1); transition: transform 160ms var(--ease-out), box-shadow var(--fast); }
.ticket-card:active { transform: scale(0.98); }
.ticket-card:hover { box-shadow: var(--shadow-2); }
.tc-poster { aspect-ratio: 2 / 1; overflow: hidden; }
.tc-body { padding: 14px var(--s4); }
.tc-body h3 { margin-bottom: var(--s2); font-size: 18px; }
.tc-body p { display: flex; align-items: flex-start; gap: 10px; margin: var(--s2) 0; }
.tc-body p .ic { margin-top: 2px; color: var(--brand-600); }
.tc-body b { display: block; font-size: var(--t-md); }
.tc-body small { font-size: var(--t-sm); color: var(--muted); }
.tc-foot { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tc-foot > .ic:first-child { color: var(--muted); }
.tc-foot .pill { margin-left: auto; }
.type-chip { display: inline-flex; align-items: center; gap: var(--s1); padding: 6px var(--s3); border-radius: 10px; background: var(--brand-100); color: var(--brand-800); font-size: var(--t-md); font-weight: 800; }

/* ---- Tab bar ------------------------------------------------------------------------------------------ */
.tabbar {
  position: fixed; z-index: 50; left: 50%; bottom: 0; width: min(440px, 100%); transform: translateX(-50%);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 6px var(--s2) calc(var(--s2) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line); border-radius: 24px 24px 0 0; background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 -8px 24px -12px rgba(6, 46, 34, 0.2); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.tab { position: relative; isolation: isolate; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; border-radius: 14px; color: var(--muted); font-size: 11.5px; font-weight: 700; text-decoration: none; transition: color var(--fast); }
.tab::before { content: ''; position: absolute; top: 5px; z-index: -1; width: 48px; height: 30px; border-radius: 12px; background: var(--brand-100); opacity: 0; transform: scale(0.6); transition: opacity 200ms var(--ease-out), transform 260ms var(--spring); }
.tab[aria-current="page"] { color: var(--brand-700); }
.tab[aria-current="page"]::before { opacity: 1; transform: none; }
.tab-pay::before { display: none; }
.pay-orb { display: grid; place-items: center; width: 60px; height: 60px; margin-top: -30px; border-radius: 50%; background: radial-gradient(circle at 30% 25%, #1C9C67, var(--brand-800)); color: #fff; box-shadow: 0 0 0 5px #fff, 0 12px 24px -6px rgba(6, 46, 34, 0.55); transition: transform 150ms var(--spring); }
.tab-pay:active .pay-orb { transform: scale(0.94); }
.tab-pay[aria-current="page"] .pay-orb { background: radial-gradient(circle at 30% 25%, #2EC27E, var(--brand-700)); }

/* Phones narrower than 360px */
@media (max-width: 359px) {
  .quick { gap: 6px; }
  .ql { font-size: 11px; }
  .bc-amount { font-size: 32px; }
  .event-card { grid-template-columns: 96px 1fr; }
  .hero { grid-template-columns: 1fr 88px; }
}

/* Toasts sit above the tab bar / bottom call to action */
body.has-tabbar .toasts { bottom: calc(92px + env(safe-area-inset-bottom)); }
body.student-app:has(.cta-bar) .toasts { bottom: calc(96px + env(safe-area-inset-bottom)); }
body.has-tabbar:has(.cta-bar) .toasts { bottom: calc(160px + env(safe-area-inset-bottom)); }

/* Purchase approval sheet (PIN keypad, Face ID) */
.pay-auth { display: grid; gap: var(--s3); padding-bottom: var(--s2); }
.pay-auth-head { display: grid; justify-items: center; gap: var(--s1); text-align: center; color: var(--brand-700); padding: var(--s2) 0 var(--s1); }
.pay-auth-amt { font-size: var(--t-2xl); font-weight: 800; letter-spacing: -0.02em; color: var(--ink); line-height: 1.1; }
.pay-auth-to { font-size: var(--t-md); color: var(--muted); max-width: 32ch; }
.pay-auth-label { text-align: center; font-size: var(--t-sm); font-weight: 700; color: var(--ink-2); }
.pay-auth-error { text-align: center; font-size: var(--t-sm); font-weight: 700; color: var(--danger); }
.pay-auth-demo { display: flex; align-items: center; justify-content: center; gap: 6px; font-size: 12px; color: var(--muted); }
.pay-auth .pin-pad { max-width: 320px; width: 100%; margin: 0 auto; }
.pay-auth .key:disabled { opacity: 0.4; }
.faceid-btn { gap: var(--s2); }
.divider.small { font-size: 12px; }
.pay-auth .divider { margin: var(--s1) 0 0; }

/* Fast taps on keypads and buttons never trigger double-tap zoom. */
.key, .btn, .chip, .icon-btn, .tab, button { touch-action: manipulation; }

/* CollegePay Rewards: Home card, Rewards screen, "Use points" switch on payment reviews */
.rewards-strip { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: var(--s3); margin: var(--s3) 0 0; min-height: 64px; padding: 10px 14px; border-radius: var(--r-lg);
  border: 1px solid var(--brand-200); background: linear-gradient(135deg, var(--brand-50), #fff); color: var(--brand-800); text-decoration: none; box-shadow: var(--shadow-1); transition: transform 140ms var(--spring); }
.rewards-strip:active { transform: scale(0.98); }
.rw-ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--brand-700); color: var(--brand-200); }
.rw-main { display: grid; min-width: 0; }
.rw-main b { font-size: 15px; font-weight: 800; color: var(--ink); }
.rw-main small { font-size: var(--t-sm); color: var(--muted); overflow-wrap: anywhere; }
.rw-worth { font-weight: 600; color: var(--brand-700); }
.rewards-hero { position: relative; overflow: hidden; display: grid; gap: var(--s1); margin: var(--s2) 0 var(--s3); padding: var(--s5); border-radius: 24px;
  background: linear-gradient(140deg, var(--brand-900), var(--brand-700) 70%, var(--brand-600)); color: #fff; box-shadow: var(--shadow-2); }
.rewards-hero::after { content: ''; position: absolute; inset: 0; opacity: 0.08; pointer-events: none; background-image: repeating-radial-gradient(circle at 105% -15%, #fff 0 1px, transparent 1.5px 16px); }
.rh-label { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; font-weight: 600; color: var(--brand-200); }
.rh-points { margin: var(--s1) 0 0; font-size: 44px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.05; }
.rh-points span:last-child { font-size: 20px; font-weight: 700; letter-spacing: 0; color: var(--brand-200); }
.rh-worth { margin: 0; font-size: var(--t-md); color: var(--brand-100); }
.rh-progress { position: relative; z-index: 1; margin-top: var(--s2); }
.rh-progress .meter { background: rgba(255, 255, 255, 0.18); }
.rh-progress .meter span { background: var(--brand-300); }
.rh-progress small { display: block; margin-top: 6px; font-size: var(--t-sm); color: var(--brand-100); }
.rh-expiry { display: flex; align-items: center; gap: var(--s2); margin: 0 0 var(--s3); padding: 10px 14px; border-radius: var(--r-lg); background: var(--warn-bg); color: var(--warn); font-size: var(--t-sm); }
.rewards-stats { margin-top: var(--s4); }
.rewards-history + .btn { margin-top: var(--s3); }
.txn.is-static { cursor: default; }
.points-toggle { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: var(--s3); min-height: 64px; margin: 0 0 var(--s3); padding: 10px 14px;
  border-radius: var(--r-lg); border: 1.5px solid var(--brand-200); background: var(--brand-50); cursor: pointer; }
.points-toggle:has(input:checked) { border-color: var(--brand-500); background: #fff; }
.pay-split { margin: 0 0 var(--s3); border-radius: var(--r-lg); border: 1px solid var(--line); background: #fff; }
.pay-split .is-points { color: var(--success); }
.sheet .points-toggle { margin-top: var(--s2); }
.rewards-history .txn-main b, .rewards-history .txn-main small { white-space: normal; }

/* ---- Tap card (physical NFC card) ---------------------------------------------------------------------------- */
.tapcard-section .section-head h3, .tapcard-section > .section-head + .banner { margin-top: 0; }
.tapcard-section .section-head h3 { font-size: var(--t-md); }
.tapcard-section .settings-list + .section-head { margin-top: var(--s5); }
.vcard.tapcard { background: linear-gradient(135deg, #12614A 0%, #0B4433 46%, #04261C 100%); }
.tc-wave { position: relative; z-index: 1; width: 34px; height: 34px; margin-top: 14px; color: rgba(255, 255, 255, 0.88); }
.tc-number { font-size: 21px; letter-spacing: 0.06em; }
.vc-frost.tc-locked { background: rgba(120, 20, 20, 0.36); }
.tc-demo { margin: 0 0 var(--s3); }
.tc-empty { display: grid; justify-items: center; gap: 10px; padding: var(--s5); text-align: center; }
.tc-empty p { color: var(--ink-2); font-size: var(--t-md); line-height: 1.45; }
.tc-empty small { font-size: 12px; color: var(--muted); }
.tc-empty-ic { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--brand-100); color: var(--brand-700); }
.tc-empty-ic .tc-wave { width: 30px; height: 30px; margin: 0; color: currentColor; }
.tc-get { display: grid; gap: var(--s4); }
.tc-get .banner { margin: 0; }
.tc-ways { display: grid; gap: var(--s2); }
.tc-hold { display: grid; justify-items: center; gap: var(--s3); padding: var(--s5) 0; text-align: center; color: var(--ink-2); }
.tc-hold .ic { color: var(--brand-600); }
.tc-points { display: grid; gap: var(--s2); margin: var(--s3) 0 0; padding: 0; list-style: none; }
.tc-points li { display: flex; gap: var(--s2); align-items: flex-start; font-size: var(--t-md); color: var(--ink-2); }
.tc-points .ic { flex: none; margin-top: 2px; color: var(--brand-600); }
.tc-reset { margin-top: var(--s3); min-height: 44px; }
.tapcard-section .set-row.is-static .switch { opacity: 0.5; }

/* Staff links under the sign-in screen: secondary to the student sign-in. */
.staff-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--s4); margin: var(--s5) 0 var(--s3); }
.staff-link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 var(--s2); border: 0; background: transparent;
  color: var(--muted); font: inherit; font-size: var(--t-sm); font-weight: 600; text-decoration: none; cursor: pointer; }
.staff-link:hover { color: var(--brand-700); text-decoration: underline; }

/* Staff: program blank tap cards (#/program) */
.prog { display: grid; gap: var(--s4); }
.prog .banner { margin: 0; }
.prog-code, .prog-run { display: grid; gap: var(--s4); padding: var(--s5); }
.prog-head { display: flex; gap: var(--s3); align-items: center; }
.prog-head b { display: block; font-size: var(--t-md); }
.prog-head small { color: var(--muted); font-size: var(--t-sm); }
.prog-ok { color: var(--success); }
.prog-note { display: flex; gap: var(--s2); align-items: flex-start; font-size: var(--t-md); color: var(--muted); }
.prog-note .ic { flex: none; margin-top: 2px; }
.prog-hint { margin-top: calc(-1 * var(--s2)); text-align: center; font-size: 12px; color: var(--muted); }
.prog-run .section-head { margin: 0; }
.prog-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.prog-list li { display: flex; justify-content: space-between; align-items: center; gap: var(--s2); padding: var(--s2) 0; border-top: 1px solid var(--line); font-weight: 700; }
