/* ==========================================================================
   T1 Familieapp – design
   Idé: køleskabsdøren. Hver person er en farvet magnet, og farverne bærer
   betydning gennem hele appen (hvem skrev det, hvilket modul man er i).
   ========================================================================== */

@font-face {
  font-family: "T1 Display";
  src: url("../fonts/BricolageGrotesque-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "T1 Display";
  src: url("../fonts/BricolageGrotesque-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #13233A;
  --ink-2: #44566C;
  --ink-3: #6E7F94;
  --bg: #EEF3F8;
  --bg-2: #E2EAF3;
  --card: #FFFFFF;
  --line: #D3DDE8;
  --line-2: #E6ECF3;
  --ok: #1FA463;
  --danger: #D3284A;
  --focus: #2F5BEA;
  --c: #13233A;
  --r-s: 12px;
  --r-m: 18px;
  --r-l: 26px;
  --display: "T1 Display", ui-rounded, "SF Pro Rounded", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 0 rgba(19, 35, 58, .04), 0 10px 26px -16px rgba(19, 35, 58, .28);
  --tabbar-h: 66px;
  color-scheme: light;
}

html.t1-locked { overflow: hidden; }

body.t1-body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.t1-body *, .t1-body *::before, .t1-body *::after { box-sizing: border-box; }
:where(.t1-body) a { color: inherit; }
.t1-body :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:where(.t1-body) :where(h1, h2, h3) { font-family: var(--display); color: inherit; }
.t1-body img { max-width: 100%; height: auto; }

.t1-sr, .t1-hp {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.t1-skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; }
.t1-skip:focus { top: 12px; }

.t1-app { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }

/* ---------- Top ---------- */
.t1-top {
  position: sticky; top: 0; z-index: 30;
  background: rgba(238, 243, 248, .86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line-2);
  padding-top: env(safe-area-inset-top);
}
.t1-top-in { max-width: 1180px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 14px; min-height: 64px; }
.t1-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); flex: none; }
.t1-dots { display: grid; grid-template-columns: repeat(2, 11px); gap: 3px; }
.t1-dots i { display: block; width: 11px; height: 11px; border-radius: 50%; background: var(--c); }
.t1-logo-word { font: 800 23px/1 var(--display); letter-spacing: -.02em; }

.t1-nav { display: flex; gap: 4px; margin-left: 10px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.t1-nav::-webkit-scrollbar { display: none; }
.t1-nav a {
  padding: 8px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 650; font-size: 15px;
  text-decoration: none; white-space: nowrap; transition: background .15s, color .15s;
}
.t1-nav a:hover { background: var(--card); color: var(--ink); }
.t1-nav a[aria-current="page"] { background: var(--c); color: #fff; }

.t1-top-end { margin-left: auto; display: flex; align-items: center; gap: 12px; flex: none; }
.t1-top-link { color: var(--ink-2); font-weight: 650; font-size: 14px; text-decoration: none; }
.t1-top-link:hover { color: var(--ink); text-decoration: underline; }
.t1-me {
  display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 700;
}
.t1-me-face { width: 34px; height: 34px; border-radius: 50%; background: var(--c); display: grid; place-items: center; font-size: 18px; line-height: 1; }

/* ---------- Bundmenu (mobil) ---------- */
.t1-tabbar { display: none; }

/* ---------- Indhold ---------- */
.t1-main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 20px 20px 56px; flex: 1; outline: none; }

/* ---------- Knapper ---------- */
.t1-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 999px; border: 2px solid transparent;
  background: var(--ink); color: #fff; font: 700 15px/1.1 var(--body); text-decoration: none;
  cursor: pointer; transition: transform .1s ease, background-color .15s, box-shadow .15s; white-space: nowrap;
}
.t1-btn:hover { box-shadow: 0 6px 16px -8px rgba(19, 35, 58, .5); }
.t1-btn:active { transform: scale(.97); }
.t1-btn:disabled { opacity: .55; cursor: default; transform: none; }
.t1-btn--accent { background: var(--c); }
.t1-btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.t1-btn--ghost:hover { background: var(--card); box-shadow: none; }
.t1-btn--danger { background: var(--danger); }
.t1-btn--danger-ghost { background: transparent; color: var(--danger); border-color: rgba(211, 40, 74, .3); }
.t1-btn--small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.t1-btn--big { min-height: 52px; padding: 0 24px; font-size: 16px; }
.t1-btn--block { width: 100%; }

.t1-icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink-2);
  font-size: 24px; line-height: 1; cursor: pointer; display: grid; place-items: center; flex: none;
}
.t1-icon-btn:hover { background: var(--bg-2); color: var(--ink); }
.t1-icon-btn--quiet { background: transparent; opacity: .45; }
.t1-icon-btn--quiet:hover, .t1-icon-btn--quiet:focus-visible { opacity: 1; background: var(--bg); }

.t1-link { color: color-mix(in srgb, var(--c) 70%, var(--ink)); font-weight: 700; font-size: 14px; text-underline-offset: 3px; }

