/* Nyår på Madeira: the parts with a life of their own.
   The sunburst, the countdown, the bottom bar, the day plan and its date strip, the boarding
   pass, the people circles, the phone buttons and the enlarged photo. Everything else
   (colours, letters, cards, forms, buttons, the tile itself) lives in style.css. */

/* ── The sunburst (drawn by sun() in app.js, in the current text colour) ── */
.sun { display: inline-block; flex: none; stroke-width: 2.6; overflow: visible; }
.sun-kicker { width: 1.55em; height: 1.55em; stroke-width: 3.6; color: var(--gold-bright); vertical-align: -0.42em; margin-right: .45em; }
.sun-foot { width: 26px; height: 26px; stroke-width: 2.4; color: var(--gold-bright); opacity: .75; }
.foot-sun { display: flex; justify-content: center; margin: 28px 0 -4px; }
.sun-load { width: 1.25em; height: 1.25em; stroke-width: 3.4; color: var(--gold-bright); vertical-align: -0.28em; margin-right: .5em;
  animation: sun-turn 9s linear infinite; }
@keyframes sun-turn { to { transform: rotate(360deg); } }
.sun-happy { width: 2.4rem; height: 2.4rem; stroke-width: 2.8; color: var(--gold-bright); }

/* ── Countdown: four glazed number tiles ── */
.countdown-wrap { margin-top: 22px; }
.countdown { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 2.6vw, 14px); max-width: 440px; }
.countdown .cell { display: flex; flex-direction: column; align-items: center; min-width: 0; }
.count-tile { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1 / 1.08; overflow: hidden; }
.count-tile.tappable { cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .15s ease; }
.count-tile.tappable:active { transform: scale(.96); }
.countdown .n { display: inline-block; font-family: var(--serif); font-size: clamp(2.1rem, 10.5vw, 3.1rem); line-height: 1;
  font-variant-numeric: lining-nums tabular-nums; letter-spacing: -.01em; }
.countdown .u { font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.countdown-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; max-width: 440px; }
.countdown-label { color: var(--muted); font-size: .92rem; margin: 0; flex: 1; }

/* The round gold fireworks button */
.fx-btn { flex: none; width: 46px; height: 46px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer; color: #6b4d0c; border: 1px solid rgba(138, 103, 24, .55);
  background: radial-gradient(circle at 35% 30%, #fbecc0, #e8c977 55%, #c8a13f);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 2px 8px rgba(138, 103, 24, .28);
  -webkit-tap-highlight-color: transparent; transition: transform .15s ease, box-shadow .15s ease; }
.fx-btn:active { transform: scale(.94); }
.fx-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.locked-card .fx-btn:focus-visible { outline-color: #f3d98f; }
.sun-btn { width: 30px; height: 30px; stroke-width: 3; transition: transform .6s ease; }

/* At midnight */
.happy-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
.happy { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(2.6rem, 11vw, 3.8rem); line-height: 1.05;
  color: var(--gold); margin: 0; text-wrap: balance; }

/* On the cover page the tiles sit on the dark glass panel: the words under them go light */
.locked-card .u, .locked-card .countdown-label { color: rgba(255, 255, 255, .86); }
.locked-card .happy { color: #f3d98f; }

/* ── The bottom bar ── */
#tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; justify-content: center; align-items: stretch; gap: 4px;
  box-sizing: border-box; height: calc(var(--tabs-h) + env(safe-area-inset-bottom));
  padding: 5px 8px calc(5px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line); view-transition-name: tabs; }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  #tabs { background: color-mix(in srgb, var(--paper) 96%, transparent);
    -webkit-backdrop-filter: saturate(1.5) blur(18px); backdrop-filter: saturate(1.5) blur(18px); }
}
#tabs[hidden] { display: none; }
.tab { flex: 1; max-width: 140px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 44px; color: var(--muted); text-decoration: none; font-size: .72rem; font-weight: 600; letter-spacing: .02em;
  -webkit-tap-highlight-color: transparent; border-radius: 14px; }
.tab-ico { display: flex; align-items: center; justify-content: center; width: 58px; height: 30px; border-radius: 999px;
  transition: background-color .2s ease, color .2s ease; }
.tab .icon { width: 23px; height: 23px; }
.tab.on { color: var(--accent); }
.tab.on .tab-ico { background: var(--accent-soft); }
.tab:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

