:root {
  --cream: #fbf6ee; --sand: #f4ecdf; --blush: #efd6cb; --clay: #e9c9b4; --sage: #c3ccae;
  --moss: #3f4a3b; --moss-2: #55614f; --terra: #93573a; --line: rgba(63, 74, 59, .22); --danger: #8a2d1f;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--moss); font: 1rem/1.55 var(--sans); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; margin: 0 0 .5rem; line-height: 1.15; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
a { color: inherit; }
p { margin: 0 0 .8rem; }
.wrap { width: min(100% - 2rem, 62rem); margin-inline: auto; }
.narrow { width: min(100% - 2rem, 26rem); margin: 12vh auto 3rem; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; background: var(--moss); color: var(--cream); padding: .5rem 1rem; z-index: 10; }
.muted { color: var(--moss-2); } .small { font-size: .875rem; }
.loading { text-align: center; margin-top: 30vh; color: var(--moss-2); }

button, .btn { font: inherit; cursor: pointer; border: 0; border-radius: 999px; padding: .65rem 1.3rem; background: var(--moss); color: var(--cream); font-weight: 500; text-decoration: none; display: inline-block; }
button:hover:not([disabled]), .btn:hover { background: #2c3629; }
button[disabled] { opacity: .55; cursor: not-allowed; }
button.ghost { background: transparent; color: var(--moss); box-shadow: inset 0 0 0 1.5px var(--moss); }
button.ghost:hover:not([disabled]) { background: var(--moss); color: var(--cream); }
button.danger { background: var(--danger); } button.danger:hover:not([disabled]) { background: #6c2318; }
button.small { padding: .35rem .85rem; font-size: .875rem; }
:focus-visible { outline: 3px solid var(--terra); outline-offset: 2px; }

input[type=text], input[type=search], select, textarea { font: inherit; color: var(--moss); background: #fff; border: 1.5px solid var(--moss-2); border-radius: .7rem; padding: .6rem .8rem; width: 100%; }
textarea { min-height: 5.5rem; resize: vertical; }
label { display: block; font-weight: 500; margin-bottom: .25rem; }
.field { margin-bottom: 1rem; }
.hint { font-weight: 400; color: var(--moss-2); font-size: .85rem; }
.count { float: right; font-size: .8rem; color: var(--moss-2); font-weight: 400; } .count.over { color: var(--danger); font-weight: 600; }

.card { background: var(--sand); border-radius: 1.2rem; padding: 1.4rem; }
.names { display: grid; gap: .6rem; margin: 1rem 0; }
.names button { text-align: left; }
.err { color: var(--danger); min-height: 1.4em; }

header.bar { border-bottom: 1px solid var(--line); background: var(--sand); }
header.bar .wrap { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; justify-content: space-between; padding-block: .8rem; }
.brand { font-family: var(--serif); font-size: 1.3rem; }
.who { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
nav.tabs { display: flex; gap: .3rem; margin: 1.2rem 0; flex-wrap: wrap; }
nav.tabs button { background: transparent; color: var(--moss); box-shadow: inset 0 0 0 1.5px var(--line); }
nav.tabs button[aria-selected=true] { background: var(--moss); color: var(--cream); }
.banner { background: var(--blush); border-radius: .8rem; padding: .6rem 1rem; margin-bottom: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 1rem; }
.chip { border-radius: 999px; padding: .25rem .8rem; background: var(--sand); box-shadow: inset 0 0 0 1.5px var(--line); color: var(--moss); font-size: .9rem; }
.chip[aria-pressed=true] { background: var(--moss); color: var(--cream); }
.tools { display: flex; gap: .8rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; } .tools input { max-width: 20rem; }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--moss-2); font-weight: 600; }
tbody tr { cursor: pointer; } tbody tr:hover { background: var(--sand); }
.badge { display: inline-block; border-radius: 999px; padding: .1rem .65rem; font-size: .82rem; background: var(--sand); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.badge.coming { background: var(--sage); } .badge.new { background: var(--blush); } .badge.talked, .badge.maybe { background: var(--clay); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--moss-2); }
.show-sm { display: none; }
@media (max-width: 40rem) { .hide-sm { display: none; } .show-sm { display: block; } th, td { padding: .6rem .3rem; } td:first-child { overflow-wrap: anywhere; } }

dialog { border: 0; border-radius: 1.3rem; padding: 1.4rem; width: min(100% - 1.5rem, 40rem); max-height: 92vh; background: var(--cream); color: var(--moss); }
dialog::backdrop { background: rgba(40, 48, 38, .5); }
.row { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.timeline { list-style: none; margin: .6rem 0 1rem; padding: 0; border-left: 2px solid var(--line); }
.timeline li { padding: 0 0 .9rem 1rem; position: relative; } .timeline li::before { content: ""; position: absolute; left: -6px; top: .45rem; width: 10px; height: 10px; border-radius: 50%; background: var(--clay); }
.timeline .meta { font-size: .82rem; color: var(--moss-2); } .timeline .note { white-space: pre-wrap; }
.contactline { font-size: 1.05rem; }
dialog .contactline { overflow-wrap: anywhere; }
.under { overflow-wrap: anywhere; }

fieldset { border: 1.5px solid var(--line); border-radius: 1rem; padding: 1rem 1rem .3rem; margin: 0 0 1.2rem; }
legend { font-family: var(--serif); font-size: 1.15rem; padding: 0 .5rem; }
.photos { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.photo img { width: 100%; height: 11rem; object-fit: cover; border-radius: .8rem; background: var(--blush); display: block; margin-bottom: .6rem; }
.stickybar { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--cream) 30%); padding: 1.2rem 0 1rem; display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }
.toast { position: fixed; left: 50%; bottom: 1.2rem; transform: translateX(-50%); background: var(--moss); color: var(--cream); padding: .7rem 1.3rem; border-radius: 999px; max-width: 92vw; z-index: 20; box-shadow: 0 6px 22px rgba(0,0,0,.25); }
.toast.bad { background: var(--danger); }