/* ---------- Felter ---------- */
.t1-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.t1-field > span:first-child { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.t1-body input[type="text"], .t1-body input[type="search"], .t1-body input[type="number"], .t1-body input[type="date"],
.t1-body input[type="url"], .t1-body input[type="email"], .t1-body input:not([type]), .t1-body select, .t1-body textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 14px;
  background: var(--card); color: var(--ink); font: 16px/1.3 var(--body); transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.t1-body textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
.t1-body select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.t1-body input:focus, .t1-body select:focus, .t1-body textarea:focus {
  outline: none; border-color: var(--c);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 20%, transparent);
}
.t1-body input::placeholder, .t1-body textarea::placeholder { color: #9AA8B8; }
.t1-body input[type="checkbox"] { width: 22px; height: 22px; accent-color: var(--c); }
.t1-check { display: flex; align-items: center; gap: 10px; font-weight: 600; min-height: 44px; cursor: pointer; }

.t1-stepper { display: grid; grid-template-columns: 44px minmax(40px, 1fr) 44px; border: 2px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--card); min-height: 48px; }
.t1-stepper button { border: 0; background: var(--bg); color: var(--ink); font: 700 22px/1 var(--body); cursor: pointer; }
.t1-stepper button:active { background: var(--bg-2); }
.t1-body .t1-stepper input { border: 0; border-radius: 0; text-align: center; min-height: 44px; padding: 0 4px; font-weight: 700; box-shadow: none; -moz-appearance: textfield; }
.t1-stepper input::-webkit-outer-spin-button, .t1-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.t1-stepper:focus-within { border-color: var(--c); }

.t1-search input {
  padding-left: 42px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236E7F94' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='8.5' cy='8.5' r='6'/%3E%3Cpath d='m13 13 5 5'/%3E%3C/svg%3E") no-repeat 14px 50%;
}

