/* Yass Prize brand: blue #002f55, green #12ac90 (primary); yellow #ffcd00, red #c2002f (secondary).
   Montserrat stands in for Gotham. Web text 15px minimum; links bold green, no underline. */
:root {
  --navy: #002f55; --navy-2: #0b4470; --green: #12ac90; --green-dark: #0e8a73;
  --yellow: #ffcd00; --red: #c2002f;
  --bg: #f4f7f9; --card: #ffffff; --line: #dde5ec; --text: #14263a; --muted: #55697c;
  --radius: 14px; --shadow: 0 1px 2px rgba(0,47,85,.06), 0 6px 18px rgba(0,47,85,.07);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 500 15px/1.55 Montserrat, Avenir, system-ui, sans-serif; }
a { color: var(--green-dark); font-weight: 700; text-decoration: none; }
a:hover { color: var(--green); }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: 26px; font-weight: 800; } h2 { font-size: 20px; font-weight: 800; } h3 { font-size: 16px; font-weight: 700; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Header */
.topbar { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 20; padding-top: env(safe-area-inset-top); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; font-weight: 800; letter-spacing: .02em; }
.brand:hover { color: #fff; }
.brand img { width: 38px; height: 38px; border-radius: 6px; }
.brand span { font-size: 16px; }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { color: #cfe0ec; font-weight: 600; padding: 8px 10px; border-radius: 8px; font-size: 15px; }
.nav a.on, .nav a:hover { color: #fff; background: rgba(255,255,255,.1); }
.accent { height: 4px; background: linear-gradient(90deg, var(--green) 0 70%, var(--yellow) 70% 85%, var(--red) 85%); }

main { padding: 24px 0 40px; min-height: calc(100vh - 140px); }

/* Buttons: always filled, never white */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 10px; padding: 11px 18px;
  font: 700 15px Montserrat, sans-serif; cursor: pointer; background: var(--green); color: #fff; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--green-dark); color: #fff; }
.btn.navy { background: var(--navy); } .btn.navy:hover { background: var(--navy-2); }
.btn.soft { background: #e3eef4; color: var(--navy); } .btn.soft:hover { background: #d3e4ee; color: var(--navy); }
.btn.danger { background: #f6e1e6; color: var(--red); } .btn.danger:hover { background: #efccd5; }
.btn.small { padding: 7px 12px; min-height: 36px; font-size: 14px; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.split { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .split { grid-template-columns: 2fr 1fr; } }

/* Sign-in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--navy); }
.signin .card { width: 100%; max-width: 420px; padding: 28px; }
.signin .logo { width: 96px; height: 96px; display: block; margin: 0 auto 16px; border-radius: 8px; }
.signin h1 { text-align: center; }
.signin .lead { text-align: center; color: var(--muted); }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 16px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.democode { background: #fff7d1; border: 1px solid #f1d970; border-radius: 10px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }

/* Forms */
label { display: block; font-weight: 700; color: var(--navy); font-size: 14px; margin: 12px 0 6px; }
input, select, textarea { width: 100%; font: 500 15px Montserrat, sans-serif; color: var(--text); padding: 11px 12px; border: 1.5px solid #c9d6e0;
  border-radius: 10px; background: #fff; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(18,172,144,.18); }
textarea { min-height: 90px; resize: vertical; }
.code-input { font-size: 26px; letter-spacing: 10px; text-align: center; font-weight: 700; }
.row2 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: 1fr 1fr 1fr; } }
.error { color: var(--red); font-weight: 600; font-size: 14px; margin-top: 10px; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; border: 1.5px solid #c9d6e0; border-radius: 10px; padding: 10px 14px; cursor: pointer; }
.radio-row input { width: auto; }

/* Home */
.hello { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px; margin-bottom: 18px; }
.apply { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; background: var(--navy); color: #fff; border: 0; margin-bottom: 22px; }
.apply h2 { color: #fff; margin: 0; } .apply p { margin: 4px 0 0; color: #cfe0ec; }
.apply .btn { background: var(--yellow); color: var(--navy); } .apply .btn:hover { background: #ffd83a; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 0 12px; }
.tile { display: flex; flex-direction: column; gap: 8px; color: var(--text); font-weight: 500; position: relative; transition: transform .12s, box-shadow .12s; }
.tile:hover { color: var(--text); transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0,47,85,.08), 0 12px 28px rgba(0,47,85,.12); }
.tile .top { display: flex; align-items: center; justify-content: space-between; }
.stop { font-weight: 800; color: var(--navy); letter-spacing: .04em; font-size: 14px; }
.stop b { color: var(--green); }
.tile .date { font-size: 22px; font-weight: 800; color: var(--navy); }
.tile .host { font-weight: 700; font-size: 16px; color: var(--text); }
.tile .where { color: var(--muted); font-size: 14px; }
.tile.past { opacity: .7; }
.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 99px; background: #e3eef4; color: var(--navy); }
.badge.going { background: var(--green); color: #fff; }
.badge.warn { background: #fff1bf; color: #6b5300; }
.badge.past { background: #eceff2; color: var(--muted); }

/* Roadshow */
.rs-head { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.rs-head .meta { flex: 1; min-width: 220px; }
.rs-head .date { color: var(--green-dark); font-weight: 800; }
.back { display: inline-block; margin-bottom: 12px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 2px solid var(--line); margin-bottom: 18px; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 700; white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tabs a.on { color: var(--navy); border-bottom-color: var(--green); }
.day { margin-bottom: 18px; }
.day h3 { background: #e9f6f2; color: var(--navy); padding: 8px 12px; border-radius: 8px; font-size: 15px; }
.stopline { display: grid; grid-template-columns: 96px 1fr; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.stopline:last-child { border-bottom: 0; }
.stopline .t { font-weight: 700; color: var(--navy); }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; }
.kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; font-weight: 600; }
.mytrip { border-left: 5px solid var(--green); }
.pre { white-space: pre-wrap; }
.docs { list-style: none; padding: 0; margin: 0; }
.docs li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.docs li:last-child { border-bottom: 0; }
.docs .ico { width: 40px; height: 40px; border-radius: 8px; background: #e3eef4; color: var(--navy); display: grid; place-items: center; font-weight: 800; font-size: 11px; flex: none; }
.docs .grow { flex: 1; min-width: 0; } .docs .grow a { word-break: break-word; }
.photos { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.photo { position: relative; border-radius: 10px; overflow: hidden; background: #dfe7ee; aspect-ratio: 1; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo { cursor: pointer; }
.photo video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.photo .play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px; border-radius: 50%;
  background: rgba(0,47,85,.75); color: #fff; display: grid; place-items: center; font-size: 18px; padding-left: 3px; pointer-events: none; }
.photo .cover-badge { position: absolute; top: 6px; left: 6px; }
.photo:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.wall { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.album { padding: 0; overflow: hidden; gap: 4px; }
.album > :not(.album-cover) { padding: 0 16px; }
.album > :last-child { padding-bottom: 16px; }
.album-cover { aspect-ratio: 16 / 10; background: #e9f0f5; display: grid; place-items: center; overflow: hidden; margin-bottom: 8px; }
.album-cover img, .album-cover video { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-inner { text-align: center; max-width: 100%; }
.lightbox img, .lightbox video { max-width: 100%; max-height: 75vh; border-radius: 8px; background: #000; }
.photo .cap { position: absolute; inset: auto 0 0 0; padding: 18px 8px 6px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); }
.photo button { position: absolute; top: 6px; right: 6px; border: 0; border-radius: 8px; background: rgba(0,0,0,.55); color: #fff; font: 700 12px Montserrat; padding: 4px 8px; cursor: pointer; }
.lightbox { position: fixed; inset: 0; background: rgba(0,15,30,.92); z-index: 50; display: grid; place-items: center; padding: 20px; }
.lightbox img { max-width: 100%; max-height: 85vh; border-radius: 8px; }
.lightbox p { color: #fff; text-align: center; margin-top: 10px; }
.going-list { list-style: none; margin: 0; padding: 0; }
.going-list li { padding: 8px 0; border-bottom: 1px solid var(--line); } .going-list li:last-child { border: 0; }
.notice { background: #fff7d1; border: 1px solid #f1d970; border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.empty { text-align: center; color: var(--muted); padding: 26px 10px; }

/* Admin */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--navy); font-weight: 700; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.it-row { display: grid; gap: 8px; grid-template-columns: 1fr; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fafcfd; }
@media (min-width: 760px) { .it-row { grid-template-columns: 1.3fr .8fr 2fr 1.3fr auto; align-items: center; } }
.it-row input { padding: 8px 10px; }
.attendee { border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.attendee summary { cursor: pointer; font-weight: 700; color: var(--navy); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Footer */
footer { text-align: center; padding: 22px 16px 30px; color: var(--muted); font-size: 13px; }
footer .pb { display: inline-flex; align-items: center; gap: 8px; }
footer img { height: 26px; }
.signin footer { color: #cfe0ec; padding-bottom: 0; }
.signin footer .pb { background: #fff; color: var(--muted); padding: 6px 12px; border-radius: 99px; }

.install-btn { white-space: nowrap; flex: none; }
.topbar .install-btn { margin-left: 6px; }
.nav a { white-space: nowrap; }
.narrow { display: none; }
@media (max-width: 900px) {
  .brand span, .nav-home, .wide { display: none; }
  .narrow { display: inline; }
}
.modal-bg { position: fixed; inset: 0; background: rgba(0,20,40,.55); z-index: 70; display: grid; place-items: center; padding: 16px; }
.modal { width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; }
@media (max-width: 560px) {
  .topbar .install-btn { padding: 6px 10px; font-size: 13px; min-height: 34px; }
  .topbar .wrap { gap: 6px; } .nav { gap: 0; } .nav a { font-size: 14px; padding: 8px 7px; }
  .nav-home { display: none; } .wide { display: none; } .narrow { display: inline; }
}

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px); background: var(--navy); color: #fff; padding: 12px 18px;
  border-radius: 12px; font-weight: 600; transition: transform .25s; z-index: 60; max-width: calc(100% - 32px); }
#toast.show { transform: translateX(-50%) translateY(0); }
.spinner { text-align: center; padding: 60px; color: var(--muted); }

@media (max-width: 560px) {
  .brand span { display: none; }
  .nav a { padding: 8px 8px; }
  .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; }
  .stopline { grid-template-columns: 1fr; gap: 2px; }
  h1 { font-size: 22px; }
}
