:root {
  --accent: #8a6d3b;
  --bg: #faf7f2;
  --card: #ffffff;
  --ink: #2b2620;
  --muted: #7a7169;
  --line: #e8e1d6;
  --ok: #3f8f5a;
  --bad: #b8433a;
  --radius: 16px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  font-size: 18px;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  -webkit-text-size-adjust: 100%;
  padding-bottom: env(safe-area-inset-bottom);
}

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 40px;
}

.hero { text-align: center; margin-bottom: 20px; }
.hero-image {
  width: 140px; height: 140px; object-fit: cover; border-radius: 50%;
  margin: 0 auto 12px; display: block; box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.eyebrow {
  margin: 0; font-size: 14px; letter-spacing: .28em; text-transform: uppercase; color: var(--accent); font-weight: 600;
}
h1 {
  font-family: "Great Vibes", "Brush Script MT", "Snell Roundhand", cursive;
  font-weight: 400; font-size: 56px; margin: 4px 0 0; line-height: 1.15; color: var(--accent);
}
.date { margin: 0; color: var(--muted); font-style: italic; font-size: 19px; }
.welcome { margin: 14px auto 0; max-width: 440px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 16px;
  margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
}
.card h2 { font-size: 22px; margin: 0 0 6px; font-weight: 600; }
.card p { margin: 0 0 10px; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 14px; margin-bottom: 6px; font-weight: 600; }
.field small { font-weight: 400; color: var(--muted); }
input[type="text"] {
  width: 100%; font: inherit; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink);
}
input[type="text"]:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }

.row { display: flex; gap: 8px; }
.row input { flex: 1; }

.actions { display: grid; gap: 12px; }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font: inherit; font-weight: 600; font-size: 20px;
  padding: 16px 18px; border-radius: 14px; border: 0; cursor: pointer;
  text-align: center; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform .06s ease, filter .12s ease;
}
.btn:active { transform: scale(.985); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.secondary { background: #f3eee6; color: var(--ink); border: 1px solid var(--line); }
.btn.big { min-height: 64px; }
.btn.small { font-size: 14px; padding: 8px 12px; border-radius: 10px; }
.btn .icon { font-size: 24px; line-height: 1; }
.btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

.notice {
  background: #fff6e0; border: 1px solid #f1dfae; color: #6b5211;
  padding: 10px 12px; border-radius: 12px; margin-top: 14px; font-size: 14px;
}
.thanks { margin-top: 14px; color: var(--ok); font-weight: 600; text-align: center; }
.error { color: var(--bad); font-size: 14px; }

.queue-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.queue { list-style: none; padding: 0; margin: 8px 0 12px; display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center;
  padding: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.thumb {
  width: 56px; height: 56px; border-radius: 10px; object-fit: cover; background: #efe9df;
  display: flex; align-items: center; justify-content: center; font-size: 24px; overflow: hidden;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-body { min-width: 0; }
.item-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-status { font-size: 13px; color: var(--muted); }
.item.done .item-status { color: var(--ok); }
.item.error .item-status { color: var(--bad); }
.bar { height: 6px; background: #efe9df; border-radius: 6px; margin-top: 6px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s ease; }
.item.done .bar > i { background: var(--ok); }

.muted { color: var(--muted); }
.small { font-size: 13px; }

.foot { text-align: center; margin-top: 24px; font-size: 14px; color: var(--muted); }
.foot p { margin: 4px 0; }

@media (min-width: 480px) {
  .actions { grid-template-columns: 1fr 1fr; }
}
