/* Encore — wedding DJ bookings and couple portal.
 *
 * Two faces, one stylesheet. The DJ's admin side is a working tool; the
 * couple's portal is the thing they open on the sofa to plan their day, so it
 * leans warm and unhurried: ivory, charcoal, a champagne accent, and a serif
 * for headings. Guest pages (song request, photo upload) are opened from a QR
 * code on a table in a dim marquee on a phone — big targets, high contrast,
 * nothing clever. */

/* Playfair Display, self-hosted (OFL, licence in fonts/). The logo is drawn in
 * it, so the masthead and the logo always agree. */
@font-face { font-family: 'Playfair Display'; src: url('fonts/PlayfairDisplay.ttf') format('truetype');
             font-weight: 400 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Playfair Display'; src: url('fonts/PlayfairDisplay-Italic.ttf') format('truetype');
             font-weight: 400 900; font-style: italic; font-display: swap; }

:root {
  --ink:        #1d1a17;
  --ink-soft:   #56504a;
  --ink-faint:  #8d857d;
  --bg:         #f6f1ea;
  --surface:    #ffffff;
  --surface-2:  #fbf8f3;
  --line:       #e4dbcf;
  --line-soft:  #efe8de;

  --gold:       #b8955a;
  --gold-deep:  #8f7040;
  --gold-pale:  #f3e9d8;
  --plum:       #5b3a5e;
  --sage:       #5f7a62;

  --ok:         #2e7d4f;
  --warn:       #b26a00;
  --bad:        #b3261e;

  --radius:     16px;
  --radius-sm:  10px;
  --shadow:     0 1px 2px rgba(29,26,23,.05), 0 6px 20px rgba(29,26,23,.07);
  --shadow-lg:  0 2px 8px rgba(29,26,23,.08), 0 20px 48px rgba(29,26,23,.14);
  --serif:      'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans:       'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 15px; line-height: 1.55;
  padding-bottom: env(safe-area-inset-bottom);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── masthead ─────────────────────────────────────────────────────────────── */

.top {
  background: var(--ink); color: #fff;
  padding: calc(14px + env(safe-area-inset-top)) 16px 14px;
  position: relative;
}
.top::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0;
              height: 3px; background: linear-gradient(90deg, var(--gold), #e3c98f, var(--gold)); }
.top-in { max-width: 1040px; margin: 0 auto; display: flex; align-items: center; gap: 14px; }
.top-mark { width: 38px; height: 38px; flex: 0 0 auto; }
.top-txt { min-width: 0; }
.top-txt h1 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 19px;
              letter-spacing: .01em; line-height: 1.15; }
.top-txt p  { margin: 2px 0 0; font-size: 10.5px; font-weight: 600; letter-spacing: .12em;
              text-transform: uppercase; color: var(--gold); }
.top-act { margin-left: auto; display: flex; gap: 8px; flex: 0 0 auto; }

.nav { background: #2a2622; position: sticky; top: 0; z-index: 30;
       overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
       -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent);
               mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent); }
.nav::-webkit-scrollbar { display: none; }
.nav-in { max-width: 1040px; margin: 0 auto; display: flex; gap: 2px; padding: 0 10px; }
.nav a { color: rgba(255,255,255,.7); font-size: 13px; font-weight: 600; padding: 13px 12px;
         white-space: nowrap; border-bottom: 3px solid transparent; text-decoration: none; }
