/* Shared design system. Served at /static/app.css so the six pages cannot
   drift apart the way they had before they shared a stylesheet. */

:root {
    --bg: #f6f5fa;            /* page: paper with a trace of dusk */
    --surface: #fff;
    --surface-2: #f4f4fa;     /* quiet fills: table heads, link boxes */
    --hover: #eceef8;
    --line: #dfe0ee;          /* card and control borders */
    --line-soft: #ebebf5;     /* grid lines inside tables and the calendar */
    --line-input: #c3c6dc;
    --text: #1b2340;          /* ink */
    --text-2: #394161;        /* labels */
    --muted: #666d8c;
    --faint: #a3a8c0;         /* disabled, empty */

    /* --blue keeps its name from the first design; it is the indigo ink. */
    --blue: #2b3a7a;
    --blue-dark: #1b2756;
    --blue-pale: #eaedf9;
    --blue-line: #c9d0ee;
    --apricot: #f08a4b;       /* the "everyone is free" colour: best time, today */
    --apricot-pale: #fff1e6;
    --apricot-line: #f7c9a5;
    --apricot-fg: #8a3e0c;
    --green-bg: #e6f3ee;
    --green-br: #9fd0bf;
    --green-fg: #17604d;
    --green-cell: #e1f1ea;
    --green-strong: #c4e4d6;
    --amber-bg: #fff4e0;
    --amber-br: #f0d08c;
    --amber-fg: #5f4300;
    --red: #c5221f;

    --radius: 18px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgba(27, 35, 64, .04), 0 12px 36px rgba(43, 58, 122, .07);
    --focus: 0 0 0 3px rgba(240, 138, 75, .45);
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    margin: 0;
    padding: 16px 16px 64px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
/* A faint dot grid that fades out down the page, like a diary margin. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
               background-image: radial-gradient(#c9cce2 .7px, transparent .7px); background-size: 18px 18px;
               -webkit-mask-image: linear-gradient(to bottom, #000, transparent 70%);
               mask-image: linear-gradient(to bottom, #000, transparent 70%); }

/* One focus ring for everything that can be tabbed to. */
:where(a, button, select, summary):focus-visible { outline: none; box-shadow: var(--focus); }

/* ---- header: product name, language selector ---- */

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px;
          margin: 0 0 16px; min-height: 36px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-family: var(--serif);
         font-weight: 700; font-size: 20px; letter-spacing: -.3px; text-decoration: none; border-radius: var(--radius-sm); padding: 2px 4px; margin-left: -4px; }
.brand:hover { color: var(--blue); }
.brand-mark { flex-shrink: 0; box-sizing: content-box; padding: 5px; border-radius: 50%; background: var(--blue);
              color: #fff; width: 16px; height: 16px; }
.langbar[hidden] { display: none; }
#lang-select { padding: 5px 8px; border: 1px solid var(--line-input); border-radius: var(--radius-sm);
               background: var(--surface); color: var(--text); font-size: 12px; font-weight: 600;
               letter-spacing: .3px; text-transform: uppercase; font-family: inherit; cursor: pointer; }
#lang-select:hover { border-color: var(--muted); }

.wrap { max-width: 720px; margin: 0 auto; }
.wrap.wide { max-width: 960px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
        box-shadow: var(--shadow); padding: 28px; margin-bottom: 16px; }

h1, h2 { font-family: var(--serif); letter-spacing: -.02em; }
h1 { font-size: 28px; font-weight: 700; line-height: 1.15; margin: 0 0 20px; }
h2 { font-size: 21px; font-weight: 700; margin: 0 0 18px; }
h1.tight { margin-bottom: 4px; }
.subtitle { color: var(--muted); font-size: 14px; margin: 0 0 20px; }

/* A check mark before the heading of the "done" pages. */
h1.success { display: flex; align-items: center; gap: 12px; }
h1.success::before { content: "✓"; display: inline-flex; align-items: center; justify-content: center;
                     flex-shrink: 0; width: 32px; height: 32px; border-radius: 50%;
                     background: var(--green-bg); color: var(--green-fg); font-size: 17px; }

/* ---- hero (create page): the headline above a scene of people meeting ---- */

