/* Flomlys: kveldskamp under lyskasterne. Mørk marineblå, gult lys for «i dag» og hovedknapper. */
:root {
  --canvas: #0F1A2E;
  --deep: #0B1424;
  --surface: #15223A;
  --surface-2: #1C2C48;
  --surface-3: #24375A;
  --ink: #EAF0FA;
  --muted: #8C9BB5;
  --line: #243552;
  --accent: #FFC83D;
  --accent-ink: #1A1300;
  --accent-glow: rgb(255 200 61 / .5);
  --ok: #7BE0A8;
  --due: #FF9D4D;
  --due-bg: #3A2614;
  --published: #8BA9D6;
  --draft: #7E8CA6;
  --danger: #FF8A80;
  --ig: #D62976;
  --tt: #0A9396;
  --yt: #E62117;
  --fb: #1877F2;
  --radius: 10px;
  --font: 'Saira', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Saira Condensed', 'Saira', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--canvas);
}
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: rgb(255 200 61 / .35); }
* { scrollbar-color: var(--surface-3) transparent; }

/* ---------- Knapper ---------- */
.btn-primary, .btn-ghost, .btn-danger, .btn-icon {
  border-radius: 8px; padding: 7px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
  border: 1px solid transparent; background: none; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { border-color: var(--line); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }
.btn-icon { padding: 4px 10px; font-size: 20px; line-height: 1; }
.btn-icon:hover { background: var(--surface-2); }
.small { padding: 4px 10px; font-size: 13px; }
.btn-gear { width: 36px; height: 36px; padding: 0; display: grid; place-items: center; }
.btn-gear svg { width: 18px; height: 18px; }

/* ---------- Hovedområde ---------- */
.main { min-width: 0; display: flex; flex-direction: column; height: 100vh; }
.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 16px 24px 12px;
}
.nav { display: flex; align-items: center; gap: 6px; }
.brand {
  font-family: var(--display); font-weight: 800; font-size: 27px; line-height: 1; color: var(--ink);
  display: flex; align-items: center; gap: 8px; margin-right: 14px;
}
.brand::before {
  content: ''; width: 8px; height: 26px; border-radius: 2px;
  background: var(--accent); box-shadow: 0 0 16px var(--accent-glow);
}
.title {
  margin: 0 0 0 10px;
  font-family: var(--display); font-weight: 800; font-size: 38px; line-height: 1;
}
.title .sub { font-weight: 500; color: var(--muted); }
.toolbar-right { display: flex; gap: 10px; align-items: center; }
.segmented { display: flex; border: 1px solid var(--line); border-radius: 8px; padding: 2px; background: var(--surface); }
.segmented button { border: 0; background: none; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--muted); }
.segmented button:hover { color: var(--ink); }
.lang-switch button { padding: 5px 9px; font-size: 13px; letter-spacing: .02em; }
.lang-switch button[aria-pressed="true"],
.segmented button[aria-selected="true"] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }

.due-banner {
  margin: 0 24px 12px; padding: 10px 14px; border-radius: var(--radius); border: 0; text-align: left; cursor: pointer;
  background: var(--due-bg); color: var(--due); font-weight: 600; box-shadow: inset 4px 0 0 var(--due);
}
.view { flex: 1; min-height: 0; padding: 0 24px 24px; overflow: auto; }

/* Måned */
.month {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-template-rows: auto repeat(6, minmax(108px, 1fr));
  gap: 6px; min-height: 100%;
}
.dow { grid-row: 1; font-size: 13px; font-weight: 600; color: var(--muted); padding: 4px 8px 2px; background: var(--canvas); position: sticky; top: 0; z-index: 1; }
.day {
  background: var(--surface); border: 1px solid transparent; border-radius: var(--radius);
  padding: 6px; display: flex; flex-direction: column; gap: 4px; min-width: 0; cursor: pointer;
}
.day:hover { border-color: var(--line); }
.day.out { background: transparent; border-color: var(--line); }
.day.out .num { opacity: .4; }
.day.past:not(.today) .num { color: var(--muted); }
.num { font-family: var(--display); font-weight: 800; font-size: 24px; line-height: 1; font-variant-numeric: tabular-nums; }
.day.today { background: linear-gradient(180deg, rgb(255 200 61 / .16), var(--surface) 55%); border-color: rgb(255 200 61 / .55); }
.day.today .num { color: var(--accent); text-shadow: 0 0 14px var(--accent-glow); }
.day.drop, .wcol.drop { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--surface)); }
.month-head { display: contents; }

