/* The working account draft shares the design preview's visual foundations. */
:root {
  font-family: var(--font-ui);
  color: var(--color-ink);
  background: var(--color-canvas);
  --green: var(--color-accent);
  --muted: var(--color-muted);
  --border: var(--color-line);
}
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 100;
  padding: 12px 18px;
  background: white;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
  border-radius: 8px;
  transform: translateY(-150%);
  /* Transparent as well as moved up: a full-page capture of a scrolled page would otherwise paint it mid-page. */
  opacity: 0;
}
/* Shown for keyboard focus only, so focus that a script or a click puts on the link leaves it hidden. */
.skip-link:focus-visible {
  transform: translateY(0);
  opacity: 1;
}
.topbar {
  background: var(--color-surface);
  height: 76px;
  padding-inline: 32px;
}
.brand {
  color: var(--color-ink);
  font-size: 24px;
}
.brand-icon {
  background: none;
  color: var(--color-accent);
  width: 34px;
  height: 34px;
}
.brand-icon .icon {
  width: 32px;
  height: 32px;
}
.account {
  margin-left: 12px;
}
.account:only-child {
  margin-left: auto;
}
button:hover {
  background: var(--color-accent-hover);
}
button.secondary {
  color: var(--color-accent);
  border-color: #bfcec5;
}
button.secondary:hover {
  background: #edf4ef;
}
button.nav.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
button.nav:hover {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
.aside-note,
.dev-box,
footer {
  color: #58675c;
  font-size: 13px;
}
aside {
  background: var(--color-sidebar);
}
.panel,
.login-card {
  border-radius: var(--radius-panel);
  box-shadow: var(--shadow-panel);
}
sv-authenticator-setup {
  display: block;
  min-width: 0;
  max-width: 40rem;
}
.authenticator-qr {
  display: block;
  width: 256px;
  max-width: 100%;
  height: auto;
  margin: 20px auto 12px;
  background: white;
  image-rendering: pixelated;
}
.authenticator-account {
  text-align: center;
  color: var(--color-muted);
  overflow-wrap: anywhere;
}
.authenticator-manual {
  border-block: 1px solid var(--color-line);
  margin-block: 20px;
}
.authenticator-manual > summary {
  padding-block: 12px;
  min-height: 44px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
}
.authenticator-manual .secret {
  user-select: all;
}
.authenticator-manual [role='status']:empty {
  display: none;
}
.authenticator-restart {
  margin-top: 16px;
}
.eyebrow {
  color: var(--color-muted);
}
input,
select {
  color: var(--color-ink);
  border-color: #d1dbd3;
}
.intro h1 {
  color: var(--color-ink);
}
.screen-art {
  background: #e5ece3;
  box-shadow: 26px 16px 0 #f0efe6;
}
.screen-art > div {
  border-color: var(--color-accent);
  color: #214d3c;
}
@media (max-width: 640px) {
  .topbar {
    padding-inline: 16px;
    gap: 12px;
    flex-wrap: wrap;
    height: auto;
    min-height: 74px;
    padding-block: 12px;
  }
  .brand {
    font-size: 20px;
  }
  .byline {
    display: none;
  }
  .account {
    margin-left: auto;
  }
}

/* The AI entry is a real link, including keyboard and open-in-new-tab support. */
a.nav {
  display: block;
  text-decoration: none;
  box-sizing: border-box;
  text-align: left;
  width: 100%;
  border: 0;
  border-radius: 8px;
  color: var(--color-muted);
  font-weight: 500;
  margin: 4px 0;
  padding: 12px;
}
a.nav:hover,
a.nav.active {
  background: var(--color-accent-soft);
  color: var(--color-accent);
}
a.nav .icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-right: 9px;
}
.ai-account-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.price-bounds,
.weekday-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-block: 1rem;
}
.sales-screen h3 {
  margin: 0 0 0.5rem;
}
.price-rule {
  border: 1px solid var(--color-line);
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.price-rule .store-form-grid {
  margin-block: 1rem;
}
.supplier-permission {
  border-top: 1px solid var(--color-line);
  padding-block: 1rem;
}
.sales-screen fieldset > label,
.sales-screen fieldset > p,
.sales-screen fieldset > button {
  margin-top: 1rem;
}
.empty-screen {
  display: grid;
  place-items: center;
  width: 88px;
  aspect-ratio: 16 / 9;
  border: 5px solid #203034;
  border-radius: 5px;
  flex-shrink: 0;
  background: var(--color-accent-soft);
}
.empty-screen.portrait {
  width: 50px;
  aspect-ratio: 9 / 16;
  margin-inline: 19px;
}
.market-hours {
  list-style: none;
  padding: 0;
}
.market-hours li {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  border-bottom: 1px solid var(--color-line);
  padding-block: 0.75rem;
}
.market-hours strong {
  margin-left: auto;
}
.plain-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
sv-sales-workspace,
sv-marketplace-workspace,
sv-market-settings {
  display: block;
}
:is(sv-sales-workspace, sv-marketplace-workspace, sv-market-settings) fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
:is(sv-sales-workspace, sv-marketplace-workspace, sv-market-settings) form > fieldset {
  display: grid;
  gap: 20px;
}
:is(sv-sales-workspace, sv-marketplace-workspace, sv-market-settings) textarea {
  font: inherit;
  display: block;
  width: 100%;
  resize: vertical;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  padding: 12px;
}
:is(sv-sales-workspace, sv-marketplace-workspace, sv-market-settings) button {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
:is(sv-sales-workspace, sv-marketplace-workspace, sv-market-settings) .icon {
  width: 20px;
  height: 20px;
}
.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1rem;
}
.section-heading .badge {
  flex-shrink: 0;
}
.settings-comparison > div {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding-block: 0.6rem;
  border-bottom: 1px solid var(--color-line);
}
.settings-comparison dd {
  margin: 0;
}
summary {
  cursor: pointer;
}
@media (max-width: 640px) {
  aside nav {
    flex-wrap: wrap;
  }
  aside .nav {
    flex: 1 1 140px;
    width: auto;
    font-size: 0.82rem;
    padding: 10px;
  }
  .section-heading {
    flex-direction: column;
  }
}

/* Booking: real device proportions, restrained summaries and a gallery workspace. */
:is(sv-booking-workspace, sv-booking-requests) {
  display: block;
  min-width: 0;
}
:is(sv-booking-workspace, sv-booking-requests) fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
  min-width: 0;
}
:is(sv-booking-workspace, sv-booking-requests) label:not(.checkbox) {
  display: grid;
  gap: 8px;
  font-weight: 600;
}
:is(sv-booking-workspace, sv-booking-requests) textarea {
  width: 100%;
  font: inherit;
  padding: 12px;
  border: 1px solid var(--border, #cbd9d5);
  border-radius: 8px;
  resize: vertical;
}
:is(sv-booking-workspace, sv-booking-requests) .panel {
  margin-block: 20px;
}
:is(sv-booking-workspace, sv-booking-requests, .booking-selection) .icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.booking-toolbar,
.booking-selection,
.booking-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.booking-list-item {
  width: 100%;
  text-align: left;
  color: inherit;
  background: white;
}
.booking-list-item > span:first-child {
  display: grid;
  gap: 8px;
}
.booking-screen {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 38%);
  gap: 24px;
  padding-block: 20px;
  border-bottom: 1px solid var(--border, #dce4e0);
}
.booking-material {
  margin: 12px 0;
  max-width: 460px;
}
.booking-material img,
.booking-material video,
.content-video {
  display: block;
  max-width: 100%;
  max-height: 380px;
  width: auto;
  height: auto;
  border: 7px solid #1c2a2e;
  border-radius: 9px;
  box-shadow: 0 5px 14px #18282b12;
  object-fit: contain;
  background: #111;
}
.booking-material figcaption {
  color: #52636c;
  font-size: 0.875rem;
  margin-top: 8px;
}
.booking-hours {
  list-style: none;
  margin: 16px 0;
  padding: 0;
}
.booking-hours li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--border, #e1e7e3);
  padding-block: 14px;
}
.booking-hours li > div {
  display: grid;
  gap: 4px;
}
.booking-hours li span,
.booking-hours li small {
  color: #52636c;
}
.booking-hours li > strong {
  white-space: nowrap;
}
.booking-total {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 12px;
  padding-block: 16px;
}
.booking-total > strong {
  font-size: 1.6rem;
}
.booking-checkout {
  display: grid;
  gap: 16px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border, #dce4e0);
}
.booking-checkout .checkbox {
  align-items: flex-start;
  line-height: 1.6;
}
.booking-decision {
  display: grid;
  gap: 12px;
}
.booking-gallery {
  width: min(1100px, calc(100vw - 32px));
  max-width: 1100px;
  max-height: calc(100dvh - 32px);
  padding: 28px;
  border: 1px solid #d2ded9;
  border-radius: 16px;
}
.booking-gallery::backdrop {
  background: #16252c88;
}
.booking-gallery > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}
.booking-gallery > header p {
  max-width: 70ch;
}
.booking-gallery > header button {
  flex-shrink: 0;
}
.market-hours .checkbox {
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 10px;
}
@media (max-width: 680px) {
  .booking-screen {
    grid-template-columns: 1fr;
  }
  .booking-selection,
  .booking-gallery > header {
    align-items: stretch;
    flex-direction: column;
  }
  .booking-gallery {
    padding: 16px;
  }
  .booking-list-item {
    flex-wrap: wrap;
  }
}