body { overflow-x: clip; }
.hero { background: var(--blue-pale); border: 1px solid var(--line); border-radius: 28px; overflow: hidden;
        padding: 32px 32px 0; margin-bottom: 24px; }
.hero h1 { font-size: clamp(34px, 7vw, 52px); line-height: 1.02; letter-spacing: -.035em; margin: 0; max-width: 11em; }
.hero p { max-width: 24em; margin: 16px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; }

/* The stage: the scene sits centred on the hero panel with a ground line. On
   narrow screens it is cropped from the sides rather than shrunk. */
.scene-wrap { display: flex; justify-content: center; overflow: hidden; margin: 24px -32px 0; padding-bottom: 12px;
              background: linear-gradient(to top, #d3d8ee 0 12px, transparent 12px); }
.scene { flex: none; width: clamp(520px, 100%, 1100px); height: auto; display: block; }


.f-ink { fill: var(--blue); }
.f-ink2 { fill: #6573bd; }
.f-tint { fill: #c4cbea; }
.f-white { fill: #fff; }
.f-warm { fill: var(--apricot); }
.f-warm2 { fill: #e9a36f; }
.f-leaf { fill: #3f8f78; }
.f-ground { fill: #d3d8ee; }
.s-ink { stroke: var(--blue); }
.s-warm { stroke: var(--apricot); }
.steam { opacity: .7; }
.s-ink2 { stroke: #6573bd; }
.arms { stroke-width: 8; stroke-linecap: round; }

/* ---- celebration (created page, agreed time) ---- */

.party { display: block; width: min(300px, 80%); height: auto; margin: 0 auto 8px; }
.confetti { animation: confetti-fall .9s cubic-bezier(.2, .7, .3, 1) both; }
@keyframes confetti-fall { from { transform: translateY(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .confetti { animation: none; } }

/* ---- forms ---- */

.field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 6px; }
input[type="text"], input[type="number"], input[type="date"], input[type="time"] {
    padding: 10px 12px; border: 1px solid var(--line-input); border-radius: var(--radius-sm);
    font-size: 15px; font-family: inherit; color: var(--text); background: var(--surface);
}
input[type="text"] { width: 100%; }
input::placeholder { color: #8a9098; }
input:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }

button[type="submit"], .btn-primary {
    background: var(--blue); color: #fff; border: 0; border-radius: 999px;
    padding: 12px 28px; font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
}
button[type="submit"]:hover, .btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: var(--surface); color: var(--blue); border: 1px solid var(--line-input);
                 border-radius: var(--radius-sm); padding: 8px 14px; font-size: 14px; font-weight: 600;
                 font-family: inherit; cursor: pointer; white-space: nowrap; }
.btn-secondary:hover { background: var(--hover); }
.btn-secondary.copied { color: var(--green-fg); border-color: var(--green-br); background: var(--green-bg); }
.actions { display: flex; justify-content: flex-end; }

/* ---- links to copy (public / admin / edit) ---- */

.linkbox { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm);
           padding: 14px 16px; margin-bottom: 12px; }
.linkbox-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.linkbox-head a { color: var(--blue); font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.linkbox-head a:hover { text-decoration: underline; }
.copyrow { display: flex; gap: 8px; }
.copyrow input[type="text"] { font-size: 13px; padding: 8px 10px; color: var(--text-2); text-overflow: ellipsis;
                              font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.notice { background: var(--green-bg); border: 1px solid var(--green-br); color: var(--green-fg);
          padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14px; }
.notice:last-child { margin-bottom: 0; }
/* Important, but not an error: keep it out of red. */
.callout { background: var(--amber-bg); border: 1px solid var(--amber-br); color: var(--amber-fg);
           padding: 11px 14px; border-radius: var(--radius-sm); margin: 16px 0 0; font-size: 14px; font-weight: 600; }

/* ---- checkbox slot lists (public poll, edit response) ---- */

.slot-day { font-size: 13px; font-weight: 700; color: var(--text-2); margin: 18px 0 8px; }
.slot-day::first-letter { text-transform: uppercase; }
.slot-day:first-child { margin-top: 0; }
.slot-row { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 10px 14px;
            margin-bottom: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm);
            background: var(--surface); cursor: pointer; transition: background .12s, border-color .12s; }
.slot-row:hover { background: var(--hover); border-color: var(--blue-line); }
.slot-row:has(input:checked) { background: var(--blue-pale); border-color: var(--blue); }
.slot-row:has(input:focus-visible) { box-shadow: var(--focus); }
.slot-row input[type="checkbox"] { width: 20px; height: 20px; margin: 0; flex-shrink: 0; accent-color: var(--blue); cursor: pointer; }
.slot-time { font-size: 15px; font-variant-numeric: tabular-nums; }

/* ---- admin results table ---- */

.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); }
table.results { border-collapse: separate; border-spacing: 0; width: 100%; font-variant-numeric: tabular-nums; }
.results th, .results td { padding: 10px 12px; text-align: center; vertical-align: middle;
                           border-bottom: 1px solid var(--line-soft); border-left: 1px solid var(--line-soft); }
.results tbody tr:last-child td { border-bottom: 0; }
/* The names stay in view when the times scroll sideways. */
.results th:first-child, .results td:first-child {
    position: sticky; left: 0; z-index: 1; background: var(--surface); border-left: 0;
    text-align: left; min-width: 130px; font-weight: 500; box-shadow: 1px 0 0 var(--line);
}
.results thead th { background: var(--surface-2); vertical-align: top; min-width: 110px; }
.results thead th:first-child { background: var(--surface-2); vertical-align: middle; font-size: 13px;
                                color: var(--text-2); font-weight: 600; }
.th-day { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.th-day::first-letter { text-transform: uppercase; }
.th-time { display: block; font-size: 14px; font-weight: 650; white-space: nowrap; }
.count { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.badge { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 10px; font-size: 11px;
         font-weight: 700; background: var(--apricot); color: #3d1a02; letter-spacing: .2px; }
.results thead th.slot-best { background: var(--apricot-pale); }
.results thead th.slot-finalized { background: var(--green-strong); }
.results td.available { background: var(--green-cell); color: var(--green-fg); font-weight: 700; font-size: 16px; }
.results td.unavailable { color: var(--faint); font-size: 16px; }
.results td.available.slot-finalized { background: var(--green-strong); }
.results td.unavailable.slot-finalized { background: #f2f9f3; }
.results form { margin: 8px 0 0; }
button.finalize-btn { padding: 4px 12px; font-size: 13px; font-weight: 600; background: var(--surface);
                      color: var(--blue); border: 1px solid var(--line-input); border-radius: var(--radius-sm);
                      cursor: pointer; font-family: inherit; }
button.finalize-btn:hover { background: var(--hover); }
button.finalize-btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
button.finalize-btn.primary:hover { background: var(--blue-dark); }
.empty { font-size: 14px; color: var(--muted); }

/* ---- duration presets (create page) ---- */

.durations { display: flex; flex-wrap: wrap; gap: 8px; }
.dur, .dur-custom { padding: 7px 14px; border: 1px solid var(--line-input); background: var(--surface);
                    border-radius: 999px; font-size: 14px; font-family: inherit; color: var(--text); cursor: pointer; }
.dur:hover, .dur-custom:hover { background: var(--hover); }
.dur-custom { border-style: dashed; color: var(--blue); }
.dur.active, .dur-custom.active { background: var(--blue); border: 1px solid var(--blue); color: #fff; }
#custom-min { width: 92px; padding: 7px 10px; border: 1px solid var(--blue); border-radius: 999px; font-size: 14px; }

/* ---- week calendar (create page) ---- */

.toolbar { display: flex; align-items: center; margin: 24px 0 10px; gap: 8px; flex-wrap: wrap; }
.nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.navbtn { width: 34px; height: 34px; border: 1px solid var(--line-input); background: var(--surface);
          border-radius: var(--radius-sm); color: var(--blue); font-size: 15px; line-height: 1;
          cursor: pointer; font-family: inherit; }
.navbtn:hover, #today-btn:hover { background: var(--hover); }
.navbtn:disabled { color: var(--faint); cursor: default; background: var(--surface); }
#today-btn { height: 34px; padding: 0 14px; border: 1px solid var(--line-input); background: var(--surface);
             border-radius: var(--radius-sm); font-size: 14px; font-family: inherit; color: var(--text); cursor: pointer; }
/* The range label switches between the week and month view. */
.range { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid transparent;
         border-radius: var(--radius-sm); background: none; font-size: 14px; font-weight: 600; font-family: inherit;
         color: var(--text); cursor: pointer; }
.range:hover { background: var(--hover); border-color: var(--line); }
.range .wk { color: var(--muted); font-weight: 400; }
.range .caret { color: var(--muted); font-size: 10px; }
.range::first-letter { text-transform: uppercase; }
.seg { display: inline-flex; margin-left: auto; border: 1px solid var(--line-input); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { padding: 7px 14px; border: 0; background: var(--surface); font-size: 14px; font-family: inherit; color: var(--text); cursor: pointer; }
.seg button + button { border-left: 1px solid var(--line-input); }
.seg button:hover { background: var(--hover); }
.seg button.active { background: var(--blue); color: #fff; }
.tz { font-size: 12px; color: var(--muted); text-align: right; margin-top: 6px; }

.calendar { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
/* minmax(0, 1fr): a time label must not widen its day column on narrow screens. */
.cal-head { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.dh { padding: 8px 0 10px; text-align: center; border-left: 1px solid var(--line-soft); }
.dh:first-child { border-left: 0; }
.dh .dow { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: .5px; }
.dh .dnum { font-size: 18px; color: var(--text-2); margin-top: 2px; }
.dh.today { background: var(--apricot-pale); }
.dh.today .dnum, .dh.today .dow { color: var(--apricot-fg); font-weight: 700; }
.grip { position: relative; display: flex; align-items: center; justify-content: center; height: 26px; background: var(--surface);
        cursor: ns-resize; touch-action: none; user-select: none; }
.grip[hidden] { display: none; }
#grip-top { border-bottom: 1px solid var(--line-soft); }
#grip-end { border-top: 1px solid var(--line-soft); }
.grip .gp { width: 34px; height: 5px; border-radius: 2px; background: var(--line-input); }
.grip:hover .gp, .grip:focus-visible .gp, .grip.drag .gp { background: var(--blue); }
.grip .gp { margin-right: 8px; }
.grip .gh { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: calc(100% - 140px); }
.grip .gl { position: absolute; left: 0; width: 50px; padding-right: 8px; text-align: right; font-size: 11px; color: var(--muted);
            font-variant-numeric: tabular-nums; }
.cal-body { max-height: min(392px, 60vh); overflow-y: auto; }
.cal-body.days { max-height: none; overflow: visible; }
.row { display: grid; grid-template-columns: 58px repeat(7, minmax(0, 1fr)); }
.tlabel { font-size: 11px; color: var(--muted); text-align: right; padding-right: 8px; font-variant-numeric: tabular-nums; }
.cell { position: relative; height: 22px; border-left: 1px solid var(--line-soft); border-top: 1px dotted #f1f2f4; cursor: pointer; }
.row.hour .cell, .row.hour .tlabel { border-top: 1px solid #e8eaed; }
.cell:hover { background: var(--blue-pale); }
/* Past, or more than a year ahead: striped so it cannot pass for free time. */
.cell.off { cursor: default;
            background: repeating-linear-gradient(135deg, #f7f7fb 0 5px, #ecedf5 5px 6px); }
/* A chosen time is drawn as one rounded block, inset from the day's edges. */
.cell.sel::before { content: ""; position: absolute; inset: 0 3px; background: var(--blue); }
.cell.sel.start::before { top: 2px; border-radius: 5px 5px 0 0; }
.cell.sel.end::before { bottom: 2px; border-radius: 0 0 5px 5px; }
.cell.sel.start.end::before { border-radius: 5px; }
/* Past the first cell the block also covers the grid line above it. */
.cell.sel:not(.start)::before { top: -1px; }
.cell.sel:hover { background: none; }
.cell.sel:hover::before { background: var(--blue-dark); }
.cell.sel .lbl { position: relative; display: block; font-size: 10px; font-weight: 600; color: #fff;
                 padding: 3px 4px 0 7px; white-space: nowrap; overflow: hidden; text-overflow: clip; }

/* Week view: one block per suggestion; overlapping ones share the column. */
.blk { position: absolute; top: -1px; bottom: 0; z-index: 1; background: var(--blue); }
.blk.start { z-index: 2; top: 2px; border-radius: 5px 5px 0 0; }
.blk.end { bottom: 2px; border-radius: 0 0 5px 5px; }
.blk.start.end { border-radius: 5px; }
.blk:hover { background: var(--blue-dark); }
.blk.par .x { display: none; }
.blk.par:hover .x { display: block; background: var(--blue-dark); }
.blk .lbl { display: block; font-size: 10px; font-weight: 600; color: #fff; padding: 3px 4px 0 6px;
            white-space: nowrap; overflow: hidden; }
.blk { cursor: grab; touch-action: none; user-select: none; }
.cell.day.sel, .cell.day .tbox { touch-action: none; user-select: none; }
.cal-body.moving { cursor: grab; user-select: none; }
.ghost { position: fixed; z-index: 50; padding: 3px 8px; border-radius: 6px; background: var(--blue-dark); color: #fff; font-size: 12px; font-weight: 600;
         pointer-events: none; box-shadow: 0 4px 12px rgba(27, 35, 64, .3); white-space: nowrap; }
.blk .rs { position: absolute; left: 0; right: 0; height: 9px; z-index: 1; cursor: ns-resize; touch-action: none; }
.blk .rs.top { top: 0; }
.blk .rs.bot { bottom: 0; }
.blk .rs::after { content: ""; position: absolute; left: 50%; width: 16px; height: 3px; margin-left: -8px; border-radius: 2px; background: rgba(255, 255, 255, .55); }
.blk .rs.top::after { top: 2px; }
.blk .rs.bot::after { bottom: 2px; }
.blk .rs:hover::after { background: #fff; }
.blk.start.end .rs::after { display: none; }   /* a one-row block is too small for the marks; the edges still drag */
.cal-body.resizing { cursor: ns-resize; user-select: none; }
.blk .x { z-index: 2; position: absolute; top: 0; right: 0; width: 18px; height: 18px; padding: 0; border: 0; background: none;
         color: rgba(255, 255, 255, .75); font-size: 14px; line-height: 18px; cursor: pointer; }
.blk .x:hover { color: #fff; }
.blk.par .lbl { padding: 3px 0 0 3px; font-size: 9px; letter-spacing: -.2px; }

/* All-day view: whole days, a few weeks at once. */
.row.dayrow .tlabel { padding-top: 8px; border-top: 1px solid var(--line-soft); }
/* Touch screens: fingers need bigger targets. ROW_PX in create_poll.html must match the row height. */
@media (pointer: coarse) {
    .cell { height: 40px; }
    .blk .rs { height: 16px; }
    .blk.start.end .rs { height: 12px; }   /* a 30 minute block keeps 16px in the middle for moving */
    .blk .rs::after { width: 22px; height: 4px; margin-left: -11px; }
    .blk .rs.top::after { top: 4px; }
    .blk .rs.bot::after { bottom: 4px; }
    .blk .lbl { font-size: 12px; }
    .blk.par .lbl { font-size: 10px; }
    .blk .x { width: 28px; height: 28px; line-height: 28px; font-size: 18px; }
}
.cell.day { height: 84px; border-top: 1px solid var(--line-soft); }
.cell.day .dn { position: relative; display: block; padding: 7px 0 0 8px; font-size: 15px; color: var(--text-2); }
.cell.day.today .dn { color: var(--apricot-fg); font-weight: 700; }
.cell.day.sel .dn { color: #fff; }
/* Narrow phone cells: let the label wrap instead of running out of the day. */
.cell.day.sel .lbl { padding: 4px 4px 0 8px; font-size: 13px; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
/* A day that already has timed slots: marked, and left alone in this view. */
.cell.day .tbox { position: absolute; left: 3px; right: 3px; bottom: 5px; padding: 4px 3px; border-radius: 5px; background: var(--blue);
                  color: #fff; font-size: 11px; font-weight: 600; line-height: 1.2; text-align: center; overflow: hidden; }
.cell.day .cnt { position: absolute; top: 6px; right: 6px; padding: 1px 6px; border-radius: 999px; background: var(--apricot);
                 color: #fff; font-size: 11px; font-weight: 700; line-height: 1.4; }
.cell.day.other:not(.sel) .dn { color: var(--muted); }
.cell.day.off .dn { color: var(--faint); }
.cell.day.today.off .dn { color: var(--apricot-fg); }

.chosen { margin-top: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: var(--blue-pale); color: var(--blue);
        border: 1px solid var(--blue-line); border-radius: 999px; padding: 4px 4px 4px 12px; font-size: 13px;
        font-weight: 500; font-variant-numeric: tabular-nums; }
.chip button { border: 0; background: transparent; color: var(--blue); cursor: pointer; border-radius: 50%;
               width: 22px; height: 22px; font-size: 15px; line-height: 1; padding: 0; font-family: inherit; }
.chip button:hover { background: var(--blue-line); }
.warn { color: var(--red); font-size: 14px; margin-top: 10px; }

/* Create page: the submit button follows the tall calendar down the page. */
.submit-bar { position: sticky; bottom: 12px; z-index: 5; align-items: center; justify-content: space-between;
              gap: 12px; padding: 10px 10px 10px 18px; background: var(--surface); border: 1px solid var(--line);
              border-radius: var(--radius); box-shadow: 0 4px 16px rgba(27, 35, 64, .12); }
.bar-count { font-size: 14px; color: var(--text-2); }

.fallback label { display: block; margin-top: 12px; font-size: 13px; font-weight: 600; }

/* ---- phones ---- */

@media (max-width: 560px) {
    body { padding: 12px 12px 48px; }
    .card { padding: 20px 16px; }
    h1 { font-size: 20px; }
    .actions:not(.submit-bar) button { width: 100%; }
    .submit-bar button { padding: 11px 18px; }
    .hero { padding: 24px 20px 0; }
    .scene-wrap { margin-inline: -20px; }
        .copyrow .btn-secondary { padding: 8px 12px; }
}

/* ---- answer pages: calendar view of the same times (.ac-*) ---- */

.ac-switch { margin: 0 0 14px; }
.ac[hidden] { display: none; }
.ac-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.ac-range { font-size: 14px; font-weight: 600; }
.ac-bar .seg { margin-left: auto; }
.ac-grid { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; background: var(--surface); }
.ac-head, .ac-allday, .ac-body { display: grid; grid-template-columns: 44px repeat(7, minmax(0, 1fr)); }
.ac-head { border-bottom: 1px solid var(--line); }
.ac-dh { padding: 6px 0 8px; text-align: center; border-left: 1px solid var(--line-soft); }
.ac-dow { font-size: 10px; text-transform: uppercase; color: var(--muted); letter-spacing: .5px; }
.ac-dnum { font-size: 17px; color: var(--text-2); margin-top: 2px; }
.ac-tl { font-size: 10px; color: var(--muted); text-align: right; padding: 2px 6px 0 0; font-variant-numeric: tabular-nums; }
.ac-allday { border-bottom: 1px solid var(--line); }
.ac-allday .ac-tl { align-self: center; padding: 0 6px 0 0; }
.ac-ad { display: flex; flex-direction: column; gap: 2px; padding: 3px 2px; border-left: 1px solid var(--line-soft); min-width: 0; }
.ac-col { position: relative; border-left: 1px solid var(--line-soft);
    background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, #e8eaed 27px, #e8eaed 28px); }
.ac-blk, .ac-chip { box-sizing: border-box; border: 1px solid var(--blue-line); background: var(--blue-pale); color: var(--text-2);
    font: inherit; font-size: 11px; line-height: 1.25; text-align: left; border-radius: 5px; padding: 2px 4px; cursor: pointer;
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ac-blk { position: absolute; min-height: 18px; }
.ac-chip { display: block; width: 100%; margin-top: 2px; }
.ac-blk:hover, .ac-chip:hover { border-color: var(--blue); }
.ac-blk.on, .ac-chip.on { background: var(--blue); border-color: var(--blue); color: #fff; }
.ac-blk.on::before, .ac-chip.on::before { content: "\2713\00a0"; }
.ac-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ac-mh { text-align: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.ac-day { min-height: 76px; padding: 4px 3px; border-left: 1px solid var(--line-soft); border-top: 1px solid var(--line-soft); min-width: 0; }
.ac-day.out { background: var(--surface-2); }
.ac-dn { display: block; margin: 0 0 2px; padding: 0 4px; border: 0; background: none; font: inherit; font-size: 13px;
    color: var(--text-2); cursor: pointer; border-radius: 4px; }
.ac-dn:hover { background: var(--hover); }
.ac-hint { font-size: 12px; color: var(--muted); margin: 8px 0 0; }
@media (pointer: coarse) { .ac-blk, .ac-chip { min-height: 30px; } .ac-dn { min-height: 28px; min-width: 28px; } }
.check-row { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.check-row input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--blue); cursor: pointer; }
.field-hint { font-size: 12px; color: var(--muted); margin: 6px 0 0; }
.slot-row { flex-wrap: wrap; }
.slot-others { flex-basis: 100%; margin-left: 32px; font-size: 13px; color: var(--muted); }
.ac-blk.has:not(.on) { border-color: var(--green-br); background: var(--green-bg); }
.ac-chip.has:not(.on) { border-color: var(--green-br); background: var(--green-bg); }
.ac-n { opacity: .85; }
.ac-blk.narrow { padding: 2px 3px; }
.ac-blk.narrow .ac-n { display: block; }

/* ---- fuller type: larger, heavier, darker lines (overrides the values above) ----
   Calendar row heights and grid columns are left alone; the drag script depends on them. */
:root {
    --text: #121a38;
    --text-2: #2a3253;
    --muted: #4c5473;
    --faint: #8a90ac;
    --line: #c6c9e0;
    --line-soft: #d4d6e8;
    --line-input: #9096b8;
    --shadow: 0 1px 2px rgba(27, 35, 64, .08), 0 10px 28px rgba(43, 58, 122, .13);
}
body { font-size: 17px; line-height: 1.55; font-weight: 450; -webkit-font-smoothing: auto; }
.wrap { max-width: 780px; }
.wrap.wide { max-width: 1040px; }

.brand { font-size: 23px; }
#lang-select { font-size: 14px; font-weight: 700; border-width: 2px; padding: 6px 10px; }
.card { border-width: 2px; padding: 32px; }
h1 { font-size: 32px; }
h2 { font-size: 24px; }
.hero { border-width: 2px; }
.hero h1 { font-size: clamp(36px, 7vw, 58px); }
.hero p { font-size: 18px; }
.subtitle { font-size: 16px; }

.field-label { font-size: 15px; font-weight: 700; }
input[type="text"], input:not([type]),
input[type="email"], select, textarea {
    font-size: 17px; border-width: 2px; padding: 11px 13px; }
button[type="submit"], .btn-primary { font-size: 17px; font-weight: 700; padding: 13px 32px; }
.btn-secondary { font-size: 16px; font-weight: 700; border-width: 2px; padding: 8px 16px; }
.linkbox { border-width: 2px; }
.linkbox-head a { font-size: 15px; font-weight: 700; }
.copyrow input[type="text"] { font-size: 15px; }
.notice, .callout { font-size: 16px; border-width: 2px; }

.slot-day { font-size: 15px; }
.slot-row { border-width: 2px; }
.slot-time { font-size: 17px; font-weight: 600; }
.slot-others, .field-hint, .ac-hint { font-size: 14px; }

.table-scroll { border-width: 2px; }
.results thead th:first-child { font-size: 15px; font-weight: 700; }
.th-day { font-size: 14px; font-weight: 700; }
.th-time { font-size: 16px; font-weight: 700; }
.count { font-size: 14px; }
.badge { font-size: 12px; }
.results td.available, .results td.unavailable { font-size: 18px; }
button.finalize-btn { font-size: 15px; font-weight: 700; border-width: 2px; }
.empty { font-size: 16px; }

.dur, .dur-custom { font-size: 16px; font-weight: 600; border-width: 2px; padding: 7px 15px; }
#custom-min { font-size: 16px; border-width: 2px; }
.navbtn, #today-btn { border-width: 2px; font-weight: 700; }
#today-btn { font-size: 16px; }
.range { font-size: 16px; font-weight: 700; }
.seg { border-width: 2px; }
.seg button { font-size: 16px; font-weight: 600; }
.seg button + button { border-left-width: 2px; }
.tz { font-size: 13px; }

.calendar, .ac-grid { border-width: 2px; }
.dh .dow, .ac-dow { font-size: 12px; font-weight: 700; }
.dh .dnum { font-size: 21px; font-weight: 600; }
.ac-dnum { font-size: 19px; font-weight: 600; }
.tlabel { font-size: 12.5px; font-weight: 600; }
.ac-tl { font-size: 11.5px; font-weight: 600; }
.grip .gh { font-size: 14px; }
.grip .gl { font-size: 12.5px; font-weight: 600; }
.cell { border-top-color: #dfe1ee; }
.row.hour .cell, .row.hour .tlabel { border-top-color: #c3c6dc; }
.ac-col { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 27px, #c9cce2 27px, #c9cce2 28px); }
.cell.sel .lbl, .blk .lbl { font-size: 12px; font-weight: 700; }
.blk.par .lbl { font-size: 10.5px; }
.cell.day .dn { font-size: 17px; font-weight: 600; }
.cell.day .tbox { font-size: 12.5px; }
.cell.day .cnt { font-size: 12.5px; }
.ghost { font-size: 14px; }
.ac-blk, .ac-chip { font-size: 13px; font-weight: 600; border-width: 2px; }
.ac-dn { font-size: 15px; font-weight: 600; }
.ac-range { font-size: 16px; font-weight: 700; }

.chip { font-size: 15px; font-weight: 600; border-width: 2px; }
.warn, .bar-count { font-size: 16px; }
.submit-bar { border-width: 2px; }
.fallback label { font-size: 15px; }

/* The week arrows are text glyphs and stay thin whatever the weight; draw them instead. */
.navbtn { position: relative; width: 38px; height: 38px; font-size: 0; }
.navbtn::after { content: ""; position: absolute; inset: 0; background-color: currentColor;
    -webkit-mask: var(--arrow) center / 20px 20px no-repeat; mask: var(--arrow) center / 20px 20px no-repeat; }
#prev-week, #ac-prev {
    --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 12H4M10 5l-7 7 7 7'/%3E%3C/svg%3E"); }
#next-week, #ac-next {
    --arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 5l7 7-7 7'/%3E%3C/svg%3E"); }
#today-btn { height: 38px; }

@media (max-width: 560px) {
    .card { padding: 22px 16px; }
    h1 { font-size: 24px; }
    .cell.day.sel .lbl { font-size: 14px; }
}

/* ---- times suggested by invitees: apricot, against the organizer's blue ---- */
.ac-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 0 0 14px; }
.ac-top .ac-switch { margin: 0; }
.ac-addbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px; margin: 0 0 12px; padding: 10px 12px;
             background: var(--apricot-pale); border: 1px solid var(--apricot-line); border-radius: var(--radius-sm); }
.ac-addbar .field-label { margin: 0; }
.ac-addbar .btn-secondary { margin-left: auto; }
.ac.adding .ac-col:not(.off), .ac.adding .ac-ad { cursor: copy; }
.ac-col.off { background-image: repeating-linear-gradient(135deg, #f7f7fb 0 5px, #ecedf5 5px 6px); cursor: default; }
.ac-blk.sug:not(.on), .ac-chip.sug:not(.on) { border-color: var(--apricot-line); background: var(--apricot-pale); color: var(--apricot-fg); }
.ac-blk.sug.on, .ac-chip.sug.on { border-color: var(--apricot); background: var(--apricot); color: #3d1a02; }
.ac-new { margin-top: 14px; }
.chip.sug { background: var(--apricot-pale); border-color: var(--apricot-line); color: var(--apricot-fg); }
.chip.sug button { color: var(--apricot-fg); }
.chip.sug button:hover { background: var(--apricot-line); }
.slot-row.suggested { border-left: 4px solid var(--apricot); }
.slot-sug { margin-left: auto; font-size: 13px; font-weight: 600; color: var(--apricot-fg); }
.slot-remove { display: flex; align-items: center; gap: 8px; margin-left: auto; cursor: pointer; font-size: 14px; }
.slot-remove input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue); cursor: pointer; }
.th-sug { display: block; font-size: 12px; font-weight: 600; color: var(--apricot-fg); }
.results td.noanswer { color: var(--faint); font-size: 16px; }
.ac-addbar[hidden], .ac-new[hidden], .seg[hidden], .warn[hidden] { display: none; }