@media (min-width: 760px) {
  #tabs { left: 50%; right: auto; transform: translateX(-50%); bottom: calc(8px + env(safe-area-inset-bottom));
    height: calc(var(--tabs-h) - 8px); padding: 5px; gap: 2px; border: 1px solid var(--line); border-radius: 999px;
    box-shadow: 0 10px 30px rgba(20, 30, 25, .14), 0 1px 3px rgba(20, 30, 25, .08); }
  .tab { flex: 0 0 auto; width: 100px; border-radius: 999px; }
}

/* Changing page: a short cross-fade where the browser does it by itself */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

/* ── The day plan ── */
/* The strip of date tiles on top; it scrolls sideways inside itself when there are many days */
/* 38px and a 3px gap: the trip's eight days fit side by side from a 360px phone up. With more days the strip
   scrolls sideways inside itself, and dateStrip() slides today's tile into view. */
.day-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(38px, 74px); gap: 3px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; margin: 0 0 18px; padding: 3px 1px 5px; }
.day-strip::-webkit-scrollbar { display: none; }
.day-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 54px; padding: 0; border: 0; -webkit-appearance: none; appearance: none;
  font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: transform .12s ease; }
.day-chip:active { transform: scale(.95); }
.day-chip .wd { font-size: .56rem; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; opacity: .8; }
.day-chip .dn { font-family: var(--serif); font-size: 1.3rem; line-height: 1.05; font-variant-numeric: lining-nums; }
/* Past days lose their colour, not their strength: grey ink stays easy to read */
.day-chip.past { filter: grayscale(.85); opacity: .85; }
.day-chip.past:focus-visible { filter: none; opacity: 1; } /* a focused past day shows in full colour, with the usual green ring */
.day-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: -4px; }

/* Each day: the date as a tile on the left, joined to the next by a thin line like a timeline */
.days { list-style: none; padding: 0; margin: 0; }
.day { position: relative; display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 16px; padding: 12px 0 18px;
  scroll-margin-top: 14px; }
.day::before { content: ""; position: absolute; left: 26px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.day:first-child { padding-top: 0; }
.day:first-child::before { top: 30px; }
.day:last-child { padding-bottom: 0; }
.day:last-child::before { bottom: auto; height: 42px; }
.day:first-child:last-child::before { display: none; }
.day-date { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center;
  align-self: start; padding: 7px 0 6px; }
.day-date .wd { font-size: .6rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.day-date .dn { font-family: var(--serif); font-size: 1.75rem; line-height: 1; margin: 2px 0 1px; font-variant-numeric: lining-nums; }
.day-date .mon { font-size: .66rem; opacity: .8; }
.day-body { padding-top: 4px; min-width: 0; }
.day-title { font-size: 1.1rem; margin: 0 0 4px; overflow-wrap: anywhere; }
.day-title.muted { font-weight: 500; }
.day-text { color: var(--muted); margin: 0 0 6px; }
.day-body > .extra:first-child, .day-body > .sr + .extra { margin-top: 2px; }
.day.past .day-date { filter: grayscale(.85); opacity: .85; }
.day.past .day-title { color: var(--muted); }
.day-chip.past .wd, .day.past .day-date .wd, .day.past .day-date .mon { opacity: 1; } /* the small words at full strength on grey */
.day.highlight .day-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 1.4rem; line-height: 1.2; }
.today-tag { display: inline-block; font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 3px 9px; margin-bottom: 6px; }
.days-card h2 { margin-bottom: 16px; }

/* The "today" card during the trip: today's page of a desk calendar */
.today-card { border: 1.5px solid var(--accent); }
.today-card.highlight { border-color: var(--gold-bright); background: linear-gradient(170deg, rgba(232, 201, 119, .16), transparent 55%), var(--card); }
.today-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; margin-bottom: 10px; }
.today-leaf { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 76px; padding: 9px 0 8px; }
.today-leaf .wd { font-size: .64rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.today-leaf .dn { font-family: var(--serif); font-size: 2.6rem; line-height: 1; margin: 3px 0 2px; font-variant-numeric: lining-nums; }
.today-leaf .mon { font-size: .72rem; }
.today-words .kicker { margin-bottom: 4px; }
.today-card .day-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(1.5rem, 6vw, 2.2rem); line-height: 1.12; margin: 0; }
.today-card .countdown-wrap { margin-top: 18px; }
.next { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }

