/* Rune og Isabell's bryllup. Colours feed the Isabyte --isa-* tokens so the
   components and the hand-written parts share one palette. */
:root {
    --paper: #faf6f2;
    --surface: #ffffff;
    --ink: #33292b;
    --muted: #75686a;
    --rose: #7a5c61;
    --rose-dark: #5f464b;
    --line: #e6dcd6;
    --ok: #2f6b4a;
    --bad: #a3322b;

    --isa-color-primary: var(--rose);
    --isa-color-bg: var(--surface);
    --isa-color-text: var(--ink);
    --isa-color-border: var(--line);
    --isa-font-family: "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
}

h1, h2, h3, .brand, .date { font-family: Georgia, "Times New Roman", serif; font-weight: normal; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 1rem; }
h1:focus { outline: none; }
h2 { font-size: 1.35rem; margin: 2rem 0 .5rem; }
a { color: var(--rose-dark); }
.small { font-size: .875rem; color: var(--muted); margin: .25rem 0; }

.site-header {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem;
    padding: .9rem 1.25rem; background: var(--surface); border-bottom: 1px solid var(--line);
}
.brand { font-size: 1.35rem; color: var(--rose-dark); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; }
.site-nav a { color: var(--ink); text-decoration: none; padding: .2rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a.active { border-bottom-color: var(--rose); }
.site-main { max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem 3rem; }
.site-footer { text-align: center; color: var(--muted); padding: 1.5rem; font-size: .9rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.75rem; }
.narrow { max-width: 560px; margin-inline: auto; }
.prose { max-width: 720px; margin-inline: auto; }
.prose img { max-width: 100%; }

.hero { text-align: center; padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(2.4rem, 8vw, 4rem); margin: 0; color: var(--rose-dark); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; color: var(--muted); margin: 0 0 .5rem; }
.date { font-size: 1.3rem; margin: .5rem 0; }
.countdown { color: var(--muted); margin: 0; }
.invitation { text-align: center; }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1rem; margin-top: 2rem; }
.tile { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; text-decoration: none; color: var(--ink); }
.tile:hover { border-color: var(--rose); }
.tile h2 { margin: 0 0 .35rem; font-size: 1.2rem; color: var(--rose-dark); }
.tile p { margin: 0; color: var(--muted); font-size: .95rem; }

form label, .question label, .field label { display: block; font-weight: 600; margin: 1rem 0 .3rem; }
:where(.card form, .upload) input:where([type=text], [type=email], [type=number], [type=password]), input.code, textarea[readonly] {
    width: 100%; padding: .65rem .75rem; font: inherit; color: inherit;
    border: 1px solid #b9aaa5; border-radius: 6px; background: #fff;
}
input:focus-visible, textarea:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
    outline: 3px solid #c9a2a8; outline-offset: 2px;
}
input.code { font-size: 1.6rem; letter-spacing: .4em; text-align: center; }