.day { container-type: inline-size; }
.chip {
  overflow: hidden;
  display: flex; align-items: center; gap: 6px; padding: 3px 5px 3px 3px; border-radius: 6px;
  background: var(--surface-2); border: 0; border-left: 3px solid var(--acc, var(--line)); cursor: grab;
  font-size: 12.5px; text-align: left; min-width: 0; width: 100%;
}
.chip:hover { background: var(--surface-3); }
.chip .mini { width: 18px; aspect-ratio: 9/16; border-radius: 3px; background: var(--line) center / cover; flex: none; }
.chip .time { font-weight: 700; font-variant-numeric: tabular-nums; }
.chip .label { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; flex: 1; color: var(--muted); }
.chip.st-published { opacity: .55; }
.chip.st-due { background: var(--due-bg); }
.chip.st-draft { border-left-style: dashed; background: transparent; box-shadow: inset 0 0 0 1px var(--line); }
@container (max-width: 150px) {
  .chip .label { display: none; }
  .chip .pf i { width: 11px; height: 11px; }
}
@container (max-width: 90px) {
  .chip .mini { display: none; }
}
.more { font-size: 12px; color: var(--muted); padding-left: 4px; }

.pf { display: inline-flex; gap: 2px; flex: none; }
.pf i { font-style: normal; width: 15px; height: 15px; border-radius: 4px; display: grid; place-items: center; }
.pf i.done { opacity: .3; }
/* Plattformikonene (SVG-symboler i index.html) */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.pf-icon { width: 100%; height: 100%; display: block; }