.nav a:hover { color: #fff; text-decoration: none; }
.nav a.on { color: #fff; border-bottom-color: var(--gold); }

/* ── layout ───────────────────────────────────────────────────────────────── */

.wrap { max-width: 1040px; margin: 0 auto; padding: 18px 14px 60px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.muted { color: var(--ink-faint); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.stack { display: grid; gap: 12px; }
.grid2 { display: grid; gap: 12px; grid-template-columns: 1fr; }
.grid3 { display: grid; gap: 12px; grid-template-columns: 1fr; }

h2 { font-family: var(--serif); font-weight: 600; font-size: 24px; letter-spacing: 0; margin: 0 0 3px; }
h3 { font-family: var(--serif); font-weight: 600; font-size: 17px; margin: 0 0 8px; }
.lede { color: var(--ink-soft); font-size: 14px; margin: 0 0 16px; }
.section-label { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
                 color: var(--gold-deep); margin: 24px 0 9px; }
.section-label:first-child { margin-top: 0; }

/* ── cards ────────────────────────────────────────────────────────────────── */

.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-pad { padding: 16px; }
.card-head { padding: 12px 16px; border-bottom: 1px solid var(--line-soft);
             font-size: 11.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
             color: var(--gold-deep); display: flex; align-items: center; gap: 8px; }
.card-head .hint { margin-left: auto; font-weight: 500; letter-spacing: 0; text-transform: none;
                   color: var(--ink-faint); font-size: 12px; }

/* The couple's "moment" card: one song for one moment of the day. */
.moment { display: flex; gap: 14px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
.moment:last-child { border-bottom: none; }
.moment-ico { flex: 0 0 40px; height: 40px; border-radius: 12px; background: var(--gold-pale);
              display: flex; align-items: center; justify-content: center; color: var(--gold-deep); }
.moment-body { min-width: 0; flex: 1 1 auto; }
.moment-name { font-weight: 700; font-size: 14.5px; }
.moment-song { font-family: var(--serif); font-size: 16px; margin-top: 2px; }
.moment-song .by { color: var(--ink-soft); font-family: var(--sans); font-size: 13px; }
.moment-note { font-size: 12.5px; color: var(--ink-faint); margin-top: 2px; }
.moment .unset { color: var(--ink-faint); font-style: italic; font-family: var(--sans); font-size: 14px; }

/* ── booking card (DJ side) ───────────────────────────────────────────────── */

.bk { display: flex; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
      overflow: hidden; color: inherit; text-decoration: none;
      transition: transform .12s ease, box-shadow .12s ease; }
.bk:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.bk-date { flex: 0 0 70px; background: var(--ink); color: #fff; display: flex; flex-direction: column;
           align-items: center; justify-content: center; padding: 13px 4px; text-align: center; }
.bk-date .dow { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.bk-date .dd  { font-size: 26px; font-weight: 700; line-height: 1.05; margin: 1px 0; font-family: var(--serif); }
.bk-date .mon { font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.bk-body { padding: 12px 14px; min-width: 0; flex: 1 1 auto; }
.bk-names { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 0 0 1px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-where { font-size: 12.5px; color: var(--ink-soft); margin: 0 0 8px;
            overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-meta { display: flex; gap: 6px 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); font-weight: 500; }
.bk-meta b { color: var(--ink); font-weight: 600; }
.bk.is-enquiry .bk-date { background: var(--plum); }
.bk.is-cancelled { opacity: .55; } .bk.is-cancelled .bk-names { text-decoration: line-through; }
.bk.is-completed .bk-date { background: var(--ink-faint); }

/* ── pills, tags, dots ────────────────────────────────────────────────────── */

.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
       letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 6px;
       background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.tag-gold { background: var(--gold-pale); color: var(--gold-deep); border-color: #e8d7b8; }
.tag-ok   { background: #e6f3ea; color: #1f5f3a; border-color: #c4e2cf; }
.tag-warn { background: #fdf2e0; color: #8a5200; border-color: #f2ddb5; }
.tag-bad  { background: #fbe9e7; color: #8f1d17; border-color: #f3c7c3; }
.tag-plum { background: #efe6f0; color: var(--plum); border-color: #dcc8de; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600;
        padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; background: var(--ink-faint); }
.dot-ok { background: var(--ok); } .dot-warn { background: var(--warn); } .dot-bad { background: var(--bad); }

.progress { height: 8px; border-radius: 999px; background: var(--line-soft); overflow: hidden; }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #d9bd82); }

/* ── buttons ──────────────────────────────────────────────────────────────── */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px;
       padding: 0 18px; border-radius: var(--radius-sm); border: none; cursor: pointer; font-family: inherit;
       font-size: 14px; font-weight: 600; text-decoration: none; background: var(--ink); color: #fff;
       -webkit-tap-highlight-color: transparent; }
.btn:hover { text-decoration: none; filter: brightness(1.18); }
.btn:active { filter: brightness(.95); }
.btn-gold  { background: var(--gold); color: #1d1a17; }
.btn-ghost { background: var(--surface); color: var(--ink); border: 1.5px solid var(--line); }
.btn-ghost:hover { border-color: var(--ink); filter: none; }
.btn-ok { background: var(--ok); } .btn-bad { background: var(--bad); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { min-height: 54px; font-size: 16px; padding: 0 24px; }
.btn-wide { width: 100%; }
.btn-top { background: rgba(255,255,255,.12); color: #fff; min-height: 36px; padding: 0 12px; font-size: 12.5px; }
.btn-top:hover { background: rgba(255,255,255,.22); filter: none; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ── forms ────────────────────────────────────────────────────────────────── */

.field { display: grid; gap: 5px; }
.field > label { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); }
.field .help { font-size: 12px; color: var(--ink-faint); }
input[type=text], input[type=date], input[type=time], input[type=number], input[type=password],
input[type=email], input[type=tel], input[type=url], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-family: inherit; font-size: 16px; }
textarea { min-height: 88px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184,149,90,.22); }
.check { display: flex; gap: 9px; align-items: flex-start; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--gold-deep); }
.check label { font-size: 14px; font-weight: 500; }
.msg { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13.5px; font-weight: 500; margin-bottom: 14px; }
.msg-ok  { background: #e6f3ea; color: #1f5f3a; border: 1px solid #c4e2cf; }
.msg-err { background: #fbe9e7; color: #8f1d17; border: 1px solid #f3c7c3; }
.msg-info { background: var(--gold-pale); color: var(--gold-deep); border: 1px solid #e8d7b8; }

/* ── lists (must play / do not play / requests) ───────────────────────────── */

.songlist { list-style: none; margin: 0; padding: 0; }
.songlist li { display: flex; gap: 10px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.songlist li:last-child { border-bottom: none; }
.songlist .n { flex: 0 0 24px; font-size: 11.5px; font-weight: 700; color: var(--ink-faint); text-align: right; }
.songlist .t { min-width: 0; flex: 1 1 auto; }
.songlist .t b { font-weight: 600; }
.songlist .t span { color: var(--ink-soft); font-size: 13px; }
.songlist .who { font-size: 11.5px; color: var(--ink-faint); }
.songlist form { margin: 0; }
.addrow { display: grid; gap: 8px; grid-template-columns: 1fr; padding: 12px 16px; background: var(--surface-2);
          border-top: 1px solid var(--line-soft); }

/* ── timeline ─────────────────────────────────────────────────────────────── */

.tl { position: relative; padding-left: 26px; }
.tl::before { content: ''; position: absolute; left: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--line); }
.tl-item { position: relative; padding: 8px 0 14px; }
.tl-item::before { content: ''; position: absolute; left: -22px; top: 12px; width: 10px; height: 10px;
                   border-radius: 999px; background: var(--gold); box-shadow: 0 0 0 3px var(--bg); }
.tl-time { font-weight: 700; font-size: 13px; color: var(--gold-deep); font-variant-numeric: tabular-nums; }
.tl-what { font-family: var(--serif); font-size: 16px; }
.tl-note { font-size: 12.5px; color: var(--ink-soft); }

/* ── gallery ──────────────────────────────────────────────────────────────── */

.gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.gal a { display: block; aspect-ratio: 1; overflow: hidden; border-radius: 6px; background: var(--line-soft); }
.gal img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gal .file { display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--ink-faint); padding: 6px; text-align: center; }

/* ── guest pages: big, bright, from a QR code in a marquee ────────────────── */

.guest { max-width: 520px; margin: 0 auto; padding: 22px 16px 60px; }
.guest-hero { text-align: center; padding: 10px 0 20px; }
.guest-hero .names { font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.15; }
.guest-hero .amp { color: var(--gold); font-style: italic; font-weight: 400; }
.guest-hero .date { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); margin-top: 6px; font-weight: 600; }
.guest .btn-lg { font-size: 17px; min-height: 60px; }
.upload-zone { border: 2px dashed var(--gold); border-radius: var(--radius); padding: 28px 16px; text-align: center;
               background: var(--gold-pale); cursor: pointer; }
.upload-zone input { display: none; }
.upload-zone .big { font-family: var(--serif); font-size: 20px; }

/* ── stats ────────────────────────────────────────────────────────────────── */

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat .v { font-family: var(--serif); font-size: 28px; font-weight: 600; letter-spacing: -.5px; }
.stat .k { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; padding: 9px 12px; font-size: 10.5px; font-weight: 700; letter-spacing: .1em;
          text-transform: uppercase; color: var(--ink-faint); border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: none; }
.scroll-x { overflow-x: auto; }
.empty { text-align: center; padding: 42px 20px; color: var(--ink-faint); }
.empty .big { font-family: var(--serif); font-size: 18px; color: var(--ink-soft); margin-bottom: 6px; }
.urlbox { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1.5px solid var(--line);
          border-radius: var(--radius-sm); padding: 9px 11px; }
.urlbox code { flex: 1 1 auto; font-size: 11.5px; word-break: break-all; color: var(--ink-soft);
               font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.45; }
.foot { text-align: center; font-size: 11.5px; color: var(--ink-faint); padding: 26px 16px 20px; }

@media (min-width: 560px) {
  .grid2 { grid-template-columns: 1fr 1fr; }
  .grid3 { grid-template-columns: repeat(3, 1fr); }
  .addrow { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .gal { grid-template-columns: repeat(4, 1fr); gap: 6px; }
}
@media (min-width: 760px) {
  .wrap { padding: 24px 20px 70px; }
  .top-txt h1 { font-size: 22px; }
  .gal { grid-template-columns: repeat(5, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  .nav, .top-act, .btn, .addrow, form { display: none !important; }
  body { background: #fff; } .card, .bk { box-shadow: none; border: 1px solid #ccc; }
}
