/* Rest days on the island and side trips abroad (public/js/trips.js). Calm and light: cream paper, serif headings,
   terracotta for the way forward, sea blue for calls and trips. Phone first; light and dark (html.theme-night). */
.tr-scope {
  --tr-sea-soft: rgba(79, 126, 160, .14);
  --tr-sky: #E3ECF1; --tr-sea: var(--sea); --tr-sea-deep: #3E6E8E; --tr-foam: #ffffff;
  --tr-land: #E6DAC2; --tr-land-line: #BFAE8C; --tr-sand: #3A3631; --tr-rock: #55504A;
  --tr-leaf: #6E8574; --tr-sun: #D9875F; --tr-yellow: #E0B45C; --tr-red: #B9533F; --tr-wood: #8C6243;
  --tr-wall: #FBF7EE; --tr-ink: #3A3631; --tr-wheel: #3A3631; --tr-cloud: #E4E2DD; --tr-road: #B9B4AA;
  --tr-paper: #FFFDF7; --tr-band: #23211E; --tr-on-band: #F6F2EA;
}
html.theme-night .tr-scope {
  --tr-sea-soft: rgba(127, 176, 208, .14);
  --tr-sky: #23303A; --tr-sea-deep: #8DB3D0; --tr-foam: rgba(255, 255, 255, .55);
  --tr-land: #3A352C; --tr-land-line: #6E6352; --tr-sand: #141210; --tr-rock: #4C4740;
  --tr-leaf: #7FA48A; --tr-sun: #E28C6A; --tr-yellow: #D6B46A; --tr-red: #D0705C; --tr-wood: #A57A58;
  --tr-wall: #4A453E; --tr-ink: #EEE8E0; --tr-wheel: #141210; --tr-cloud: #2C2B29; --tr-road: #3A3733;
  --tr-paper: #2A2723; --tr-band: #2C2A26; --tr-on-band: #EFEAE0;
}

.tr { --tr-w: 620px; }
.tr-player { width: min(var(--tr-w), 100% - 32px); margin-inline: auto; }
.tr-h1 { font-size: clamp(1.9rem, 6vw, 2.6rem); margin: 4px 0 20px; }
.tr-h2 { font-size: 1.5rem; margin: 2px 0 12px; }
.tr .tag { margin: 0; }
.tr-back { display: inline-flex; align-items: center; gap: var(--sp-2); color: var(--text-2); text-decoration: none; font-size: var(--fs-sm); font-weight: 500; }
.tr-back svg { width: 16px; height: 16px; }
.tr-back:hover { color: var(--text); }
.tr-k { display: block; font-size: var(--fs-xs); letter-spacing: .12em; text-transform: uppercase; font-weight: 600; color: var(--sea); margin-bottom: 4px; }
.tr-note { color: var(--text-3); font-size: 13.5px; text-align: center; margin: 14px auto 0; max-width: 32em; }
.tr-help { color: var(--text-3); font-size: .9em; }
.tr-art { display: block; width: 100%; height: 100%; }

/* top row: back link and the steps of the day */
.tr-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tr-steps { display: flex; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tr-steps li { width: 26px; height: 6px; border-radius: 99px; background: rgba(var(--fg-rgb), .14); position: relative; }
.tr-steps li.done { background: var(--sea); opacity: .55; }
.tr-steps li.now { background: var(--sea); }
.tr-steps li span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* trip rows (offer card and list) */
.tr-trip { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid rgba(var(--fg-rgb), .12); border-radius: 14px; padding: 8px 12px 8px 8px; color: var(--text); text-decoration: none; min-width: 0; transition: border-color .2s, transform .2s; }
a.tr-trip:hover { border-color: var(--sea); transform: translateY(-1px); }
.tr-trip.on { border-color: var(--accent); background: var(--accent-soft); }
.tr-trip.side { border-style: dashed; border-color: var(--sea); }
.tr-trip.locked { opacity: .62; }
.tr-trip.locked svg:not(.tr-art) { width: 18px; height: 18px; color: var(--text-3); }
.tr-thumb { width: 56px; height: 56px; border-radius: 11px; overflow: hidden; display: block; background: var(--tr-sky); }
.tr-trip-t { min-width: 0; display: grid; gap: 2px; }
.tr-trip-t b { font-weight: 600; font-size: 15px; line-height: 1.25; }
.tr-trip-t small { font-size: 12.5px; color: var(--text-2); line-height: 1.35; }
.tr-plane { color: var(--sea); font-size: 18px; }

.tr-offer { display: grid; gap: 12px; border-color: rgba(79, 126, 160, .35); background: linear-gradient(180deg, var(--tr-sea-soft), transparent 70%), var(--surface); }
.tr-offer h3 { font-size: 1.35rem; line-height: 1.2; margin: 0; }
.tr-offer-list { display: grid; gap: 8px; }
.tr-offer-foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; }

