/* PepperJam — colours taken from the logo: pepper red, yellow and green on a deep navy stage. */
:root {
  --red: #e8452c; --red-d: #c23419;
  --yellow: #ffc928; --yellow-d: #f0a500;
  --green: #5fb83f; --green-d: #3f8f27;
  --navy: #1d2a6b; --navy-d: #121b4a; --blue: #2e6fd8;
  --orange: #ff8a1f;
  --ink: #1b1e2e; --muted: #5d6275; --line: #e4e1d8;
  --paper: #fffaf0; --card: #ffffff;
  --radius: 18px;
  --shadow: 0 2px 0 rgba(27, 30, 46, .9), 0 10px 24px rgba(29, 42, 107, .12);
  --font-h: 'Baloo 2', 'Be Vietnam Pro', system-ui, sans-serif;
  --font: 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); line-height: 1.6;
  background: var(--paper);
  background-image: radial-gradient(rgba(29, 42, 107, .06) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3 { font-family: var(--font-h); line-height: 1.15; margin: 0 0 .4em; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; }
.right { text-align: right; }
code { font-family: ui-monospace, Consolas, monospace; background: #f3efe4; padding: .05em .35em; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- nav ---------- */
/* Header and footer share one look: navy with a yellow edge, and the red/green wordmark. */
.wordmark { font-family: var(--font-h); font-weight: 800; color: var(--red); text-decoration: none; letter-spacing: .3px; line-height: 1.1; }
.wordmark b { color: var(--green); }
.nav { position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff; border-bottom: 4px solid var(--yellow); }
.nav-in { max-width: 1140px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; }
.brand { font-size: 1.7rem; }
.links { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.links::-webkit-scrollbar { display: none; }
.links a { color: #fff; text-decoration: none; font-weight: 600; font-size: .92rem; padding: 6px 12px; border-radius: 999px; white-space: nowrap; }
.links a:hover { background: rgba(255, 255, 255, .12); color: var(--yellow); }
.btn-ghost { background: transparent; color: inherit; border: 2px solid currentColor; border-radius: 999px; padding: 5px 14px; font: 600 .85rem var(--font); cursor: pointer; }
.nav .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .7); }
.nav .btn-ghost:hover { border-color: var(--yellow); color: var(--yellow); }

@media (max-width: 860px) {
  .nav-in { flex-wrap: wrap; gap: 6px 12px; padding-bottom: 6px; }
  .brand { flex: 1; }
  .links { order: 3; flex-basis: 100%; margin: 0 -16px; padding: 0 12px; }
}

/* ---------- hero ---------- */
.hero { text-align: center; padding: 20px 16px 36px; background: #fff; border-bottom: 4px solid var(--ink); position: relative; overflow: hidden; }
.hero-logo { margin: 0 auto; width: min(880px, 100%); }
.tagline { font-family: var(--font-h); font-size: clamp(1.3rem, 3.4vw, 2rem); font-weight: 800; color: var(--navy); margin: -8px 0 18px; }
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: 700 1rem var(--font); padding: 11px 22px; border-radius: 999px; cursor: pointer; text-decoration: none;
  background: var(--yellow); color: var(--ink); border: 2.5px solid var(--ink); box-shadow: 0 3px 0 var(--ink);
  transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 var(--ink); }
.btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn-hot { background: var(--red); color: #fff; }
.btn-ghost-dark { background: #fff; color: var(--navy); }
.btn.btn-ghost { background: #fff; color: var(--ink); border-color: var(--ink); }
.btn-danger { background: #fff; color: var(--red-d); border-color: var(--red-d); box-shadow: none; }
.btn-sm { padding: 5px 12px; font-size: .85rem; box-shadow: 0 2px 0 var(--ink); }
.btn-block { width: 100%; }
.link { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; padding: 0; }

/* ---------- sections ---------- */
main { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.sec { padding: 56px 0 8px; }
.title { text-align: center; font-size: clamp(1.9rem, 5vw, 2.7rem); margin-bottom: 28px; }
.title span { display: inline-block; padding: 2px 22px 0; background: var(--navy); color: var(--yellow); border-radius: 14px; transform: rotate(-1.5deg); box-shadow: 4px 4px 0 var(--red); }
.lead { font-size: 1.1rem; text-align: center; max-width: 720px; margin: 0 auto 24px; color: var(--muted); }
.card { background: var(--card); border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 18px; }
.chip { display: inline-block; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 12px; font-weight: 700; font-size: .9rem; }
.chip-sm { font-size: .78rem; padding: 0 9px; }
.pill { display: inline-block; border-radius: 999px; padding: 3px 12px; font-weight: 700; font-size: .82rem; white-space: nowrap; }
.pill-ok { background: #e3f5da; color: var(--green-d); }
.pill-full { background: #fde3de; color: var(--red-d); }
.pill-hot { background: #fff0cc; color: #8a5a00; }
.pill-done { background: #ecebe6; color: var(--muted); }

/* about */
.about { display: grid; grid-template-columns: 1.6fr 1fr; gap: 28px; align-items: center; }
.about-text { font-size: 1.08rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.facts li { background: #fff; border: 2.5px solid var(--ink); border-radius: var(--radius); padding: 14px; text-align: center; box-shadow: var(--shadow); }
.facts li:nth-child(1) { background: #ffe1db; } .facts li:nth-child(2) { background: #fff3c4; }
.facts li:nth-child(3) { background: #e3f5da; } .facts li:nth-child(4) { background: #dde7fb; }
.facts b { display: block; font-family: var(--font-h); font-size: 1.5rem; line-height: 1.2; }
.facts span { font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } }

/* members */
.grid-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.member { background: #fff; border: 2.5px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .15s; }
.member:hover { transform: translateY(-4px) rotate(-.6deg); }
.member-img { aspect-ratio: 1; border-bottom: 2.5px solid var(--ink); background: #fff; }
.member-img img { width: 100%; height: 100%; object-fit: cover; }
.member-body { padding: 16px 18px 18px; }
.member .role { display: inline-block; font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; padding: 1px 10px; border-radius: 999px; color: #fff; margin-bottom: 6px; }
.m0 .role { background: var(--red); } .m1 .role { background: var(--yellow-d); }
.m2 .role { background: var(--green); } .m3 .role { background: var(--blue); }
.member h3 { font-size: 1.5rem; margin-bottom: 4px; }
.member p { font-size: .95rem; }
.fun { color: var(--muted); font-style: italic; margin: 0; }

/* music timeline */
.timeline { position: relative; max-width: 820px; margin: 0 auto; padding-left: 28px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 4px; background: repeating-linear-gradient(var(--navy) 0 10px, transparent 10px 16px); border-radius: 2px; }
.tl { position: relative; margin-bottom: 18px; }
.tl-dot { position: absolute; left: -27px; top: 22px; width: 18px; height: 18px; border-radius: 50%; background: var(--yellow); border: 3px solid var(--ink); }
.tl:nth-child(3n+2) .tl-dot { background: var(--red); } .tl:nth-child(3n) .tl-dot { background: var(--green); }
.tl-card { background: #fff; border: 2.5px solid var(--ink); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.tl-card p:last-child { margin-bottom: 0; }
.tl-meta time { white-space: nowrap; }
.tl-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; margin-bottom: 6px; font-size: .85rem; color: var(--muted); }
.video { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; background: #000; padding: 0; cursor: pointer; margin-top: 10px; }
.video img { width: 100%; height: 100%; object-fit: cover; }
.video iframe { width: 100%; height: 100%; border: 0; }
.play { position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border-radius: 50%; background: var(--red); color: #fff; font-size: 1.6rem; display: grid; place-items: center; border: 3px solid #fff; }

/* concerts */
.concert { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; background: #fff; border: 2.5px solid var(--ink); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; box-shadow: var(--shadow); }
.concert.done { opacity: .7; box-shadow: none; }
.date-badge { width: 84px; text-align: center; background: var(--red); color: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 6px 0; line-height: 1.1; transform: rotate(-3deg); }
.concert:nth-child(even) .date-badge { background: var(--green); transform: rotate(2deg); }
.done .date-badge { background: #8c8f9c; }
.date-badge b { display: block; font-family: var(--font-h); font-size: 2.1rem; }
.date-badge span { display: block; font-weight: 700; }
.date-badge small { opacity: .85; }
.concert-body p { margin: 0 0 4px; }
.concert-body .when { text-transform: capitalize; font-weight: 600; }
.concert-side { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }
.past summary { cursor: pointer; font-weight: 700; margin: 10px 0 14px; }
@media (max-width: 700px) {
  .concert { grid-template-columns: auto 1fr; }
  .concert-side { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}

/* tickets */
.picker { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 20px; }
.pick { background: #fff; border: 2.5px solid var(--ink); border-radius: 14px; padding: 8px 16px; cursor: pointer; text-align: left; font: inherit; color: var(--ink); }
.pick b { display: block; font-family: var(--font-h); font-size: 1.05rem; }
.pick small { color: var(--muted); }
.pick.on { background: var(--navy); color: #fff; box-shadow: 3px 3px 0 var(--yellow); }
.pick.on small { color: #cdd3f5; }
.booking { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
@media (max-width: 900px) { .booking { grid-template-columns: 1fr; } }
.hall { background: var(--navy); color: #fff; border: 2.5px solid var(--ink); border-radius: var(--radius); padding: 18px 14px; box-shadow: var(--shadow); min-width: 0; }
.hall .muted { color: #c3c9ee; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.stats div { background: rgba(255, 255, 255, .08); border-radius: 12px; padding: 8px; text-align: center; }
.stats b { display: block; font-family: var(--font-h); font-size: 1.8rem; line-height: 1.1; }
.stats .hot b { color: var(--yellow); }
.stats span { font-size: .8rem; color: #c3c9ee; }
.bar { height: 14px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; border: 2px solid var(--ink); }
.bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--yellow), var(--orange), var(--red)); transition: width .6s; }
.bar-green { background: #eef3ea; }
.bar-green i { background: linear-gradient(90deg, var(--yellow), var(--green)); }
.stage { margin: 16px auto 14px; width: 78%; text-align: center; font-family: var(--font-h); font-weight: 800; letter-spacing: .3em; color: var(--ink); background: linear-gradient(var(--yellow), var(--orange)); border-radius: 8px 8px 50% 50% / 8px 8px 22px 22px; padding: 6px 0 10px; }
.seatmap { --half: 12; --rest: 0; overflow-x: auto; padding-bottom: 4px; }
.seatmap .row { display: grid; grid-template-columns: 18px repeat(var(--half), minmax(22px, 1fr)) 18px; gap: 4px; margin-bottom: 4px; min-width: calc((var(--half) + var(--rest)) * 26px + 60px); }
.seatmap.split .row { grid-template-columns: 18px repeat(var(--half), minmax(22px, 1fr)) 8px repeat(var(--rest), minmax(22px, 1fr)) 18px; }
@media (max-width: 480px) {
  .seatmap .row, .seatmap.split .row { gap: 3px; min-width: calc((var(--half) + var(--rest)) * 21px + 50px); }
  .seatmap .row { grid-template-columns: 14px repeat(var(--half), minmax(17px, 1fr)) 14px; }
  .seatmap.split .row { grid-template-columns: 14px repeat(var(--half), minmax(17px, 1fr)) 6px repeat(var(--rest), minmax(17px, 1fr)) 14px; }
  .seat { min-height: 17px; font-size: .55rem; }
  .hall { padding: 14px 10px; }
}
.rl { font-size: .72rem; font-weight: 700; color: #c3c9ee; display: grid; place-items: center; }
.seat { aspect-ratio: 1; min-height: 22px; border-radius: 7px 7px 4px 4px; border: 0; font: 600 .62rem var(--font); cursor: pointer; padding: 0; color: var(--ink); }
.seat.free { background: #e8ecff; }
.seat.free:hover { background: var(--yellow); }
.seat.sel { background: var(--yellow); outline: 2px solid #fff; transform: scale(1.08); }
.seat.taken { background: var(--red); color: rgba(255, 255, 255, .7); cursor: not-allowed; }
.seat.mine { background: var(--green); color: #fff; cursor: default; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; margin-top: 12px; font-size: .8rem; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .seat { display: inline-block; width: 16px; min-height: 16px; height: 16px; transform: none; outline: 0; }

.form h3 { margin-bottom: 4px; }
.form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 12px; }
.form input, .admin input, .admin select, .admin textarea {
  display: block; width: 100%; margin-top: 4px; padding: 10px 12px; font: 1rem var(--font);
  border: 2px solid var(--ink); border-radius: 12px; background: #fff; color: var(--ink);
}
.form input:focus, .admin input:focus, .admin select:focus, .admin textarea:focus { outline: 3px solid var(--yellow); outline-offset: 1px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.picked { margin: 4px 0 14px; font-size: .9rem; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.done-card { margin-top: 22px; text-align: center; background: #f2fbe9; }
.done-card .big { font-size: 3rem; line-height: 1; }
.code { font-size: 1.3rem; font-weight: 700; background: var(--yellow); border: 2px solid var(--ink); padding: 2px 12px; }

/* charity */
.fund { max-width: 720px; margin: 0 auto 24px; }
.fund-top { display: flex; justify-content: space-between; margin-bottom: 10px; }
.fund-top b { display: block; font-family: var(--font-h); font-size: 1.7rem; color: var(--green-d); }
.fund-top .right b { color: var(--navy); }
.fund .center { margin: 10px 0 0; }
.campaigns { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.campaign p:last-child { margin-bottom: 0; }
.amount { font-weight: 700; color: var(--green-d); }

/* footer */
.foot { margin-top: 64px; background: var(--navy); color: #fff; text-align: center; padding: 28px 16px; border-top: 4px solid var(--yellow); }
.foot a { color: var(--yellow); }
.foot .muted { color: #c3c9ee; }
.foot-brand { font-size: 2rem; margin: 0; }

/* admin */
.admin { max-width: 1140px; margin: 16px auto 0; padding: 16px; background: #fff; border: 2.5px dashed var(--navy); border-radius: var(--radius); }
@media (max-width: 1172px) { .admin { margin: 16px; } }
.admin-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.tab { background: #f3efe4; border: 2px solid transparent; border-radius: 999px; padding: 4px 14px; font: 600 .9rem var(--font); cursor: pointer; color: var(--ink); }
.tab.on { background: var(--navy); color: #fff; }
.admin-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0; }
.admin-tools select, .admin-tools input { width: auto; flex: 1 1 220px; margin: 0; }
.table-wrap { overflow-x: auto; border: 2px solid var(--ink); border-radius: 12px; }
.guests { width: 100%; border-collapse: collapse; font-size: .88rem; }
.guests th, .guests td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.guests th { background: var(--navy); color: #fff; position: sticky; top: 0; }
.guests tr:nth-child(even) td { background: #faf8f2; }
#contentJson { min-height: 420px; font: .85rem/1.45 ui-monospace, Consolas, monospace; white-space: pre; }

/* modal + toast */
#modal { position: fixed; inset: 0; z-index: 50; background: rgba(18, 27, 74, .55); display: grid; place-items: center; padding: 16px; }
.dialog { width: min(380px, 100%); }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 140%); z-index: 60; background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-weight: 600; max-width: calc(100% - 32px); transition: transform .25s; pointer-events: none; }
#toast.show { transform: translate(-50%, 0); }
#toast.bad { background: var(--red-d); }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