/* ---------- Paneler ---------- */
.t1-panel { background: var(--card); border-radius: var(--r-l); padding: 20px; border: 1px solid var(--line-2); box-shadow: var(--shadow); min-width: 0; }
.t1-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.t1-panel-head h2 { font-size: 21px; font-weight: 700; margin: 0; line-height: 1.2; letter-spacing: -.01em; }
.t1-pill {
  display: inline-flex; align-items: center; padding: 3px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, #fff); color: color-mix(in srgb, var(--c) 72%, var(--ink));
  font: 700 13px/1.4 var(--body); white-space: nowrap;
}
.t1-pill:empty { display: none; }
.t1-pill.is-clear { background: #E3F5EC; color: #13784A; }
.t1-notice { max-width: 640px; }
.t1-notice h1 { margin: 0 0 6px; font-size: 26px; }

.t1-empty {
  list-style: none; padding: 22px 18px; text-align: center; color: var(--ink-3); font-weight: 600;
  border: 2px dashed var(--line); border-radius: var(--r-m); background: rgba(255, 255, 255, .5);
}
.t1-loading { list-style: none; color: var(--ink-3); padding: 14px 4px; }
.t1-empty-line { color: var(--ink-3); margin: 0; }

/* ---------- Forside ---------- */
.t1-hello { padding: 16px 4px 0; }
.t1-hello-date { margin: 0; color: var(--ink-3); font-weight: 650; font-size: 15px; }
.t1-hello-title {
  font-weight: 800; font-size: clamp(36px, 6.4vw, 60px); line-height: 1.02; letter-spacing: -.03em;
  margin: 6px 0 0; text-wrap: balance;
}

.t1-fridge { display: flex; flex-wrap: wrap; gap: 18px 24px; padding: 28px 4px 32px; }
.t1-magnet {
  display: flex; flex-direction: column; align-items: center; gap: 8px; width: 92px;
  text-decoration: none; color: var(--ink); transform: rotate(var(--tilt, 0deg));
  transition: transform .2s cubic-bezier(.2, .9, .3, 1.2);
}
.t1-magnet:hover, .t1-magnet:focus-visible { transform: rotate(0deg) translateY(-3px); }
.t1-magnet:focus-visible { outline-offset: 6px; border-radius: 16px; }
.t1-magnet-face {
  position: relative; width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center;
  font-size: 40px; line-height: 1;
  background: radial-gradient(circle at 32% 26%, rgba(255, 255, 255, .5), rgba(255, 255, 255, 0) 44%), var(--c);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .12), 0 12px 20px -10px color-mix(in srgb, var(--c) 75%, #000);
}
.t1-magnet-name { font-weight: 750; font-size: 15px; }
.t1-magnet-badge {
  position: absolute; top: -4px; right: -6px; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 999px;
  background: #fff; color: var(--ink); border: 2.5px solid var(--c); font: 800 14px/23px var(--display); text-align: center;
}
.t1-magnet--guest .t1-magnet-face { background: #fff; border: 3px dashed #B6C3D2; box-shadow: none; font-size: 34px; }
.t1-magnet--small { width: 72px; }
.t1-magnet--small .t1-magnet-face { width: 58px; height: 58px; font-size: 28px; }
.t1-magnet--small .t1-magnet-name { font-size: 14px; }

@keyframes t1-drop {
  0% { opacity: 0; transform: translateY(-28px) rotate(calc(var(--tilt, 0deg) * -2)); }
  70% { opacity: 1; }
  100% { opacity: 1; transform: rotate(var(--tilt, 0deg)); }
}
.t1-hello + .t1-fridge .t1-magnet { animation: t1-drop .6s cubic-bezier(.2, .9, .3, 1.25) both; animation-delay: calc(var(--i, 0) * 70ms + 80ms); }

.t1-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.t1-tile {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; align-content: center;
  padding: 18px 20px; border-radius: var(--r-l); min-height: 100px; text-decoration: none; color: var(--ink);
  background: #fff; background: color-mix(in srgb, var(--c) 10%, #fff);
  border: 1px solid color-mix(in srgb, var(--c) 22%, #fff); transition: background-color .15s, transform .12s;
}
.t1-tile:hover { background: color-mix(in srgb, var(--c) 16%, #fff); }
.t1-tile:active { transform: scale(.985); }
.t1-tile-emoji {
  grid-row: span 2; width: 56px; height: 56px; border-radius: 18px; background: #fff; display: grid; place-items: center;
  font-size: 29px; line-height: 1; align-self: center; transform: rotate(-4deg);
}
.t1-tile-title { font: 700 22px/1.15 var(--display); letter-spacing: -.01em; align-self: end; }
.t1-tile-stat { font-weight: 650; font-size: 15px; color: color-mix(in srgb, var(--c) 55%, var(--ink)); align-self: start; }
.t1-tile--lead { grid-column: span 2; background: var(--c); color: #fff; border-color: transparent; min-height: 136px; padding: 22px 24px; }
.t1-tile--lead:hover { background: color-mix(in srgb, var(--c) 88%, #000); }
.t1-tile--lead .t1-tile-emoji { width: 72px; height: 72px; font-size: 38px; border-radius: 22px; background: rgba(255, 255, 255, .22); }
.t1-tile--lead .t1-tile-title { font-size: 32px; font-weight: 800; }
.t1-tile--lead .t1-tile-stat { color: rgba(255, 255, 255, .9); font-size: 17px; }

/* ---------- Sidehoved for moduler ---------- */
.t1-pagehead { display: flex; align-items: center; gap: 16px; padding: 10px 4px 20px; }
.t1-pagehead-emoji {
  flex: none; width: 64px; height: 64px; border-radius: 20px; background: var(--c); display: grid; place-items: center;
  font-size: 34px; line-height: 1; transform: rotate(-5deg); box-shadow: 0 10px 18px -10px color-mix(in srgb, var(--c) 80%, #000);
}
.t1-pagehead h1 { font-weight: 800; font-size: clamp(32px, 5vw, 46px); line-height: 1.02; letter-spacing: -.025em; margin: 0; }
.t1-pagehead p { margin: 4px 0 0; color: var(--ink-2); font-weight: 650; }
.t1-pagehead-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Indkøb ---------- */
.t1-shop { --c: #1FA463; }
.t1-shop-add {
  display: grid; grid-template-columns: minmax(0, 2fr) 150px minmax(0, 1.4fr) auto; gap: 12px; align-items: end;
  background: var(--card); padding: 18px; border-radius: var(--r-l); border: 1px solid var(--line-2); box-shadow: var(--shadow);
  margin-bottom: 18px; position: relative;
}
.t1-listbar { margin: 0 0 12px; max-width: 420px; }

.t1-shop-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.t1-shop-row {
  display: flex; align-items: center; gap: 12px; background: var(--card); border-radius: var(--r-m);
  padding: 8px 12px 8px 10px; border: 1px solid var(--line-2); border-left: 6px solid var(--who, var(--line));
  box-shadow: 0 1px 0 rgba(19, 35, 58, .03);
}
.t1-shop-main {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 8px 0; color: inherit;
  font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 1px;
}
div.t1-shop-main { cursor: default; }
.t1-shop-name { font-weight: 700; font-size: 17px; overflow-wrap: anywhere; }
.t1-shop-note { color: var(--ink-3); font-size: 14px; overflow-wrap: anywhere; }
.t1-qty {
  flex: none; min-width: 34px; height: 34px; padding: 0 9px; border-radius: 11px; background: var(--bg);
  font: 800 17px/34px var(--display); text-align: center;
}
.t1-who {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 16px; line-height: 1;
  background: color-mix(in srgb, var(--who, #ccc) 18%, #fff);
}
.t1-shop-row.is-bought { border-left-color: var(--line); background: rgba(255, 255, 255, .62); }
.t1-shop-row.is-bought .t1-shop-name { text-decoration: line-through; color: var(--ink-3); }
.t1-shop-row.is-bought .t1-who, .t1-shop-row.is-bought .t1-qty { opacity: .55; }
.t1-basket { margin-top: 28px; }
.t1-basket-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 4px 10px; }
.t1-basket-head h2 { font-size: 20px; margin: 0; display: flex; align-items: center; gap: 8px; }

/* Afkrydsning (fælles for indkøb og lister) */
.t1-tick {
  flex: none; position: relative; width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid var(--line);
  background: #fff; cursor: pointer; padding: 0; transition: background-color .15s, border-color .15s, transform .12s;
}
.t1-tick:hover { border-color: var(--c); }
.t1-tick:active { transform: scale(.9); }
.t1-tick::after {
  content: ""; position: absolute; left: 10px; top: 5px; width: 8px; height: 14px;
  border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) scale(0); transition: transform .15s;
}
.t1-tick[aria-pressed="true"] { background: var(--c); border-color: var(--c); }
.t1-tick[aria-pressed="true"]::after { transform: rotate(45deg) scale(1); }
.t1-tick--static { display: none; }

/* ---------- Fryser og barskab ---------- */
.t1-inv-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 12px; }
.t1-inv-tools .t1-search { flex: 1 1 280px; max-width: 460px; }
.t1-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 18px; }
.t1-chips:empty { display: none; }
.t1-chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 14px 0 12px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--card); color: var(--ink); font: 650 14px/1 var(--body); cursor: pointer; white-space: nowrap;
}
.t1-chip::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cc, var(--ink)); }
.t1-chip span { color: var(--ink-3); font-weight: 700; }
.t1-chip[aria-pressed="true"] { background: var(--cc, var(--ink)); border-color: var(--cc, var(--ink)); color: #fff; }
.t1-chip[aria-pressed="true"]::before { background: #fff; }
.t1-chip[aria-pressed="true"] span { color: rgba(255, 255, 255, .85); }

.t1-inv-cat { margin: 0 0 26px; }
.t1-inv-cat h2 { display: flex; align-items: center; gap: 10px; font-size: 20px; font-weight: 700; margin: 0 4px 10px; letter-spacing: -.01em; }
.t1-inv-cat h2::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--cc); }
.t1-inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.t1-inv-card {
  display: flex; align-items: stretch; background: var(--card); border-radius: var(--r-m); border: 1px solid var(--line-2);
  border-top: 5px solid var(--cc, var(--line)); box-shadow: 0 1px 0 rgba(19, 35, 58, .03); overflow: hidden; min-width: 0;
}
.t1-inv-open {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 12px 8px 12px 14px; color: inherit; font: inherit;
  cursor: pointer; display: flex; flex-direction: column; gap: 3px;
}
.t1-inv-name { font-weight: 700; font-size: 17px; line-height: 1.25; overflow-wrap: anywhere; }
.t1-inv-meta { color: var(--ink-3); font-size: 14px; overflow-wrap: anywhere; }
.t1-inv-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.t1-flag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.t1-flag--open { background: #FFF1D6; color: #8A5300; }
.t1-flag--old { background: #FDE4E8; color: #A1173A; }
.t1-inv-qty { flex: none; display: flex; align-items: center; gap: 2px; padding: 8px 8px 8px 0; }
.t1-inv-qty button {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink); font: 700 21px/1 var(--body); cursor: pointer;
}
.t1-inv-qty button:hover { background: var(--bg-2); }
.t1-inv-qty button:active { transform: scale(.92); }
.t1-inv-qty button:disabled { opacity: .5; }
.t1-inv-num { min-width: 46px; display: flex; flex-direction: column; align-items: center; line-height: 1; }
.t1-inv-num strong { font: 800 26px/1 var(--display); letter-spacing: -.02em; }
.t1-inv-num small { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-top: 2px; }

.t1-scanbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 16px; }
.t1-scan {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px; border-radius: var(--r-m); border: 0; cursor: pointer;
  font: 700 16px/1.2 var(--body); color: #fff; text-align: left;
}
.t1-scan--add { background: #1FA463; }
.t1-scan--remove { background: #D3284A; }
.t1-scan:active { transform: scale(.98); }
.t1-scan-sign { flex: none; width: 44px; height: 44px; border-radius: 14px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font: 800 19px/1 var(--display); }

.t1-sheet-sub { margin: 0 0 14px; color: var(--ink-2); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.t1-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: var(--cc); }
.t1-line { border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--r-m); padding: 14px; margin: 0 0 12px; }
.t1-line.is-opened { border-left-color: #E3A008; }
.t1-line-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.t1-line-amount { font-size: 15px; font-weight: 700; color: var(--ink-2); }
.t1-line-amount strong { font: 800 26px/1 var(--display); color: var(--ink); }
.t1-line-sub { flex-basis: 100%; color: var(--ink-3); font-size: 14px; }
.t1-line-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.t1-line-edit { margin-top: 12px; border-top: 1px dashed var(--line); }
.t1-line-edit summary { cursor: pointer; font-weight: 700; color: var(--ink-2); padding: 12px 0 6px; }
.t1-line-edit[open] summary { margin-bottom: 8px; }
.t1-save-state { margin: 10px 0 0; font-size: 13px; color: var(--ink-3); font-weight: 600; min-height: 1.4em; }
.t1-pair { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 6px; }
.t1-inline { display: flex; gap: 8px; align-items: center; }
.t1-inline input { flex: 1; min-width: 0; }
.t1-camera { margin-top: 10px; border-radius: var(--r-m); overflow: hidden; background: #000; color: #fff; text-align: center; }
.t1-camera video { display: block; width: 100%; max-height: 46vh; object-fit: cover; }
.t1-camera p { margin: 0; padding: 8px; font-size: 14px; }
.t1-scan-result { min-height: 1.5em; font-weight: 700; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.t1-scan-result.is-ok { color: #13784A; }
.t1-scan-result.is-error { color: var(--danger); }
.t1-body .t1-scan-form input[name="barcode"] { font: 800 24px/1 var(--display); letter-spacing: .04em; min-height: 58px; text-align: center; }

.t1-history { list-style: none; margin: 0; padding: 0; }
.t1-history li { padding: 10px 0 10px 14px; border-bottom: 1px solid var(--line-2); position: relative; }
.t1-history li::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 4px; border-radius: 4px; background: var(--who, var(--line)); }
.t1-history li div { display: flex; justify-content: space-between; gap: 12px; }
.t1-history-act { font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.t1-history-meta { display: block; color: var(--ink-3); font-size: 13px; margin-top: 2px; }
.t1-history .t1-empty::before { display: none; }

/* ---------- Mastervarer ---------- */
.t1-seg { display: inline-flex; background: var(--card); border: 2px solid var(--line); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.t1-seg button { border: 0; background: none; border-radius: 999px; min-height: 36px; padding: 0 14px; font: 650 14px/1 var(--body); color: var(--ink-2); cursor: pointer; }
.t1-seg button[aria-pressed="true"] { background: var(--c); color: #fff; }
.t1-master-panel { padding: 6px 20px; }
.t1-master-list { list-style: none; margin: 0; padding: 0; }
.t1-master-list .t1-empty { margin: 14px 0; }
.t1-master-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.t1-master-row:last-child { border-bottom: 0; }
.t1-master-main { flex: 1 1 220px; min-width: 0; text-align: left; background: none; border: 0; padding: 6px 0; font: inherit; color: inherit; cursor: pointer; display: flex; flex-direction: column; }
.t1-master-main strong { font-size: 16px; }
.t1-master-main span { font-size: 14px; color: var(--ink-3); }
.t1-master-flags { display: flex; gap: 6px; flex-wrap: wrap; }
.t1-toggle {
  min-height: 34px; padding: 0 12px; border-radius: 999px; border: 2px solid var(--line); background: var(--card);
  color: var(--ink-3); font: 650 13px/1 var(--body); cursor: pointer;
}
.t1-toggle[aria-pressed="true"] { background: var(--tc); border-color: var(--tc); color: #fff; }
.t1-fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 18px; }
.t1-fieldset legend { font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 2px; padding: 0; }

/* ---------- Sange ---------- */
.t1-song-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.t1-song {
  position: relative; display: flex; align-items: stretch; background: var(--card); border-radius: var(--r-m);
  border: 1px solid var(--line-2); box-shadow: 0 1px 0 rgba(19, 35, 58, .03); min-width: 0;
}
.t1-song.is-fav { border-color: #F2D27A; }
.t1-song-open {
  flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 14px 6px 14px 16px; font: inherit; color: inherit;
  cursor: pointer; display: flex; flex-direction: column; gap: 4px;
}
.t1-song-title { font: 700 19px/1.2 var(--display); letter-spacing: -.01em; overflow-wrap: anywhere; }
.t1-song-first { color: var(--ink-2); font-style: italic; font-size: 15px; overflow-wrap: anywhere; }
.t1-song-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 0; }
.t1-tag { display: inline-flex; padding: 2px 9px; border-radius: 999px; background: color-mix(in srgb, var(--c) 12%, #fff); color: color-mix(in srgb, var(--c) 75%, var(--ink)); font-size: 12.5px; font-weight: 700; }
.t1-tag--muted { background: var(--bg); color: var(--ink-3); }
.t1-star {
  flex: none; width: 48px; border: 0; background: none; color: #C9D3DE; font-size: 24px; cursor: pointer; display: grid; place-items: center;
  border-radius: 0 var(--r-m) var(--r-m) 0;
}
.t1-star[aria-pressed="true"], span.t1-star { color: #E3A008; }
.t1-star:hover { color: #E3A008; }
.t1-song-detail h3 { font-size: 17px; margin: 18px 0 6px; }
.t1-lyrics {
  white-space: pre-wrap; font: 500 calc(18px * var(--lyrics-scale, 1))/1.6 var(--body); margin: 8px 0 0; color: var(--ink);
  background: var(--bg); border-radius: var(--r-m); padding: 16px 18px;
}
.t1-chords { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: calc(15px * var(--lyrics-scale, 1)); }
.t1-reference { background: color-mix(in srgb, var(--c) 10%, #fff); border-radius: var(--r-m); padding: 16px 18px; margin-top: 8px; }
.t1-reference p { margin: 6px 0 0; color: var(--ink-2); }
.t1-song-notes { white-space: pre-wrap; margin: 0; }
.t1-size-ctrl { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.t1-size-ctrl .t1-icon-btn { font-size: 15px; font-weight: 800; width: 44px; height: 44px; }
.t1-hint { margin: 0; font-size: 13.5px; color: var(--ink-3); }
.t1-body textarea.t1-mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; }
.t1-master-row.is-inactive .t1-master-main strong { color: var(--ink-3); }

/* Lejrbål: mørk og varm, stor tekst */
body.t1-campfire {
  --bg: #19120D; --bg-2: #2A1F17; --card: #241A13; --ink: #FDEBD3; --ink-2: #EBCBA3; --ink-3: #B8987A;
  --line: #4A3828; --line-2: #36291E; --c: #F59E0B; --focus: #F59E0B;
  background-image: radial-gradient(ellipse 80% 50% at 50% 115%, rgba(245, 120, 11, .35), transparent 70%);
  background-attachment: fixed;
}
body.t1-campfire .t1-top { background: rgba(25, 18, 13, .86); }
body.t1-campfire .t1-tabbar { background: rgba(25, 18, 13, .96); }
body.t1-campfire .t1-pagehead-emoji { background: #F59E0B; }
body.t1-campfire .t1-tag { background: rgba(245, 158, 11, .16); color: #F8C471; }
body.t1-campfire .t1-song.is-fav { border-color: #8A5A12; }
body.t1-campfire .t1-reference { background: rgba(245, 158, 11, .12); }
body.t1-campfire .t1-song-title { font-size: 22px; }
body.t1-campfire .t1-lyrics { font-size: calc(22px * var(--lyrics-scale, 1)); line-height: 1.7; }
body.t1-campfire .t1-chip { background: var(--card); }
body.t1-campfire .t1-chip[aria-pressed="true"] { background: #F59E0B; border-color: #F59E0B; color: #19120D; }
body.t1-campfire .t1-chip[aria-pressed="true"] span { color: rgba(25, 18, 13, .7); }
body.t1-campfire .t1-chip[aria-pressed="true"]::before { background: #19120D; }
body.t1-campfire [data-campfire] { background: #F59E0B; color: #19120D; }
body.t1-campfire .t1-btn--ghost { color: var(--ink); }
body.t1-campfire .t1-me, body.t1-campfire .t1-nav a:hover { background: var(--card); }
body.t1-campfire .t1-search input { background-color: var(--card); }

/* ---------- Personlig side ---------- */
.t1-person {
  position: relative; overflow: hidden; display: flex; align-items: center; gap: 24px;
  padding: 28px; margin: 8px 0 20px; border-radius: 32px; background-color: var(--c); color: #fff;
  background-image:
    radial-gradient(circle at 92% -18%, rgba(255, 255, 255, .2) 0 130px, transparent 131px),
    radial-gradient(circle at 74% 128%, rgba(255, 255, 255, .13) 0 96px, transparent 97px);
}
.t1-person-magnet {
  flex: none; width: 108px; height: 108px; border-radius: 50%; background: #fff; display: grid; place-items: center;
  font-size: 56px; line-height: 1; transform: rotate(-6deg); box-shadow: 0 14px 26px -12px rgba(0, 0, 0, .45);
}
.t1-person-text { min-width: 0; }
.t1-person h1 { font-weight: 800; font-size: clamp(40px, 7vw, 64px); line-height: .98; letter-spacing: -.035em; margin: 0; }
.t1-person p { margin: 10px 0 0; font-size: 17px; max-width: 56ch; color: rgba(255, 255, 255, .92); }
.t1-person-actions { margin-top: 16px; display: flex; gap: 8px; flex-wrap: wrap; }
.t1-person .t1-btn--ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }
.t1-person .t1-btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.t1-guest-message { margin-top: 8px; }
.t1-guest-message p { margin: 6px 0 0; }
.t1-guest-message a { color: #fff; font-weight: 700; }

.t1-person-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.t1-person-grid > .t1-panel:only-child { grid-column: 1 / -1; }

.t1-add-row { display: grid; grid-template-columns: minmax(0, 1fr) 168px auto; gap: 10px; margin-bottom: 8px; }
.t1-checklist { list-style: none; margin: 0; padding: 0; }
.t1-checklist .t1-empty { border: 0; background: none; text-align: left; padding: 14px 2px; }
.t1-check-row { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line-2); }
.t1-check-row:last-child { border-bottom: 0; }
.t1-check-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t1-check-title { font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.t1-check-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; font-weight: 650; color: var(--ink-3); }
.t1-due.is-today { color: color-mix(in srgb, var(--c) 75%, var(--ink)); }
.t1-due.is-late { color: var(--danger); }
.t1-from { display: inline-flex; align-items: center; gap: 6px; }
.t1-from::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--who); }
.t1-check-row.is-done .t1-check-title { text-decoration: line-through; color: var(--ink-3); }
.t1-check-row.is-leaving { animation: t1-out .26s ease forwards; }
@keyframes t1-out { to { opacity: 0; transform: translateX(28px); } }
.t1-done { margin-top: 10px; border-top: 1px dashed var(--line); }
.t1-done summary { cursor: pointer; font-weight: 700; color: var(--ink-2); padding: 14px 2px 6px; list-style-position: inside; }

.t1-mini-list { list-style: none; margin: 0; padding: 0; }
.t1-mini-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-weight: 600; }
.t1-mini-list li:last-child { border-bottom: 0; }
.t1-mini-list .t1-qty { height: 28px; min-width: 28px; font-size: 15px; line-height: 28px; }

.t1-family-strip { margin-top: 34px; }
.t1-family-strip h2 { font-family: var(--body); font-size: 15px; font-weight: 700; color: var(--ink-3); margin: 0 0 2px 4px; }
.t1-fridge--small { padding: 12px 4px; gap: 14px 20px; }

.t1-guest-login { margin-top: 18px; max-width: 520px; }
.t1-guest-login h2 { margin: 0 0 4px; font-size: 22px; }
.t1-guest-login p { margin: 0 0 14px; color: var(--ink-2); }
.t1-guest-shop .t1-shop-add { box-shadow: none; border: 0; padding: 0; margin-bottom: 14px; }
.t1-guest-shop .t1-shop-row { box-shadow: none; }

/* ---------- Login-port ---------- */
.t1-gate {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; flex: 1;
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 8% 12%, #2F5BEA 0 70px, transparent 71px),
    radial-gradient(circle at 94% 20%, #E0336E 0 54px, transparent 55px),
    radial-gradient(circle at 88% 92%, #8B4DEB 0 88px, transparent 89px),
    radial-gradient(circle at 12% 88%, #F07A12 0 46px, transparent 47px);
}
.t1-gate-card { background: var(--card); border-radius: 32px; padding: 36px 32px; max-width: 460px; width: 100%; box-shadow: 0 30px 60px -30px rgba(19, 35, 58, .45); }
.t1-gate-card .t1-dots { grid-template-columns: repeat(2, 22px); gap: 6px; }
.t1-gate-card .t1-dots i { width: 22px; height: 22px; }
.t1-gate-card h1 { font-weight: 800; font-size: 40px; line-height: 1.02; letter-spacing: -.03em; margin: 22px 0 10px; }
.t1-gate-card p { margin: 0; color: var(--ink-2); font-size: 17px; }
.t1-gate .t1-gate-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

/* ---------- Ark (dialog) ---------- */
.t1-sheet-wrap {
  position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center;
  background: rgba(19, 35, 58, 0); transition: background-color .18s ease;
}
.t1-sheet-wrap.is-open { background: rgba(19, 35, 58, .45); }
.t1-sheet {
  width: 100%; max-width: 560px; max-height: 90vh; max-height: 90dvh; overflow: auto; overscroll-behavior: contain;
  background: var(--card); border-radius: 26px 26px 0 0; padding: 0 20px calc(22px + env(safe-area-inset-bottom));
  transform: translateY(100%); transition: transform .24s cubic-bezier(.2, .8, .2, 1);
}
.t1-sheet-wrap.is-open .t1-sheet { transform: none; }
.t1-sheet-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 0 12px; background: var(--card); }
.t1-sheet-head h2 { margin: 0; font-size: 23px; font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
.t1-sheet-body { padding-bottom: 4px; }
.t1-form { display: grid; gap: 14px; }
.t1-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.t1-form-grid .is-wide { grid-column: 1 / -1; }
.t1-sheet-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
.t1-sheet-actions .t1-btn--danger-ghost { margin-right: auto; }

/* ---------- Toast ---------- */
.t1-toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 120;
  transform: translate(-50%, 160%); opacity: 0; transition: transform .24s cubic-bezier(.2, .8, .2, 1), opacity .2s;
  display: flex; align-items: center; gap: 16px; max-width: calc(100% - 32px); width: max-content;
  background: var(--ink); color: #fff; border-radius: 16px; padding: 13px 18px; font-weight: 650;
  box-shadow: 0 16px 32px -14px rgba(19, 35, 58, .6);
}
.t1-toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.t1-toast.is-error { background: var(--danger); }
.t1-toast-undo { background: none; border: 0; color: #FFD25E; font: 800 15px/1 var(--body); cursor: pointer; padding: 6px 2px; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Mobil ---------- */
@media (max-width: 760px) {
  .t1-top-in { padding: 8px 16px; min-height: 58px; }
  .t1-nav, .t1-me-name, .t1-top-link { display: none; }
  .t1-me { padding: 3px; }
  .t1-main { padding: 14px 16px calc(var(--tabbar-h) + 36px + env(safe-area-inset-bottom)); }

  .t1-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    background: rgba(255, 255, 255, .96); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-top: 1px solid var(--line-2); padding-bottom: env(safe-area-inset-bottom);
  }
  .t1-tabbar a {
    position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    min-height: var(--tabbar-h); padding: 6px 2px; text-decoration: none; color: var(--ink-3); font-size: 11.5px; font-weight: 700;
  }
  .t1-tab-icon { font-size: 23px; line-height: 1; filter: saturate(.3); opacity: .7; transition: transform .15s; }
  .t1-tabbar a[aria-current="page"] { color: var(--ink); }
  .t1-tabbar a[aria-current="page"] .t1-tab-icon { filter: none; opacity: 1; transform: translateY(-1px) scale(1.08); }
  .t1-tabbar a[aria-current="page"]::before {
    content: ""; position: absolute; top: 0; left: 50%; width: 30px; height: 4px; margin-left: -15px;
    border-radius: 0 0 4px 4px; background: var(--c);
  }
  .t1-toast { bottom: calc(var(--tabbar-h) + 14px + env(safe-area-inset-bottom)); }

  .t1-fridge { gap: 14px 4px; justify-content: space-between; flex-wrap: nowrap; padding: 22px 0 26px; }
  .t1-magnet { width: 64px; flex: 0 1 64px; min-width: 0; }
  .t1-magnet-face { width: 58px; height: 58px; font-size: 29px; }
  .t1-magnet-name { font-size: 13.5px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .t1-magnet-badge { min-width: 24px; height: 24px; font-size: 13px; line-height: 19px; padding: 0 6px; right: -8px; }
  .t1-magnet--guest .t1-magnet-face { font-size: 26px; }
  .t1-fridge--small { justify-content: flex-start; gap: 14px 18px; flex-wrap: wrap; }

  .t1-tiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .t1-tile { grid-template-columns: 1fr; grid-template-rows: auto; row-gap: 4px; padding: 16px; min-height: 0; align-content: start; }
  .t1-tile-emoji { grid-row: auto; width: 48px; height: 48px; font-size: 25px; border-radius: 15px; margin-bottom: 6px; }
  .t1-tile-title { font-size: 20px; }
  .t1-tile-stat { font-size: 14px; }
  .t1-tile--lead { grid-template-columns: auto 1fr; padding: 18px; min-height: 0; }
  .t1-tile--lead .t1-tile-emoji { grid-row: span 2; width: 60px; height: 60px; font-size: 32px; margin: 0; }
  .t1-tile--lead .t1-tile-title { font-size: 26px; }

  .t1-pagehead { padding: 6px 0 16px; gap: 14px; flex-wrap: wrap; }
  .t1-pagehead-emoji { width: 54px; height: 54px; font-size: 29px; border-radius: 17px; }
  .t1-pagehead-actions { margin-left: 0; width: 100%; justify-content: flex-start; }

  .t1-shop-add { grid-template-columns: 1fr 1fr; grid-template-areas: "item item" "note note" "amount submit"; padding: 14px; gap: 10px; }
  .t1-field--item { grid-area: item; }
  .t1-field--note { grid-area: note; }
  .t1-field--amount { grid-area: amount; }
  .t1-shop-submit { grid-area: submit; min-height: 48px; }
  .t1-listbar { max-width: none; }
  /* Noten fylder kun, når man er i gang med at skrive */
  .t1-shop-add { grid-template-areas: "item item" "note note" "amount submit"; }
  .t1-shop-add:not(:focus-within) .t1-field--note:has(input:placeholder-shown) { display: none; }

  .t1-person { flex-direction: column; align-items: flex-start; gap: 16px; padding: 22px; border-radius: 28px; }
  .t1-person-magnet { width: 84px; height: 84px; font-size: 44px; }
  .t1-person-grid { grid-template-columns: 1fr; }
  .t1-add-row { grid-template-columns: minmax(0, 1fr) auto; }
  .t1-add-row input[name="title"] { grid-column: 1 / -1; }
  .t1-panel { padding: 16px; border-radius: 22px; }
  .t1-form-grid { grid-template-columns: 1fr; }
  .t1-gate-card { padding: 28px 22px; }
  .t1-inv-grid { grid-template-columns: 1fr; gap: 8px; }
  .t1-inv-cat h2 { font-size: 18px; }
  .t1-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 4px; scrollbar-width: none; }
  .t1-chips::-webkit-scrollbar { display: none; }
  .t1-scan { min-height: 58px; font-size: 15px; padding: 8px 12px; gap: 10px; }
  .t1-scan-sign { width: 38px; height: 38px; font-size: 17px; }
  .t1-master-panel { padding: 4px 14px; }
  .t1-pagehead-actions .t1-btn { flex: 1 1 auto; }
  .t1-song-grid { grid-template-columns: 1fr; gap: 8px; }
}

@media (min-width: 761px) {
  .t1-sheet-wrap { align-items: center; padding: 24px; }
  .t1-sheet { border-radius: 26px; transform: translateY(16px) scale(.98); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
  .t1-sheet-wrap.is-open .t1-sheet { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .t1-body *, .t1-body *::before, .t1-body *::after { animation: none !important; transition: none !important; }
}

@media print {
  .t1-top, .t1-tabbar, .t1-toast, .t1-shop-add, .t1-listbar { display: none !important; }
  body.t1-body { background: #fff; }
}