:is(sv-booking-workspace, sv-booking-requests) button:not(.booking-list-item) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
:is(sv-booking-workspace, sv-booking-requests) fieldset > button {
  justify-self: start;
}
:is(sv-booking-workspace, sv-booking-requests) .actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
:is(sv-booking-workspace, sv-booking-requests) .alert.info {
  background: #f0f6f2;
  border: 1px solid #dce9e2;
}
.booking-checkout > .badge {
  justify-self: start;
}
.booking-workspace-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 17px;
  border: 1px solid #b9cbc6;
  border-radius: 8px;
  color: var(--color-accent);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.booking-workspace-link:hover {
  background: #edf4f1;
}

.booking-format {
  padding-block: 16px;
  border-bottom: 1px solid var(--border);
}
.booking-format > summary {
  font-weight: 650;
  margin-bottom: 16px;
  cursor: pointer;
}
.booking-format:last-child {
  border-bottom: 0;
}
sv-marketplace-workspace .booking-weekdays {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding-block: 12px;
}
.booking-weekdays legend {
  font-weight: 600;
  margin-bottom: 8px;
}

sv-screen-availability,
sv-delivery-issues {
  display: block;
}
sv-screen-availability .panel {
  margin-block: 1.2rem;
}
.availability-screen-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
}
.restriction-list {
  list-style: none;
  padding: 0;
}
.restriction-list > li,
.delivery-issue {
  padding-block: 1rem;
  border-bottom: 1px solid var(--border, #dce5e0);
}
sv-delivery-issues {
  margin-top: 1.2rem;
}
sv-delivery-issues summary {
  cursor: pointer;
  font-weight: 600;
  padding-block: 0.7rem;
}
sv-delivery-issues textarea {
  width: 100%;
}
:is(sv-screen-availability, sv-delivery-issues) fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
  display: grid;
  gap: 16px;
}
:is(sv-screen-availability, sv-delivery-issues) legend {
  font-weight: 600;
  padding: 0 0 12px;
}
:is(sv-screen-availability, sv-delivery-issues) label.check-label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 500;
}
:is(sv-screen-availability, sv-delivery-issues) .check-label input {
  width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 0;
  flex: 0 0 18px;
  accent-color: var(--color-accent);
}
sv-screen-availability textarea {
  font: inherit;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  resize: vertical;
}
sv-notification-link {
  display: block;
}
.notification-link {
  display: flex !important;
  align-items: center;
  gap: 5px;
}
.notification-count {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 20px;
  background: #ffdfa0;
  color: #5c461e;
  font-size: 12px;
  margin-left: auto;
}
sv-notifications {
  display: block;
}
/* The notifications as a compact list: one section per day, one row per notification or per booking's answers. */
.notification-day {
  margin-block: 1.25rem 0;
}
.notification-day h2 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--color-muted);
}
.notification-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border-block-start: 1px solid var(--color-line);
}
.notification-row {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr) auto;
  gap: 4px 12px;
  align-items: start;
  padding: 10px 4px 10px 10px;
  border-block-end: 1px solid var(--color-line);
  border-inline-start: 4px solid transparent;
}
.notification-row.unread {
  border-inline-start-color: var(--color-accent);
}
.notification-row time {
  padding-block-start: 2px;
  font-size: 0.85rem;
  color: var(--color-muted);
  white-space: nowrap;
}
.notification-text {
  min-width: 0;
}
.notification-text strong {
  display: block;
}
.notification-text .badge {
  margin-inline-start: 6px;
  vertical-align: middle;
}
.notification-text .plain-text {
  margin: 2px 0 0;
  color: var(--color-muted);
  font-size: 0.92rem;
}
.notification-text > summary {
  cursor: pointer;
  list-style: none;
}
.notification-text > summary::-webkit-details-marker {
  display: none;
}
.notification-text > summary > span {
  display: block;
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 0.92rem;
}
.notification-text > summary > strong::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 10px 2px 2px;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: rotate(-45deg);
  color: var(--color-muted);
}
.notification-text[open] > summary > strong::before {
  transform: translateY(-2px) rotate(45deg);
}
.notification-group-list {
  margin: 8px 0 0;
  padding: 0 0 0 19px;
  list-style: none;
  border-inline-start: 2px solid var(--color-line);
}
.notification-group-list li {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 10px;
  padding: 6px 0;
}
.notification-group-list li.unread strong::after {
  content: ' •';
  color: var(--color-accent);
}
.notification-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 12px;
  justify-content: end;
}
.notification-actions .text-action {
  min-height: 0;
  padding: 2px 0;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .notification-row {
    grid-template-columns: 3rem minmax(0, 1fr);
  }
  .notification-actions {
    grid-column: 2;
    justify-content: start;
  }
}
@media (max-width: 640px) {
  nav sv-notification-link {
    flex: 1 1 140px;
  }
}

