/* Together — event scheduler. Light theme: white, bright companion colors, Manrope Light. */
:root {
  color-scheme: light;
  --bg: #ffffff; --fg: #17171a; --muted: #6e6e76; --line: #e6e6ea; --soft: #f6f6f8;
  --band: rgba(23, 23, 26, .07); --accent: #17171a; --link: #2b59ff;
  --err: #d6293e; --ok: #12a150; --warn-bg: #fff4e5; --warn: #b25e00;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); }
body { font: 300 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
b, strong { font-weight: 600; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: var(--link); text-underline-offset: 3px; }

.page { max-width: 1040px; margin: 0 auto; padding: 24px 16px 64px; }
.banner { display: block; width: 100%; aspect-ratio: 3 / 1; object-fit: cover; border-radius: 12px; margin: 0 0 20px; background: var(--soft); }
h1 { margin: 0; font-weight: 300; font-size: clamp(1.6rem, 5vw, 2.3rem); letter-spacing: -0.015em; line-height: 1.15; overflow-wrap: anywhere; }
.when { margin: 6px 0 0; font-size: 1.05rem; }
.place { margin: 2px 0 0; color: var(--muted); font-size: 1.05rem; overflow-wrap: anywhere; }
.place a { color: var(--muted); }
.status { margin: 10px 0 0; color: var(--err); font-size: 14px; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.live i { width: 7px; height: 7px; border-radius: 50%; background: #c9c9cf; }
.live.on i { background: var(--ok); box-shadow: 0 0 0 3px rgba(18, 161, 80, .15); }

.notice { margin: 18px 0 0; padding: 14px 16px; border-radius: 12px; background: var(--warn-bg); color: var(--warn); display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.notice p { margin: 0; }
.notice.soft { background: var(--soft); color: var(--muted); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 36px; align-items: start; margin-top: 26px; }
@media (max-width: 760px) { .layout { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- calendar ---------- */
.cal-wrap { --cell-h: 68px; }
.month-title { margin: 22px 0 8px; font-weight: 600; font-size: 1.05rem; }
.month-title:first-child { margin-top: 0; }
.grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); user-select: none; -webkit-user-select: none; border-radius: 2px; }
.dow { padding: 8px 0; text-align: center; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--soft); }
.cell { position: relative; height: var(--cell-h); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 7px; cursor: pointer; outline: none; transition: height .15s ease; }
.cell.empty { background: var(--soft); cursor: default; }
/* the extra days around the event: shown greyed out, still selectable */
.cell.extra { background: #f3f3f5; }
.cell.extra .num { color: #a3a3ab; font-weight: 400; }
@media (hover: hover) { .cell.extra:hover { background: #ebebee; } }
.cell:focus-visible { box-shadow: inset 0 0 0 2px var(--fg); }
@media (hover: hover) { .cell:not(.empty):hover { background: rgba(23, 23, 26, .035); } }
.cell.sel-mid { background: var(--band); }
.cell.sel-start { background: linear-gradient(to right, transparent 50%, var(--band) 50%); }
.cell.sel-end { background: linear-gradient(to left, transparent 50%, var(--band) 50%); }
.cell.sel-start.sel-end { background: transparent; }
.num { position: relative; z-index: 3; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; min-width: 34px; height: 34px; border-radius: 50%; font-size: 16px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.num .mon { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 1px; }
.cell.sel-ring .num, .cell.sel-end .num { box-shadow: 0 0 0 2px var(--ring, var(--fg)); }
.holiday { position: relative; z-index: 3; max-width: 100%; padding: 0 3px; font-size: 9.5px; font-weight: 500; line-height: 1.15; color: #d6293e; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bars { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.bar { position: absolute; left: -1px; right: -1px; height: 6px; }
.bar.cap-start { left: 6px; border-top-left-radius: 3px; border-bottom-left-radius: 3px; }
.bar.cap-end { right: 6px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; }
.range-hint { margin: 10px 0 0; font-size: 14px; color: var(--muted); min-height: 1.4em; }
.range-hint.warn { color: var(--err); }
@media (max-width: 480px) { .num { min-width: 28px; height: 28px; font-size: 14px; } .holiday { font-size: 8.5px; } }

/* ---------- forms ---------- */
.form { margin-top: 20px; display: grid; gap: 12px; max-width: 560px; }
.field { display: grid; grid-template-columns: 110px minmax(0, 1fr); align-items: center; gap: 10px; }
.field > span, .label { font-size: 14px; font-weight: 500; }
.field input, .field textarea, .input { width: 100%; padding: 10px 12px; font-size: 16px; font-weight: 300; border: 1px solid #cfcfd6; border-radius: 8px; background: #fff; color: var(--fg); }
.field textarea, textarea.input { min-height: 90px; resize: vertical; line-height: 1.5; }
.field input:focus, .field textarea:focus, .input:focus { outline: 2px solid var(--fg); outline-offset: 1px; }
.field input::placeholder, .input::placeholder { color: #a5a5ad; }
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: #17171a; }
.indent { margin-left: 120px; }
@media (max-width: 520px) { .field { grid-template-columns: 1fr; gap: 4px; } .indent { margin-left: 0; } }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; padding: 10px 20px; min-height: 44px; border-radius: 8px; border: 1px solid #cfcfd6; background: #fff; color: var(--fg); font-weight: 600; font-size: 15px; cursor: pointer; transition: background .2s ease, border-color .2s ease; white-space: nowrap; }
.btn:hover { border-color: var(--fg); }
.btn.solid { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.solid:hover { background: #33333a; }
.btn.done { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--err); border-color: var(--err); }
.btn.danger.solid { background: var(--err); color: #fff; }
.btn:disabled { background: #fff; border-color: #e3e3e8; color: #b8b8bf; cursor: not-allowed; }
.btn.solid:disabled { background: #c9c9cf; border-color: #c9c9cf; color: #fff; }
.btn.small { min-height: 34px; padding: 6px 12px; font-size: 13.5px; }
.feedback { margin: 0; font-size: 14px; min-height: 1.4em; color: var(--muted); }
.feedback.error { color: var(--err); }
.feedback.ok { color: var(--ok); }
.tag { display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 999px; background: var(--soft); border: 1px solid var(--line); font-size: 11px; font-weight: 500; color: var(--muted); vertical-align: 1px; }

/* ---------- companions ---------- */
.people-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--fg); }
.people-head h2, .panel h2 { margin: 0; font-weight: 600; font-size: 1.15rem; }
.people ul { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 4px; border: 0; background: none; text-align: left; cursor: pointer; border-radius: 8px; }
@media (hover: hover) { .row:hover { background: var(--soft); } }
.row:focus-visible { outline: 2px solid var(--fg); outline-offset: 1px; }
.dot { flex: none; position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--c, #fff); }
.dot.on::after { content: ""; position: absolute; left: 50%; top: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: #fff; }
.who { display: grid; min-width: 0; }
.who .name { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .dates { font-size: 12.5px; color: var(--muted); }
.empty-note { color: var(--muted); font-size: 14px; padding: 6px 4px; }
.people-btns { display: flex; gap: 8px; margin-top: 14px; }
.people-btns .btn { flex: 1; }

.panel { margin-top: 36px; }
.panel h2 { padding-bottom: 8px; border-bottom: 2px solid var(--fg); margin-bottom: 12px; }
.panel .body { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 760px; }
.danger-zone { margin-top: 44px; display: flex; justify-content: flex-start; }
.disclaimer { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); max-width: 760px; }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(0, 0, 0, .45); }
.modal-card { width: 100%; max-width: 440px; background: #fff; border-radius: 14px; padding: 22px 20px 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal-card h3 { margin: 0 0 8px; font-weight: 600; font-size: 1.2rem; }
.modal-card p { margin: 0 0 18px; color: #3c3c43; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* ---------- create page ---------- */
.create { max-width: 680px; }
.lead { color: var(--muted); margin: 6px 0 26px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .two { grid-template-columns: 1fr; } }
.hint { font-size: 12.5px; color: var(--muted); margin: -4px 0 0 120px; }
@media (max-width: 520px) { .hint { margin-left: 0; } }
.group-title { margin: 18px 0 2px; font-weight: 600; font-size: 1.05rem; padding-bottom: 6px; border-bottom: 2px solid var(--fg); }
.sections { display: grid; gap: 12px; }
.section-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 8px; background: #fff; }
.section-card .top { display: flex; gap: 8px; }
.section-card .top input { flex: 1; min-width: 0; }
.icon-btn { border: 1px solid #cfcfd6; background: #fff; border-radius: 8px; width: 40px; flex: none; cursor: pointer; color: var(--muted); font-size: 18px; line-height: 1; }
.icon-btn:hover { color: var(--err); border-color: var(--err); }

/* banner cropper */
.drop { display: grid; place-items: center; aspect-ratio: 3 / 1; border: 1.5px dashed #cfcfd6; border-radius: 12px; color: var(--muted); font-weight: 500; cursor: pointer; background: var(--soft); text-align: center; padding: 10px; }
.drop:hover { border-color: var(--fg); color: var(--fg); }
.cropper { display: grid; gap: 10px; }
.crop-frame { position: relative; aspect-ratio: 3 / 1; border-radius: 12px; overflow: hidden; background: #111; touch-action: none; cursor: grab; }
.crop-frame:active { cursor: grabbing; }
.crop-frame img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; pointer-events: none; max-width: none; }
.crop-frame .guide { position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .8); border-radius: 12px; }
.crop-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.crop-tools input[type=range] { flex: 1; min-width: 140px; accent-color: #17171a; }

.result { margin-top: 26px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); }
.result .link { display: flex; gap: 8px; margin: 10px 0; }
.result .link input { flex: 1; min-width: 0; }

/* ---------- live brief (events without a cover image) ---------- */
.brief-card { margin: 0 0 22px; border-radius: 16px; padding: 20px 22px; color: #12233d; background: linear-gradient(125deg, #dff1ff 0%, #e9e4ff 45%, #ffe9dc 100%); display: grid; gap: 14px; }
.b-top { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.b-place { margin: 0; font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; }
.b-sub { margin: 2px 0 0; font-size: 14px; color: #44546d; }
.b-count { margin: 0; padding: 6px 14px; border-radius: 999px; background: rgba(255, 255, 255, .75); font-weight: 600; font-size: 14px; white-space: nowrap; }
.b-facts { display: flex; flex-wrap: wrap; gap: 8px; }
.b-fact { background: rgba(255, 255, 255, .7); border-radius: 10px; padding: 8px 12px; font-size: 13.5px; }
.b-fact small { display: block; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #5b6b84; }
.b-label { margin: 2px 0 -6px; font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #5b6b84; }
.b-days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(78px, 1fr); gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.b-day { background: rgba(255, 255, 255, .8); border-radius: 12px; padding: 10px 8px; text-align: center; font-size: 13px; }
.b-day .d { font-weight: 600; font-size: 12px; color: #44546d; }
.b-day .i { font-size: 22px; line-height: 1.3; }
.b-day .t { font-weight: 600; }
.b-day .t span { color: #6b7a90; font-weight: 400; }
.b-day .w { font-size: 11.5px; color: #44546d; }
.b-credit { margin: 0; font-size: 11.5px; color: #5b6b84; }
.b-credit a { color: inherit; }

@media (min-width: 761px) { .people { position: sticky; top: 16px; } }

/* create page: dates row, location picker, banner info */
.when-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; align-items: center; }
.pad { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.pad input { width: 64px; padding: 10px 8px; text-align: center; }
@media (max-width: 620px) { .when-grid { grid-template-columns: 1fr 1fr; } .pad { grid-column: 1 / -1; } }
select.input { appearance: none; -webkit-appearance: none; padding-right: 30px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%236e6e76' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 12px center; }
.place-box { position: relative; }
.place-box input.picked { border-color: var(--ok); }
.place-list { position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 4px; list-style: none; background: #fff; border: 1px solid #cfcfd6; border-radius: 10px; box-shadow: 0 12px 30px rgba(0, 0, 0, .12); max-height: 300px; overflow-y: auto; }
.place-list li { padding: 8px 10px; border-radius: 7px; cursor: pointer; display: grid; }
.place-list li small { color: var(--muted); font-size: 12.5px; }
.place-list li.on, .place-list li:hover { background: var(--soft); }
.place-list li.none { cursor: default; color: var(--muted); font-size: 14px; }
.check-row { display: flex; align-items: center; gap: 8px; }
.info { width: 22px; height: 22px; border-radius: 50%; border: 1px solid #cfcfd6; background: #fff; color: var(--muted); font: 600 12px/1 var(--font); cursor: pointer; padding: 0; }
.info:hover, .info[aria-expanded=true] { border-color: var(--fg); color: var(--fg); }
.info-box { font-size: 13.5px; color: #3c3c43; background: var(--soft); border-radius: 10px; padding: 10px 12px; }

.time-pair { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 6px; }

/* ======================================================================
   Ivory and gold (owner's choice, 2026-11-22): bright and light, still Vice Advice.
   Warm ivory page, white cards with fine gold edges, Cormorant for big titles,
   Manrope Light for everything else, gold pill buttons. These rules override the ones above.
   ====================================================================== */
:root {
  --bg: #fbf8f1; --fg: #1c1a16; --muted: #6f6656; --line: #ece3cd; --soft: #f6f1e4;
  --gold: #c9ac60; --gold-deep: #9b7d3a; --edge: #e6dcc4; --card-edge: #efe6d0;
  --accent: #c9ac60; --link: #9b7d3a; --band: rgba(201, 172, 96, .18);
  --serif: "Cormorant Garamond", Garamond, Georgia, serif;
}
html, body { background: var(--bg); }
a { color: var(--link); }

.brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; margin: 0 0 14px; }
.brand img { width: 13px; height: auto; display: block; }
.brand span { font-family: var(--serif); font-size: 13px; letter-spacing: .32em; color: var(--gold-deep); }
.brand:hover span { color: var(--fg); }

h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 7vw, 3.4rem); letter-spacing: .005em; line-height: 1.05; }
.lead { color: var(--muted); }

/* cards */
.card { background: #fff; border: 1px solid var(--card-edge); border-radius: 16px; padding: 18px 20px 20px; display: grid; gap: 12px; }
.create .form { max-width: none; gap: 16px; }
.group-title { margin: 0 0 2px; padding: 0; border: 0; font: 600 11px/1.4 var(--font); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }

/* fields */
.field input, .field textarea, .input, select.input { border: 1px solid var(--edge); border-radius: 10px; background-color: #fff; }
.field input:focus, .field textarea:focus, .input:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
.field > span, .label { color: var(--fg); }
.check input, .crop-tools input[type=range] { accent-color: var(--gold-deep); }
.place-box input.picked { border-color: var(--gold); background: #fffdf7; }
.place-list { border-color: var(--edge); }
.place-list li.on, .place-list li:hover { background: var(--soft); }
.info { border-color: var(--edge); }
.info:hover, .info[aria-expanded=true] { border-color: var(--gold-deep); color: var(--gold-deep); }
.info-box { background: var(--soft); }
.drop { border-color: var(--edge); background: var(--soft); }
.drop:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.section-card { border-color: var(--card-edge); background: #fffdf8; }
.icon-btn { border-color: var(--edge); }

/* buttons: gold pills */
.btn { border-radius: 999px; border-color: var(--edge); background: #fff; }
.btn:hover { border-color: var(--gold-deep); }
.btn.solid { background: var(--gold); border-color: var(--gold); color: var(--fg); }
.btn.solid:hover { background: #d6bb73; border-color: #d6bb73; }
.btn.solid:disabled { background: #e8dcbc; border-color: #e8dcbc; color: #8a8170; }
.btn.danger { color: #b8323f; border-color: #e7b9bd; }
.btn.danger.solid { background: #b8323f; border-color: #b8323f; color: #fff; }
.btn.done { background: #4f9a63; border-color: #4f9a63; color: #fff; }

/* event page */
.layout > .cal, .layout > .people { background: #fff; border: 1px solid var(--card-edge); border-radius: 16px; padding: 18px; }
.grid { border-color: var(--line); }
.dow { background: var(--soft); color: var(--gold-deep); border-color: var(--line); }
.cell { border-color: var(--line); background: #fff; }
.cell.empty { background: var(--bg); }
.cell.extra { background: #f5f0e4; }
.cell.extra .num { color: #a79d88; }
@media (hover: hover) { .cell:not(.empty):hover { background: #fffaf0; } .cell.extra:hover { background: #efe8d8; } }
.holiday { color: #b8323f; }
.people-head { border-bottom: 1px solid var(--gold); }
.people-head h2, .panel h2 { font-family: var(--serif); font-weight: 500; font-size: 1.55rem; letter-spacing: .01em; }
.panel { background: #fff; border: 1px solid var(--card-edge); border-radius: 16px; padding: 18px 20px; margin-top: 22px; }
.panel h2 { border-bottom: 1px solid var(--gold); }
.row:hover { background: var(--soft); }
.tag { background: var(--soft); border-color: var(--line); }
.live.on i { background: #4f9a63; box-shadow: 0 0 0 3px rgba(79, 154, 99, .15); }
.notice.soft { background: var(--soft); }
.banner { border: 1px solid var(--card-edge); }
.brief-card { background: linear-gradient(125deg, #fff6e2 0%, #fdeee6 50%, #eef2fb 100%); border: 1px solid var(--card-edge); }
.result { background: #fff; border-color: var(--card-edge); }
.modal-card { border: 1px solid var(--card-edge); }
.disclaimer { border-top-color: var(--line); }
.danger-zone { margin-top: 28px; }
.people-head h2 { font-size: 1.45rem; white-space: nowrap; }
#peopleCount { font-family: var(--font); font-size: 13px; font-weight: 400; color: var(--muted); letter-spacing: 0; margin-left: 4px; }
@media (max-width: 620px) { .when-grid { grid-template-columns: 1fr; } }
