/* ==========================================================================
   Körschema / wedding day timeline (/korschema-brollop, /en/wedding-day-timeline). Built by korschema.js.
   Settings on the left, the timeline as a printable sheet on the right; stacked on phones.
   Shared parts (intro, buttons, inputs, tips, ad, feedback) come from verktyg.css. Prefix tl-.
   ========================================================================== */
.tl-app {
  display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: clamp(18px, 3vw, 40px);
  align-items: start; padding-block: 8px 56px;
  --tl-line: #e7e1d8; --tl-paper: #fffdf9; --tl-muted: #7b7267;
}
.tl-settings {
  position: sticky; top: 16px; display: flex; flex-direction: column; gap: 14px; padding: 22px;
  background: #f7f3ec; border-radius: 22px;
}
.tl-settings h2, .tl-sheet h2 { margin: 0; }
.tl-settings h2 { font: italic 400 1.45rem/1.2 var(--bp-serif); letter-spacing: 0; }
.tl-field { display: flex; flex-direction: column; gap: 6px; font-size: .84rem; color: var(--tl-muted); min-width: 0; }
.tl-field[hidden] { display: none; }
.tl-field .bp-input { font-size: .95rem; }
.tl-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tl-row3 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 10px; }
select.bp-input { appearance: auto; }
.tl-switch { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; cursor: pointer; position: relative; line-height: 1.35; }
.tl-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tl-switch em { display: block; font-style: normal; font-size: .78rem; color: var(--tl-muted); margin-top: 2px; }
.tl-switch-ui { width: 36px; height: 21px; border-radius: 999px; background: rgba(60, 45, 30, .2); position: relative; flex: none; transition: background .2s; margin-top: 1px; }
.tl-switch-ui::after { content: ""; position: absolute; left: 2px; top: 2px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s; }
.tl-switch input:checked + .tl-switch-ui { background: #6db33d; }
.tl-switch input:checked + .tl-switch-ui::after { transform: translateX(15px); }
.tl-switch input:focus-visible + .tl-switch-ui { outline: 3px solid var(--bp-accent); outline-offset: 2px; }
.tl-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; }
.tl-actions .bp-btn.primary { background: var(--bp-accent); border-color: var(--bp-accent); color: #10200a; }
.tl-actions .bp-btn.primary:hover { background: #94d167; }
.tl-link { appearance: none; border: 0; background: none; padding: 4px 2px; font: 500 .85rem var(--bp-sans); color: var(--tl-muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.tl-danger { color: var(--bp-danger); }

/* The sheet */
.tl-sheet { background: var(--tl-paper); border: 1px solid var(--tl-line); border-radius: 24px; padding: clamp(22px, 3.4vw, 44px); box-shadow: 0 18px 50px -30px rgba(60, 40, 20, .45); position: relative; overflow: hidden; }
.tl-sheet::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: linear-gradient(90deg, #e8909f, #f2a46f 22%, #e2bd50 42%, #8cc184 62%, #7fb0df 80%, #b29ae2); }
.tl-sheet-head { text-align: center; padding-bottom: 18px; margin-bottom: 8px; border-bottom: 1px solid var(--tl-line); }
.tl-kicker { margin: 0; font: 600 .7rem/1.2 var(--bp-sans); letter-spacing: .16em; text-transform: uppercase; color: var(--bp-accent-ink); }
.tl-names { font: italic 400 clamp(1.7rem, 3vw, 2.3rem)/1.15 var(--bp-serif); margin: 6px 0 4px !important; letter-spacing: 0; }
.tl-date { margin: 0; color: var(--tl-muted); font-size: .92rem; }
.tl-summary { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 14px; }
.tl-summary span { display: inline-flex; gap: 7px; align-items: baseline; padding: 6px 12px; border-radius: 999px; background: #f4efe7; font-size: .82rem; }
.tl-summary em { font-style: normal; color: var(--tl-muted); }
.tl-summary b { font-variant-numeric: tabular-nums; font-weight: 600; }
.tl-edited { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; justify-content: space-between; margin: 12px 0 0; padding: 10px 14px; border-radius: 14px; background: #fff3dc; color: #74480a; font-size: .86rem; }
.tl-edited[hidden] { display: none; }
.tl-list { list-style: none; margin: 10px 0 0; padding: 0; position: relative; }
.tl-list::before { content: ""; position: absolute; left: 88px; top: 12px; bottom: 12px; width: 2px; background: #eee8de; border-radius: 2px; }
.tl-ev { position: relative; border-radius: 14px; transition: background .15s; }
.tl-ev:hover, .tl-ev.is-open { background: #f8f4ee; }
.tl-ev-main { appearance: none; border: 0; background: none; width: 100%; display: grid; grid-template-columns: 58px 22px minmax(0, 1fr); gap: 10px; align-items: start; padding: 10px 10px; text-align: left; cursor: pointer; color: inherit; font: inherit; border-radius: 14px; }
.tl-ev-main:focus-visible { outline: 3px solid var(--bp-accent); outline-offset: -3px; }
.tl-time { font: 600 1rem/1.4 var(--bp-sans); font-variant-numeric: tabular-nums; text-align: right; }
.tl-dot { width: 14px; height: 14px; margin: 4px 0 0 4px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px var(--tl-paper); position: relative; z-index: 1; }
.tl-ev:hover .tl-dot, .tl-ev.is-open .tl-dot { box-shadow: 0 0 0 4px #f8f4ee; }
.tl-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tl-body b { font-weight: 600; font-size: 1rem; line-height: 1.4; }
.tl-meta { font-size: .8rem; color: var(--tl-muted); font-variant-numeric: tabular-nums; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; }
.tl-gold { font-style: normal; font-weight: 600; font-size: .72rem; padding: 2px 8px; border-radius: 999px; background: linear-gradient(90deg, #fbe6b0, #f7d0a4); color: #7a4b0e; }
.tl-note { font-size: .86rem; color: #5a534a; line-height: 1.5; margin-top: 2px; }
.tl-sun { display: grid; grid-template-columns: 58px 22px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 10px; margin: 2px 0; border-radius: 14px; background: linear-gradient(90deg, rgba(251, 230, 176, .55), rgba(247, 208, 164, .25) 60%, transparent); }
.tl-sun .tl-time { color: #9a5d12; }
.tl-sundot { width: 18px; height: 18px; margin-left: 2px; border-radius: 50%; background: radial-gradient(circle at 50% 60%, #f7b24a 0 45%, #fbd27a 46% 100%); box-shadow: 0 0 0 4px var(--tl-paper), 0 0 14px rgba(247, 178, 74, .7); position: relative; z-index: 1; }
.tl-sunlabel { font-size: .9rem; font-weight: 600; color: #7a4b0e; }
.tl-sunlabel em { display: block; font-style: normal; font-weight: 400; font-size: .8rem; color: #9a6a2e; }
.tl-sun-none { display: block; background: #f4efe7; padding: 10px 14px; margin-top: 10px; }
.tl-sun-none .tl-sunlabel { font-weight: 400; color: var(--tl-muted); }
.tl-editor { padding: 2px 14px 14px 100px; display: flex; flex-direction: column; gap: 10px; }
.tl-editor textarea { resize: vertical; font: 400 .9rem/1.45 var(--bp-sans); }
.tl-shift { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; font-size: .8rem; color: var(--tl-muted); }
.tl-shift .bp-btn { padding: 6px 11px; font-size: .78rem; }
.tl-ed-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tl-add { appearance: none; margin: 10px 0 0 78px; border: 1.5px dashed #d8cfc2; background: transparent; border-radius: 999px; padding: 8px 16px; display: inline-flex; gap: 8px; align-items: center; font: 600 .85rem var(--bp-sans); color: var(--bp-accent-ink); cursor: pointer; }
.tl-add span { font-size: 1.1rem; line-height: 1; }
.tl-add:hover { border-color: var(--bp-accent-ink); background: #f8f4ee; }
.tl-foot { display: none; }

@media (max-width: 900px) {
  .tl-app { grid-template-columns: minmax(0, 1fr); }
  .tl-settings { position: static; }
}
@media (max-width: 520px) {
  .tl-list::before { left: 70px; }
  .tl-ev-main, .tl-sun { grid-template-columns: 46px 18px minmax(0, 1fr); gap: 8px; padding-inline: 6px; }
  .tl-time { font-size: .92rem; }
  .tl-editor { padding-left: 14px; }
  .tl-add { margin-left: 0; }
  .tl-row2 { grid-template-columns: minmax(0, 1fr); }
}

/* Print: only the sheet, on white, with the address of the tool at the bottom */
@media print {
  @page { size: A4 portrait; margin: 14mm; }
  html, body { background: #fff !important; }
  .site-header, .site-footer, .tl-hide-print, .tl-settings, .tl-add, .tl-edited, .fb-dialog, .mobile-menu { display: none !important; }
  .tl-app { display: block; padding: 0; }
  .bp-wrap { padding: 0 !important; max-width: none; }
  .tl-sheet { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .tl-sheet::before { display: none; }
  .tl-ev, .tl-sun { break-inside: avoid; }
  .tl-ev-main { padding-block: 6px; }
  .tl-list::before, .tl-summary span, .tl-sun { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tl-dot, .tl-sundot, .tl-gold { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tl-foot { display: block; margin: 18px 0 0; text-align: center; font-size: 8pt; color: #aaa; }
}