/* A screen's Bildspel tab: the images that fill the places nobody has bought, as tiles in playing order. */
sv-screen-slideshow {
  display: grid;
  gap: 1rem;
}
sv-screen-slideshow fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
/* Today's minute on the screen: the ads first, then the places the slideshow fills. */
.playlist-loop {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 4px;
  margin: 1rem 0 0.5rem;
  padding: 0;
  list-style: none;
}
/* The page's security policy allows no inline styles, so a part's width is a class: one column per place. */
.playlist-loop .span-1 {
  grid-column: span 1;
}
.playlist-loop .span-2 {
  grid-column: span 2;
}
.playlist-loop .span-3 {
  grid-column: span 3;
}
.playlist-loop .span-4 {
  grid-column: span 4;
}
.playlist-loop .span-5 {
  grid-column: span 5;
}
.playlist-loop .span-6 {
  grid-column: span 6;
}
.playlist-loop .loop-place {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 2.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
}
.playlist-today {
  margin: 0 0 1rem;
}
.slideshow-more {
  display: grid;
  gap: 0.75rem;
}
.slideshow-more summary {
  cursor: pointer;
  font-weight: 650;
}
.playlist-how p,
.playlist-copy > p {
  max-inline-size: 72ch;
  margin-block: 0.5rem 0;
}
.playlist-copy fieldset {
  display: grid;
  gap: 0.25rem;
  margin-block: 0.75rem !important;
}
.slideshow-head h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
}
.slideshow-head .hint {
  margin-block: 0.35rem 0;
}
.slideshow-panel > .alert {
  margin-block: 1rem 0;
}
.slideshow-outdated-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.badge.tone-active {
  background: var(--area, var(--color-accent));
  color: #fff;
}
.badge.tone-changed {
  background: var(--status-action-soft);
  color: var(--status-action);
}
/* The tiles, in the order the screen shows them; the last tile adds an image. */
.slideshow-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr));
  gap: 1rem;
  margin: 1.25rem 0 0.75rem;
  padding: 0;
  list-style: none;
}
.slideshow-tile {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
  padding: 0.6rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-panel, 12px);
  background: var(--color-surface);
}
.slideshow-tile.is-new,
.slideshow-tile.is-changed {
  border-color: var(--status-action);
  box-shadow: 0 0 0 1px var(--status-action);
}
.slideshow-tile.is-playing {
  border-color: var(--area, var(--color-accent));
  box-shadow: 0 0 0 1px var(--area, var(--color-accent));
}
/* A tile is dragged to a new place; the tile it is over is outlined. */
.slideshow-tile[draggable='true'] {
  cursor: grab;
}
.slideshow-tile.is-dragged {
  opacity: 0.45;
}
.slideshow-tile.is-drop {
  outline: 3px dashed var(--color-accent);
  outline-offset: 2px;
}
.slideshow-drag-hint {
  margin: 0 0 0.5rem;
}
/* One line about when the image shows; it opens the image, where seconds and period are changed. */
.slideshow-summary {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control, 8px);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 500;
  text-align: start;
}
.slideshow-summary:hover {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.slideshow-summary .icon {
  flex: none;
  width: 1rem;
  height: 1rem;
  color: var(--color-accent);
}
/* Every frame has the screen's proportions; the picture is fitted inside it on black, as on the screen. */
.slideshow-frame {
  position: relative;
  aspect-ratio: 16 / 9;
}
.frame-portrait {
  aspect-ratio: 9 / 16;
}
.frame-square {
  aspect-ratio: 1;
}
.frame-wide {
  aspect-ratio: 21 / 9;
}
.frame-tall {
  aspect-ratio: 3 / 4;
}
.slideshow-tiles:has(.frame-portrait) {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
}
.slideshow-thumb {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #14212a;
  overflow: hidden;
  cursor: zoom-in;
}
.slideshow-thumb:hover {
  background: #14212a;
}
.slideshow-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.slideshow-tile.state-ended .slideshow-thumb img,
.slideshow-tile.state-archived .slideshow-thumb img,
.slideshow-tile.state-mismatch .slideshow-thumb img {
  opacity: 0.45;
}
.slideshow-number {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  display: inline-grid;
  place-items: center;
  min-inline-size: 1.75rem;
  block-size: 1.75rem;
  padding-inline: 0.4rem;
  border-radius: 999px;
  background: #fff;
  color: var(--color-ink);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 1px 3px #0003;
  pointer-events: none;
}
.slideshow-remove {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  min-height: 0;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: #fff;
  color: var(--status-problem);
  box-shadow: 0 1px 3px #0003;
}
.slideshow-remove:hover {
  background: var(--status-problem-soft);
}
.slideshow-remove .icon,
.slideshow-move .icon {
  width: 1.15rem;
  height: 1.15rem;
}
.slideshow-meta {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
}
.slideshow-meta strong {
  overflow-wrap: anywhere;
}
.slideshow-meta .hint {
  margin: 0;
}
.slideshow-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.slideshow-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.6rem 1rem;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.slideshow-fields legend {
  margin-bottom: 0.5rem;
  padding: 0;
  font-weight: 650;
}
/* The open image: the picture beside its seconds and period on wide windows, above them on narrow ones. */
.slideshow-viewer-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 1.5rem;
}
@media (min-width: 900px) {
  .slideshow-viewer-body {
    grid-template-columns: minmax(0, 1fr) 17rem;
    align-items: start;
  }
  .slideshow-viewer-body .slideshow-fields {
    margin-top: 1rem;
  }
}
.slideshow-fields label {
  font-size: 13px;
}
.slideshow-seconds :is(input, select) {
  inline-size: 6rem;
}
/* A video is always one place: its seconds are shown but not changed. */
.slideshow-seconds input[readonly] {
  background: var(--color-canvas);
  color: var(--color-muted);
}
.slideshow-video-seconds {
  flex-basis: 100%;
  margin: -0.25rem 0 0;
}
/* Video: the poster frame with a play mark in the tile's lower left corner. */
.slideshow-video-mark {
  position: absolute;
  bottom: 0.5rem;
  left: 0.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.5rem 0.15rem 0.35rem;
  border-radius: 999px;
  background: #14212acc;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
}
.slideshow-video-mark .icon {
  width: 0.9rem;
  height: 0.9rem;
  fill: currentColor;
}
.slideshow-viewer-figure video {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65dvh;
  border-radius: 8px;
  background: #14212a;
}
.slideshow-period-toggle {
  min-height: 2.75rem;
  align-items: center;
}
.slideshow-period {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 0.5rem;
  inline-size: 100%;
}
.slideshow-period input {
  inline-size: 100%;
  min-inline-size: 0;
}
.slideshow-period.off label {
  color: var(--color-muted);
}
.slideshow-period input:disabled {
  background: var(--surface-muted, #f3f4f8);
  color: var(--color-muted);
  cursor: not-allowed;
}
.slideshow-move {
  display: flex;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-top: auto;
}
.slideshow-move .icon-button,
.slideshow-viewer-actions .icon {
  flex: none;
}
.slideshow-move .icon-button {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control, 8px);
  background: var(--color-surface);
  color: var(--color-ink);
}
.slideshow-move .icon-button:hover:not(:disabled) {
  background: var(--surface-muted, #f3f4f8);
}
.slideshow-move .icon-button:disabled {
  opacity: 0.4;
}
.slideshow-add-tile {
  display: flex;
  min-width: 0;
}
.slideshow-add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  inline-size: 100%;
  min-block-size: 9rem;
  padding: 1rem;
  border: 2px dashed var(--control-border, #a1a8bb);
  border-radius: var(--radius-panel, 12px);
  background: transparent;
  color: var(--color-accent);
  font-weight: 650;
}
.slideshow-add:hover:not(:disabled) {
  background: var(--color-accent-soft);
  border-color: var(--color-accent);
}
.slideshow-add .icon {
  width: 2.25rem;
  height: 2.25rem;
}
.slideshow-add:disabled {
  color: var(--color-muted);
  cursor: not-allowed;
}
.slideshow-empty {
  margin-block: 1rem 0.75rem;
}
.slideshow-empty h3 {
  margin: 0;
  font-size: 1.05rem;
}
.slideshow-empty p {
  margin: 0.25rem 0;
  color: var(--color-muted);
}
/* A tile waiting for its AI image, and the choice behind the plus. */
.slideshow-making {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.5rem;
  block-size: 100%;
  padding: 0.75rem;
  background: repeating-linear-gradient(135deg, #1d2c37 0 12px, #223441 12px 24px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}
.slideshow-making.failed {
  background: var(--status-problem-soft);
  color: var(--status-problem);
}
.slideshow-making .icon {
  width: 1.25rem;
  height: 1.25rem;
}
.slideshow-viewer-figure .slideshow-making {
  min-block-size: 12rem;
  border-radius: 8px;
}
.slideshow-add-choice {
  width: min(820px, calc(100vw - 32px));
}
.slideshow-choices {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}
/* One column that fills the card, so every card's content starts at the same edge whatever its length. */
.slideshow-choice {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: start;
  gap: 0.35rem;
  inline-size: 100%;
  min-block-size: 8rem;
  padding: 1rem;
  border: 1.5px solid var(--color-line);
  border-radius: var(--radius-panel, 12px);
  background: var(--color-surface);
  color: var(--color-ink);
  text-align: start;
}
.slideshow-choice:hover:not(:disabled) {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.slideshow-choice:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}
.slideshow-choice .icon {
  width: 1.75rem;
  height: 1.75rem;
  color: var(--color-accent);
}
.slideshow-choice span {
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 400;
}
.slideshow-ai {
  width: min(980px, calc(100vw - 24px));
  padding: 0;
}
.slideshow-ai .ai-editor {
  margin: 0;
  border: 0;
}
/* While the changes bar shows, focus and scrolling keep fields clear of it: its height is measured by the tab
   (--slideshow-bar) and added to the bottom menu's padding on phones. */
:root:has(.slideshow-changes) {
  scroll-padding-block-end: calc(var(--bottom-bar, 0px) + var(--slideshow-bar, 0px) + 1.5rem);
}
/* Unsaved changes stay in view while scrolling, above the phone's bottom menu. */
.slideshow-changes {
  position: sticky;
  bottom: 1rem;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--status-action);
  border-radius: var(--radius-panel, 12px);
  background: var(--status-action-soft);
  color: var(--status-action);
  box-shadow: 0 6px 20px #14212a26;
}
.slideshow-changes p {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  font-weight: 600;
}
.slideshow-changes-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.slideshow-changes-actions .secondary {
  background: #fff;
}
/* The enlarged picture, with the next and previous image of the slideshow. */
.slideshow-viewer {
  width: min(1100px, calc(100vw - 32px));
}
.slideshow-viewer-figure {
  margin: 1rem 0;
}
.slideshow-viewer-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 65dvh;
  object-fit: contain;
  border-radius: 8px;
  background: #14212a;
}
.slideshow-viewer-figure figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.6rem;
  color: var(--color-muted);
  font-size: 14px;
}
.slideshow-viewer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.slideshow-viewer-actions button {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.slideshow-viewer-spacer {
  flex: 1 1 auto;
}

/* Choosing images for a slideshow: large pictures to tick, the fitting ones first. */
.slideshow-gallery,
.slideshow-upload {
  width: min(980px, calc(100vw - 24px));
}
.slideshow-upload {
  width: min(620px, calc(100vw - 24px));
}
sv-slideshow-picker,
sv-slideshow-upload {
  display: block;
  margin-top: 0.75rem;
}
.picker-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0.75rem 1rem;
  margin: 0.75rem 0 1rem;
}
.picker-filters > label {
  flex: 0 1 14rem;
}
.picker-search {
  display: flex;
  flex: 1 1 16rem;
  align-items: end;
  gap: 0.5rem;
}
.picker-search label {
  flex: 1 1 auto;
}
.picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(46%, 10.5rem), 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.picker-tile {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  justify-items: start;
  gap: 0.2rem;
  inline-size: 100%;
  block-size: 100%;
  min-height: 0;
  padding: 0.4rem;
  border: 2px solid var(--color-line);
  border-radius: var(--radius-panel, 12px);
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: 400;
  text-align: start;
  cursor: pointer;
}
.picker-tile:hover:not(.unfit) {
  border-color: var(--color-accent);
}
.picker-tile.chosen {
  border-color: var(--color-accent);
  background: var(--color-accent-soft);
}
.picker-tile:has(input:focus-visible) {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
.picker-tile input {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  width: 1.4rem;
  height: 1.4rem;
  min-height: 0;
  margin: 0;
}
.picker-picture {
  position: relative;
  display: block;
  inline-size: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 8px;
  background: #14212a;
  overflow: hidden;
}
.picker-picture img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.picker-name {
  font-weight: 650;
  overflow-wrap: anywhere;
}
.picker-size,
.picker-note,
.picker-reason {
  color: var(--color-muted);
  font-size: 12px;
}
.picker-reason {
  color: var(--status-problem);
  font-weight: 600;
}
.picker-order {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  display: inline-grid;
  place-items: center;
  min-inline-size: 1.6rem;
  block-size: 1.6rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.picker-tile.unfit {
  cursor: default;
  background: var(--surface-muted, #f3f4f8);
}
.picker-tile.unfit img {
  opacity: 0.55;
}
.picker-others {
  margin-top: 1.25rem;
}
.picker-others summary {
  padding-block: 0.6rem;
  cursor: pointer;
  font-weight: 650;
}
.picker-empty {
  padding: 1.5rem 1rem;
  border: 1px dashed var(--control-border, #a1a8bb);
  border-radius: var(--radius-panel, 12px);
  color: var(--color-muted);
  text-align: center;
}
/* The count and Lägg till stay in view at the bottom of the dialog. */
.picker-actions {
  position: sticky;
  bottom: -1px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
  margin-top: 1rem;
  padding: 0.75rem 0 0.25rem;
  border-top: 1px solid var(--color-line);
  background: var(--color-surface);
}
.picker-actions [role='status'] {
  margin-inline-end: auto;
  color: var(--color-muted);
  font-weight: 600;
}
.picker-file input {
  display: block;
  inline-size: 100%;
  margin-top: 0.35rem;
}
.picker-uploads {
  display: grid;
  gap: 0.4rem;
  margin: 0.75rem 0;
  padding: 0;
  list-style: none;
}
.picker-uploads li {
  display: grid;
  gap: 0.1rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-control, 8px);
  font-size: 14px;
}
.picker-uploads span {
  color: var(--color-muted);
}
.picker-uploads .state-unfit span,
.picker-uploads .state-unreadable span,
.picker-uploads .state-failed span {
  color: var(--status-problem);
}
.picker-uploads .state-done span {
  color: var(--status-done, #1b6e3c);
}
.slideshow-viewer-actions .danger {
  color: var(--status-problem);
}
@media (max-width: 740px) {
  .slideshow-changes {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
}
@media (max-width: 600px) {
  /* Two tiles per row on a phone, so more of the slideshow is in view. */
  .slideshow-tiles,
  .slideshow-tiles:has(.frame-portrait) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
  .slideshow-tile {
    padding: 0.45rem;
  }
  .slideshow-summary {
    padding-inline: 0.45rem;
  }
  .slideshow-remove {
    width: 2.25rem;
    height: 2.25rem;
  }
  .slideshow-period input {
    padding-inline: 0.4rem;
    font-size: 14px;
  }
  .playlist-loop .loop-place {
    padding: 0.4rem;
    font-size: 11px;
  }
  .slideshow-changes {
    padding: 0.6rem 0.75rem;
  }
  .slideshow-changes p {
    font-size: 13px;
  }
  .slideshow-changes-actions {
    flex: 1 1 100%;
    flex-wrap: nowrap;
  }
  .slideshow-changes-actions button {
    flex: 1 1 0;
    padding-inline: 0.5rem;
  }
}
@media (max-width: 379px) {
  .slideshow-tiles,
  .slideshow-tiles:has(.frame-portrait) {
    grid-template-columns: minmax(0, 1fr);
  }
}

sv-campaign-content {
  display: block;
  margin-block: 1.5rem;
}
sv-campaign-content summary {
  cursor: pointer;
  padding-block: 1rem;
  font-weight: 650;
}
sv-campaign-content fieldset {
  border: 0;
  padding: 0;
  min-width: 0;
}
.campaign-content-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 1rem;
}
.campaign-content-compare figure {
  margin: 0;
}
.campaign-content-compare figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
}
.campaign-content-screen,
.content-change,
.content-stop,
.content-stop-form {
  border-top: 1px solid var(--line, #dce5df);
  padding-block: 1.5rem;
}
@media (max-width: 600px) {
  .campaign-content-compare {
    grid-template-columns: 1fr;
  }
}

.overview-controls {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 1rem;
}
.overview-controls label {
  flex: 1 1 18rem;
}
.overview-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}
.overview-card h2 {
  font-size: 1.35rem;
  margin: 0;
}
.overview-card .eyebrow {
  margin: 0 0 0.35rem;
}
.overview-status,
.overview-plan {
  display: grid;
  gap: 0.4rem;
  padding: 0.85rem;
  border-radius: 0.7rem;
  background: var(--surface-muted, #f0f5f2);
}
.overview-plan {
  background: transparent;
  border: 1px solid var(--border, #dce4df);
}
.overview-card p {
  margin: 0.25rem 0;
}
.overview-periods {
  padding-left: 1.2rem;
}
.overview-periods li {
  margin-block: 0.8rem;
  overflow-wrap: anywhere;
}
.overview-periods span {
  display: block;
  color: var(--muted, #596b70);
}
.overview-card summary {
  cursor: pointer;
  padding: 0.7rem 0;
}
@media (max-width: 600px) {
  .overview-controls button {
    flex: 1 1 100%;
  }
}

/* The icon stays beside the label at every navigation width. */
aside a.nav,
aside button.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}
aside a.nav .icon,
aside button.nav .icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  margin-right: 0;
}
@media (min-width: 641px) and (max-width: 900px) {
  .app-layout {
    grid-template-columns: 250px minmax(0, 1fr);
  }
  aside a.nav,
  aside button.nav {
    font-size: 14px;
  }
}
