:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d2924;
  background: #263a3d;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(16,30,34,.18), rgba(18,27,25,.42)),
    url("/static/background.jpg") center center / cover fixed no-repeat;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background: linear-gradient(90deg, rgba(245,240,226,.10), rgba(255,248,231,.02));
}

a { color: #2f5145; }
button, input, select { font: inherit; }
.topbar {
  min-height: 66px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(47,81,69,.15);
  background: rgba(255,255,255,.84);
  backdrop-filter: blur(12px);
}
.topbar nav { display:flex; gap:18px; align-items:center; }
.brand { font-weight: 750; letter-spacing: .01em; }
.brand-link { color: inherit; text-decoration: none; display:flex; align-items:center; gap:10px; }
.brand-mini { width: 28px; height: 34px; object-fit: contain; flex: 0 0 auto; }
.shell {
  width: min(760px, calc(100% - 28px));
  margin: 38px auto 70px;
}
.narrow { width: min(480px, calc(100% - 28px)); }
.hero {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 30px;
  text-align: left;
}
.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 6vw, 3.7rem);
  font-weight: 600;
  letter-spacing: .045em;
}
.hero p { margin:.35rem 0 0; font-size:1.05rem; color:#53645d; }
.hero-logo {
  width: 84px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 9px 14px rgba(33,31,27,.18));
}
.card {
  background: rgba(255,255,255,.90);
  border: 1px solid rgba(47,81,69,.13);
  border-radius: 22px;
  padding: 24px;
  margin: 18px 0;
  box-shadow: 0 14px 40px rgba(30,50,42,.07);
}
.card h1, .card h2 { margin-top:0; }
.auth-card { padding-top: 16px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #eef1ed;
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 22px;
}
.auth-tab {
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  background: transparent;
  color: #5a6862;
  font-weight: 700;
  cursor: pointer;
}
.auth-tab.active {
  background: #fff;
  color: #203f35;
  box-shadow: 0 3px 12px rgba(32,63,53,.08);
}
.tab-icon { margin-right: 6px; font-size: .72em; }
.auth-panel { min-height: 260px; }
.stack { display:grid; gap:14px; }
label span { display:block; margin-bottom:6px; font-weight:650; }
input, select {
  width:100%;
  padding:13px 14px;
  border-radius:12px;
  border:1px solid #b9c4be;
  background:white;
}
input:focus, select:focus {
  outline: 3px solid rgba(47,81,69,.12);
  border-color: #56776b;
}
.field-help {
  display:block;
  margin-top:7px;
  color:#687871;
  line-height:1.35;
}
button {
  border:0;
  border-radius:12px;
  padding:12px 16px;
  font-weight:700;
  cursor:pointer;
}
button:disabled { opacity:.55; cursor:default; }
.primary { background:#213e35; color:white; }
.primary:hover { background:#183129; }
.secondary { background:#e6ece8; color:#244238; }
.danger { background:#f6e0df; color:#8b2d29; }
.linklike { background:transparent; color:#2f5145; padding:4px; }
.wide { width:100%; }
.hidden { display:none !important; }
.error {
  padding:12px 14px;
  border-radius:12px;
  background:#fff0ef;
  color:#852c29;
  margin-bottom:16px;
}
.error-text { color:#852c29; }
.hint, .muted { color:#677770; font-size:.92rem; }
.status { min-height:1.4em; }
.code-label { text-align:center; color:#66766f; margin-top:20px; }
.activation-code {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.2rem, 10vw, 4.2rem);
  font-weight:800;
  letter-spacing:.16em;
  text-align:center;
  padding:14px 0;
}
.activation-code.small {
  text-align:left;
  font-size:1.5rem;
  letter-spacing:.1em;
  padding:0 0 5px;
}
.install-card {
  border-color: rgba(174,126,59,.26);
  background: linear-gradient(135deg, rgba(255,251,242,.97), rgba(249,244,231,.97));
}
.install-row { display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.install-copy h2 { margin:0 0 4px; font-size:1.15rem; }
.install-copy p { margin:0; color:#5f6c66; }
.install-icon { width:64px; height:64px; border-radius:16px; }
.install-dialog {
  border: 0;
  border-radius: 22px;
  padding: 0;
  width: min(420px, calc(100% - 32px));
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.install-dialog::backdrop { background: rgba(20,28,25,.54); }
.dialog-body { padding: 26px; text-align:center; }
.dialog-icon { width:84px; height:84px; border-radius:20px; margin-bottom:8px; }
.admin-brand { display:flex; align-items:center; gap:10px; }
.admin-grid { width:min(1050px,calc(100% - 28px)); }
.admin-item {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  border-top:1px solid #e0e6e2;
}
.inline-form { display:flex; gap:8px; align-items:center; flex:1; max-width:520px; }
.table-wrap { overflow:auto; }
table { border-collapse:collapse; width:100%; }
th, td { text-align:left; padding:10px; border-bottom:1px solid #e0e6e2; }
code { font-size:.9em; }

@media (max-width: 650px) {
  .topbar { padding:0 14px; }
  .topbar nav { gap:12px; font-size:.92rem; }
  .shell { margin:22px auto 48px; }
  .hero { align-items:center; justify-content:flex-start; gap:16px; }
  .hero-logo { width:66px; height:90px; }
  .hero h1 { font-size:2.25rem; }
  .hero p { font-size:.96rem; }
  .card { padding:18px; border-radius:18px; }
  .auth-tabs { margin-bottom:18px; }
  .auth-tab { padding:10px 7px; font-size:.9rem; }
  .admin-item, .inline-form { align-items:stretch; flex-direction:column; }
}


.transparent-icon {
  border-radius: 0 !important;
  object-fit: contain;
}
.user-editor {
  border-top: 1px solid #e0e6e2;
  padding: 12px 0;
}
.user-editor summary {
  cursor: pointer;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: center;
}
.user-edit-form {
  margin-top: 16px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(241,244,239,.86);
}
@media (max-width: 650px) {
  body {
    background-attachment: scroll;
    background-position: 45% center;
  }
  .user-editor summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}


.turnstile-slot {
  min-height: 0;
}
.remote-audio {
  width: 0;
  height: 0;
  overflow: hidden;
}
#endConversation {
  margin-top: 10px;
}


.voice-admin-card { grid-column: 1 / -1; }
.voice-language-form { max-width: 360px; margin: 14px 0; }
.voice-current {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(241,244,239,.9);
  margin: 12px 0 18px;
}
.voice-current code { display:block; margin-top:4px; overflow-wrap:anywhere; }
.voice-description { min-height: 1.5em; }
.voice-actions { display:flex; gap:10px; flex-wrap:wrap; }
.voice-actions button { flex:1 1 180px; }
.voice-audio { width:100%; margin-top:8px; }
.success-note {
  padding:12px 14px;
  border-radius:12px;
  background:#eaf4ed;
  color:#265b37;
  margin-bottom:16px;
}
.button-link {
  display:inline-block;
  text-align:center;
  text-decoration:none;
  border-radius:12px;
  padding:12px 16px;
  font-weight:700;
}
.not-found-card { text-align:center; padding:34px 28px; }
.not-found-logo { width:92px; height:120px; object-fit:contain; }
.not-found-code {
  font-size:.9rem;
  font-weight:800;
  letter-spacing:.18em;
  color:#8a6b48;
  margin-top:10px;
}
.not-found-card h1 {
  font-family:Georgia, "Times New Roman", serif;
  font-size:clamp(1.7rem, 6vw, 2.5rem);
  margin:10px 0;
}
.not-found-card p { color:#5f6c66; margin-bottom:24px; }

@media (max-width: 650px) {
  .voice-actions { flex-direction:column; }
}


/* ==========================================================================
   KRONIKY v1.6.0 — NOČNÍ BRONZ
   Dark, low-luminance theme for long voice sessions with Screen Wake Lock.
   ========================================================================== */

:root {
  color-scheme: dark;
  color: #f2ede7;
  background: #080c0f;
  --night-bg: #080c0f;
  --night-surface: #151514;
  --night-surface-2: #1c1917;
  --night-border: rgba(185, 122, 103, .34);
  --night-border-soft: rgba(216, 179, 84, .18);
  --night-text: #f2ede7;
  --night-muted: #bdb2a8;
  --night-gold: #d8b354;
  --night-copper: #c48772;
  --night-teal: #126d63;
  --night-teal-hover: #178277;
}

body {
  color: var(--night-text);
  background:
    linear-gradient(180deg, rgba(5, 8, 10, .91), rgba(6, 9, 10, .96)),
    url("/static/background.jpg") center center / cover fixed no-repeat;
}

body::before {
  background:
    radial-gradient(circle at 50% 0%, rgba(216, 179, 84, .055), transparent 34%),
    linear-gradient(90deg, rgba(196, 135, 114, .025), transparent 45%);
}

a { color: #d9aa73; }
a:hover { color: #efc58f; }

.topbar {
  border-bottom: 1px solid var(--night-border-soft);
  background: rgba(7, 11, 14, .94);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .22);
}

.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #e5bc76;
}

.topbar .brand > img {
  display: block !important;
  width: 36px !important;
  height: 46px !important;
  min-width: 36px !important;
  max-width: 36px !important;
  min-height: 46px !important;
  max-height: 46px !important;
  object-fit: contain !important;
  flex: 0 0 36px !important;
}

.hero h1,
.card h1,
.card h2,
.card h3 {
  color: #e2bb73;
}

.hero p,
.field-help,
.hint,
.muted,
.install-copy p,
.not-found-card p {
  color: var(--night-muted);
}

.hero-logo {
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, .48))
    drop-shadow(0 0 12px rgba(216, 179, 84, .06));
}

.card {
  background:
    linear-gradient(145deg, rgba(28, 24, 21, .96), rgba(14, 16, 16, .96));
  border: 1px solid var(--night-border);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, .30),
    inset 0 1px 0 rgba(255, 255, 255, .025);
}

.auth-tabs {
  background: #0e1416;
  border: 1px solid rgba(216, 179, 84, .10);
}
.auth-tab {
  color: #aaa19a;
}
.auth-tab.active {
  color: #f2d4ad;
  background: #24201d;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .30);
}

input,
select {
  color: var(--night-text);
  border-color: #544940;
  background: #0e1416;
}
input:focus,
select:focus {
  outline: 3px solid rgba(216, 179, 84, .12);
  border-color: #a77c55;
}
select option {
  color: var(--night-text);
  background: #111718;
}

.primary {
  color: #fff;
  background: linear-gradient(180deg, #157a6e, #0f6259);
  border: 1px solid rgba(90, 211, 191, .30);
  box-shadow: 0 8px 24px rgba(7, 86, 76, .26);
}
.primary:hover {
  background: linear-gradient(180deg, #188b7e, #126d63);
}
.secondary {
  color: #ead7c8;
  background: #28231f;
  border: 1px solid rgba(196, 135, 114, .30);
}
.secondary:hover { background: #322a25; }
.danger {
  color: #efbbb3;
  background: #3a211f;
  border: 1px solid rgba(204, 104, 90, .32);
}
.linklike {
  color: #d7aa74;
}

.error {
  color: #f2b9b1;
  background: rgba(75, 31, 29, .75);
  border: 1px solid rgba(216, 113, 99, .25);
}
.error-text { color: #efaaa1; }

.install-card {
  border-color: rgba(216, 179, 84, .30);
  background:
    linear-gradient(135deg, rgba(31, 26, 21, .98), rgba(17, 18, 17, .98));
}

.install-dialog {
  color: var(--night-text);
  background: #171716;
  border: 1px solid var(--night-border);
}
.install-dialog::backdrop {
  background: rgba(2, 5, 7, .78);
}

.admin-item,
.user-editor,
th,
td {
  border-color: rgba(216, 179, 84, .15);
}

.user-edit-form,
.voice-current {
  color: var(--night-text);
  background: rgba(11, 16, 17, .82);
  border: 1px solid rgba(216, 179, 84, .12);
}

.success-note {
  color: #bde2d3;
  background: rgba(21, 76, 64, .58);
  border: 1px solid rgba(77, 175, 151, .22);
}

code {
  color: #d8c2ad;
}

.not-found-code,
.eyebrow,
.user-metric-label,
.transcript-role {
  color: var(--night-copper);
}

/* User metrics in /internal */
.user-list {
  display: grid;
  gap: 14px;
}
.user-overview {
  padding: 18px;
  border: 1px solid rgba(216, 179, 84, .16);
  border-radius: 16px;
  background: rgba(8, 12, 13, .46);
}
.user-overview h3 {
  margin: 0 0 4px;
}
.user-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}
.user-identity {
  overflow-wrap: anywhere;
}
.user-password {
  white-space: nowrap;
}
.user-metrics {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) repeat(2, minmax(100px, .7fr)) minmax(150px, 1fr);
  gap: 9px;
  margin: 15px 0 10px;
}
.user-metric {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(30, 26, 23, .72);
  border: 1px solid rgba(196, 135, 114, .13);
}
.user-metric-label {
  display: block;
  margin-bottom: 3px;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.user-metric strong {
  color: #f1e9e0;
}
.user-metric-link a {
  font-weight: 700;
}
.user-editor-compact {
  border-top: 0;
  padding: 4px 0 0;
}
.user-editor-compact > summary {
  justify-content: flex-start;
  color: #d7aa74;
  font-weight: 700;
}

/* Combined transcript */
.transcript-shell {
  width: min(920px, calc(100% - 28px));
}
.transcript-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.transcript-header h1 {
  margin-bottom: 8px;
}
.eyebrow {
  margin: 0 0 5px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}
.transcript-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.transcript-stats strong {
  color: #eee3d8;
}
.transcript-session h2 {
  margin-bottom: 2px;
}
.transcript-session-meta {
  margin-bottom: 16px;
}
.transcript-events {
  display: grid;
  gap: 10px;
}
.transcript-event {
  padding: 13px 15px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.055);
  background: rgba(8, 12, 13, .64);
}
.transcript-event.narrator {
  border-left: 3px solid #b98a65;
}
.transcript-event.interviewer {
  border-left: 3px solid #307e73;
}
.transcript-role {
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.transcript-role span,
.transcript-role em {
  color: #958c84;
  font-weight: 500;
  letter-spacing: 0;
  font-style: normal;
}
.transcript-event p {
  margin: 6px 0 0;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .user-overview-head,
  .transcript-header {
    align-items: stretch;
    flex-direction: column;
  }
  .user-password {
    white-space: normal;
  }
  .user-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .topbar .brand > img {
    width: 32px !important;
    height: 42px !important;
    min-width: 32px !important;
    max-width: 32px !important;
    min-height: 42px !important;
    max-height: 42px !important;
    flex-basis: 32px !important;
  }

  .user-metrics {
    grid-template-columns: 1fr;
  }

  body {
    background:
      linear-gradient(180deg, rgba(5, 8, 10, .92), rgba(6, 9, 10, .97)),
      url("/static/background.jpg") 45% center / cover scroll no-repeat;
  }
}

/* ==========================================================================
   KRONIKY v1.6.1 — /internal login mobile layout
   ========================================================================== */

.internal-login-page {
  min-height: 100vh;
}

.internal-login-shell {
  width: min(440px, calc(100% - 28px));
  margin-top: clamp(28px, 8vh, 76px);
}

.internal-login-card {
  overflow: hidden;
}

.internal-login-brand {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.internal-login-logo {
  display: block !important;
  width: 52px !important;
  height: 68px !important;
  min-width: 52px !important;
  max-width: 52px !important;
  min-height: 68px !important;
  max-height: 68px !important;
  object-fit: contain !important;
  flex: 0 0 52px !important;
}

.internal-login-appname {
  color: var(--night-copper);
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.internal-login-brand h1 {
  margin: 2px 0 0;
  font-size: clamp(1.55rem, 6vw, 2rem);
  line-height: 1.1;
}

.internal-login-back {
  margin: 18px 0 0;
  text-align: center;
  font-size: .92rem;
}

@media (max-width: 600px) {
  .internal-login-shell {
    width: min(100% - 24px, 420px);
    margin: 18px auto 36px;
  }

  .internal-login-card {
    padding: 20px;
  }

  .internal-login-brand {
    gap: 13px;
    margin-bottom: 18px;
  }

  .internal-login-logo {
    width: 44px !important;
    height: 58px !important;
    min-width: 44px !important;
    max-width: 44px !important;
    min-height: 58px !important;
    max-height: 58px !important;
    flex-basis: 44px !important;
  }
}



/* ==========================================================================
   KRONIKY v1.7.0 — USER CHRONICLE MEDIA + REGISTRATION EXPLANATION
   ========================================================================== */

body.user-personalized {
  background:
    linear-gradient(180deg, rgba(5, 8, 10, .82), rgba(6, 9, 10, .90)),
    var(--user-bg-landscape),
    url("/static/background.jpg");
  background-position: center center, center center, center center;
  background-size: cover, cover, cover;
  background-attachment: fixed, fixed, fixed;
  background-repeat: no-repeat;
}

.signed-in-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}

.signed-in-main {
  min-width: 0;
}

.chronicle-book-wrap {
  display: grid;
  place-items: center;
  min-height: 190px;
  perspective: 900px;
}

.chronicle-book {
  position: relative;
  width: 118px;
  height: 164px;
  transform: rotateY(-12deg) rotateX(2deg);
  transform-style: preserve-3d;
  filter: drop-shadow(12px 18px 18px rgba(0,0,0,.48));
}

.chronicle-book-pages {
  position: absolute;
  z-index: 0;
  left: 12px;
  top: 9px;
  width: 112px;
  height: 158px;
  border-radius: 3px 8px 8px 3px;
  background:
    repeating-linear-gradient(
      0deg,
      #d6c7a8 0,
      #d6c7a8 2px,
      #b9aa8d 2px,
      #b9aa8d 3px
    );
  box-shadow:
    inset -8px 0 12px rgba(79, 57, 35, .20),
    4px 3px 0 #9c8869;
  transform: translateZ(-7px);
}

.chronicle-book-cover {
  position: absolute;
  z-index: 2;
  inset: 0 8px 5px 0;
  padding: 13px 11px 12px;
  border-radius: 5px 10px 10px 5px;
  overflow: hidden;
  background:
    radial-gradient(circle at 27% 18%, rgba(255,255,255,.07), transparent 18%),
    radial-gradient(circle at 72% 60%, rgba(0,0,0,.18), transparent 33%),
    linear-gradient(110deg, #4a2118, #6e3824 45%, #321711);
  border: 2px solid #a66b3d;
  box-shadow:
    inset 7px 0 14px rgba(20, 7, 3, .42),
    inset 0 0 0 2px rgba(231, 177, 91, .17),
    inset 0 0 22px rgba(0,0,0,.33),
    0 0 0 1px rgba(20,8,4,.85);
}

.chronicle-book-cover::before {
  content: "";
  position: absolute;
  inset: 6px;
  pointer-events: none;
  border: 1px solid rgba(225, 175, 92, .55);
  border-radius: 3px 7px 7px 3px;
}

.chronicle-book-cover::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 9px;
  background:
    linear-gradient(90deg, rgba(0,0,0,.42), rgba(255,255,255,.035), rgba(0,0,0,.20));
}

.chronicle-book-title {
  position: relative;
  z-index: 2;
  margin: 3px 0 9px 6px;
  color: #e3bd79;
  font-family: Georgia, "Times New Roman", serif;
  font-size: .78rem;
  line-height: 1.05;
  text-align: center;
  text-shadow: 0 1px 2px #1e0803;
}

.chronicle-book-photo {
  position: relative;
  z-index: 2;
  width: 78px;
  height: 99px;
  margin: 0 auto;
  overflow: hidden;
  border: 2px solid #c89a57;
  border-radius: 2px;
  background: #171411;
  box-shadow:
    0 0 0 2px rgba(54, 22, 11, .85),
    0 6px 14px rgba(0,0,0,.34);
}

.chronicle-book-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.chronicle-book-photo img.chronicle-book-logo {
  object-fit: contain;
  padding: 10px;
  background: #0b1012;
}

.device-registration-explain {
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid rgba(216, 179, 84, .25);
  border-radius: 14px;
  background:
    linear-gradient(145deg, rgba(43, 34, 26, .78), rgba(18, 20, 19, .78));
}

.device-registration-explain h3 {
  margin: 0 0 8px;
  color: #e2bb73;
}

.device-registration-explain p {
  margin: 7px 0;
  color: #d0c5ba;
}

.media-assignment-fieldset {
  margin: 12px 0 4px;
  padding: 14px;
  border: 1px solid rgba(216, 179, 84, .17);
  border-radius: 12px;
}

.media-assignment-fieldset legend {
  padding: 0 7px;
  color: #e2bb73;
  font-weight: 800;
}

@media (max-width: 650px) {
  .signed-in-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .chronicle-book-wrap {
    min-height: 150px;
  }

  .chronicle-book {
    width: 94px;
    height: 132px;
  }

  .chronicle-book-pages {
    width: 90px;
    height: 127px;
    left: 10px;
    top: 7px;
  }

  .chronicle-book-cover {
    padding: 10px 9px;
  }

  .chronicle-book-title {
    margin-bottom: 7px;
    font-size: .67rem;
  }

  .chronicle-book-photo {
    width: 62px;
    height: 79px;
  }

  body.user-personalized {
    background:
      linear-gradient(180deg, rgba(5, 8, 10, .82), rgba(6, 9, 10, .90)),
      var(--user-bg-portrait),
      url("/static/background.jpg");
    background-position: center center, center center, 45% center;
    background-size: cover, cover, cover;
    background-attachment: scroll, scroll, scroll;
    background-repeat: no-repeat;
  }
}

/* ==========================================================================
   KRONIKY v1.7.1 — STARÝ PSACÍ STŮL + KOŽENÁ KRONIKA
   Default public/login scene based on the approved visual concepts.
   Own Kroniky logo remains live HTML; generated artwork is used only as scene.
   ========================================================================== */

body.vintage-desk-page:not(.user-personalized) {
  min-height: 100vh;
  background-color: #090705;
  background-image:
    linear-gradient(90deg, rgba(4,3,2,.84), rgba(4,3,2,.12) 28%, rgba(4,3,2,.10) 72%, rgba(4,3,2,.84)),
    linear-gradient(180deg, rgba(2,2,2,.16), rgba(2,2,2,.50)),
    url("/static/vintage-desk-desktop.webp");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-position: center, center, center top;
  background-size: cover, cover, auto 100vh;
  background-attachment: fixed, fixed, fixed;
}

/* Keep personalized v1.7.0 backgrounds authoritative after sign-in. */
body.vintage-desk-page.user-personalized {
  background-color: #090705;
}

.vintage-desk-page .topbar {
  background: linear-gradient(180deg, rgba(6,5,4,.92), rgba(8,7,6,.70));
  border-bottom-color: rgba(196, 135, 114, .18);
  backdrop-filter: blur(7px);
}

.vintage-desk-page .shell {
  position: relative;
  z-index: 1;
  width: min(690px, calc(100% - 28px));
  padding-top: clamp(24px, 5vh, 58px);
  padding-bottom: 64px;
}

.vintage-book-brand {
  width: min(560px, 100%);
  margin: 0 auto -18px;
  padding: 10px 24px 30px;
  justify-content: center;
  text-align: center;
  border-radius: 20px 20px 0 0;
  background:
    linear-gradient(180deg, rgba(28,17,12,.96), rgba(22,13,9,.92));
  border: 1px solid rgba(187, 126, 75, .55);
  border-bottom: 0;
  box-shadow:
    0 -12px 34px rgba(0,0,0,.28),
    inset 0 0 0 2px rgba(215, 168, 92, .06);
}

.vintage-book-brand .hero-logo {
  width: 64px;
  max-height: 82px;
  object-fit: contain;
  filter:
    drop-shadow(0 5px 7px rgba(0,0,0,.45))
    drop-shadow(0 0 6px rgba(216,179,84,.12));
}

.vintage-book-brand h1 {
  margin-top: 3px;
  color: #e0b970;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .06em;
}

.vintage-book-brand p {
  color: #bda995;
}

.vintage-book-panel {
  position: relative;
  isolation: isolate;
  width: min(600px, 100%);
  margin-left: auto;
  margin-right: auto;
  overflow: visible;
  padding: clamp(28px, 5vw, 44px);
  border: 1px solid #7b4f32;
  border-radius: 15px 18px 18px 15px;
  background:
    radial-gradient(circle at 24% 12%, rgba(255,255,255,.035), transparent 17%),
    radial-gradient(circle at 78% 72%, rgba(0,0,0,.22), transparent 34%),
    linear-gradient(112deg, rgba(59,31,22,.985), rgba(31,18,13,.99) 48%, rgba(20,13,10,.995));
  box-shadow:
    0 30px 70px rgba(0,0,0,.54),
    inset 12px 0 20px rgba(7,3,2,.35),
    inset 0 0 0 3px rgba(199,142,78,.075),
    inset 0 0 42px rgba(0,0,0,.28);
}

/* Stitched inner frame. */
.vintage-book-panel::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 9px;
  pointer-events: none;
  border: 1px solid rgba(204,151,87,.42);
  border-radius: 10px 13px 13px 10px;
  box-shadow:
    inset 0 0 0 3px rgba(0,0,0,.16),
    0 0 0 1px rgba(45,21,13,.72);
}

/* Leather cord and brass eyelets along the left side. */
.vintage-book-panel::after {
  content: "";
  position: absolute;
  z-index: 4;
  left: -18px;
  top: 12%;
  width: 26px;
  height: 76%;
  pointer-events: none;
  background:
    radial-gradient(circle at 18px 11%, #b98a4a 0 4px, #3a1b10 5px 7px, transparent 8px),
    radial-gradient(circle at 18px 50%, #b98a4a 0 4px, #3a1b10 5px 7px, transparent 8px),
    radial-gradient(circle at 18px 89%, #b98a4a 0 4px, #3a1b10 5px 7px, transparent 8px),
    linear-gradient(90deg, transparent 0 8px, #2b160e 9px 12px, #70412b 13px 16px, #24120c 17px 20px, transparent 21px);
  filter: drop-shadow(3px 4px 4px rgba(0,0,0,.52));
}

.vintage-book-panel > * {
  position: relative;
  z-index: 2;
}

.vintage-book-panel h2,
.vintage-book-panel h3 {
  color: #e3c18a;
  font-family: Georgia, "Times New Roman", serif;
}

.vintage-book-panel p,
.vintage-book-panel label,
.vintage-book-panel .field-help,
.vintage-book-panel .hint {
  color: #d4c5b7;
}

.vintage-book-panel input,
.vintage-book-panel select {
  background: rgba(9, 12, 12, .80);
  border-color: rgba(177, 127, 77, .46);
  color: #f1e7dc;
}

.vintage-book-panel .auth-tabs {
  background: rgba(8, 10, 10, .62);
  border-color: rgba(188, 131, 76, .24);
}

.vintage-book-panel .auth-tab.active {
  background: rgba(91, 52, 31, .58);
  color: #f0d3a7;
}

/* The user's assigned portrait becomes a quiet photograph beneath the UI text. */
.profile-watermark {
  position: absolute !important;
  z-index: 0 !important;
  inset: 12% 11% 10% auto;
  width: min(48%, 250px);
  height: 74%;
  object-fit: cover;
  object-position: center;
  opacity: .15;
  filter: sepia(.58) saturate(.72) contrast(1.08) brightness(.78);
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse at center, #000 28%, rgba(0,0,0,.84) 56%, transparent 84%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 28%, rgba(0,0,0,.84) 56%, transparent 84%);
  pointer-events: none;
}

.vintage-book-content {
  position: relative;
  z-index: 2;
}

.signed-in-card .signed-in-main {
  max-width: 430px;
}

/* Admin login uses the same leather-book object, but stays compact. */
.vintage-desk-page .internal-login-shell {
  width: min(470px, calc(100% - 28px));
  margin-top: clamp(28px, 7vh, 72px);
}

.vintage-desk-page .internal-login-card {
  padding: clamp(25px, 6vw, 42px);
}

@media (max-width: 700px) {
  body.vintage-desk-page:not(.user-personalized) {
    background-image:
      linear-gradient(180deg, rgba(2,2,2,.16), rgba(2,2,2,.46)),
      url("/static/vintage-desk-mobile.webp");
    background-repeat: no-repeat, no-repeat;
    background-position: center, center top;
    background-size: cover, cover;
    background-attachment: scroll, scroll;
  }

  .vintage-desk-page .shell {
    width: min(100% - 20px, 560px);
    padding-top: 18px;
  }

  .vintage-book-brand {
    width: calc(100% - 18px);
    margin-bottom: -14px;
    padding: 8px 18px 26px;
  }

  .vintage-book-brand .hero-logo {
    width: 52px;
    max-height: 68px;
  }

  .vintage-book-panel {
    width: 100%;
    padding: 26px 22px 30px;
    border-radius: 13px 16px 16px 13px;
  }

  .vintage-book-panel::after {
    left: -13px;
    width: 20px;
  }

  .profile-watermark {
    inset: 14% 7% 10% auto;
    width: 58%;
    height: 68%;
    opacity: .13;
  }

  .vintage-desk-page .internal-login-shell {
    width: min(100% - 20px, 430px);
    margin: 18px auto 36px;
  }
}

/* ==========================================================================
   KRONIKY v1.7.2 — NATURAL BOOK BACKGROUND / SINGLE LIVE PANEL
   The photographic book is the frame. The HTML panel itself has no frame.
   ========================================================================== */

body.vintage-desk-page {
  min-height: 100svh;
  color: #f2e7d8;
  background-color: #0d0906;
  background-image:
    url("/static/vintage-book-desktop-clean.webp"),
    url("/static/vintage-book-desktop-clean.webp");
  background-repeat: no-repeat, no-repeat;
  background-position: center center, center center;
  background-size: auto 124vh, cover;
  background-attachment: fixed, fixed;
}

/* Do not darken the approved photographic scene again. */
body.vintage-desk-page::before {
  display: none !important;
}

/* A custom background chosen in /internal still remains authoritative. */
body.vintage-desk-page.user-personalized {
  background-image:
    var(--user-bg-landscape),
    url("/static/vintage-book-desktop-clean.webp");
  background-position: center center, center center;
  background-size: cover, auto 124vh;
  background-repeat: no-repeat, no-repeat;
}

.public-topbar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  min-height: 48px;
  justify-content: flex-end;
  padding: 10px 18px;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
}

.public-topbar nav {
  margin-left: auto;
}

.public-topbar a {
  color: #d9b77f;
  text-shadow: 0 2px 4px rgba(0,0,0,.9);
}

.book-page-shell {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  min-height: 100svh;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18vh 16px 15vh;
}

.book-page-panel {
  position: relative;
  isolation: isolate;
  width: min(370px, 78vw);
  margin: 0 auto;
  padding: 0;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible;
}

.book-page-panel::before,
.book-page-panel::after {
  display: none !important;
}

.book-page-content {
  position: relative;
  z-index: 2;
}

.book-page-heading {
  margin: 0 0 22px;
  text-align: center;
}

.book-page-logo {
  display: block;
  width: 52px;
  height: 68px;
  margin: 0 auto 7px;
  object-fit: contain;
  filter:
    drop-shadow(0 4px 6px rgba(0,0,0,.55))
    drop-shadow(0 0 5px rgba(222,176,87,.12));
}

.book-page-heading h1 {
  margin: 0;
  color: #e3bd79;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 2.55rem);
  line-height: 1.05;
  letter-spacing: .035em;
  text-shadow: 0 2px 5px rgba(0,0,0,.9);
}

.book-page-heading p {
  margin: 8px auto 0;
  max-width: 330px;
  color: #dac7af;
  font-size: .98rem;
  text-shadow: 0 2px 4px rgba(0,0,0,.9);
}

.book-page-panel .auth-card,
.book-page-panel .signed-in-main {
  position: relative;
  z-index: 2;
  padding: 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.book-page-panel h2,
.book-page-panel h3 {
  color: #e7c78f;
  text-shadow: 0 2px 4px rgba(0,0,0,.85);
}

.book-page-panel p,
.book-page-panel label,
.book-page-panel .field-help,
.book-page-panel .hint {
  color: #e3d6c7;
  text-shadow: 0 1px 3px rgba(0,0,0,.9);
}

.book-page-panel input,
.book-page-panel select {
  background: rgba(8, 10, 9, .76);
  border: 1px solid rgba(200, 149, 91, .44);
  color: #f4eadf;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
}

.book-page-panel .auth-tabs {
  background: rgba(7, 9, 8, .48);
  border: 1px solid rgba(198, 146, 86, .26);
}

.book-page-panel .auth-tab {
  color: #c7b5a1;
}

.book-page-panel .auth-tab.active {
  color: #f2d39e;
  background: rgba(78, 45, 27, .64);
}

.book-page-panel .device-registration-explain {
  background: rgba(12, 13, 11, .55);
  border: 1px solid rgba(205, 153, 92, .25);
}

.book-page-panel .primary {
  background: linear-gradient(180deg, #177d70, #0f6259);
  border-color: rgba(92, 211, 189, .32);
}

.book-page-panel .secondary {
  background: rgba(38, 31, 26, .78);
  border-color: rgba(196, 135, 114, .34);
}

.book-page-panel .danger {
  background: rgba(67, 35, 30, .78);
}

.profile-watermark {
  position: absolute !important;
  z-index: 0 !important;
  left: 7%;
  right: 7%;
  bottom: 1%;
  width: 86%;
  height: 72%;
  object-fit: cover;
  object-position: center;
  opacity: .50 !important;
  filter: sepia(.55) saturate(.72) contrast(1.05) brightness(.62);
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse at center, #000 32%, rgba(0,0,0,.86) 62%, transparent 92%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 32%, rgba(0,0,0,.86) 62%, transparent 92%);
  pointer-events: none;
}

.book-page-panel .signed-in-main > *,
.book-page-panel .auth-card > * {
  position: relative;
  z-index: 2;
}

/* Public page deliberately has no visible link to /internal. */
.public-topbar a[href="/internal"],
.book-page-shell a[href="/internal"] {
  display: none !important;
}

@media (max-width: 700px) {
  body.vintage-desk-page {
    background-image: url("/static/vintage-book-mobile-clean.webp");
    background-position: center top;
    background-size: cover;
    background-repeat: no-repeat;
    background-attachment: scroll;
  }

  body.vintage-desk-page.user-personalized {
    background-image:
      var(--user-bg-portrait),
      url("/static/vintage-book-mobile-clean.webp");
    background-position: center center, center top;
    background-size: cover, cover;
    background-repeat: no-repeat, no-repeat;
  }

  .book-page-shell {
    min-height: 100svh;
    padding: 17vh 12px 13vh;
  }

  .book-page-panel {
    width: min(430px, 70vw);
  }

  .book-page-logo {
    width: 44px;
    height: 58px;
    margin-bottom: 5px;
  }

  .book-page-heading {
    margin-bottom: 16px;
  }

  .book-page-heading h1 {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .book-page-heading p {
    font-size: .9rem;
  }

  .book-page-panel .device-registration-explain {
    padding: 12px;
  }

  .book-page-panel .device-registration-explain p {
    font-size: .86rem;
    line-height: 1.38;
  }
}

@media (max-width: 430px) {
  .book-page-panel {
    width: 72vw;
  }

  .book-page-shell {
    padding-top: 16.5vh;
  }

  .book-page-heading p {
    font-size: .84rem;
  }

  .book-page-panel p,
  .book-page-panel label {
    font-size: .9rem;
  }
}


.book-page-panel .install-card {
  margin-top: 18px;
  padding: 14px 0 0;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* ==========================================================================
   KRONIKY v1.7.3 — SEPARATE DESK SCENE + BOOK AS PANEL BACKGROUND
   Architecture:
   1) desk + artifacts = full-page background, no book
   2) leather book = background image of the live content panel
   Therefore the book always grows/scrolls together with the content.
   ========================================================================== */

body.vintage-desk-page {
  min-height: 100svh;
  color: #f2e7d8;
  background-color: #281a10;
  background-image: url("/static/desk-background-desktop.webp") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body.vintage-desk-page::before {
  display: none !important;
}

/* A per-user landscape/portrait background still overrides the default table. */
body.vintage-desk-page.user-personalized {
  background-image: var(--user-bg-landscape) !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

.public-topbar {
  position: relative;
  z-index: 30;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 9px 18px;
  background: rgba(13, 9, 6, .28) !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: blur(2px);
}

.public-topbar nav {
  margin-left: auto;
}

.public-topbar a {
  color: #e0c08b;
  text-shadow: 0 2px 5px rgba(0,0,0,.88);
}

.mobile-header-brand {
  display: none;
}

/* The shell only positions the book. The book itself belongs to the panel. */
.book-page-shell {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  min-height: calc(100svh - 58px);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: clamp(24px, 5vh, 64px) 22px 70px;
}

/* Important: this block can grow arbitrarily. Its background grows with it. */
.book-page-panel {
  position: relative;
  isolation: isolate;
  width: min(780px, 88vw);
  min-height: 620px;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 90px 118px 86px;
  border: 0 !important;
  border-radius: 0 !important;
  background-color: transparent !important;
  background-image: url("/static/book-panel-desktop.webp") !important;
  background-position: center center !important;
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  box-shadow: none !important;
  overflow: visible;
  filter: drop-shadow(0 28px 35px rgba(0,0,0,.38));
}

.book-page-panel::before,
.book-page-panel::after {
  display: none !important;
}

.book-page-content {
  position: relative;
  z-index: 2;
  min-height: 440px;
}

.book-page-heading {
  margin: 0 0 25px;
  text-align: center;
}

.desktop-panel-logo {
  display: block;
}

.book-page-logo {
  width: 58px;
  height: 74px;
  margin: 0 auto 7px;
  object-fit: contain;
  filter:
    drop-shadow(0 4px 6px rgba(0,0,0,.52))
    drop-shadow(0 0 7px rgba(222,176,87,.12));
}

.book-page-heading h1 {
  margin: 0;
  color: #e3bd79;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  line-height: 1.05;
  letter-spacing: .035em;
  text-shadow: 0 2px 5px rgba(0,0,0,.86);
}

.book-page-heading p {
  margin: 9px auto 0;
  max-width: 420px;
  color: #e1d1bd;
  font-size: 1rem;
  text-shadow: 0 2px 4px rgba(0,0,0,.85);
}

/* The live form/controls remain ordinary HTML on top of the leather image. */
.book-page-panel .auth-card,
.book-page-panel .signed-in-main,
.book-page-panel .install-card {
  position: relative;
  z-index: 2;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* Keep inputs readable without turning them into another big panel. */
.book-page-panel input,
.book-page-panel select {
  background: rgba(8, 10, 9, .80);
  border: 1px solid rgba(201, 150, 91, .48);
  color: #f4eadf;
}

.book-page-panel .auth-tabs {
  background: rgba(7, 9, 8, .48);
  border: 1px solid rgba(198, 146, 86, .27);
}

.book-page-panel .auth-tab.active {
  color: #f2d39e;
  background: rgba(78, 45, 27, .65);
}

.book-page-panel .device-registration-explain {
  background: rgba(12, 13, 11, .56);
  border: 1px solid rgba(205, 153, 92, .27);
}

/* User portrait is literally below all live content, at the requested 50 %. */
.profile-watermark {
  position: absolute !important;
  z-index: 0 !important;
  left: 12%;
  right: 12%;
  bottom: 7%;
  width: 76%;
  height: 66%;
  object-fit: cover;
  object-position: center;
  opacity: .50 !important;
  filter: sepia(.48) saturate(.75) contrast(1.04) brightness(.68);
  mix-blend-mode: screen;
  mask-image: radial-gradient(ellipse at center, #000 36%, rgba(0,0,0,.88) 65%, transparent 94%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 36%, rgba(0,0,0,.88) 65%, transparent 94%);
  pointer-events: none;
}

.book-page-panel .signed-in-main > *,
.book-page-panel .auth-card > *,
.book-page-panel .install-card > * {
  position: relative;
  z-index: 2;
}

@media (max-width: 700px) {
  body.vintage-desk-page {
    background-image: url("/static/desk-background-mobile.webp") !important;
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
  }

  body.vintage-desk-page.user-personalized {
    background-image: var(--user-bg-portrait) !important;
    background-position: center center !important;
    background-size: cover !important;
  }

  .public-topbar {
    min-height: 56px;
    padding: 6px 12px;
    justify-content: space-between;
  }

  .mobile-header-brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
  }

  .mobile-header-brand img {
    display: block;
    width: 34px;
    height: 44px;
    object-fit: contain;
    filter: drop-shadow(0 3px 5px rgba(0,0,0,.55));
  }

  .desktop-panel-logo {
    display: none !important;
  }

  .book-page-shell {
    min-height: calc(100svh - 56px);
    padding: 10px 8px 36px;
  }

  .book-page-panel {
    width: min(438px, 96vw);
    min-height: 590px;
    padding: 62px 48px 68px;
    background-image: url("/static/book-panel-mobile.webp") !important;
    background-size: 100% 100% !important;
    filter: drop-shadow(0 20px 26px rgba(0,0,0,.40));
  }

  .book-page-content {
    min-height: 455px;
  }

  .book-page-heading {
    margin-bottom: 17px;
  }

  .book-page-heading h1 {
    font-size: clamp(1.65rem, 7vw, 2.1rem);
  }

  .book-page-heading p {
    margin-top: 7px;
    font-size: .88rem;
    line-height: 1.4;
  }

  .book-page-panel .device-registration-explain {
    padding: 12px;
  }

  .book-page-panel .device-registration-explain p {
    font-size: .84rem;
    line-height: 1.38;
  }

  .profile-watermark {
    left: 10%;
    width: 80%;
    height: 62%;
    bottom: 8%;
  }
}

@media (max-width: 400px) {
  .book-page-panel {
    width: 98vw;
    padding-left: 42px;
    padding-right: 42px;
  }

  .book-page-heading p,
  .book-page-panel p,
  .book-page-panel label {
    font-size: .86rem;
  }
}\n\n

/* ==========================================================================
   KRONIKY v1.7.5 — REPAIRED v1.7.4 CSS / CLEAN DESK + OUTSIDE INSTALL HELP
   ========================================================================== */

body.vintage-desk-page {
  background-color: #2a190f;
  background-image: url("/static/desk-background-desktop-v174.webp") !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body.vintage-desk-page.user-personalized {
  background-image: var(--user-bg-landscape) !important;
  background-position: center center !important;
  background-size: cover !important;
  background-repeat: no-repeat !important;
}

.book-page-shell {
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.outside-install-wrap {
  width: min(720px, 88vw);
  margin: 0 auto;
}

.outside-install-card {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 16px 18px;
  border: 1px solid rgba(190, 133, 79, .40) !important;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(38, 24, 16, .93), rgba(20, 15, 12, .94)) !important;
  box-shadow:
    0 16px 32px rgba(0,0,0,.32),
    inset 0 0 0 1px rgba(225, 172, 95, .06) !important;
  backdrop-filter: blur(3px);
}

.outside-install-card .install-row {
  align-items: center;
}

.outside-install-card h2 {
  color: #e3bd79;
}

.outside-install-card p {
  color: #d6c5b3;
}

/* The PWA/home-screen help is a sibling below the book, never part of it. */
.book-page-panel .install-card {
  display: none !important;
}

@media (max-width: 700px) {
  body.vintage-desk-page {
    background-image: url("/static/desk-background-mobile-v174.webp") !important;
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
  }

  body.vintage-desk-page.user-personalized {
    background-image: var(--user-bg-portrait) !important;
    background-position: center center !important;
    background-size: cover !important;
  }

  .book-page-shell {
    gap: 10px;
  }

  .outside-install-wrap {
    width: min(438px, 96vw);
  }

  .outside-install-card {
    padding: 14px 15px;
  }
}


/* ==========================================================================
   KRONIKY v1.7.6 — DESKTOP BACKGROUND ONLY
   Mobile v1.7.5 is intentionally untouched.
   The neutral centre of the PC background is completely hidden by the live
   book + the separate help panel; only natural photographic desk edges remain
   visible around them.
   ========================================================================== */

@media (min-width: 701px) {
  body.vintage-desk-page {
    background-image: url("/static/desk-background-desktop-v176.webp") !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }

  body.vintage-desk-page.user-personalized {
    background-image: var(--user-bg-landscape) !important;
  }

  .book-page-panel {
    width: min(1000px, 88vw) !important;
    min-height: 700px;
    padding-left: clamp(125px, 8vw, 165px) !important;
    padding-right: clamp(125px, 8vw, 165px) !important;
  }

  .outside-install-wrap {
    width: min(1000px, 88vw) !important;
  }

  .outside-install-card {
    background:
      linear-gradient(180deg, rgba(38, 24, 16, .97), rgba(20, 15, 12, .98)) !important;
  }
}


/* ==========================================================================
   KRONIKY v1.7.9 — DARK BROWN PAGE CANVAS
   Prevents a white flash while photographic backgrounds are loading/repainting.
   ========================================================================== */

html {
  min-height: 100%;
  background-color: #24160d !important;
}

body {
  min-height: 100vh;
  background-color: #24160d !important;
}

body.vintage-desk-page {
  background-color: #24160d !important;
}

/* KRONIKY MANAGED MOBILE BACKGROUND BEGIN */
@media (max-width: 700px) {
  body.vintage-desk-page:not(.user-personalized) {
    background-image: url("/static/desk-background-mobile-custom-e9156d5bafa4.png?v=e9156d5bafa4") !important;
    background-position: center top !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: scroll !important;
  }
}
/* KRONIKY MANAGED MOBILE BACKGROUND END */

/* KRONIKY MANAGED DESKTOP BACKGROUND BEGIN */
@media (min-width: 701px) {
  body.vintage-desk-page:not(.user-personalized) {
    background-image: url("/static/desk-background-desktop-custom-e9156d5bafa4.png?v=e9156d5bafa4") !important;
    background-position: center center !important;
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-attachment: fixed !important;
  }
}
/* KRONIKY MANAGED DESKTOP BACKGROUND END */

/* KRONIKY MANAGED PROFILE CENTER BOTTOM BEGIN */
/*
 * Profil je stále pod živým HTML obsahem.
 * Box je vyšší, aby fotografie pokračovala za uvítací text směrem vzhůru.
 * center top chrání horní část fotografie při případném ořezu.
 */
.book-page-panel .profile-watermark {
  top: auto !important;
  height: 80% !important;
  object-fit: cover !important;
  object-position: center top !important;
  bottom: 7% !important;
}

@media (max-width: 700px) {
  .book-page-panel .profile-watermark {
    top: auto !important;
    height: 84% !important;
    object-fit: cover !important;
    object-position: center top !important;
    bottom: 8% !important;
  }
}
/* KRONIKY MANAGED PROFILE CENTER BOTTOM END */

/* KRONIKY MANAGED TRANSPARENT SIGNED-IN CONTROLS BEGIN */
/*
 * Tlačítka zůstávají průsvitná, ale musí mít jasnou affordanci.
 * Alfa se týká pouze podkladu, nikoli textu.
 */

/* Pozdrav nesmí vytvářet krycí plochu přes fotografii. */
.book-page-panel .signed-in-main h2 {
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Primární akce: cca 72 % alfa + jasnější okraj. */
.book-page-panel .signed-in-main .primary {
  background: linear-gradient(
    180deg,
    rgba(23, 125, 112, .72),
    rgba(15, 98, 89, .72)
  ) !important;
  border: 1.5px solid rgba(103, 224, 205, .68) !important;
  box-shadow:
    0 7px 18px rgba(0, 0, 0, .24),
    inset 0 1px 0 rgba(255, 255, 255, .13) !important;
}

.book-page-panel .signed-in-main .primary:hover,
.book-page-panel .signed-in-main .primary:focus-visible {
  background: linear-gradient(
    180deg,
    rgba(28, 139, 124, .78),
    rgba(17, 105, 95, .78)
  ) !important;
  border-color: rgba(125, 238, 220, .82) !important;
}

/* Sekundární akce: stále propouští fotografii, ale má zřetelný bronzový rám. */
.book-page-panel .signed-in-main .secondary {
  background: rgba(38, 31, 26, .68) !important;
  border: 1.5px solid rgba(206, 164, 126, .46) !important;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(255, 255, 255, .08) !important;
}

.book-page-panel .signed-in-main .secondary:hover,
.book-page-panel .signed-in-main .secondary:focus-visible {
  background: rgba(48, 39, 32, .76) !important;
  border-color: rgba(222, 181, 141, .62) !important;
}

.book-page-panel .signed-in-main .danger {
  background: rgba(67, 35, 30, .70) !important;
  border: 1.5px solid rgba(204, 135, 115, .46) !important;
  box-shadow:
    0 6px 16px rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(255, 255, 255, .07) !important;
}

.book-page-panel .signed-in-main .danger:hover,
.book-page-panel .signed-in-main .danger:focus-visible {
  background: rgba(79, 40, 34, .78) !important;
  border-color: rgba(219, 149, 129, .62) !important;
}
/* KRONIKY MANAGED TRANSPARENT SIGNED-IN CONTROLS END */
/* EXP-01: visible client access; narrator controls keep their existing styles. */
.public-client-entry {border-top:1px solid #b99a70;border-bottom:1px solid #b99a70;padding:16px 0;margin:12px 0 20px;text-align:left}
.public-client-entry p {margin:0 0 10px;font-size:16px;line-height:1.5}
.public-client-entry>div {display:flex;flex-wrap:wrap;gap:8px 18px;align-items:center}
.public-client-entry a {min-height:44px;display:inline-flex;align-items:center;font-size:16px;color:#f1d5aa;text-underline-offset:4px}
.public-client-entry a.public-client-create {padding:9px 14px;background:#74441f;color:#fff9ee;border-radius:5px;text-decoration:none}
.public-narrator-heading {font-family:Georgia,serif;font-size:24px;margin:0 0 14px}
.public-topbar nav {flex-wrap:wrap}
.public-topbar nav a.public-client-register {display:inline-flex;min-height:44px;align-items:center}
@media(max-width:700px) {.public-topbar nav {gap:4px 12px}.public-topbar nav a {font-size:16px}.public-client-entry {padding:12px 0}.public-client-entry a {max-width:100%;overflow-wrap:anywhere}.public-narrator-heading {font-size:22px}}

@media(max-width:700px) {.public-topbar nav {min-width:0;max-width:calc(100% - 44px);justify-content:flex-end;white-space:normal}.public-topbar nav a {min-height:44px;display:inline-flex;align-items:center;white-space:normal;max-width:100%}}
@media(max-width:700px) {.book-page-panel:has(.public-client-entry) {max-width:calc(100vw - 32px)}}

/* WEB-16: keep the DES-01 portrait placement without a visible stage. */
.narrator-photo-link { margin: .75rem 0 0; text-align: center; }
.narrator-photo-link a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; color: #f5e1bf; text-decoration: underline; text-underline-offset: .18em; }
.chronicler-guide {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: min(500px, 100%);
  margin: 4px auto 12px;
  padding: 0;
  background: transparent;
}

.chronicler-portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 500 / 599;
  object-fit: contain;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 88%, transparent 100%);
}

.chronicler-motion-toggle {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 4px 8px;
  border: 1px solid #957451;
  border-radius: 6px;
  background: #3b281ce8;
  color: #fff4df;
  font: 600 .75rem/1.1 system-ui, sans-serif;
  cursor: pointer;
}

.chronicler-motion-toggle:focus-visible {
  outline: 3px solid #73c8c1;
  outline-offset: 3px;
}

.chronicler-motion-toggle:disabled {
  opacity: .75;
  cursor: default;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.narrator-greeting {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.narrator-greeting h2 { margin: 0; }

.device-verified-info {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid rgba(93, 61, 34, .58);
  border-radius: 50%;
  background: rgba(255, 248, 231, .72);
  color: #4b301e;
  font: 700 1rem/1 Georgia, serif;
  cursor: pointer;
}

.device-verified-info:focus-visible {
  outline: 3px solid #176f68;
  outline-offset: 2px;
}

.device-verified-tip {
  position: absolute;
  z-index: 4;
  top: calc(100% + 8px);
  left: 50%;
  width: min(290px, 82vw);
  transform: translateX(-50%);
  padding: 9px 11px;
  border: 1px solid rgba(91, 60, 35, .55);
  border-radius: 8px;
  background: #fff8e8;
  box-shadow: 0 8px 18px rgba(43, 25, 13, .24);
  color: #3b291e;
  font-size: .9rem;
  line-height: 1.4;
  text-align: center;
  text-shadow: none;
}

.recording-consent-notice {
  margin: 4px auto 10px;
  max-width: 42rem;
  font-size: .9rem;
  line-height: 1.45;
}

.voice-consent-info {
  display: inline-block;
  min-height: 44px;
  margin: 1px auto 8px;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.voice-consent-info:focus-visible {
  outline: 3px solid #176f68;
  outline-offset: 2px;
}

@media (max-width: 700px) {
  .chronicler-guide {
    width: min(100%, 420px);
    margin: 3px auto 10px;
  }
}
