:root {
  --bg: #EDECE7; --panel: #F8F7F3; --ink: #191B23; --soft: #64646B; --line: #D3D0C7; --line-2: #C2BEB2;
  --accent: #7A1426; --accent-ink: #ffffff; --accent-tint: #EFDCDD; --warn: #9a2b2b; --ok: #2f6b4a;
  --display: "Gloock", "Big Caslon", Georgia, serif;
  --ui: "Newsreader", Georgia, serif;
  --mono: "Courier Prime", "Courier New", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 17px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: .06em; text-transform: uppercase; }
.eyebrow { font: 500 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.muted { color: var(--soft); }

.btn { font-size: 15px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 3px; background: transparent; color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.btn:hover { background: rgba(35, 27, 26, .06); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: #3A2F2D; border-color: #3A2F2D; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { background: rgba(0, 0, 0, .05); }
.btn:disabled { opacity: .5; cursor: default; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.top { flex-wrap: nowrap; display: flex; align-items: center; gap: 16px; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.brand { font-family: var(--display); font-size: 20px; letter-spacing: .1em; text-transform: uppercase; text-decoration: none; margin-right: auto; }
.top nav { display: flex; gap: 6px; align-items: center; }

input[type=text], input[type=email], input[type=url], input[type=date], input[type=time], input[type=datetime-local], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 3px; background: #fff; min-height: 40px;
}
textarea { resize: vertical; min-height: 76px; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(122, 20, 38, .14); }
label.f { display: block; margin: 0 0 12px; }
label.f > span { display: block; font-size: 12px; color: var(--soft); margin-bottom: 4px; }
.row2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.row2 > * { min-width: 0; }
input[type=date], input[type=time], input[type=datetime-local] { min-width: 0; max-width: 100%; }

dialog { border: 0; border-radius: 4px; padding: 28px; width: min(420px, calc(100vw - 32px)); background: var(--panel); color: var(--ink); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(20, 20, 16, .5); }
dialog h2 { font-size: 30px; margin-bottom: 8px; }
dialog p { margin: 0 0 16px; color: var(--soft); }
dialog .actions { flex-wrap: wrap; display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.err { color: var(--warn); font-size: 13px; min-height: 20px; }
.toast { max-width: calc(100vw - 32px); text-align: center; position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 3px; font-size: 13px; z-index: 100; }

/* phone frame used by catalogue, editor and dashboard */
.phone { position: relative; aspect-ratio: 390 / 844; border-radius: 34px; background: #111; padding: 7px; box-shadow: 0 1px 0 rgba(255, 255, 255, .2) inset, 0 24px 60px rgba(30, 26, 14, .28); }
.phone > .screen { position: absolute; inset: 7px; border-radius: 28px; overflow: hidden; background: #222; }
.phone img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* the invitation always renders at a real phone size (390x844) and is scaled to the frame */
.phone iframe { position: absolute; left: 0; top: 0; width: 390px; height: calc(100% / var(--fit, 1)); border: 0; transform-origin: 0 0; transform: scale(var(--fit, 1)); }