/* Uke */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; min-height: 100%; }
.wcol { display: flex; flex-direction: column; gap: 10px; border-radius: var(--radius); padding: 8px; min-width: 0; cursor: pointer; border: 1px solid transparent; }
.wcol:hover { background: var(--surface); }
.whead { display: flex; align-items: baseline; gap: 6px; padding-bottom: 6px; border-bottom: 2px solid var(--line); }
.wcol.today .whead { border-color: var(--accent); }
.whead .num { font-size: 40px; }
.wcol.today .whead .num { color: var(--accent); text-shadow: 0 0 16px var(--accent-glow); }
.whead .wd { color: var(--muted); font-weight: 600; }
.card {
  border: 0; padding: 0; background: none; text-align: left; cursor: grab; display: flex; flex-direction: column; gap: 6px;
}
.card .poster { border-radius: 8px; background-color: var(--surface-2); box-shadow: 0 0 0 3px var(--acc, transparent); }
.card .poster .ph { color: var(--muted); }
.card .meta { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.card .time { font-family: var(--display); font-weight: 800; font-size: 19px; font-variant-numeric: tabular-nums; }
.card .cap { font-size: 12.5px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.status { font-size: 11.5px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-left: auto; white-space: nowrap; }
.status.draft { color: var(--draft); box-shadow: inset 0 0 0 1px var(--draft); }
.status.scheduled { color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, transparent); }
.status.due { color: var(--due); background: var(--due-bg); }
.status.published { color: var(--published); background: color-mix(in srgb, var(--published) 16%, transparent); }
.add-hint { color: var(--muted); font-size: 13px; opacity: 0; transition: opacity .15s; }
.wcol:hover .add-hint { opacity: 1; }

/* Plakat for klipp (brukes i uke, klippvelger) */
.poster {
  aspect-ratio: 9 / 16;
  width: 100%;
  border-radius: 8px;
  background: var(--surface-2) center / cover no-repeat;
  display: grid; place-items: center;
  overflow: hidden;
  position: relative;
}
.poster img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster .ph { font-family: var(--display); font-weight: 800; font-size: 22px; color: var(--muted); }

/* Liste – som et kampprogram */
.list { max-width: 900px; display: flex; flex-direction: column; gap: 28px; }
.list h2 { margin: 0 0 6px; font-family: var(--display); font-size: 24px; font-weight: 800; }
.list h2 .n { color: var(--muted); font-weight: 500; }
.fixture {
  display: grid; grid-template-columns: 64px 54px 34px 1fr auto; align-items: center; gap: 14px;
  padding: 10px 8px; border-bottom: 1px solid var(--line); cursor: pointer; background: none; border-left: 0; border-right: 0; border-top: 0; width: 100%; text-align: left; border-radius: 0;
}
.fixture:hover { background: var(--surface); }
.fx-date { display: flex; flex-direction: column; line-height: 1; }
.fx-date .d { font-family: var(--display); font-weight: 800; font-size: 30px; font-variant-numeric: tabular-nums; }
.fx-date .m { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.fx-time { font-family: var(--display); font-weight: 800; font-size: 21px; font-variant-numeric: tabular-nums; }
.fx-thumb { width: 34px; aspect-ratio: 9/16; border-radius: 4px; background: var(--surface-2) center / cover; }
.fx-body { min-width: 0; }
.fx-body .acc { font-weight: 700; display: flex; align-items: center; gap: 8px; }
.fx-body .acc .swatch { width: 10px; height: 10px; border-radius: 50%; }
.fx-body .cap { color: var(--muted); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.fx-right { display: flex; align-items: center; gap: 10px; }
.empty { color: var(--muted); padding: 10px 8px; }

/* ---------- Statistikk ---------- */
.mode-switch { margin-right: 10px; }
.stats { display: flex; flex-direction: column; gap: 14px; }
.stats-grid { display: grid; grid-template-columns: minmax(380px, 580px) minmax(0, 1fr); gap: 20px; align-items: start; }
.stats-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.stats-updated { color: var(--muted); font-size: 13px; }
.stat-cards { display: flex; flex-direction: column; gap: 12px; }
.stat-card { background: var(--surface); border-radius: var(--radius); padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.stat-head { display: flex; align-items: center; gap: 10px; }
.stat-head strong { font-family: var(--display); font-size: 20px; font-weight: 800; line-height: 1; }
.stat-head .muted { color: var(--muted); font-size: 13px; }
.stat-icon { width: 24px; height: 24px; flex: none; }
.stat-note { margin: 0; color: var(--muted); font-size: 13.5px; max-width: 60ch; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 6px; }
.tile { background: var(--canvas); border-radius: 8px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tile-k { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tile-v { font-family: var(--display); font-weight: 800; font-size: 26px; line-height: 1.05; font-variant-numeric: tabular-nums; }
.tile .delta { font-size: 11.5px; line-height: 1.3; color: var(--muted); }
.tile .delta.up { color: var(--ok); }
.tile .delta.down { color: var(--danger); }
.stat-top { min-width: 0; }
.stat-top h2 { margin: 2px 0 8px; font-family: var(--display); font-size: 24px; font-weight: 800; }
.stat-table { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.stat-table th:nth-child(1) { width: 50px; } .stat-table th:nth-child(3), .stat-table th:nth-child(4) { width: 76px; }
.stat-table th:nth-child(5) { width: 96px; } .stat-table th:nth-child(6) { width: 60px; }
.stat-table th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.stat-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.stat-table tr:hover td { background: var(--surface); }
.stat-table .ncol { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-table a { color: var(--accent); font-weight: 600; }
.st-thumb { width: 44px; }
.st-thumb img { width: 34px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 4px; display: block; background: var(--surface-2); }
.st-title > * { vertical-align: middle; }
.st-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.st-title > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.st-title strong { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.st-title small { color: var(--muted); font-size: 12px; }
@media (max-width: 1100px) { .stats-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .mode-switch { margin-right: 0; }
  .stat-table th:nth-child(5), .stat-table td:nth-child(5) { display: none; }
  .stat-table th:nth-child(5) { width: 0; }
}

/* ---------- Dialoger ---------- */
dialog {
  overflow: hidden; border: 1px solid var(--line); padding: 0; border-radius: 16px;
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / .5); max-height: calc(100vh - 40px);
}
dialog::backdrop { background: rgb(4 9 18 / .7); }
.editor { width: min(920px, calc(100vw - 32px)); }
.editor form { display: grid; grid-template-columns: 300px 1fr; }
.editor-media { background: var(--deep); padding: 18px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 40px); overflow: auto; }
.preview { aspect-ratio: 9 / 16; border-radius: 10px; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 0; }
.preview video, .preview img { width: 100%; height: 100%; object-fit: contain; background: #000; display: block; }
.preview .empty-media { padding: 20px; font-size: 14px; }
.media-actions { display: flex; gap: 8px; }
.media-name { font-size: 12.5px; color: var(--muted); word-break: break-word; margin: 0; }
.editor-fields { min-width: 0; padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 14px; overflow: auto; max-height: calc(100vh - 40px); }
.editor-head { display: flex; justify-content: space-between; align-items: center; }
.editor-head h2 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 30px; line-height: 1.1; }
.field { display: flex; flex-direction: column; gap: 5px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 5px; }
.field input, .field textarea {
  border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--canvas); width: 100%;
}
.field input:focus, .field textarea:focus { border-color: color-mix(in srgb, var(--accent) 60%, var(--line)); outline: none; }
.field textarea { resize: vertical; }
.field small { color: var(--muted); font-size: 12.5px; }
.counter.over { color: var(--danger); font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.platform-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.ptoggle { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 8px; border-radius: 999px; border: 1px solid var(--line); cursor: pointer; font-weight: 600; font-size: 14px; user-select: none; color: var(--muted); }
.ptoggle input { position: absolute; opacity: 0; pointer-events: none; }
.ptoggle .dot { width: 20px; height: 20px; display: grid; place-items: center; opacity: .35; filter: grayscale(1); transition: opacity .15s, filter .15s; }
.ptoggle:has(input:checked) { border-color: var(--ink); color: var(--ink); }
.ptoggle:has(input:checked) .dot { opacity: 1; filter: none; }
.ptoggle:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-targets { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.target-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.target-row > span { font-size: 13px; color: var(--muted); min-width: 110px; }
.target-opts { display: flex; gap: 4px; flex-wrap: wrap; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: var(--canvas); }
.target-opts button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); }
.target-opts button:hover:not(:disabled) { color: var(--ink); }
.target-opts button[aria-pressed="true"] { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); }
.target-opts button:disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; }
.due-box { background: var(--due-bg); color: var(--ink); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.due-box p { margin: 0; }
.due-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.caption-qr { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.caption-qr[hidden] { display: none; }
.caption-qr svg { display: block; width: 300px; max-width: 100%; height: auto; border-radius: 8px; }
.caption-qr p { font-size: 13px; max-width: 240px; }
.due-platforms { display: flex; flex-wrap: wrap; gap: 12px; }
.due-platforms label { display: flex; gap: 6px; align-items: center; font-weight: 600; }
.editor-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding-top: 4px; }
.spacer { flex: 1; }
.error { color: var(--danger); margin: 0; font-weight: 600; }
.settings { width: min(620px, calc(100vw - 32px)); }
.settings form { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 16px; max-height: calc(100vh - 40px); overflow: auto; }
.folder-row { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.folders-view { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.platform-status { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.platform-status li { display: flex; gap: 8px; align-items: center; }
.platform-status .off { color: var(--muted); }

/* ---------- Velg klipp ---------- */
.clip-picker { width: min(1000px, calc(100vw - 32px)); height: min(740px, calc(100vh - 40px)); }
.clip-picker[open] { display: flex; flex-direction: column; }
.pick-top { padding: 18px 22px 0; display: flex; flex-direction: column; gap: 12px; }
.src-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); }
.src-tabs button {
  background: none; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 8px 14px 10px;
  cursor: pointer; color: var(--muted); font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.src-tabs button:hover { color: var(--ink); }
.src-tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent); }
.src-tabs svg { width: 16px; height: 16px; }
.pick-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pick-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 22px 12px; }
.pick-accounts { display: flex; gap: 6px; flex-wrap: wrap; }
.pick-accounts button {
  cursor: pointer; border: 1px solid var(--line); background: none; border-radius: 999px; padding: 4px 12px 4px 10px;
  font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 7px; color: var(--muted);
}
.pick-accounts button:hover { color: var(--ink); }
.pick-accounts button[aria-pressed="true"] { background: var(--surface-2); border-color: var(--ink); color: var(--ink); }
.pick-accounts .swatch { width: 9px; height: 9px; border-radius: 50%; }
.pick-accounts .count { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; }
.lib-search {
  flex: 1; min-width: 180px; padding: 7px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--canvas); color: var(--ink);
}
.lib-search::placeholder { color: var(--muted); }
.lib-unused { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; white-space: nowrap; }
.library {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; align-content: start;
  padding: 4px 22px 22px;
}
.clip {
  position: relative; border: 0; padding: 0; background: none; text-align: left; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.clip:hover .poster, .clip:focus-visible .poster { box-shadow: 0 0 0 2px var(--accent); }
.clip:focus-visible { outline: none; }
.clip .dur {
  position: absolute; right: 5px; top: 5px; font-size: 11px; font-weight: 600;
  background: rgb(0 0 0 / .6); color: #fff; padding: 0 5px; border-radius: 4px; font-variant-numeric: tabular-nums;
}
.clip .used {
  position: absolute; left: 5px; bottom: 5px; font-size: 11px; font-weight: 700;
  background: var(--accent); color: var(--accent-ink); padding: 0 6px; border-radius: 4px;
}
.clip .clip-name {
  font-size: 12.5px; line-height: 1.25; color: var(--ink);
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word;
}
.lib-empty { grid-column: 1 / -1; color: var(--muted); }
.pick-pc { padding: 22px; }
.drop-zone {
  flex: 1; border: 2px dashed var(--line); border-radius: 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; color: var(--muted); padding: 20px;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, transparent); }
.drop-zone:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.drop-zone svg { width: 44px; height: 44px; color: var(--accent); }
.drop-zone strong { color: var(--ink); font-size: 18px; }
.drop-zone small { font-size: 12.5px; max-width: 46ch; }
.pick-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px;
}
.pick-folders { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--canvas); padding: 10px 16px; border-radius: 10px; font-weight: 600; z-index: 10;
}
.toast[popover] { inset: auto auto 20px 50%; margin: 0; border: 0; max-width: min(560px, calc(100vw - 32px)); }

/* ---------- Mindre skjermer ---------- */
@media (max-width: 1100px) {
  .week { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .main { height: auto; min-height: 100vh; }
  .toolbar { padding: 12px 16px; }
  .brand { display: none; }
  .view { padding: 0 16px 16px; }
  .due-banner { margin: 0 16px 12px; }
  .title { font-size: 28px; }
  .month { gap: 4px; grid-template-rows: auto repeat(6, minmax(80px, auto)); }
  .chip .label, .chip .mini { display: none; }
  .week { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor form { grid-template-columns: 1fr; }
  .editor-media { max-height: none; }
  .preview { max-height: 50vh; aspect-ratio: auto; height: 50vh; }
  .fixture { grid-template-columns: 52px 48px 1fr auto; }
  .fx-thumb { display: none; }
  .library { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; padding: 4px 16px 16px; }
  .pick-top, .pick-filters, .pick-foot { padding-left: 16px; padding-right: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Automatisk publisering ---------- */
.pf i.failed { outline: 2px solid var(--danger); outline-offset: 1px; }
.pf i.publishing { animation: pp-pulse 1.2s ease-in-out infinite; }
@keyframes pp-pulse { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .pf i.publishing { animation: none; } }
.due-banner.has-failed { box-shadow: inset 4px 0 0 var(--danger); }
.pf-hint { margin-top: 8px; color: var(--muted); font-size: 12.5px; }
.pf-hint .auto { color: var(--ok); font-weight: 600; }
.due-platforms { flex-direction: column; gap: 8px; align-items: stretch; }
.res-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.res-note { font-size: 13px; }
.res-note .error { display: inline; }
.res-note .busy { color: var(--muted); }
.res-note .auto-note { color: var(--ok); font-weight: 600; }
.pf i.inbox { outline: 2px dashed var(--accent); outline-offset: 1px; }
.res-note a { color: var(--accent); font-weight: 600; }
a.btn-primary { display: inline-flex; text-decoration: none; }
button.link { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; }
.ig-panel { display: flex; flex-direction: column; gap: 10px; border-top: 1px solid var(--line); padding-top: 14px; }
.ig-panel h3 { margin: 0; font-family: var(--display); font-size: 20px; font-weight: 800; }
.ig-panel .ig-help { margin: 0; font-size: 13px; color: var(--muted); }
.ig-panel .ig-help strong { color: var(--ink); }
.ig-panel a:not(.btn-primary) { color: var(--accent); }
.ig-actions { margin: 0; display: flex; gap: 8px; }
.copy-row { display: flex; gap: 6px; }
.copy-row input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--canvas); font-size: 13px; }
.ig-paste summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.ig-paste[open] { display: flex; flex-direction: column; gap: 6px; }
.ig-accounts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ig-accounts li { display: grid; grid-template-columns: 1fr auto auto; gap: 6px 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--canvas); }
.ig-user { display: flex; flex-direction: column; min-width: 0; }
.ig-user small { font-size: 12px; color: var(--muted); }
.ig-user small.error, .ig-warn { color: var(--danger); }
.ig-map { display: flex; flex-direction: column; font-size: 11.5px; color: var(--muted); gap: 2px; }
.ig-map select { border: 1px solid var(--line); border-radius: 6px; padding: 4px 6px; background: var(--surface); color: var(--ink); font: inherit; font-size: 13px; }
.ig-warn { grid-column: 1 / -1; font-size: 12px; font-weight: 600; }
@media (max-width: 560px) { .ig-accounts li { grid-template-columns: 1fr; } }
