:root {
      --ink: #0d2731;
      --navy: #0b3444;
      --blue: #087da3;
      --sky: #cfeaf0;
      --paper: #f4f1e9;
      --white: #fffefa;
      --line: #c8d2d1;
      --accent: #e35231;
      --muted: #577078;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      background: var(--paper);
      color: var(--ink);
      font-family: "Manrope", Arial, sans-serif;
      font-size: 16px;
      line-height: 1.55;
    }

    a { color: inherit; text-decoration: none; }
    img { display: block; width: 100%; }
    button, input, select, textarea { font: inherit; }

    .page {
      width: 100%;
      overflow: hidden;
      background: var(--paper);
    }

    .shell { width: min(1180px, calc(100% - 80px)); margin: 0 auto; }

    .topline {
      background: var(--ink);
      color: #c8dcdf;
      font-size: 12px;
      letter-spacing: .12em;
      text-transform: uppercase;
    }

    .topline .shell {
      display: flex;
      justify-content: space-between;
      align-items: center;
      min-height: 36px;
    }

    .topline strong { color: #fff; font-weight: 700; }

    header {
      background: #fcfbf7;
      border-bottom: 1px solid rgba(13, 39, 49, .12);
    }

    .nav {
      display: flex;
      align-items: center;
      justify-content: space-between;
      min-height: 92px;
      gap: 32px;
    }

    .brand {
      display: block;
      min-width: 180px;
    }

    .brand img { width: 180px; height: auto; filter: contrast(1.18) saturate(1.12); mix-blend-mode: darken; }

    .navlinks { display: flex; align-items: center; gap: 30px; font-size: 14px; font-weight: 700; }
    .navlinks a:not(.button) { padding: 8px 0; border-bottom: 1px solid transparent; }
    .navlinks a:not(.button):hover { border-color: var(--blue); }

    .button {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-height: 48px;
      padding: 0 22px;
      border: 1px solid var(--ink);
      background: var(--ink);
      color: #fff;
      font-size: 13px;
      font-weight: 800;
      letter-spacing: .02em;
    }

    .button::after { content: "↗"; margin-left: 12px; font-size: 16px; }
    .button.light { background: var(--white); color: var(--ink); border-color: var(--white); }
    .button.outline { background: transparent; color: var(--ink); }

    .hero { position: relative; padding: 74px 0 66px; background: var(--paper); }
    .hero::before {
      content: "";
      position: absolute;
      inset: 0 0 auto auto;
      width: 44%;
      height: 100%;
      background: var(--sky);
    }

    .hero-grid {
      position: relative;
      display: grid;
      grid-template-columns: .92fr 1.08fr;
      align-items: center;
      gap: 70px;
    }

    .eyebrow {
      display: flex;
      align-items: center;
      gap: 12px;
      margin: 0 0 24px;
      color: var(--blue);
      font-size: 12px;
      font-weight: 800;
      letter-spacing: .14em;
      text-transform: uppercase;
    }

    .eyebrow::before { content: ""; width: 34px; height: 2px; background: currentColor; }
    h1, h2, h3, p { margin-top: 0; }
    h1 {
      margin-bottom: 24px;
      font-size: clamp(50px, 5.2vw, 76px);
      line-height: .98;
      letter-spacing: -.065em;
      max-width: 670px;
    }

    h1 span { color: var(--blue); }
    .lead { max-width: 590px; margin-bottom: 32px; font-size: 19px; line-height: 1.6; color: #36545d; }
    .hero-actions { display: flex; align-items: center; gap: 24px; }
    .emergency-link {
      display: inline-flex;
      flex-direction: column;
      justify-content: center;
      min-height: 48px;
      padding: 7px 18px;
      background: var(--accent);
      color: #fff;
      font-size: 15px;
      font-weight: 800;
      line-height: 1.15;
    }
    .emergency-link small { margin-bottom: 4px; color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }

    .hero-visual { position: relative; min-height: 568px; }
    .hero-main {
      position: absolute;
      top: 0;
      right: 0;
      width: 88%;
      height: 500px;
      object-fit: cover;
      filter: saturate(.78) contrast(1.04);
    }

    .hero-inset {
      position: absolute;
      left: 0;
      bottom: 0;
      width: 39%;
      height: 230px;
      object-fit: cover;
      border: 12px solid var(--paper);
      filter: saturate(.78) contrast(1.04);
    }

    .hero-note {
      position: absolute;
      right: -22px;
      bottom: 30px;
      width: 200px;
      padding: 18px 20px;
      background: var(--accent);
      color: #fff;
      font-size: 12px;
      font-weight: 800;
      line-height: 1.45;
      letter-spacing: .03em;
      text-transform: uppercase;
    }

    .proof { background: var(--navy); color: #fff; }
    .proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
    .proof-item { padding: 34px 42px; border-right: 1px solid rgba(255,255,255,.15); }
    .proof-item:last-child { border: 0; }
    .proof strong { display: block; margin-bottom: 4px; font-size: 30px; line-height: 1; letter-spacing: -.04em; }
    .proof span { color: #b5d0d6; font-size: 12px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }

    section { padding: 108px 0; }
    .section-head { display: grid; grid-template-columns: .8fr 1.2fr; gap: 80px; align-items: end; margin-bottom: 56px; }
    .section-head h2 { margin-bottom: 0; font-size: 52px; line-height: 1.08; letter-spacing: -.05em; }
    .section-head p { max-width: 540px; margin: 0; color: var(--muted); font-size: 17px; }

    .services { background: var(--white); }
    .service-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
    .service {
      min-height: 304px;
      padding: 34px;
      border-right: 1px solid var(--line);
      border-bottom: 1px solid var(--line);
      background: var(--white);
    }

    .service:nth-child(2), .service:nth-child(6) { background: #edf5f4; }
    .service-no { display: block; margin-bottom: 40px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
    .service h3 { margin-bottom: 14px; font-size: 21px; line-height: 1.25; letter-spacing: -.025em; }
    .service p { margin-bottom: 0; color: var(--muted); font-size: 14px; }

    .emergency { padding: 0; background: var(--white); }
    .emergency-box {
      display: grid;
      grid-template-columns: 1.4fr .8fr;
      align-items: center;
      min-height: 220px;
      background: var(--accent);
      color: #fff;
    }

    .emergency-copy { padding: 42px 64px; }
    .emergency-copy span { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
    .emergency-copy h2 { margin: 8px 0 0; max-width: 650px; font-size: 42px; line-height: 1.1; letter-spacing: -.045em; }
    .emergency-number { padding: 42px 54px; border-left: 1px solid rgba(255,255,255,.35); }
    .emergency-number small { display: block; margin-bottom: 8px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
    .emergency-number strong { font-size: 34px; letter-spacing: -.04em; white-space: nowrap; }

    .projects { background: var(--paper); }
    .projects-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 22px; }
    .project-column { display: grid; gap: 22px; }
    .project { position: relative; min-height: 330px; overflow: hidden; background: var(--ink); }
    .project.tall { min-height: 900px; }
    .project-column .project { min-height: 285px; }
    .project img { position: absolute; inset: 0; height: 100%; object-fit: cover; filter: saturate(.72) contrast(1.07); transition: transform .4s ease; }
    .project::after { content: ""; position: absolute; inset: 45% 0 0; background: linear-gradient(transparent, rgba(6,28,37,.86)); }
    .project-meta { position: absolute; z-index: 2; left: 28px; right: 28px; bottom: 24px; color: #fff; }
    .project-meta span { font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: #badbe0; }
    .project-meta h3 { margin: 6px 0 0; font-size: 24px; letter-spacing: -.035em; }

    .references { background: #eaf3f2; }
    .reference-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
    .reference-card { min-height: 235px; padding: 30px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
    .reference-card:nth-child(even) { background: #f4f8f7; }
    .reference-year { display: block; margin-bottom: 28px; color: var(--blue); font-size: 12px; font-weight: 800; letter-spacing: .14em; }
    .reference-card h3 { margin-bottom: 12px; font-size: 20px; line-height: 1.25; letter-spacing: -.025em; }
    .reference-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
    .reference-card strong { font-size: 12px; font-weight: 800; }

    .about { position: relative; background: var(--navy); color: #fff; }
    .about::after {
      content: "1991";
      position: absolute;
      right: -18px;
      bottom: -62px;
      color: rgba(255,255,255,.045);
      font-size: 290px;
      font-weight: 800;
      letter-spacing: -.09em;
      line-height: 1;
    }

    .about-grid { position: relative; z-index: 1; display: grid; grid-template-columns: .92fr 1.08fr; gap: 100px; }
    .about h2 { margin-bottom: 28px; font-size: 54px; line-height: 1.06; letter-spacing: -.055em; }
    .about .intro { color: #c5d9dc; font-size: 18px; }
    .timeline { margin-top: 38px; border-top: 1px solid rgba(255,255,255,.2); }
    .timeline-row { display: grid; grid-template-columns: 90px 1fr; padding: 20px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
    .timeline-row strong { color: #79c2d0; font-size: 14px; }
    .timeline-row span { color: #d8e6e8; font-size: 14px; }
    .coverage { align-self: end; padding: 40px; background: #0f4254; }
    .coverage h3 { margin-bottom: 12px; font-size: 24px; }
    .coverage p { margin-bottom: 28px; color: #bed2d6; font-size: 14px; }
    .places { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(255,255,255,.2); border-left: 1px solid rgba(255,255,255,.2); }
    .place { padding: 18px; border-right: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); font-size: 13px; font-weight: 800; }

    .partners-map { background: var(--paper); }
    .partners-map-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 22px; }
    .partner-panel, .map-panel { border: 1px solid var(--line); background: var(--white); }
    .partner-panel { padding: 42px; }
    .partner-panel h3 { margin: 12px 0 16px; font-size: 32px; line-height: 1.1; letter-spacing: -.04em; }
    .partner-panel p { color: var(--muted); font-size: 14px; }
    .partner-panel .button { margin-top: 22px; }
    .map-panel { overflow: hidden; }
    .map-panel iframe { display: block; width: 100%; height: 390px; border: 0; border-radius: 14px; }
    .map-caption { display: flex; justify-content: space-between; gap: 24px; align-items: center; padding: 24px 28px; border-top: 1px solid var(--line); }
    .map-caption strong { display: block; font-size: 15px; }
    .map-caption span { color: var(--muted); font-size: 12px; }
    .map-caption a { color: var(--blue); font-size: 12px; font-weight: 800; white-space: nowrap; }

    .contact { background: var(--navy); color: var(--white); }
    .contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
    .contact .eyebrow { color: #79c2d0; }
    .contact h2 { margin-bottom: 20px; font-size: 52px; line-height: 1.05; letter-spacing: -.05em; }
    .contact-intro { margin-bottom: 34px; color: #bed2d6; font-size: 16px; }
    .contact-list { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; padding: 1px; background: rgba(255,255,255,.14); }
    .contact-row { min-height: 112px; padding: 20px; background: #0f4254; }
    .contact-row span { display: block; margin-bottom: 10px; color: #79c2d0; font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
    .contact-row strong { overflow-wrap: anywhere; font-size: 14px; font-weight: 700; }
    .contact-row strong small { display: block; margin-bottom: 6px; color: #bed2d6; font-size: 12px; font-weight: 500; }
    .contact-row a:hover { color: #79c2d0; }
    .urgent-note { margin-top: 22px; padding: 20px 22px; border-left: 4px solid #ffb19d; background: var(--accent); color: #fff; font-size: 13px; }

    .form-card { padding: 46px; border-top: 5px solid var(--accent); background: #fffefa; color: var(--ink); box-shadow: 0 24px 60px rgba(0,0,0,.18); }
    .form-card h3 { margin-bottom: 8px; font-size: 25px; letter-spacing: -.03em; }
    .form-card > p { margin-bottom: 30px; color: var(--muted); font-size: 13px; }
    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
    .field { display: grid; gap: 7px; }
    .field.full { grid-column: 1 / -1; }
    .field label { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
    .control {
      display: flex;
      align-items: center;
      min-height: 54px;
      padding: 0 16px;
      border: 1px solid #bacaca;
      background: #f7faf9;
      color: #829397;
      font-size: 13px;
    }
    .contact .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
    .contact .field { min-width: 0; }
    .contact .control { display: block; width: 100%; height: 54px; font: inherit; font-size: 14px; color: var(--ink); border-radius: 0; }
    .contact .control::placeholder { color: #647d87; opacity: 1; }
    .contact textarea.control { height: auto; min-height: 160px; padding: 16px; resize: none; overflow: auto; }
    .contact select.control { cursor: pointer; }
    .contact .inquiry-hint { display: block; margin-top: 12px; color: var(--muted); font-size: 12px; }
    .contact #inquiry-errors { margin: 20px 0 0; }
    .form-card .button { width: 100%; margin-top: 24px; border-color: var(--accent); background: var(--accent); }

    footer { background: var(--ink); color: #c1d0d3; }
    .footer-main { display: grid; grid-template-columns: 1.2fr .8fr 1fr; gap: 70px; padding: 60px 0 46px; }
    .footer-brand { color: #fff; font-size: 28px; font-weight: 800; letter-spacing: -.055em; }
    .footer-brand em { color: var(--accent); font-style: normal; }
    footer p { margin: 14px 0 0; max-width: 320px; color: #8eaaaf; font-size: 13px; }
    .footer-col h4 { margin: 0 0 14px; color: #fff; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
    .footer-col a, .footer-col span { display: block; margin: 7px 0; font-size: 13px; }
    .footer-bottom { display: flex; justify-content: space-between; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.12); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }

    @media (max-width: 900px) {
      .shell { width: min(100% - 36px, 680px); }
      .topline .shell, .navlinks { display: none; }
      .topline { min-height: 10px; }
      .nav { min-height: 76px; }
      .brand img { width: 160px; }
      .hero::before { width: 100%; height: 38%; top: auto; bottom: 0; }
      .hero-grid, .section-head, .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 42px; }
      .hero { padding-top: 56px; }
      .hero-visual { min-height: 470px; }
      .hero-main { width: 90%; height: 420px; }
      .hero-inset { height: 180px; }
      .hero-note { right: 0; }
      .proof-grid, .service-grid { grid-template-columns: 1fr; }
      .reference-grid, .partners-map-grid { grid-template-columns: 1fr; }
      .proof-item { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.15); }
      section { padding: 76px 0; }
      .section-head h2, .about h2, .contact h2 { font-size: 42px; }
      .emergency-box, .projects-grid, .footer-main { grid-template-columns: 1fr; }
      .emergency-number { border-left: 0; border-top: 1px solid rgba(255,255,255,.35); }
      .project.tall { min-height: 480px; }
      .form-grid, .contact .form-grid { grid-template-columns: 1fr; }
      .field.full { grid-column: auto; }
      .contact-list { grid-template-columns: 1fr; }
    }

/* Sdílené stránky referencí a jejich správy. */
html { scrollbar-gutter: stable; scrollbar-color: var(--muted) var(--paper); }
* { scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { background: var(--muted); border: 2px solid var(--paper); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover, ::-webkit-scrollbar-thumb:active { background: var(--ink); }
a, button { cursor: pointer; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: none; border-color: var(--ink); }
button { font: inherit; }
button:active, .button:active { transform: translateY(1px); }
button[aria-disabled="true"] { opacity: .65; cursor: wait; }
.page-links, .page-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; }
.page-links { font-size: 13px; font-weight: 800; }
.page-links a:hover, .page-actions a:hover, .text-button:hover { color: var(--blue); }
.page-links [aria-current] { color: var(--blue); text-decoration: underline; text-underline-offset: 6px; }
.page-actions { margin-top: 28px; }
.section-head h1 { margin: 0; font-size: clamp(32px, 4vw, 54px); line-height: 1.1; letter-spacing: -.05em; }
.reference-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
.reference-gallery a:first-child { grid-column: 1 / -1; }
.reference-photo { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; }
.reference-card { overflow-wrap: anywhere; }

.field { min-width: 0; }
.admin-login { max-width: 480px; }
.admin-signin { min-height: 100svh; display: flex; flex-direction: column; }
.admin-signin > header { flex-shrink: 0; }
.admin-signin > section { flex: 1; display: grid; align-items: center; padding: 40px 0; }
.admin-signin > section > .shell { width: min(480px, calc(100% - 40px)); }
.admin-signin .section-head { margin-bottom: 24px; }
.admin-login .field + .field { margin-top: 18px; }
.admin-page .form-card h2 { font-size: 26px; letter-spacing: -.04em; }
.admin-page .control { display: block; width: 100%; font: inherit; color: var(--ink); background: var(--white); }
.admin-page input.control { min-height: 48px; }
.admin-page textarea { resize: none; min-height: 170px; overflow: auto; }
.admin-page small { display: block; margin-top: 8px; color: var(--muted); font-size: 12px; }
.admin-photo { display: block; width: 100%; max-height: 220px; object-fit: contain; margin-top: 16px; }
.admin-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
#photo-order > div { position: relative; cursor: grab; }
#photo-order > [hidden], #undo-photo-removal[hidden] { display: none; }
.photo-delete { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--white); color: var(--ink); font-size: 26px; line-height: 1; cursor: pointer; }
.photo-delete:hover { background: var(--ink); color: var(--white); }
#photo-order .admin-photo { touch-action: none; user-select: none; }
#photo-order > .is-dragging { opacity: .45; cursor: grabbing; }
.photo-order-actions { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.photo-order-actions small { flex: 1; }
.photo-order-actions button { min-width: 36px; min-height: 36px; border: 1px solid var(--line); background: var(--white); color: var(--ink); cursor: pointer; }
.photo-order-actions button:disabled { opacity: .35; cursor: default; }
.text-button { display: inline-block; padding: 10px 0; border: 0; color: var(--blue); background: transparent; font: inherit; font-size: 13px; text-decoration: underline; }
.notice { padding: 18px 24px; margin-bottom: 24px; border: 1px solid var(--blue); background: var(--sky); }
.notice.error { border-color: var(--accent); background: var(--white); }
.notice p { margin: 0 0 8px; }
[aria-invalid="true"] { border-color: var(--accent); }
@media (max-width: 760px) {

  .admin-page .form-card { padding: 26px; }
  .nav:has(.page-links) { flex-wrap: wrap; gap: 20px; padding-top: 20px; padding-bottom: 20px; }
  .page-links { gap: 18px; }
  .admin-page .nav { gap: 16px; font-size: 12px; }
}
@media (forced-colors: active) { html { scrollbar-color: auto; } }
dialog { width: min(560px, calc(100% - 32px)); padding: 32px; border: 1px solid var(--line); background: var(--white); color: var(--ink); }
dialog::backdrop { background: rgb(13 39 49 / .65); }

/* Administrace: přehled, detail a editor vlastních realizací. */
.admin-workspace { --admin-canvas: #f7f9fa; --admin-border: #dce5e9; --admin-action: #cf4323; --admin-register-columns: 72px minmax(180px, 1.5fr) minmax(130px, .85fr) minmax(105px, .55fr) 218px; display: grid; grid-template-columns: 224px minmax(0, 1fr); min-height: 100svh; background: var(--admin-canvas); }
.admin-sidebar { position: sticky; top: 0; height: 100svh; align-self: start; overflow: auto; display: flex; flex-direction: column; padding: 32px 20px 24px; background: #102f3a; color: #e7f0f3; }
.admin-sidebar .brand { display: flex; align-items: center; justify-content: center; width: 164px; max-width: 100%; min-width: 0; min-height: 76px; padding: 10px 14px; border-radius: 7px; background: #fff; }
.admin-sidebar .brand img { width: 136px; }
.admin-caption { margin: 14px 0 46px; color: #abc2cb; font-size: 12px; letter-spacing: .03em; }
.admin-sidebar nav { display: grid; gap: 8px; }
.admin-sidebar nav a { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px; border-left: 3px solid transparent; border-radius: 5px; font-size: 14px; font-weight: 600; }
.admin-sidebar nav svg { width: 21px; height: 21px; flex-shrink: 0; }
.admin-sidebar nav a:hover { background: #1b424f; }
.admin-sidebar nav [aria-current] { border-left-color: #ef6747; background: #224f5e; color: #fff; }
.admin-sidebar-bottom { display: grid; gap: 10px; margin-top: auto; padding-top: 22px; border-top: 1px solid #36535f; font-size: 12px; }
.admin-sidebar-bottom > a { display: inline-flex; align-items: center; min-height: 36px; }
.admin-workspace .text-button { color: var(--blue); text-decoration: none; }
.admin-workspace .admin-sidebar-bottom .text-button { color: #e7f0f3; font-size: 13px; }
.admin-workspace > section { min-width: 0; padding: 40px; }
.admin-workspace > section > .shell { width: min(1200px, 100%); }
.admin-workspace h1 { margin: 0 0 12px; font-size: 40px; line-height: 1.15; letter-spacing: -.055em; }
.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 36px; }
.admin-toolbar > div { min-width: 0; }
.admin-toolbar p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }
.admin-workspace .button { min-height: 46px; border-radius: 8px; font-size: 13px; white-space: normal; }
.admin-workspace .button::after { content: none; }
.admin-workspace .admin-primary { border-color: var(--admin-action); background: var(--admin-action); color: #fff; gap: 8px; flex-shrink: 0; }
.admin-primary:hover { filter: brightness(.92); }
.admin-primary > span { font-size: 24px; line-height: 1; font-weight: 400; }
.admin-back { display: inline-block; margin-bottom: 12px; color: var(--blue); font-size: 13px; }
.admin-toolbar > .admin-back { margin-bottom: 0; }
.admin-tabs { display: flex; gap: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--admin-border); }
.admin-tabs a { display: inline-flex; align-items: center; gap: 10px; padding: 12px 6px 16px; margin-bottom: -1px; border-bottom: 3px solid transparent; color: var(--muted); font-size: 14px; font-weight: 600; }
.admin-tabs [aria-current] { color: var(--ink); border-bottom-color: var(--admin-action); font-weight: 800; }
.admin-tabs a:hover { color: var(--ink); }
.admin-tabs span { min-width: 18px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.admin-reference-grid { overflow: hidden; border: 1px solid #ccd9df; border-radius: 12px; background: #fff; }
.admin-register-head, .admin-reference { display: grid; grid-template-columns: var(--admin-register-columns); align-items: center; column-gap: 20px; padding: 20px 24px; }
.admin-register-head { border-bottom: 1px solid var(--admin-border); background: #fcfdfe; color: var(--muted); font-size: 12px; font-weight: 700; }
.admin-register-head > span:first-child { grid-column: span 2; }
.admin-reference { min-height: 114px; border-bottom: 1px solid var(--admin-border); }
.admin-reference:last-child { border-bottom: 0; }
.admin-reference:hover { background: #fafcfd; }
.admin-reference-media { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 72px; height: 72px; overflow: hidden; border: 1px solid #dfe7ea; border-radius: 6px; background: #f3f6f7; color: #5c7480; text-align: center; }
.admin-reference-media > svg { width: 25px; height: 25px; }
.admin-empty-media > svg { width: 42px; height: 42px; justify-self: center; }
.admin-reference-media > small { max-width: 68px; padding: 0 3px; font-size: 10px; line-height: 1.4; }
.admin-reference-media img { height: 100%; object-fit: cover; }
.admin-reference-body { display: contents; }
.admin-record-title { min-width: 0; overflow-wrap: anywhere; }
.admin-mobile-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.admin-reference .reference-year { margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 500; letter-spacing: 0; }
.admin-reference h2 { margin: 0; font-size: 17px; line-height: 1.45; letter-spacing: -.02em; }
.admin-reference p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; }
.admin-reference .admin-record-cost { font-size: 14px; font-variant-numeric: tabular-nums; }
.admin-reference strong { color: var(--ink); font-weight: 700; }
.admin-reference .admin-excerpt { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; margin-top: 7px; overflow: hidden; font-size: 12px; }
.admin-card-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 16px; padding-top: 10px; margin-top: auto; border-top: 1px solid #e0e8ec; }
.admin-card-actions a, .admin-card-actions .text-button { display: inline-flex; align-items: center; min-height: 32px; padding: 0; color: #08718d; font-size: 12px; font-weight: 600; }
.admin-card-actions a:hover, .admin-workspace .text-button:hover, .admin-back:hover { text-decoration: underline; text-underline-offset: 4px; }
.admin-card-actions form { margin: 0; }
.admin-reference .admin-card-actions { flex-wrap: nowrap; gap: 8px; margin: 0; padding: 0; border: 0; }
.admin-reference .admin-card-actions a, .admin-reference .admin-card-actions button { min-height: 34px; padding: 5px 9px; border: 1px solid #cbd8de; border-radius: 5px; color: #284b5b; background: #fff; font-size: 12px; text-decoration: none; white-space: nowrap; }
.admin-reference .admin-card-actions a:hover, .admin-reference .admin-card-actions button:hover { border-color: #8fa9b6; background: #f2f7f9; }
.admin-reference .admin-card-actions .admin-danger { border-color: #efc9c0; color: #ad3926; }
.admin-workspace .admin-danger { color: #b43823; }
.admin-list-note { margin: 22px 0 0; color: var(--muted); font-size: 12px; }
.admin-empty { padding: 56px 24px; border: 1px dashed var(--admin-border); border-radius: 10px; background: #fff; text-align: center; }
.admin-empty h2 { font-size: 22px; }
.admin-empty p { color: var(--muted); font-size: 14px; }
.admin-editor { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .85fr); gap: 24px; align-items: start; }
.admin-panel { min-width: 0; margin: 0; padding: 28px; border: 1px solid var(--admin-border); border-radius: 10px; background: #fff; box-shadow: 0 3px 12px rgb(16 47 58 / .025); overflow-wrap: anywhere; }
.admin-panel h2 { margin: 0 0 18px; font-size: 20px; line-height: 1.35; letter-spacing: -.03em; }
.admin-panel h3 { margin: 26px 0 12px; font-size: 15px; }
.admin-workspace .admin-help { margin: 0 0 20px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.admin-workspace .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 20px; }
.admin-workspace .field { display: flex; flex-direction: column; align-self: stretch; gap: 8px; }
.admin-workspace .field label { font-size: 12px; font-weight: 600; line-height: 1.6; letter-spacing: 0; text-transform: none; }
.admin-workspace .field .control { margin-top: auto; }
.admin-workspace .control { min-height: 48px; padding: 12px 14px; border-color: #c9d6dc; border-radius: 6px; font-size: 14px; }
.admin-workspace .control:focus { border-color: var(--ink); }
.admin-workspace textarea.control { min-height: 210px; }
.admin-workspace [aria-invalid="true"] { border-color: var(--accent); }
.admin-upload { padding: 20px; border: 1px dashed #a8c0ca; border-radius: 8px; background: #f6fafb; }
.admin-upload label { display: block; margin-bottom: 14px; font-size: 13px; font-weight: 700; }
.admin-upload input { width: 100%; min-width: 0; color: var(--muted); font-size: 12px; }
.admin-upload input::file-selector-button { margin-right: 10px; padding: 8px 10px; border: 1px solid #bdcfd6; border-radius: 5px; background: #fff; color: var(--ink); font: inherit; cursor: pointer; }
.admin-upload input::file-selector-button:hover { background: #e7f1f5; }
.admin-workspace .admin-photos { margin-top: 18px; }
.admin-workspace .admin-photo { margin: 0; max-height: 160px; aspect-ratio: 1.4; border-radius: 6px; object-fit: cover; }
.admin-workspace #photo-preview small { overflow-wrap: anywhere; }
.admin-workspace #photo-errors { margin: 16px 0 0; font-size: 12px; }
.admin-editor-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 24px; margin-top: 26px; padding: 22px 0; border-top: 1px solid var(--admin-border); font-size: 13px; }
.admin-contact-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.admin-contact-groups legend { float: left; width: 100%; padding: 0; margin-bottom: 20px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.admin-contact-groups .form-grid { clear: both; }
.admin-contact-groups { align-items: start; }
.admin-detail { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 24px; align-items: start; }
.admin-detail .reference-gallery { margin: 0; }
.admin-detail .reference-photo { border-radius: 6px; }
.admin-detail .reference-year { margin-bottom: 12px; }
.admin-detail .admin-card-actions { margin-top: 26px; }
.admin-empty-media { display: grid; place-content: center; min-height: 300px; padding: 24px; border-radius: 6px; background: #e3eff3; color: #426575; text-align: center; }
.admin-empty-media p { margin: 14px 0 8px; font-size: 13px; }
.admin-empty-media a { color: #08718d; font-size: 13px; text-decoration: underline; }
.admin-facts { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 12px 16px; margin: 24px 0; padding: 22px 0; border-block: 1px solid var(--admin-border); font-size: 13px; }
.admin-facts dt { color: var(--muted); }
.admin-facts dd { margin: 0; font-weight: 600; }
.admin-description { font-size: 14px; line-height: 1.85; }
.admin-workspace .notice { border-radius: 8px; border-color: #b7d7c9; background: #eaf5ef; font-size: 13px; }
.admin-workspace .notice.error { border-color: #edbeaf; background: #fff4f0; }
.admin-skip { position: absolute; top: -100px; left: 16px; z-index: 5; padding: 10px; background: #fff; }
.admin-skip:focus { top: 12px; }
#admin-content:focus { outline: none; }
dialog { border-radius: 12px; box-shadow: 0 20px 70px rgb(13 39 49 / .2); }
dialog h2 { font-size: 22px; letter-spacing: -.03em; }
dialog p { font-size: 14px; }
dialog .button { border-radius: 7px; }
dialog .button::after { content: none; }
#delete-description { font-weight: 700; overflow-wrap: anywhere; }
#confirm-delete { border-color: #b43823; background: #b43823; }
@media (max-width: 1200px) {
  .admin-register-head { display: none; }
  .admin-reference { grid-template-columns: 72px minmax(0, 1fr) 218px; gap: 8px 20px; }
  .admin-reference-media { grid-column: 1; grid-row: 1 / 4; align-self: start; }
  .admin-record-title { grid-column: 2; grid-row: 1; }
  .admin-record-client { grid-column: 2; grid-row: 2; }
  .admin-record-cost { grid-column: 2; grid-row: 3; }
  .admin-reference .admin-card-actions { grid-column: 3; grid-row: 1 / 4; }
  .admin-mobile-label { position: static; width: auto; height: auto; margin: 0; overflow: visible; clip-path: none; white-space: normal; }
  .admin-editor { grid-template-columns: 1fr; }
  .admin-contact-groups { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .admin-workspace { grid-template-columns: 190px minmax(0, 1fr); }
  .admin-workspace > section { padding: 28px; }
  .admin-sidebar { padding: 26px 16px; }
  .admin-detail { grid-template-columns: 1fr; }
  .admin-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .admin-reference { grid-template-columns: 72px minmax(0, 1fr); }
  .admin-reference .admin-card-actions { grid-column: 2; grid-row: 4; flex-wrap: wrap; margin-top: 4px; }
}
@media (max-width: 700px) {
  .admin-workspace { display: block; }
  .admin-sidebar { position: static; display: grid; grid-template-columns: 1fr auto; gap: 16px; height: auto; padding: 20px; overflow: visible; }
  .admin-sidebar .brand { width: 132px; min-height: 62px; padding: 8px 12px; }
  .admin-sidebar .brand img { width: 108px; }
  .admin-caption { align-self: center; margin: 0; font-size: 11px; }
  .admin-sidebar nav { display: flex; grid-column: 1 / -1; gap: 8px; }
  .admin-sidebar nav a { flex: 1; }
  .admin-sidebar-bottom { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; gap: 16px; margin-top: 0; padding-top: 12px; }
  .admin-workspace > section { padding: 28px 20px; }
  .admin-workspace h1 { font-size: 28px; }
  .admin-toolbar { gap: 18px; }
  .admin-reference { gap: 7px 14px; padding: 20px 16px; }
  .admin-reference h2 { font-size: 15px; }
  .admin-reference-media { min-height: 0; }
  .admin-card-actions { column-gap: 13px; }
  .admin-panel { padding: 22px; }
  .admin-workspace .form-grid { grid-template-columns: 1fr; }
  .admin-workspace .field.full { grid-column: auto; }
  .admin-workspace .control { font-size: 16px; }
  .admin-contact-groups { gap: 18px; }
  .admin-sidebar-bottom > a { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { .admin-workspace { scroll-behavior: auto; } }

/* Zvětšená galerie společná pro veřejný web i detail v administraci. */
.reference-gallery a { cursor: zoom-in; }
.reference-card .reference-gallery > a:not(:first-child) { display: none; }
.reference-gallery a:focus { outline: none; box-shadow: none; }
.reference-gallery a:focus-visible .reference-photo { filter: brightness(.9); }
.photo-viewer { width: min(1200px, calc(100% - 32px)); max-width: none; max-height: calc(100svh - 32px); padding: 0; border: 1px solid #385360; border-radius: 12px; background: #0d2731; color: #f8fbfc; box-shadow: 0 28px 90px rgb(0 0 0 / .4); }
.photo-viewer::backdrop { background: rgb(4 14 19 / .88); }
.photo-viewer-toolbar { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 22px; background: #0d2731; }
.photo-viewer-toolbar > div { min-width: 0; }
.photo-viewer h2 { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.4; letter-spacing: -.02em; overflow-wrap: anywhere; }
.photo-viewer-counter { margin: 5px 0 0; color: #bdd1d9; font-size: 12px; font-variant-numeric: tabular-nums; }
.photo-viewer button { border: 1px solid #506976; background: #193843; color: #fff; font: inherit; cursor: pointer; }
.photo-viewer button:hover { border-color: #9fb6bf; background: #284b59; }
.photo-viewer button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.photo-viewer .photo-viewer-close { display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0; min-height: 44px; padding: 0 12px; border-radius: 7px; font-size: 13px; }
.photo-viewer-close > span { font-size: 26px; line-height: 1; }
.photo-viewer-stage { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 16px; padding: 0 20px 16px; }
.photo-viewer-stage > button { grid-row: 1; width: 44px; min-height: 56px; padding: 0; border-radius: 8px; font-size: 38px; line-height: 1; }
.photo-viewer-prev { grid-column: 1; }
.photo-viewer-next { grid-column: 3; }
.photo-viewer-image { position: relative; grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: center; min-width: 0; height: min(65svh, 720px); }
.photo-viewer-image img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; }
.photo-viewer-status { position: absolute; inset: 0; display: grid; place-content: center; margin: 0; padding: 20px; color: #d7e4e9; font-size: 14px; text-align: center; }
.photo-viewer-thumbs { display: flex; gap: 10px; overflow-x: auto; padding: 6px 22px 20px; }
.photo-viewer-thumbs button { flex: 0 0 80px; height: 58px; padding: 2px; border: 2px solid transparent; border-radius: 5px; background: transparent; opacity: .7; }
.photo-viewer-thumbs button:first-child { margin-left: auto; }
.photo-viewer-thumbs button:last-child { margin-right: auto; }
.photo-viewer-thumbs img { width: 100%; height: 100%; object-fit: cover; border-radius: 2px; }
.photo-viewer-thumbs [aria-current] { border-color: #f1a08b; opacity: 1; }
.photo-viewer-single .photo-viewer-image { grid-column: 1 / -1; }
.photo-viewer [hidden] { display: none; }
@media (max-width: 600px) {
  .photo-viewer { width: calc(100% - 16px); max-height: calc(100svh - 16px); border-radius: 8px; }
  .photo-viewer-toolbar { gap: 12px; padding: 14px; }
  .photo-viewer h2 { font-size: 14px; }
  .photo-viewer-stage { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 10px 12px; }
  .photo-viewer-image { grid-column: 1; height: 55svh; }
  .photo-viewer-stage > button { grid-column: 1; z-index: 1; width: 40px; min-height: 48px; background: rgb(13 39 49 / .85); }
  .photo-viewer-prev { justify-self: start; }
  .photo-viewer-next { justify-self: end; }
  .photo-viewer-thumbs { padding: 6px 14px 14px; }
}
