:root {
  /* Stillmark — green-on-white brand palette */
  --bg: #f4f8f6;
  --panel: #ffffff;
  --panel-2: #eef4f0;
  --border: #d5e1da;
  --text: #15241d;
  --muted: #5f7269;
  --accent: #1f8a66;        /* Stillmark green */
  --accent-2: #166b50;      /* deeper green — hover / links */
  --green: #1f8a66;         /* booked / success */
  --amber: #b07514;
  --red: #c0473f;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: var(--accent-2); }

.wrap { max-width: 980px; margin: 0 auto; padding: 32px 20px 80px; }
.wrap.narrow { max-width: 720px; }

header.top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
header.top h1 { font-size: 22px; margin: 0; letter-spacing: -0.01em; max-width: 640px; }
header.top .who { color: var(--muted); font-size: 14px; }

.brand { display: flex; flex-direction: column; gap: 10px; }
.wordmark { color: var(--accent); font-weight: 800; font-size: 15px; letter-spacing: 0.04em; text-transform: uppercase; }
.brandmark { display: flex; align-items: center; gap: 12px; }
.brandmark .seal { height: 46px; width: auto; display: block; }
.brandmark .logo { height: 30px; width: auto; display: block; }

/* week / day navigation (guest picker) */
.weeknav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 14px; }
.weeknav .label { font-weight: 700; font-size: 15px; }
.daystrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 18px; }
.daycell { border: 1px solid var(--border); border-radius: 10px; padding: 8px 4px; text-align: center; background: var(--panel-2); }
.daycell.has { cursor: pointer; }
.daycell.has:hover { border-color: var(--accent); }
.daycell.empty { opacity: 0.4; }
.daycell.active { border-color: var(--accent); background: rgba(31,138,102,0.12); }
.daycell .dow { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.03em; }
.daycell .dnum { font-size: 17px; font-weight: 700; line-height: 1.3; }
.daycell .cnt { font-size: 10px; color: var(--accent); font-weight: 600; min-height: 13px; }
.dayhead { margin: 0 0 10px; font-size: 14px; color: var(--muted); }

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}
.card h2 { margin: 0 0 14px; font-size: 16px; letter-spacing: -0.01em; }
.card h3 { margin: 0 0 6px; font-size: 15px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.col { display: flex; flex-direction: column; gap: 6px; }
.grow { flex: 1 1 auto; min-width: 160px; }

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

input, select, textarea {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 9px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
textarea { resize: vertical; min-height: 60px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }

button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 9px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
button:hover { background: var(--accent-2); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.ghost { background: transparent; border: 1px solid var(--border); color: var(--text); }
button.ghost:hover { background: var(--panel-2); }
button.small { padding: 6px 10px; font-size: 12px; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.booked { background: rgba(31,138,102,0.13); color: var(--green); }
.pill.pending { background: rgba(240,180,41,0.15); color: var(--amber); }
.pill.canceled { background: rgba(239,83,80,0.15); color: var(--red); }

.share-link { display: flex; gap: 8px; align-items: center; }
.share-link input { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.invite { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 12px; background: var(--panel-2); }
.invite .head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.invite .picks { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.pickrow { display: flex; align-items: center; gap: 10px; font-size: 14px; padding: 6px 10px; border-radius: 8px; background: var(--panel); }
.pickrow.chosen { border: 1px solid var(--green); }
.pickrow.backup { opacity: 0.92; }
.rank-badge { width: 22px; height: 22px; border-radius: 6px; background: var(--accent); color: white; font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.rank-badge.chosen { background: var(--green); }
.tag { font-size: 11px; color: var(--muted); border: 1px solid var(--border); padding: 1px 6px; border-radius: 6px; }

/* guest slot picker */
.day { margin-bottom: 18px; }
.day h3 { position: sticky; top: 0; background: var(--panel); padding: 6px 0; font-size: 14px; color: var(--muted); }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.slot {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 10px 8px;
  text-align: center;
  font-size: 14px;
  cursor: pointer;
  user-select: none;
}
.slot:hover { border-color: var(--accent); }
.slot.selected { border-color: var(--accent); background: rgba(31,138,102,0.14); }
.slot .badge { position: absolute; top: -8px; right: -8px; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: white; font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

.selbar { position: sticky; bottom: 0; background: var(--panel); border-top: 1px solid var(--border); padding: 14px 0; margin-top: 8px; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel-2); border: 1px solid var(--border); padding: 10px 16px; border-radius: 10px; font-size: 14px; opacity: 0; transition: opacity 0.2s; pointer-events: none; z-index: 50; }
.toast.show { opacity: 1; }
.error { color: var(--red); font-size: 14px; }
.hidden { display: none !important; }
.center { text-align: center; }
.big-check { font-size: 48px; color: var(--green); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
