/* Wizzle: one box, one ticket. Brand tokens live here; swap them if the logo changes. */
:root {
  --blue: #2F6BFF;
  --blue-dark: #1F4FD1;
  --sun: #FFB400;
  --ink: #1B1F3B;
  --muted: #5B6078;
  --line: #DADFEA;
  --soft: #F3F6FF;
  --bg: #FFFFFF;
  --danger: #C0392B;
  --ok: #1E8E5A;
  --radius: 28px;
  --font: Nunito, "Segoe UI", -apple-system, BlinkMacSystemFont, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font);
  font-size: 18px; line-height: 1.5; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
a { color: var(--blue-dark); }
main { flex: 1; width: 100%; }
.center { display: flex; flex-direction: column; align-items: center; padding: 0 16px; }
.hero { padding-top: 12vh; padding-bottom: 32px; }
.logo { width: min(320px, 70vw); height: auto; display: block; margin: 0 auto 10px; }
.tagline { margin: 0 0 28px; color: var(--muted); font-size: 20px; text-align: center; }
.sr { position: absolute; left: -9999px; }

/* the one box */
.box {
  width: 100%; max-width: 640px; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 6px rgba(32,33,36,.18); background: #fff; padding: 6px 10px 6px 18px;
  display: flex; align-items: flex-start; gap: 6px; transition: box-shadow .15s;
}
.box:focus-within { box-shadow: 0 2px 10px rgba(47,107,255,.28); border-color: #B8C8FF; }
.box textarea {
  flex: 1; border: 0; outline: 0; resize: none; font: inherit; font-size: 20px; line-height: 1.45;
  padding: 12px 4px; min-height: 58px; max-height: 40vh; background: transparent; color: var(--ink);
}
.box textarea::placeholder { color: #8A90A8; }
.box .attach {
  flex: none; width: 48px; height: 48px; border-radius: 50%; border: 0; background: transparent; cursor: pointer;
  display: grid; place-items: center; color: var(--muted); margin-top: 6px;
}
.box .attach:hover, .box .attach:focus-visible { background: var(--soft); color: var(--blue-dark); outline: 0; }
.box .attach svg { width: 26px; height: 26px; }

.filelist { list-style: none; margin: 10px 0 0; padding: 0; width: 100%; max-width: 640px; }
.filelist li {
  display: flex; align-items: center; gap: 10px; background: var(--soft); border-radius: 14px; padding: 8px 12px; margin-top: 6px; font-size: 16px;
}
.filelist li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist button { border: 0; background: transparent; color: var(--muted); font-size: 22px; cursor: pointer; line-height: 1; padding: 4px 6px; }

.details { width: 100%; max-width: 640px; margin-top: 18px; }
.field { margin-top: 14px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; font-size: 17px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 15px; }
.field input[type=text], .field input[type=email], .field input[type=tel] {
  width: 100%; font: inherit; font-size: 19px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--ink);
}
.field input:focus { outline: 3px solid #B8C8FF; border-color: var(--blue); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-size: 16px; color: var(--ink); }
.check input { width: 24px; height: 24px; margin: 2px 0 0; flex: none; accent-color: var(--blue); }

.actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.btn {
  font: inherit; font-weight: 800; font-size: 18px; padding: 14px 28px; border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; line-height: 1;
}
.btn.primary { background: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.secondary { background: var(--soft); color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { background: #E7EDFF; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn:focus-visible { outline: 3px solid #B8C8FF; }
.note { color: var(--muted); font-size: 15px; text-align: center; max-width: 640px; margin: 18px auto 0; }
.error { background: #FDECEA; color: var(--danger); border: 1px solid #F5C2BC; border-radius: 16px; padding: 14px 16px; margin: 14px auto 0; max-width: 640px; width: 100%; font-size: 17px; }
.error:empty { display: none; }
.success { background: #E7F7EE; color: var(--ok); border: 1px solid #BFE6D0; border-radius: 16px; padding: 12px 16px; margin-top: 10px; font-size: 16px; }

/* ticket */
.ticket { width: 100%; max-width: 680px; margin: 28px auto; padding: 0 16px; }
.card { border: 1px solid var(--line); border-radius: 24px; padding: 28px 24px; box-shadow: 0 1px 6px rgba(32,33,36,.12); background: #fff; }
.card h1 { font-size: 26px; margin: 0 0 6px; }
.ticket-no { font-size: clamp(36px, 9vw, 54px); font-weight: 900; letter-spacing: 2px; color: var(--blue-dark); margin: 6px 0 2px; word-break: break-all; }
.qr { display: block; width: 180px; height: 180px; margin: 12px auto; }
.kv { margin: 18px 0 0; padding: 0; list-style: none; }
.kv li { padding: 10px 0; border-top: 1px solid var(--line); }
.kv b { display: block; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.msg { white-space: pre-wrap; }
.tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 20px; }
.tools .btn { justify-content: center; width: 100%; }
.inline-form { display: none; margin-top: 12px; }
.inline-form.open { display: block; }
.inline-form .row { display: flex; gap: 10px; }
.inline-form input { flex: 1; font: inherit; font-size: 18px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; min-width: 0; }
.pill { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--soft); color: var(--blue-dark); font-weight: 800; font-size: 14px; }

/* legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 32px 16px 48px; }
.doc h1 { font-size: 34px; margin: 0 0 4px; }
.doc .updated { color: var(--muted); margin-bottom: 24px; }
.doc h2 { font-size: 22px; margin-top: 32px; }
.doc p, .doc li { font-size: 17px; }
.doc .placeholder { background: #FFF4D6; padding: 0 4px; border-radius: 4px; }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; max-width: 760px; margin: 0 auto; width: 100%; }
.topbar img { height: 36px; width: auto; }

footer { border-top: 1px solid var(--line); background: #FAFBFF; padding: 18px 16px; font-size: 15px; color: var(--muted); }
footer .links { display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .copy { text-align: center; margin-top: 10px; }

/* staff */
.staff { max-width: 1100px; margin: 0 auto; padding: 24px 16px; }
.staff table { width: 100%; border-collapse: collapse; font-size: 15px; }
.staff th, .staff td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.staff select { font: inherit; padding: 6px 8px; border-radius: 8px; }

@media print {
  body { font-size: 14px; }
  footer, .tools, .inline-form, .noprint, .topbar { display: none !important; }
  .card { box-shadow: none; border: 1px solid #999; }
  .ticket { margin: 0; }
}