/* #/trips */
.tr-list .lead { margin-bottom: 8px; }
.tr-sec { margin-top: 32px; }
.tr-sec h2 { font-size: 1.45rem; margin-bottom: 8px; }
.tr-grid { display: grid; gap: 12px; margin-top: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; }
.tr-done { display: grid; gap: 8px; justify-items: start; }
.tr-done .tr-pc { width: 100%; }
.tr-passport { margin-top: 18px; padding: 12px 14px; border: 1px solid rgba(var(--fg-rgb), .12); border-radius: 14px; background: var(--surface); }
.tr-passport > div { display: flex; flex-wrap: wrap; gap: 12px; }

/* stamps: English only */
.tr-stamp { display: inline-grid; place-items: center; text-align: center; min-width: 92px; min-height: 92px; padding: 10px; border-radius: 50%; border: 2.5px dashed var(--accent); color: var(--accent-2); transform: rotate(-7deg); font-size: var(--fs-xs); line-height: 1.2; }
.tr-stamp b { font-weight: 700; letter-spacing: .06em; max-width: 9em; }
.tr-stamp i { font-style: normal; color: var(--text-3); font-size: var(--fs-xs); }
.tr-stamp.side { border-radius: 10px; border-style: double; border-width: 4px; border-color: var(--sea); color: var(--sea); transform: rotate(5deg); min-height: 72px; }
.tr-passport .tr-stamp { min-width: 78px; min-height: 78px; font-size: var(--fs-xs); }
.tr-passport .tr-stamp.side { min-height: 60px; }