/* ── The boarding pass: paper, so it stays cream in dark mode too ── */
.pass-slot:empty { display: none; }
.pass { --pass-paper: #fbf6e6; --pass-ink: #1b1e1c; --pass-quiet: #6f6853; --pass-green: #1f5b46;
  position: relative; max-width: 520px; margin: 0 auto 18px; color: var(--pass-ink); background: var(--pass-paper);
  border-radius: 16px; box-shadow: 0 1px 2px rgba(40, 30, 10, .12), 0 10px 28px rgba(40, 30, 10, .14); overflow: hidden; }
.pass-band { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 18px;
  background: var(--pass-green); color: #f3efe2; }
.pass-title { margin: 0; font-family: var(--sans); font-size: .78rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: inherit; }
.sun-pass { width: 26px; height: 26px; stroke-width: 3; color: #e8c977; }
.pass-main { padding: 14px 18px 16px; }
.pass-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.pass-code { font-family: var(--serif); font-size: clamp(3.4rem, 17vw, 4.6rem); line-height: .9; letter-spacing: .02em; color: var(--pass-green); }
.pass-left { margin: 0 0 6px; padding: 5px 11px; border-radius: 999px; background: #e8c977; color: #3d2c05;
  font-size: .8rem; font-weight: 700; white-space: nowrap; }
.pass-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin: 0; }
.pass-field { min-width: 0; }
.pass-field.wide { grid-column: 1 / -1; }
.pass-field dt { font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--pass-quiet); }
.pass-field dd { margin: 1px 0 0; font-size: 1.02rem; font-weight: 600; overflow-wrap: break-word; }
/* On a narrow phone the room gets its own row, so its name is never split mid-word */
@media (max-width: 374px) { .pass-field.room { grid-column: 1 / -1; } }
.pass-field.wide:first-child dd { font-family: var(--serif); font-size: 1.35rem; font-weight: 400; }
/* The perforation, with a half-round bite out of each edge in the page's colour */
.pass-tear { position: relative; height: 0; margin: 0 18px; border-top: 2px dashed rgba(60, 50, 30, .28); }
.pass-tear::before, .pass-tear::after { content: ""; position: absolute; top: -13px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--paper); box-shadow: inset 0 1px 4px rgba(40, 30, 10, .22); }
.pass-tear::before { left: -30px; }
.pass-tear::after { right: -30px; }
.pass-stub { padding: 14px 18px 16px; }
.barcode { display: flex; align-items: stretch; height: 38px; overflow: hidden; }
.barcode .bar { flex: none; background: var(--pass-ink); }
.bar.w1 { width: 1px; } .bar.w2 { width: 2px; } .bar.w3 { width: 3px; } .bar.w4 { width: 5px; }
.bar.g1 { margin-right: 2px; } .bar.g2 { margin-right: 4px; }

