.tuvi9-shell-header {
  position: sticky;
  top: 0;
  z-index: 300;
  border-bottom: 1px solid var(--line, #d8c5ad);
  background: var(--panel, #fffdf8);
  background: color-mix(in srgb, var(--panel, #fffdf8) 96%, transparent);
  color: var(--text, #2d241d);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tuvi9-shell-header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  width: min(calc(100% - 32px), 1500px);
  min-height: 66px;
  margin-inline: auto;
  gap: 18px;
}

.tuvi9-shell-brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.tuvi9-shell-brand img {
  display: block;
  width: 72px;
  height: 46px;
  object-fit: contain;
}

.tuvi9-shell-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.tuvi9-shell-nav a,
.tuvi9-shell-nav .tuvi9-shell-disabled {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border-radius: 9px;
  color: var(--text, #2d241d);
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.tuvi9-shell-nav a:hover,
.tuvi9-shell-nav a[aria-current="page"] {
  background: var(--panel-soft, #f1e7d7);
  color: var(--accent, #8e4820);
}

.tuvi9-shell-nav .tuvi9-shell-disabled {
  cursor: not-allowed;
  opacity: .58;
}

.tuvi9-shell-header-actions {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.tuvi9-shell-header-action {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 11px;
  border: 1px solid var(--line, #d8c5ad);
  border-radius: 9px;
  background: transparent;
  color: var(--accent, #8e4820);
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.tuvi9-shell-header-action:hover {
  background: var(--panel-soft, #f1e7d7);
}

.tuvi9-shell-header-action[hidden],
.tuvi9-shell-action-compact {
  display: none !important;
}

.tuvi9-shell-footer {
  margin-top: 28px;
  border-top: 1px solid var(--line, #d8c5ad);
  background: var(--panel, #fffdf8);
  color: var(--text, #2d241d);
}

.tuvi9-shell-footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr 1fr;
  width: min(calc(100% - 32px), 1500px);
  margin-inline: auto;
  padding: 28px 6px 18px;
  gap: 28px;
}

.tuvi9-shell-footer-logo {
  display: block;
  width: 118px;
  height: auto;
  margin: 0 0 12px;
}

.tuvi9-shell-footer-brand {
  margin-bottom: 8px;
  font-size: 22px;
  font-weight: 800;
}

.tuvi9-shell-footer-tagline,
.tuvi9-shell-footer-note {
  margin: 0;
  color: var(--muted, #6f6054);
  line-height: 1.6;
}

.tuvi9-shell-footer-title {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.tuvi9-shell-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.tuvi9-shell-footer-links a,
.tuvi9-shell-footer-links .tuvi9-shell-disabled {
  color: var(--text, #2d241d);
  font-size: 14px;
  text-decoration: none;
}

.tuvi9-shell-footer-links a:hover {
  color: var(--accent, #8e4820);
}

.tuvi9-shell-footer-links .tuvi9-shell-disabled {
  opacity: .58;
}

.tuvi9-shell-footer-note {
  margin-top: 14px;
  font-size: 14px;
}

.tuvi9-shell-footer-bottom {
  padding: 14px 22px;
  border-top: 1px solid var(--line, #d8c5ad);
  color: var(--muted, #6f6054);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 820px) {
  .tuvi9-shell-header-inner {
    grid-template-columns: 1fr auto 1fr;
    width: min(calc(100% - 18px), 1500px);
    min-height: 54px;
    gap: 6px;
  }

  .tuvi9-shell-brand img {
    width: 44px;
    height: 34px;
  }

  .tuvi9-shell-header-inner-account {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .tuvi9-shell-header-inner-account .tuvi9-shell-nav a,
  .tuvi9-shell-header-inner-account .tuvi9-shell-nav .tuvi9-shell-disabled {
    padding-inline: 4px;
  }

  .tuvi9-shell-nav {
    min-width: 0;
    gap: 1px;
  }

  .tuvi9-shell-nav a,
  .tuvi9-shell-nav .tuvi9-shell-disabled {
    min-height: 34px;
    padding-inline: 6px;
    font-size: 11px;
  }

  .tuvi9-shell-header-actions {
    gap: 4px;
  }

  .tuvi9-shell-header-action {
    min-height: 32px;
    padding-inline: 7px;
    font-size: 11px;
  }

  .tuvi9-shell-footer-inner {
    grid-template-columns: 1fr;
    padding: 24px 0 16px;
    gap: 20px;
  }
}

@media (max-width: 560px) {
  .tuvi9-shell-nav .tuvi9-shell-disabled {
    display: none;
  }

  .tuvi9-shell-header-inner-account {
    gap: 3px;
  }

  .tuvi9-shell-header-inner-account .tuvi9-shell-brand img {
    width: 34px;
    height: 30px;
  }

  .tuvi9-shell-header-inner-account .tuvi9-shell-nav a {
    min-height: 30px;
    padding-inline: 2px;
    font-size: 10px;
  }

  .tuvi9-shell-header-inner-account .tuvi9-shell-header-actions {
    gap: 2px;
  }

  .tuvi9-shell-header-inner-account .tuvi9-shell-header-action {
    min-height: 30px;
    padding-inline: 5px;
    font-size: 10px;
  }

  .tuvi9-shell-action-full {
    display: none;
  }

  .tuvi9-shell-action-compact {
    display: inline !important;
  }
}

@media print {
  .tuvi9-shell-header,
  .tuvi9-shell-footer {
    display: none !important;
  }
}