/* the call */
.tr-call { background: var(--tr-band); color: var(--tr-on-band); border-radius: 22px; padding: 22px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.tr-call-sub { font-size: 12.5px; opacity: .78; }
.tr-ring { width: 76px; height: 76px; border-radius: 50%; background: linear-gradient(140deg, var(--tr-leaf), var(--sea)); display: grid; place-items: center; font-family: var(--serif); font-size: 30px; color: #fff; box-shadow: 0 0 0 8px rgba(255, 255, 255, .07); animation: tr-ring 1.6s ease-in-out infinite; }
.tr-ring.grace { background: linear-gradient(140deg, #E8A87C, var(--accent)); }
.tr-ring.sam { background: linear-gradient(140deg, #E0B45C, #C98F4F); }
.tr-ring.ray { background: linear-gradient(140deg, #C86D51, #8C6243); }
.tr-ring.lucia { background: linear-gradient(140deg, #6FB6D0, var(--sea)); }
.tr-call.live .tr-ring { animation: none; width: 54px; height: 54px; font-size: 22px; box-shadow: 0 0 0 5px rgba(255, 255, 255, .07); }
@keyframes tr-ring { 50% { box-shadow: 0 0 0 14px rgba(255, 255, 255, .03); } }
@media (prefers-reduced-motion: reduce) { .tr-ring { animation: none; } }
.tr-call-who { font-family: var(--serif); font-size: 1.35rem; }
.tr-call-log { display: grid; gap: 8px; width: 100%; }
.tr-call-log:empty { display: none; }
.tr-call .tr-line { background: rgba(255, 255, 255, .08); border-radius: 14px 14px 14px 4px; padding: 9px 12px; text-align: left; font-size: 15px; display: grid; gap: 2px; margin-right: 12%; }
.tr-call .tr-line.you { background: rgba(127, 176, 208, .22); border-radius: 14px 14px 4px 14px; margin: 0 0 0 12%; }
.tr-call .tr-line small { opacity: .72; font-size: 12.5px; }
.tr-call .tr-who { font-size: var(--fs-xs); font-weight: 600; letter-spacing: .04em; opacity: .7; }
.tr-from { display: inline-block; justify-self: start; margin-top: 3px; font-size: var(--fs-xs); padding: 1px 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.tr-call-turn { width: 100%; }
.tr-call-btns { display: flex; gap: 36px; margin-top: 6px; }
.tr-call-btns button { width: 60px; height: 60px; border-radius: 50%; border: 0; display: grid; place-items: center; color: #fff; cursor: pointer; }
.tr-call-btns svg { width: 24px; height: 24px; }
.tr-no { background: #B44A3C; }
.tr-yes { background: #4E8A5E; }
.tr-call-btns button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.tr-hang { margin-top: 6px; }

/* answering: say it or choose */
.tr-answer { display: grid; gap: 12px; justify-items: center; margin-top: 6px; }
.tr-prompt { margin: 0; font-size: 15px; display: grid; gap: 2px; }
.tr-prompt small { color: inherit; opacity: .7; font-size: 12.5px; }
.tr-mic { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px; font: 600 15px var(--sans); background: var(--accent); color: var(--accent-ink); cursor: pointer; }
.tr-mic svg { width: 18px; height: 18px; }
.tr-mic.listening { background: var(--sea); color: #fff; animation: tr-pulse 1.2s ease-in-out infinite; }
@keyframes tr-pulse { 50% { box-shadow: 0 0 0 8px rgba(127, 176, 208, .2); } }
.tr-or { font-size: 12.5px; opacity: .75; }
.tr-opts { display: grid; gap: 8px; width: 100%; }
.tr-opt { text-align: left; border: 1px solid rgba(var(--fg-rgb), .24); border-radius: 12px; padding: 10px 14px; background: var(--surface); color: var(--text); font: 15px/1.35 var(--sans); cursor: pointer; display: grid; gap: 2px; }
.tr-opt small { color: var(--text-3); font-size: 12.5px; }
.tr-opt:hover:not([disabled]) { border-color: var(--sea); }
.tr-opt.right { border-color: var(--ok); background: var(--ok-soft); }
.tr-opt.wrong { opacity: .5; text-decoration: line-through; text-decoration-color: var(--text-3); }
.tr-opt[disabled] { cursor: default; }
.tr-call .tr-opt { background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .22); color: var(--tr-on-band); }
.tr-call .tr-opt.right { background: rgba(157, 184, 164, .25); border-color: #9DB8A4; }
.tr-heard { margin: 0; font-size: 13.5px; min-height: 1em; }
.tr-heard:empty { display: none; }
.tr-replay { border: 0; background: none; color: inherit; opacity: .78; font: 13px var(--sans); display: inline-flex; gap: 8px; align-items: center; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.tr-replay svg { width: 15px; height: 15px; }

/* the place and the stretches */
.tr-place, .tr-stretch { display: grid; gap: 16px; }
.tr-banner { height: 150px; border-radius: 16px; overflow: hidden; border: 1px solid rgba(var(--fg-rgb), .12); }
.tr-listen { justify-self: start; }
.tr-listen svg { width: 16px; height: 16px; }
.tr-scene { display: grid; gap: 12px; }
.tr-sline { display: grid; gap: 2px; padding: 4px 0 4px 12px; border-left: 3px solid transparent; transition: border-color .2s, background .2s; }
.tr-sline.on { border-left-color: var(--sea); background: var(--tr-sea-soft); border-radius: 0 8px 8px 0; }
.tr-sline .tr-en { font-family: var(--serif); font-size: 1.14rem; line-height: 1.4; }
.tr-sline small { color: var(--text-3); font-size: 13.5px; }
.tr-who { font-size: var(--fs-xs); font-weight: 600; color: var(--sea); letter-spacing: .04em; }
.tr-fact { background: var(--tr-sea-soft); border-radius: 14px; padding: 12px 14px; }
.tr-fact p { margin: 0; font-family: var(--serif); font-size: 1.08rem; line-height: 1.4; }
.tr-fact small { color: var(--text-2); font-size: 13.5px; display: block; margin-top: 2px; }
.tr-q { display: grid; gap: 12px; }
.tr-qq { margin: 0; display: grid; gap: 2px; font-weight: 600; }
.tr-qq small { font-weight: 400; color: var(--text-3); }
.tr-next { justify-self: start; margin-top: 4px; }

/* side-trip challenges */
.tr-chs { display: grid; gap: 16px; }
.tr-ch { border: 1px solid rgba(var(--fg-rgb), .12); border-radius: 16px; padding: 14px; background: var(--surface); display: grid; gap: 12px; }
.tr-ch .tr-prompt { font-weight: 600; }
.tr-ch .tr-answer { justify-items: start; }
.tr-ch .tr-line { display: grid; gap: 2px; padding: 9px 12px; border-radius: 12px; background: var(--surface-2); }
.tr-ch .tr-line.you { background: var(--tr-sea-soft); }
.tr-ch .tr-line small { color: var(--text-3); font-size: 13px; }
.tr-ch .tr-line .tr-en { font-family: var(--serif); font-size: 1.05rem; }
.tr-playbtn { justify-self: start; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 10px 18px; font: 600 15px var(--sans); background: var(--sea); color: #fff; cursor: pointer; }
.tr-playbtn svg { width: 16px; height: 16px; }
.tr-playbtn[disabled] { opacity: .5; }
.tr-frame { margin: 0; font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.tr-text { width: 100%; border: 1px solid rgba(var(--fg-rgb), .24); border-radius: 12px; padding: 12px; font: 16px/1.5 var(--serif); background: var(--tr-paper); color: var(--text); resize: vertical; }
.tr-text:focus { outline: 2px solid var(--sea); outline-offset: 1px; }
.tr-write-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tr-write-row .tr-count { margin-right: auto; }
.tr-model { margin: 0; font-family: var(--serif); color: var(--text-2); border-left: 3px solid var(--sea); padding-left: 10px; }
.tr-fix ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 14px; }
.tr-fix:empty { display: none; }

/* boarding pass */
.tr-pass { background: var(--tr-paper); border: 1px solid var(--tr-land-line); border-radius: 16px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .06); }
.tr-pass-top { background: var(--sea); color: #fff; padding: 11px 14px; display: flex; justify-content: space-between; font-size: var(--fs-xs); letter-spacing: .1em; text-transform: uppercase; font-weight: 600; }
.tr-pass-mid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 14px 12px; gap: 8px; }
.tr-pass-mid .tr-r { text-align: right; }
.tr-code { font-family: var(--serif); font-size: 2.3rem; line-height: 1; }
.tr-city { font-size: 12px; color: var(--text-3); }
.tr-pass-plane { color: var(--sea); font-size: 22px; }
.tr-pass-rows { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 14px 14px; font-size: var(--fs-xs); color: var(--text-3); }
.tr-pass-rows b { display: block; color: var(--text); font-size: 13.5px; font-weight: 600; }
.tr-pass-tear { border-top: 2px dashed var(--tr-land-line); margin: 0; padding: 12px 14px 14px 14px; list-style: none; counter-reset: m; display: grid; gap: 8px; }
.tr-pass-tear li { counter-increment: m; display: grid; grid-template-columns: 24px 1fr; gap: 12px; font-size: 14px; align-items: start; }
.tr-pass-tear li::before { content: counter(m); width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--sea); color: var(--sea); display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 700; }
.tr-stage > .tr-next { margin-top: 16px; }

/* postcard */
.tr-pc { margin: 0; background: var(--tr-paper); border: 1px solid var(--tr-land-line); border-radius: 8px; overflow: hidden; transform: rotate(-1deg); box-shadow: 0 10px 26px rgba(0, 0, 0, .08); }
.tr-pc-front { position: relative; height: 150px; }
.tr-pc-hi { position: absolute; left: 12px; top: 10px; font-family: var(--serif); font-size: 1.05rem; color: var(--tr-ink); background: color-mix(in srgb, var(--tr-paper) 78%, transparent); padding: 2px 8px; border-radius: 6px; }
.tr-pc-back { padding: 12px 14px; display: grid; gap: 4px; font-size: 13.5px; }
.tr-pc-back i { font-family: var(--serif); font-size: 1.05rem; }
.tr-pc-own { margin: 0 0 4px; font-family: var(--serif); font-size: 1.05rem; line-height: 1.45; white-space: pre-line; }
.tr-pc-date { color: var(--text-3); font-size: 12px; }
.tr-end { display: grid; gap: 16px; justify-items: center; text-align: center; }
.tr-end .tr-pc { width: min(420px, 100%); text-align: left; }
.tr-stamp-slot { display: grid; gap: 8px; justify-items: center; min-height: 40px; }
.tr-home { min-width: 220px; justify-content: center; }

/* the summary */
.tr-sum { display: grid; gap: 12px; }
.tr-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.tr-nums div { background: var(--bg); border: 1px solid rgba(var(--fg-rgb), .12); border-radius: 12px; padding: 10px 4px; }
.tr-nums b { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; display: block; line-height: 1.1; }
.tr-nums span { font-size: 12px; color: var(--text-3); }
.tr-well, .tr-todo { margin: 0; font-size: 15px; }
.tr-well .tr-k, .tr-todo .tr-k { display: inline; color: var(--ok); }
.tr-todo .tr-k { color: var(--accent-2); }

@media (min-width: 760px) {
  .tr-call { padding: 26px 28px; }
  .tr-banner { height: 190px; }
  .tr-pc-front { height: 180px; }
}

/* Listen + Listen slowly */
.tr-listens, .tr-plays { justify-self: start; gap: 8px; }
.tr-replays { gap: 16px; }
.tr-playslow { padding: 10px 12px; background: var(--surface-2); color: var(--sea); box-shadow: inset 0 0 0 1px var(--sea); }