button.primary, .upload-button.primary, a.button {
    display: inline-block; margin-top: 1.25rem; padding: .7rem 1.4rem; font: inherit; font-weight: 600; cursor: pointer;
    color: #fff; background: var(--rose); border: 0; border-radius: 6px; text-decoration: none;
}
button.primary:hover, .upload-button.primary:hover, a.button:hover { background: var(--rose-dark); }
button.plain { font: inherit; padding: .45rem .9rem; border: 1px solid #b9aaa5; border-radius: 6px; background: #fff; cursor: pointer; }

.notice { padding: .7rem .9rem; border-radius: 6px; background: #f3ebe6; border: 1px solid var(--line); }
.notice.error { background: #fbeceb; border-color: #e5b9b5; color: var(--bad); }
.notice.success { background: #e9f4ee; border-color: #b9d8c6; color: var(--ok); }
.notice.warning { background: #fff5dc; border-color: #ecd596; color: #6b5200; }

.question { margin-bottom: 1.25rem; }

.upload-button input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.upload-button:focus-within { outline: 3px solid #c9a2a8; outline-offset: 2px; }
.upload-summary { font-weight: 600; min-height: 1.6em; }
.upload-list { list-style: none; margin: 0; padding: 0; }
.upload-list li { display: grid; grid-template-columns: 1fr auto; gap: .15rem .75rem; padding: .5rem 0; border-top: 1px solid var(--line); font-size: .9rem; }
.upload-list .upload-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-list progress { grid-column: 1 / -1; width: 100%; height: .5rem; accent-color: var(--rose); }
.upload-list li.ok .upload-status { color: var(--ok); }
.upload-list li.failed .upload-status { color: var(--bad); }

/* Admin */
.admin-nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin-bottom: 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.admin-nav a { text-decoration: none; color: var(--ink); border-bottom: 2px solid transparent; }
.admin-nav a.active, .admin-nav a:hover { border-bottom-color: var(--rose); }
.row { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: end; }
.row > * { flex: 1 1 180px; }
.row > .fit { flex: 0 0 auto; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; align-items: center; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin: 1rem 0 1.5rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .9rem 1rem; }
.stat .value { font-size: 1.7rem; font-family: Georgia, serif; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stat .label { color: var(--muted); font-size: .85rem; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
table.data { border-collapse: collapse; width: 100%; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: .55rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { background: #f6efea; font-weight: 600; white-space: nowrap; }
table.data tr:last-child td { border-bottom: 0; }
table.data td.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: .05rem .5rem; border-radius: 999px; font-size: .8rem; background: #efe6e1; }
.tag.ok { background: #e2f1e8; color: var(--ok); }
.tag.bad { background: #fbe6e4; color: var(--bad); }
.tag.wait { background: #fff1cf; color: #6b5200; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.25rem; margin: .5rem 0 1rem; }
dl.facts dt { color: var(--muted); }
dl.facts dd { margin: 0; overflow-wrap: anywhere; }

/* QR poster */
.poster { text-align: center; background: #fff; padding: 2rem 1rem; }
.poster h1 { font-size: 2.6rem; color: var(--rose-dark); margin-bottom: .25rem; }
.poster .qr svg { width: min(70vw, 105mm); height: auto; }
.poster .lead { font-size: 1.3rem; margin: .5rem 0 1.5rem; }
.poster .url { font-size: .8rem; color: var(--muted); overflow-wrap: anywhere; }

#blazor-error-ui { display: none; position: fixed; inset: auto 0 0 0; padding: .7rem 1.25rem; background: #fff5dc; border-top: 1px solid #ecd596; z-index: 1000; }
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

@media print {
    .no-print { display: none !important; }
    html, body { background: #fff; }
    .site-main { padding: 0; max-width: none; }
    .poster { padding: 18mm 10mm 0; }
    .poster h1 { font-size: 34pt; }
    .poster .qr svg { width: 120mm; }
    .poster .lead { font-size: 18pt; }
    @page { size: A4 portrait; margin: 12mm; }
}

/* Front page, after the couple's planning.wedding site: white, airy, thin headings. */
:root { --rose: #814646; --rose-dark: #5e3232; --paper: #ffffff; --isa-color-primary: #814646; }
html, body { font-weight: 300; }
h1, h2, h3, .brand, .date { font-family: "Helvetica Neue", "Segoe UI", Arial, sans-serif; font-weight: 200; }
strong, b { font-weight: 600; }
.site-header { border-bottom: 0; }
.brand { font-weight: 400; letter-spacing: .02em; }
.site-nav { align-items: center; }
.site-nav a { font-size: .9rem; color: var(--rose); }
.site-nav a.rsvp-link, .outline-button {
    display: inline-block; padding: .45rem 1.1rem; border: 1px solid var(--rose); border-radius: 2px;
    color: var(--rose); text-decoration: none; font-size: .85rem; letter-spacing: .05em; background: transparent;
}
.site-nav a.rsvp-link:hover, .outline-button:hover { background: var(--rose); color: #fff; border-bottom-color: var(--rose); }
.site-main:has(.hero) { max-width: none; padding: 0 0 3rem; }
.hero {
    text-align: center; padding: clamp(3rem, 12vw, 8rem) 1.25rem; margin: 0;
    background: linear-gradient(160deg, #f1ebee 0%, #e4dbe2 55%, #d6d1d7 100%); background-size: cover; background-position: center;
}
.hero.with-photo { min-height: min(70vh, 620px); display: grid; align-items: center; }
.hero.with-photo .hero-text { background: rgba(255, 255, 255, .78); padding: 1.5rem 2rem; justify-self: center; border-radius: 2px; }
.hero h1 { font-size: clamp(2.6rem, 9vw, 4.5rem); color: var(--ink); margin: .25rem 0 0; font-weight: 200; }
.hero-date { font-size: 1.5rem; margin: 0; }
.hero-lead { font-size: 1.15rem; margin: .4rem 0 0; color: var(--muted); }
.band { max-width: 1000px; margin: 0 auto; padding: 3rem 1.25rem 1rem; scroll-margin-top: 1rem; }
.section-title { font-size: 1.5rem; font-weight: 600; margin: 0 0 1.5rem; }
.band .prose { margin-inline: 0; max-width: 760px; }
.events { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; }
.event { text-align: center; padding: 2rem 1rem; border: 1px solid var(--line); border-radius: 2px; }
.event h3 { font-size: 2rem; margin: 0 0 1rem; }
.event-date, .event-time { font-size: 1.35rem; margin: 0; }
.event-address { color: var(--muted); font-size: .9rem; margin: .75rem 0; }
.event-links { display: flex; flex-direction: column; gap: .15rem; font-size: .9rem; margin: 0 0 1rem; }
.event-links a { color: var(--rose); }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 2rem; align-items: center; }
.palette { display: flex; gap: .75rem; justify-content: center; }
.palette span { width: 4.2rem; height: 4.2rem; border-radius: 50%; }
.countdown-band { text-align: center; padding: 3rem 1.25rem 1rem; }
.countdown-band .countdown { font-size: clamp(2rem, 7vw, 3.2rem); font-weight: 200; color: var(--ink); margin: 0 0 .5rem; }
fieldset.person { border: 1px solid var(--line); border-radius: 6px; padding: .5rem 1rem 1rem; margin: 0 0 1.25rem; }
fieldset.person legend { font-weight: 600; padding: 0 .4rem; }
.admin-login { margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
details { margin: 1rem 0; }
details summary { cursor: pointer; color: var(--rose); }

/* Table planner. Lengths inside the SVG are millimetres. */
.plan { max-width: 780px; margin: 0 auto; }
.plan-svg { width: 100%; height: auto; touch-action: none; user-select: none; background: #f4f1ee; border: 1px solid var(--line); border-radius: 4px; }
.plan-floor { fill: #fffdf9; }
.plan-grid line { stroke: #e3dcd5; stroke-width: 12; }
.plan-wall { fill: none; stroke: #4a4244; stroke-width: 90; stroke-linejoin: miter; }
.plan-door { stroke: #fffdf9; stroke-width: 110; }
.plan-fixed { fill: #b08a66; stroke: #6d5138; stroke-width: 25; }
.plan-fixed-label, .plan-table-label { font: 600 260px "Helvetica Neue", Arial, sans-serif; fill: #2a2224; pointer-events: none; }
.plan-fixed-label { fill: #fff; }
.plan-note { font: 400 200px "Helvetica Neue", Arial, sans-serif; fill: #6a5d60; dominant-baseline: middle; }
.plan-scale { stroke: #4a4244; stroke-width: 40; }
.plan-table { cursor: grab; outline: none; }
.plan-table rect { fill: #e9e4ea; stroke: #6f6470; stroke-width: 25; }
.plan-table.parked rect { fill: #f3f0f4; stroke-dasharray: 90 60; }
.plan-table.bad rect { fill: #f6c9c5; stroke: #a3322b; stroke-width: 45; }
.plan-table.selected rect, .plan-table:focus-visible rect { stroke: #814646; stroke-width: 70; }
.plan-table:active { cursor: grabbing; }
.plan-status { min-height: 1.6em; font-weight: 600; }
.plan-status.warn { color: var(--bad); }
@media print { .plan { max-width: none; } .plan-svg { border: 0; background: #fff; max-height: 250mm; } }
.plan-table.fixed { cursor: default; }

/* Login page with a background picture (only when an admin has uploaded one). The picture
   is fixed behind everything; body goes transparent so it shows through. */
.login-backdrop { position: fixed; inset: 0; z-index: -1; background-size: cover; background-position: 58% 45%; }
/* The white wash; --wash (0 to .9) comes from Admin → Innhold. */
.login-backdrop::after { content: ""; position: absolute; inset: 0; background: #fff; opacity: var(--wash, .35); }
body:has(.login-backdrop) { background: transparent; }
body:has(.login-backdrop) .site-header { background: transparent; border-bottom: 0; }
body:has(.login-backdrop) .brand, body:has(.login-backdrop) .site-footer { color: var(--ink); text-shadow: 0 0 10px #fff, 0 0 3px #fff; }
.site-main:has(.login-backdrop) { max-width: none; min-height: calc(100vh - 9rem); min-height: calc(100dvh - 9rem); display: flex; align-items: flex-end; justify-content: center; padding: 1rem 1rem 2rem; }
.login-card.card:is(.login-backdrop ~ *) {
    width: 100%; max-width: 440px; margin: 0; border: 0; border-radius: 12px;
    background: rgba(255, 255, 255, .93); box-shadow: 0 18px 50px rgba(30, 20, 22, .35);
}
@supports (backdrop-filter: blur(8px)) {
    .login-card.card:is(.login-backdrop ~ *) { background: rgba(255, 255, 255, .84); backdrop-filter: blur(10px); }
}
.login-card .eyebrow { margin-bottom: .35rem; }
.login-card h1 { font-size: 2.2rem; color: var(--rose-dark); }
.login-card .submit .isabyte-button { width: 100%; justify-content: center; }
/* Wide screens: the form sits to the right so the villa and the tree stay in view. */
@media (min-width: 900px) {
    .site-main:has(.login-backdrop) { align-items: center; justify-content: flex-end; padding-right: clamp(2rem, 8vw, 9rem); }
    .login-backdrop { background-position: 38% 45%; }
}

/* Isabyte components inside the hand-written forms. */
.static-field { display: block; }
.static-field .isabyte-text-input-wrapper, .static-field .isabyte-text-input { width: 100%; }
.submit { margin-top: 1.25rem; }
.upload-button { position: relative; display: inline-block; margin-top: 1rem; }

/* Guest list, family view: a shaded row per family with its people indented underneath. */
.view-switch { gap: .4rem; }
tr:has(.family-head) { background: #f3ebe6; }
.family-member { display: inline-block; padding-left: 1.5rem; }

/* Reply to the invitation: one line per person with a switch, the name and an address field. */
.invitation-card { display: block; width: 100%; height: auto; border-radius: 8px; margin: 0 0 1.25rem; }
form.reply { text-align: left; margin-top: 1.25rem; }
.reply-person { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: .35rem .9rem; padding: .8rem 0; border-top: 1px solid var(--line); }
.reply-person:last-of-type { border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.reply-name { font-weight: 600; }
.reply-email { grid-column: 2; overflow-wrap: anywhere; }
.reply-switch { display: inline-flex; }
.invitation .submit .isabyte-button { width: 100%; justify-content: center; }

/* Travel guide: a sketch map with a travelling marker, and one step of the journey at a time. */
.tour-title { font-size: 1.2rem; font-weight: 600; margin: 2rem 0 1rem; }
.tour-stage { display: grid; gap: 1.25rem; grid-template-columns: 1fr; align-items: start; margin-top: 1rem; }
.tour-panel { max-width: 760px; }
.tour-facts { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .75rem !important; }
.tour-facts span { background: #f3ebe6; border-radius: 999px; padding: .15rem .7rem; font-size: .85rem; }
.tour-facts span:first-child { background: var(--rose); color: #fff; }
.tour-place.here circle { stroke: var(--rose); stroke-width: 4; }
.tour-place.party.here circle { stroke: var(--ink); }
.tour-times .tag, .tour-times td:first-child { white-space: nowrap; }
@media (max-width: 700px) { .tour-place text { font-size: 18px; } .tour-place text.sub, .tour-place.small text { font-size: 15px; } }
.tour-map-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; scrollbar-width: thin; }
.tour-map { width: 100%; min-width: 680px; height: auto; display: block; }
.tour-river { fill: none; stroke: #cfe0e6; stroke-width: 16; stroke-linecap: round; opacity: .7; }
.tour-hills path { fill: #dfe6d6; opacity: .7; }
.tour-lines path { fill: none; stroke: #cbbfb8; stroke-width: 4; stroke-linecap: round; }
.tour-lines path.walk, .tour-segments path.walk { stroke-dasharray: 2 9; stroke-width: 4; }
.tour-segments path { fill: none; stroke: var(--rose); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.tour-segments path.active { opacity: 1; }
.tour-place circle { fill: #fff; stroke: #8d7f7a; stroke-width: 2.5; }
.tour-place .icon { fill: none; stroke: #5b4d4a; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tour-place text { font: 600 15px "Helvetica Neue", Arial, sans-serif; fill: var(--ink); paint-order: stroke; stroke: #f4eeea; stroke-width: 4px; stroke-linejoin: round; }
.tour-place text.sub { font-weight: 400; font-size: 13px; fill: var(--muted); }
.tour-place.small circle { stroke-width: 2; }
.tour-place.small text { font-size: 13px; font-weight: 400; }
.tour-place.party circle { fill: var(--rose); stroke: #fff; }
.tour-place.party .icon { stroke: #fff; }
.tour-marker { pointer-events: none; }
.tour-marker .body { fill: var(--ink); stroke: #fff; stroke-width: 2.5; }
.tour-marker .halo { fill: var(--rose); opacity: .22; transform-origin: center; transform-box: fill-box; animation: tour-pulse 2.2s ease-in-out infinite; }
.tour-marker .glyph { display: none; fill: none; stroke: #fff; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.tour-marker[data-mode=tog] .glyph-tog, .tour-marker[data-mode=buss] .glyph-buss, .tour-marker[data-mode=gange] .glyph-gange,
.tour-marker:not([data-mode]) .glyph-tog { display: inline; }
@keyframes tour-pulse { 0%, 100% { transform: scale(.75); opacity: .28; } 50% { transform: scale(1.25); opacity: .1; } }
@media (prefers-reduced-motion: reduce) { .tour-marker .halo { animation: none; } }

.tour[data-route=tog] .tour-only-buss, .tour[data-route=buss] .tour-only-tog { display: none; }
.tour-steps { list-style: none; margin: 0; padding: 0; }
.tour-step { border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem 1.25rem; margin: 0 0 1rem; background: var(--surface); }
.tour-step h3 { margin: 0 0 .6rem; font-size: 1.2rem; font-weight: 600; color: var(--rose-dark); }
.tour-step p, .tour-step ul { margin: .5rem 0; }
.tour-step ul { padding-left: 1.2rem; }
.tour-live .tour-step { display: none; margin: 0; }
.tour-live .tour-step.active { display: block; animation: tour-in .35s ease-out; }
@keyframes tour-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .tour-live .tour-step.active { animation: none; } }
.tour-aside { background: #f6efea; border-radius: 8px; padding: .75rem 1rem; margin-top: .75rem; }
.tour-aside p { margin: .35rem 0; }
.tour-times { width: 100%; border-collapse: collapse; margin: .75rem 0; font-size: .95rem; }
.tour-times th { text-align: left; font-weight: 600; font-size: .8rem; color: var(--muted); padding: .2rem .5rem .35rem 0; border-bottom: 1px solid var(--line); }
.tour-times td { padding: .4rem .5rem .4rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tour-times tr.pick td { background: #eef6f1; }
.tour-times tr.pick td:first-child { box-shadow: inset 3px 0 0 var(--ok); padding-left: .5rem; }
.tour-controls { display: none; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1rem; }
.tour-live .tour-controls { display: flex; }
.tour-count { color: var(--muted); font-size: .9rem; }
.tour-off { visibility: hidden; }
.tour-source { margin-top: 1rem; max-width: 760px; }
.tour-stage > * { min-width: 0; }
.tour-times { table-layout: auto; }
@media (max-width: 500px) { .tour-step { padding: .9rem .9rem; } .tour-times { font-size: .88rem; } }

.tour-min rect { fill: #fff; stroke: #cbbfb8; stroke-width: 1.5; }
.tour-min text { font: 600 13px "Helvetica Neue", Arial, sans-serif; fill: var(--ink); text-anchor: middle; }
.tour-min.walk rect { stroke-dasharray: 3 3; }
.tour-tools { margin-top: 1.5rem; max-width: 760px; }
.tour-tool { border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.25rem; margin-top: .75rem; background: var(--surface); }
.tour-live .tour-tool { display: none; }
.tour-live .tour-tool.open { display: block; animation: tour-in .35s ease-out; }
.tour:not(.tour-live) .tour-tools > .actions { display: none; }
.tour-tool h3 { margin: 0 0 .5rem; font-size: 1.1rem; font-weight: 600; }
.tour-tool h4 { margin: 1rem 0 .4rem; font-size: 1rem; font-weight: 600; }
.tour-links, .tour-apps, .tour-next-list { list-style: none; margin: 0; padding: 0; }
.tour-links li, .tour-apps li, .tour-next-list li { padding: .55rem 0; border-top: 1px solid var(--line); }
.tour-apps li { display: grid; gap: .15rem; }
.tour-stores { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.tour-next-result { margin-top: .75rem; }

.card + .card { margin-top: 1.5rem; }
.asked { border-top: 1px solid var(--line); padding-top: .6rem; margin: .6rem 0 0; white-space: pre-wrap; }

/* ---- Phones ---- */
.menu-toggle { display: none; }
@media (max-width: 760px) {
    /* Header: name and a menu button on one line; the menu opens underneath. */
    .site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; padding: .6rem 1rem; }
    .menu-toggle { display: inline-flex; }
    .site-nav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 0; padding: .25rem 0 .5rem; }
    .site-header.menu-open .site-nav { display: flex; }
    .site-nav a { padding: .8rem .25rem; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
    .site-nav a.rsvp-link { margin-top: .75rem; text-align: center; padding: .8rem 1rem; border: 1px solid var(--rose); font-size: 1rem; }
    body:has(.login-backdrop) .menu-toggle { display: none; }

    .site-main { padding: 1.25rem 1rem 2.5rem; }
    .card { padding: 1.25rem 1rem; }
    h1 { font-size: 1.7rem; }

    /* Admin menu: one line that scrolls sideways instead of wrapping into several. */
    .admin-nav { flex-wrap: nowrap; overflow-x: auto; gap: 1.1rem; margin: 0 -1rem 1.25rem; padding: 0 1rem .6rem; scrollbar-width: none; }
    .admin-nav::-webkit-scrollbar { display: none; }
    .admin-nav a { white-space: nowrap; padding: .35rem 0; }

    /* Buttons in a row: full width and easy to hit. */
    .actions { display: flex; flex-wrap: wrap; gap: .5rem; }
    .actions .isabyte-button { min-height: 44px; }
    .row { gap: .25rem 1rem; }
    .row > * { flex-basis: 100%; }
    .row > .fit { flex: 1 1 100%; }

    /* Tables: every row becomes a card, each value on its own line with the column's heading in front. */
    .isabyte-grid-table thead { display: none; }
    .isabyte-grid-table, .isabyte-grid-table tbody, .isabyte-grid-table tr, .isabyte-grid-table td { display: block; width: auto !important; min-width: 0 !important; }
    .isabyte-grid-table tr { padding: .7rem .85rem; border-bottom: 1px solid var(--line); }
    .isabyte-grid-table td { padding: .12rem 0 !important; border: 0 !important; overflow-wrap: anywhere; }
    .isabyte-grid-table td.cell-empty { display: none; }
    .isabyte-grid-table td[data-label]:not([data-label=""])::before { content: attr(data-label) ": "; color: var(--muted); font-size: .8rem; }
    .isabyte-grid-table td:first-child { font-weight: 600; font-size: 1.02rem; }
    .isabyte-grid-table td:first-child::before { content: none !important; }
    .isabyte-grid-table td .isabyte-button, .isabyte-grid-table td isabyte-button { margin: .35rem .35rem 0 0; }
    .isabyte-grid-table tr:has(.family-head) td:first-child { font-size: 1.1rem; }
    .family-member { padding-left: 0; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    dl.facts { grid-template-columns: 1fr; }
    dl.facts dt { margin-top: .5rem; }

    .hero.with-photo { min-height: 46vh; }
    .hero.with-photo .hero-text { padding: 1rem 1.25rem; }
    .band { padding: 2rem 1rem .5rem; }
    .event { padding: 1.25rem .75rem; }
    .palette span { width: 3.2rem; height: 3.2rem; }
    input, textarea, select { font-size: 16px; } /* smaller text makes iPhones zoom in on focus */
}
