:root {
  --ink: #2a1d21; --muted: #84706f; --line: #ecdfdb; --paper: #fbf6f3; --card: #ffffff;
  --brand: #c8284c; --brand-soft: #f6dfe3;
  --serif: 'Playfair Display', Georgia, serif; --sans: 'Jost', system-ui, sans-serif; --script: 'Great Vibes', cursive;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }

.topbar {
  position: sticky; top: 0; z-index: 20; height: 64px; padding: 0 clamp(16px, 4vw, 40px);
  display: flex; align-items: center; justify-content: space-between;
  background: color-mix(in srgb, var(--paper) 85%, transparent); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 20px; text-decoration: none; }
.brand-mark { width: 28px; height: 28px; background: url('/favicon.svg') center / contain no-repeat; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none;
  padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 500; font-size: 15px; transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .6; pointer-events: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 10px 24px -12px var(--brand); }
.btn.ghost { background: transparent; }
.btn.small { padding: 7px 14px; font-size: 13px; }
.btn.big { padding: 16px 30px; font-size: 17px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font-weight: 500; font-size: 14px; }
.danger { color: #b3261e !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 200; max-width: min(520px, 92vw);
  transform: translate(-50%, 20px); opacity: 0; transition: all .25s ease;
  background: #2a1d21; color: #fff; padding: 13px 20px; border-radius: 14px; font-size: 14px; box-shadow: 0 14px 30px -10px rgba(0,0,0,.4);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: #8f1d2e; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(30, 18, 22, .45); backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal-card { position: relative; width: min(480px, 100%); max-height: 90vh; overflow: auto; background: var(--card); border-radius: 24px; padding: 30px 26px 24px; box-shadow: 0 40px 80px -30px rgba(0,0,0,.5); animation: rise .25s ease; }
.modal-card h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; margin: 0 0 6px; }
.modal-x { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--paper); font-size: 20px; line-height: 1; color: var(--muted); }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(14px); opacity: 0; } }