/* ── People as circles ── */
.face { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 34px; height: 34px; border-radius: 50%;
  color: #fff; font-size: .95rem; font-weight: 700; line-height: 1; letter-spacing: 0; }
.face-c0 { background: #1f5b46; } .face-c1 { background: #a9832c; } .face-c2 { background: #b5532f; }
.face-c3 { background: #2f6f8f; } .face-c4 { background: #7a4a6b; } .face-c5 { background: #6b7a3a; }
.face-me { box-shadow: 0 0 0 2px var(--card), 0 0 0 4px var(--gold-bright); }
.who-group { margin: 0 0 16px; }
.who-head { margin: 0 0 10px; font-size: 1rem; }
.who-faces { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 16px; }
.who-person { display: inline-flex; align-items: center; gap: 8px; }

/* ── Phone numbers as buttons ── */
.phone-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.phone-pill { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--accent-soft); color: var(--accent); text-decoration: none; line-height: 1.2;
  -webkit-tap-highlight-color: transparent; }
.phone-pill:active { transform: translateY(1px); }
.phone-name { font-weight: 700; }
.phone-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ── The enlarged photo ── */
.lb-open, .lb-open body { overflow: hidden; }
.lightbox { padding: 0; margin: 0; border: 0; background: transparent; width: 100vw; height: 100vh; height: 100dvh;
  max-width: none; max-height: none; overflow: hidden; color: #fff; }
.lightbox::backdrop { background: rgba(8, 12, 11, .88); }
.lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 64px calc(12px + env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
  box-sizing: border-box; }
.lb-mat { margin: 0; padding: 10px 10px 8px; background: #fbf6e6; border-radius: 8px; max-width: 100%; max-height: 100%;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45); display: flex; flex-direction: column; box-sizing: border-box; }
.lb-mat img { display: block; width: auto; height: auto; max-width: min(100%, 92vw); max-height: calc(100vh - 160px);
  max-height: calc(100dvh - 160px); object-fit: contain; border-radius: 3px; margin: 0 auto; }
.lb-caption { display: flex; justify-content: space-between; gap: 12px; padding: 8px 4px 0; color: #4c4636; font-size: .85rem; }
.lb-count { font-variant-numeric: tabular-nums; white-space: nowrap; color: #6f6853; }
.lb-btn { position: absolute; z-index: 2; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  padding: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-tap-highlight-color: transparent; }
.lb-btn:focus-visible { outline: 2px solid #e8c977; outline-offset: 2px; }
.lb-btn .icon { width: 22px; height: 22px; }
.lb-close { top: calc(10px + env(safe-area-inset-top)); right: calc(12px + env(safe-area-inset-right)); }
.lb-prev, .lb-next { top: 50%; margin-top: -23px; }
.lb-prev { left: calc(10px + env(safe-area-inset-left)); }
.lb-next { right: calc(10px + env(safe-area-inset-right)); }
@media (max-width: 600px) {
  /* On a phone the arrows sit under the photo, out of its way */
  .lb-prev, .lb-next { top: auto; margin-top: 0; bottom: calc(14px + env(safe-area-inset-bottom)); }
  .lb-prev { left: calc(50% - 58px); }
  .lb-next { right: calc(50% - 58px); }
  .lightbox:has(.lb-prev) .lb-stage { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

/* ── Hover looks, only where there is a mouse (on a phone they would stick after a tap) ── */
@media (hover: hover) {
  .fx-btn:hover { box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 4px 14px rgba(138, 103, 24, .4); }
  .fx-btn:hover .sun-btn { transform: rotate(45deg); }
  .tab:not(.on):hover { color: var(--ink); }
  .lb-btn:hover { background: rgba(255, 255, 255, .24); }
}

/* ── The chat (the Chatt tab) ── */
.chat-head > p:last-of-type { margin-bottom: 0; }
.chat-off { margin: 14px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); }
.chat-cost { margin: 12px 0 0; }
.chat-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.chat-list:focus { outline: none; } /* it takes the focus after "Ta bort" so the focus is not lost; nothing to show */
.chat-empty { margin: 0; }
/* One message: a soft bubble; your own on the right in pale green, the agent's with its gold name */
.msg { max-width: 92%; align-self: flex-start; padding: 10px 14px 12px; border-radius: 16px;
  background: var(--paper); border: 1px solid var(--line); overflow-wrap: anywhere; }
.msg.mine { align-self: flex-end; background: var(--accent-soft); border-color: transparent; }
.msg.note { align-self: center; max-width: 100%; padding: 0 8px; background: none; border: 0;
  color: var(--muted); font-size: .875rem; font-style: italic; text-align: center; }
.msg.note p { margin: 0; }
.msg-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; margin-bottom: 3px; }
.msg-who { font-weight: 700; color: var(--ink); }
.msg.agent .msg-who { color: var(--gold); }
.msg.note .msg-who { color: inherit; font-weight: 600; }
.msg-when { color: var(--muted); }
/* "Ta bort": small letters, but a full-size place to tap */
.msg-del { margin: -12px -8px -12px auto; padding: 0 8px; min-height: 44px; }
/* On a note, "Ta bort" sits centred under the line, in the same quiet style. */
.msg.note .msg-del { display: flex; margin: -4px auto -10px; font-style: normal; }
.sun-msg { width: 15px; height: 15px; stroke-width: 3.6; color: var(--gold-bright); }
.msg-body p { margin: 0 0 8px; }
.msg-body > :last-child { margin-bottom: 0; }
.chat-ul { margin: 0 0 8px; padding-left: 1.2em; }
.chat-ul li { margin: 2px 0; }
.chat-url { overflow-wrap: anywhere; }
.msg-src { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); font-size: .875rem; }
.msg-src-h { margin: 0 0 2px; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.msg-src ul { margin: 0; padding-left: 1.1em; }
.msg-src li { margin: 3px 0; overflow-wrap: anywhere; }
.chat-busy { display: flex; align-items: center; color: var(--muted); margin: 14px 0 0; }
.chat-busy[hidden] { display: none; }
/* The writing box stays in reach: it sticks just above the bottom bar, and above the screen
   keyboard when one is open (app.js measures how much the keyboard hides: --chat-kb) */
.chat-form { position: sticky; z-index: 5; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 8px);
  margin: 16px 0 0; padding: 12px 0 2px; background: var(--card); box-shadow: 0 -14px 14px -14px rgba(20, 30, 25, .18); }
.chat-form.kb-open { bottom: calc(var(--chat-kb) + 8px); }
.chat-row { display: flex; gap: 8px; align-items: flex-end; }
.chat-input { flex: 1; min-width: 0; min-height: 48px; max-height: 160px; resize: none; }
.btn.primary.chat-send { flex: none; min-height: 48px; min-width: 0; padding-inline: 18px; } /* the writing box gets the width, not the button */
.chat-input::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-status { margin-top: 8px; }
.chat-status:empty { display: none; }

/* The booking card: the place, the day, the time and how many at a glance, then the ways to send */
.bk, .tk { align-self: stretch; padding: 14px 16px 16px; border-radius: 16px; background: var(--card);
  border: 1.5px solid var(--gold-bright); box-shadow: var(--shadow); }
.bk.bk-bokat { border-color: var(--accent); }
.bk.bk-nej { border-color: var(--line); }
/* The state label sits beside the place's name, or drops below it when the longest word of the
   name would otherwise have to be cut (320 px wide, "Restaurante" + "Bokat av Edgar"). */
.bk-top, .tk-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 6px 10px; }
.bk-place, .tk-title { flex: 1 1 9rem; min-width: 0; margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.4rem; line-height: 1.15; overflow-wrap: anywhere; }
.bk-chip, .tk-chip { flex: none; padding: 4px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; white-space: nowrap;
  background: rgba(232, 201, 119, .32); color: var(--ink); }
.bk-chip-skickat { background: var(--accent-soft); color: var(--accent); }
.bk-chip-bokat { background: var(--accent); color: var(--accent-ink); }
.bk-chip-nej { background: var(--line); color: var(--muted); }
.bk-what { margin: 2px 0 0; color: var(--muted); }
/* The day needs more room than the time and the head count, so each gets the width of its own words
   (three equal thirds broke "Mån 28/12" in two on a narrow phone). */
.bk-facts { display: grid; grid-template-columns: auto auto 1fr; gap: 8px 18px; margin: 10px 0 12px; }
.bk-fact { min-width: 0; }
.bk-fact dt { font-size: .62rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.bk-fact dd { margin: 1px 0 0; font-size: 1.05rem; font-weight: 600; overflow-wrap: break-word; }
.bk-said { margin: 0 0 12px; font-style: italic; }
.bk-msg { border-top: 1px solid var(--line); }
.bk-lang { margin: 10px 0 2px; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.bk-text { margin: 0; }
.bk-send { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.bk-links { margin: 10px 0 0; font-size: .875rem; }
.bk-state { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.bk-state .field { margin-bottom: 0; }
.bk-moves { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.bk-guest { margin: 12px 0 0; }
/* The place's phone, WhatsApp, email and booking site written out, so a wrong one shows before a tap. */
.bk-contact { margin: 12px 0 0; overflow-wrap: anywhere; }
.bk-links .muted { overflow-wrap: anywhere; }
/* The agent's browser card (taskCard in app.js): a sibling of the booking card, with the same frame,
   heading and state label, then the site, the picture of the page and what was filled in.
   Gold frame while it waits or works, green when done, a plain hairline when it went nowhere. */
.tk { overflow-wrap: break-word; } /* a word is broken only when it cannot fit on a line of its own */
.tk.tk-done { border-color: var(--accent); }
.tk.tk-fail, .tk.tk-off { border-color: var(--line); }
.tk-chip-work { background: var(--accent-soft); color: var(--accent); }
.tk-chip-done { background: var(--accent); color: var(--accent-ink); }
.tk-chip-fail { background: var(--bad-soft); color: var(--bad); }
.tk-chip-off { background: var(--line); color: var(--muted); }
.tk-site { margin: 6px 0 0; }
.tk-reason { margin: 10px 0 0; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tk-summary { margin: 8px 0 0; }
/* The picture: a frame with the picture's own proportions (16:9), so the card never jumps when it arrives,
   and a thin border so a white web page does not melt into the card. */
.tk-pic { margin: 12px 0 0; }
.tk-pic[hidden] { display: none; }
.tk-shot { display: block; width: 100%; aspect-ratio: 16 / 9; padding: 0; border: 1px solid var(--field-line);
  border-radius: 10px; overflow: hidden; background: var(--paper); cursor: zoom-in; }
.tk-shot img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tk-h { margin: 14px 0 6px; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tk-pic > .tk-h { margin-top: 0; }
/* What is filled in: the field's name on the left, what was typed on the right; long values wrap inside the card. */
.tk-fields { display: grid; grid-template-columns: fit-content(40%) minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: .9375rem; }
.tk-field { display: contents; }
.tk-field dt { color: var(--muted); min-width: 0; }
.tk-field dd { margin: 0; font-weight: 600; min-width: 0; }
/* On the narrowest phones two columns leave too little room for an e-mail address: the name goes above what was typed. */
@media (max-width: 359px) {
  .tk-fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .tk-field dd { margin-bottom: 8px; }
}
.tk-button { margin: 12px 0 0; }
.tk-result { margin: 12px 0 0; }
.tk-act { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.tk-live { margin: 0 0 10px; }
.tk-moves { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tk-until { margin: 10px 0 0; }
.tk-guest { margin: 12px 0 0; }
.tk > .tk-status { margin-top: 12px; }
.tk-status:empty { display: none; }
/* "Agenten fyller i på …": a long site name wraps instead of widening the page. */
.chat-busy > span { min-width: 0; overflow-wrap: anywhere; }
/* The take-over view ("Ta över", takeoverView in app.js): the whole screen on a phone, a panel on a
   wide screen. The agent's page sits in a frame that can be panned; − and + make it smaller or larger. */
.tv { padding: 0; border: 0; margin: auto; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  background: var(--card); color: var(--ink); overflow: hidden; }
@media (min-width: 700px) {
  .tv { width: min(94vw, 980px); height: auto; max-height: 94dvh; border-radius: var(--r-card); box-shadow: var(--shadow-photo); }
}
.tv::backdrop { background: rgba(8, 12, 11, .72); }
.tv-in { display: flex; flex-direction: column; gap: 10px; height: 100%; max-height: inherit; overflow-y: auto;
  padding: calc(14px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(14px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
.tv-head { display: flex; align-items: center; gap: 10px; }
.tv-title:focus { outline: none; } /* it only holds the focus so the keyboard stays shut; nothing to show */
.tv-title { flex: 1; min-width: 0; margin: 0; font-family: var(--serif); font-weight: 400; font-size: 1.3rem; line-height: 1.15; overflow-wrap: anywhere; }
.tv-frame { flex: none; overflow: auto; max-height: 56vh; max-height: 56dvh; border: 1px solid var(--field-line);
  border-radius: 10px; background: var(--paper); overscroll-behavior: contain; }
.tv-canvas { position: relative; width: 100%; }
.tv-canvas img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; cursor: crosshair; touch-action: pan-x pan-y;
  -webkit-user-select: none; user-select: none; }
/* Where the last tap landed, until the next picture arrives. A ring, so the spot under it stays visible. */
.tv-mark { position: absolute; width: 24px; height: 24px; margin: -12px 0 0 -12px; border-radius: 50%; pointer-events: none;
  border: 3px solid var(--terra); box-shadow: 0 0 0 2px var(--card); }
.tv-mark[hidden] { display: none; }
.tv-controls { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.tv-type { display: flex; gap: 8px; }
.tv-text { flex: 1; min-width: 0; font: inherit; font-size: 16px; color: inherit; background-color: var(--field);
  border: 1px solid var(--field-line); border-radius: var(--r); padding: 10px 14px; min-height: 44px; }
.tv-text:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); background-color: var(--card); }
.tv-show { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: .875rem; align-self: flex-start; cursor: pointer; }
.tv-show-box { width: 20px; height: 20px; margin: 0; accent-color: var(--accent); }
.tv-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tv-zoom { flex: none; display: inline-flex; gap: 8px; }
.tv-zoom .btn { min-width: 44px; padding-inline: 0; font-size: 1.1rem; }
.tv-note { margin: 0; }
.tv-status { margin: 0; align-self: flex-start; }
.tv-status:empty { display: none; }
.tv-foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: auto; }
/* Read by screen readers, never seen: who just wrote in the chat. */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

/* ── Less movement, for people who asked for it ── */
@media (prefers-reduced-motion: reduce) {
  .sun-load { animation: none; }
  .count-tile, .fx-btn, .sun-btn, .tab-ico, .day-chip, .phone-pill { transition: none; }
  .fx-btn:hover .sun-btn { transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
