:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-strong: #e8eef7;
  --text: #1d242d;
  --muted: #667181;
  --border: #d7deea;
  --shadow: 0 18px 45px rgba(30, 38, 50, 0.14);
  --primary: #176b68;
  --primary-strong: #0e4f4c;
  --accent: #c15b2f;
  --gold: #d8a323;
  --focus: rgba(23, 107, 104, 0.22);
  --radius: 8px;
  font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #151a1f;
  --surface: #20272e;
  --surface-strong: #2b3540;
  --text: #edf3f5;
  --muted: #aab6bf;
  --border: #3a4652;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  --primary: #54b7ad;
  --primary-strong: #7bcac1;
  --accent: #e07a4b;
  --gold: #e1b849;
  --focus: rgba(84, 183, 173, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-strong) 45%, transparent), transparent 280px),
    var(--bg);
  color: var(--text);
  font-family: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.language-picker {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
}

.language-picker select {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font: 700 12px/1 "Segoe UI", system-ui, sans-serif;
  height: 36px;
  min-width: 56px;
  padding: 0 7px;
}

.connection-mode-chip {
  align-items: center;
  background: color-mix(in srgb, #1d9d6c 12%, var(--surface));
  border: 1px solid color-mix(in srgb, #1d9d6c 38%, var(--border));
  border-radius: 6px;
  color: var(--text);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  gap: 7px;
  min-height: 32px;
  padding: 0 9px;
}

.connection-mode-chip::before {
  background: #1d9d6c;
  border-radius: 50%;
  content: "";
  height: 7px;
  width: 7px;
}

.connection-mode-chip.is-offline {
  background: color-mix(in srgb, var(--gold) 13%, var(--surface));
  border-color: color-mix(in srgb, var(--gold) 40%, var(--border));
}

.connection-mode-chip.is-offline::before {
  background: var(--gold);
}

.auth-language-choice {
  margin: 12px 0 2px;
}

.app-header,
.viewer-toolbar {
  align-items: center;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 16px;
  min-height: 68px;
  padding: 12px 24px;
  position: sticky;
  top: 0;
  z-index: 5;
  backdrop-filter: blur(14px);
}

.app-header--search {
  position: sticky;
}

.brand {
  align-items: center;
  display: inline-flex;
  flex: 0 0 auto;
  gap: 10px;
  min-width: 0;
}

.brand--compact .brand-name {
  display: none;
}

.brand-mark {
  align-items: center;
  background: url("/assets/gerabox-logo.svg?v=20260701-2") center / contain no-repeat;
  color: transparent;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  overflow: hidden;
  user-select: none;
  width: 34px;
}

.brand-mark--large {
  height: 76px;
  width: 76px;
}

.brand-name {
  font-size: 20px;
  font-weight: 760;
  letter-spacing: 0;
}

.header-nav {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 18px;
  justify-content: flex-end;
  font-size: 14px;
}

.header-action-link {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.header-action-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.auth-user {
  color: var(--muted);
  font-size: 14px;
  margin-left: auto;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-logout {
  min-height: 38px;
}

.auth-shell {
  align-items: center;
  display: grid;
  min-height: 100vh;
  padding: 28px;
}

.auth-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 20px;
  margin: auto;
  max-width: 460px;
  padding: 28px;
  width: 100%;
}

.auth-brand {
  align-items: center;
  display: flex;
  gap: 16px;
}

.auth-brand h1 {
  font-size: 34px;
  margin: 0;
}

.auth-brand p {
  color: var(--muted);
  line-height: 1.5;
  margin: 4px 0 0;
}

.auth-tabs {
  background: var(--surface-strong);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 4px;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
}

.auth-tab {
  background: transparent;
  border: 0;
  border-radius: calc(var(--radius) - 2px);
  color: var(--muted);
  min-height: 38px;
}

.auth-tab.is-active {
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form[hidden] {
  display: none;
}

.auth-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  min-height: 42px;
  outline: none;
  padding: 0 12px;
}

.auth-form input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus);
}

.auth-consent {
  align-items: flex-start;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 10px;
  line-height: 1.45;
}

.auth-consent input {
  accent-color: var(--primary);
  flex: 0 0 auto;
  height: 18px;
  margin: 1px 0 0;
  min-height: 0;
  padding: 0;
  width: 18px;
}

.auth-consent a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: underline;
}

.auth-message {
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  min-height: 22px;
}

.header-nav a,
.result-url,
.library-url {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.header-nav a:hover,
.result-title:hover,
.library-title:hover {
  color: var(--primary);
  text-decoration: underline;
}

.start-shell {
  display: grid;
  min-height: calc(100vh - 68px);
  padding: 72px 24px 44px;
  place-items: start center;
}

.start-panel {
  width: min(100%, 820px);
}

.features-section {
  margin-top: 56px;
  width: min(100%, 980px);
}

.features-section h2 {
  font-size: 26px;
  margin: 0 0 18px;
}

.feature-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.feature-card h3 {
  font-size: 16px;
  margin: 0 0 8px;
}

.feature-card__head {
  align-items: center;
  display: flex;
  gap: 10px;
  margin-bottom: 8px;
}

.feature-card__head h3 {
  margin: 0;
}

.feature-logo {
  border-radius: 8px;
  height: 38px;
  width: 38px;
}

.feature-card p {
  color: var(--muted);
  line-height: 1.48;
  margin: 0;
}

.start-title {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 30px;
}

.start-title h1 {
  font-size: clamp(44px, 8vw, 86px);
  line-height: 1;
  margin: 0;
}

.command-search {
  width: 100%;
}

.command-box {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  gap: 12px;
  min-height: 46px;
  padding: 0 16px;
  transition: box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
  width: 100%;
}

.command-box--large {
  min-height: 58px;
}

.command-box:focus-within,
.command-box:hover {
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: var(--shadow);
}

.command-icon {
  color: var(--primary);
  flex: 0 0 auto;
  font-size: 20px;
}

.command-box input {
  background: transparent;
  border: 0;
  color: var(--text);
  flex: 1;
  min-width: 0;
  outline: none;
}

.button-row,
.shortcut-grid {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.button-row {
  margin-top: 18px;
}

.shortcut-grid {
  margin-top: 34px;
}

.shortcut-tile {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  justify-items: center;
  min-height: 94px;
  padding: 16px;
  width: 156px;
}

.shortcut-tile span {
  color: var(--accent);
  font-size: 24px;
}

.shortcut-logo {
  border-radius: 6px;
  height: 30px;
  width: 30px;
}

.toolbar-ai-logo {
  border-radius: 4px;
  height: 22px;
  width: 22px;
}

.shortcut-tile strong {
  font-size: 14px;
}

.material-button,
.quick-action {
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: inline-flex;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
}

.material-button {
  background: var(--surface);
  color: var(--text);
}

.material-button:hover,
.shortcut-tile:hover,
.tab:hover,
.icon-button:hover {
  border-color: var(--border);
  box-shadow: 0 2px 9px rgba(30, 38, 50, 0.12);
}

.material-button--primary,
.icon-button--filled {
  background: var(--primary);
  color: #fff;
}

.material-button--primary:hover,
.icon-button--filled:hover {
  background: var(--primary-strong);
}

.material-button--soft {
  background: var(--surface-strong);
}

.material-button--danger {
  background: color-mix(in srgb, #b42318 12%, var(--surface));
  border-color: color-mix(in srgb, #b42318 32%, var(--border));
  color: #b42318;
}

.material-button--android {
  background: #2f7d4a;
  color: #fff;
}

.material-button--android:hover {
  background: #286a3f;
}

.icon-button {
  align-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
  display: inline-flex;
  flex: 0 0 auto;
  height: 40px;
  justify-content: center;
  min-width: 40px;
  padding: 0 10px;
}

.header-search {
  align-items: center;
  display: flex;
  flex: 1;
  gap: 10px;
  max-width: 780px;
  min-width: 0;
}

.results-layout {
  display: grid;
  gap: 32px;
  grid-template-columns: 250px minmax(0, 820px);
  padding: 28px 40px 56px;
}

.results-panel {
  min-width: 0;
}

.filters-panel {
  align-self: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: sticky;
  top: 92px;
}

.filters-panel h2 {
  font-size: 16px;
  margin: 0 0 18px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.field span {
  color: var(--muted);
  font-size: 13px;
}

.field select {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  min-height: 40px;
  padding: 0 12px;
}

.results-meta {
  color: var(--muted);
  display: flex;
  gap: 10px;
  min-height: 24px;
  font-size: 14px;
}

.results-kind-tabs {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.ai-search-comment {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 36%, var(--border));
  border-radius: var(--radius);
  color: var(--text);
  line-height: 1.5;
  margin-top: 12px;
  max-width: 820px;
  padding: 14px 16px;
}

.results-list,
.library-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.results-list--media {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.media-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-width: 0;
  overflow: hidden;
}

.media-image-button {
  aspect-ratio: 4 / 3;
  background: var(--surface-strong);
  border: 0;
  cursor: zoom-in;
  display: block;
  padding: 0;
  width: 100%;
}

.media-image-button img {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.media-video {
  aspect-ratio: 16 / 9;
  background: #101416;
  display: block;
  width: 100%;
}

.media-card__body {
  display: grid;
  gap: 6px;
  padding: 13px 14px 15px;
}

.media-card__title {
  font-size: 15px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.media-card__meta {
  color: var(--muted);
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.media-lightbox {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  height: min(88vh, 900px);
  margin: auto;
  max-height: 88vh;
  max-width: min(94vw, 1280px);
  padding: 0;
  width: min(94vw, 1280px);
}

.media-lightbox::backdrop {
  background: rgb(10 15 18 / 78%);
}

.media-lightbox__toolbar {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: space-between;
  min-height: 56px;
  padding: 8px 12px 8px 16px;
}

.media-lightbox__toolbar strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-lightbox > img {
  display: block;
  height: calc(100% - 57px);
  object-fit: contain;
  width: 100%;
}

.result-item,
.library-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  max-width: 820px;
  padding: 18px;
}

.result-title,
.library-title {
  color: var(--primary);
  font-size: 19px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.result-description,
.library-description {
  color: var(--muted);
  line-height: 1.48;
  margin: 0;
}

.result-actions,
.library-actions,
.card-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.source-badge {
  align-self: start;
  background: color-mix(in srgb, var(--gold) 18%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--gold) 38%, var(--border));
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  line-height: 1;
  padding: 6px 10px;
  width: fit-content;
}

.viewer-toolbar {
  gap: 10px;
  min-height: 66px;
  position: relative;
}

.toolbar-group {
  display: flex;
  gap: 4px;
}

.viewer-address {
  flex: 1;
}

.viewer-address input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  min-height: 40px;
  outline: none;
  padding: 0 14px;
  width: 100%;
}

.viewer-address input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus);
}

.viewer-mode-button {
  min-height: 40px;
  padding-inline: 12px;
  white-space: nowrap;
}

.viewer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  height: calc(100vh - 66px);
}

.browser-frame {
  background: var(--surface-strong);
  min-width: 0;
}

.browser-frame iframe {
  background: #fff;
  border: 0;
  height: 100%;
  width: 100%;
}

.reader-panel {
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.reader-panel__head {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 16px;
}

.reader-panel__head h2 {
  font-size: 16px;
  margin: 0;
}

.reader-content {
  line-height: 1.58;
  overflow: auto;
  padding: 18px;
}

.reader-content h1 {
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 18px;
}

.reader-content p {
  color: var(--muted);
  margin: 0 0 14px;
}

.find-popover {
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  gap: 8px;
  padding: 8px;
  position: fixed;
  right: 22px;
  top: 82px;
  z-index: 8;
}

.find-popover[hidden] {
  display: none;
}

.find-popover input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  min-height: 36px;
  outline: none;
  padding: 0 10px;
  width: 220px;
}

.library-shell {
  padding: 32px 40px 60px;
}

.ai-shell,
.download-shell {
  display: grid;
  min-height: calc(100vh - 68px);
  padding: 34px 20px 60px;
  place-items: start center;
}

.ai-panel,
.download-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: min(100%, 860px);
}

.ai-panel {
  display: grid;
  grid-template-rows: auto minmax(340px, 52vh) auto;
}

.ai-heading {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 14px;
  padding: 18px;
}

.ai-logo {
  border-radius: 8px;
  height: 56px;
  width: 56px;
}

.ai-heading h1,
.download-panel h1 {
  font-size: 30px;
  margin: 0;
}

.ai-heading p,
.download-panel p {
  color: var(--muted);
  line-height: 1.5;
  margin: 5px 0 0;
}

.ai-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 18px;
}

.ai-message {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: min(680px, 92%);
  padding: 12px 14px;
}

.ai-message p {
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
}

.ai-message--user {
  align-self: flex-end;
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
}

.ai-message--bot {
  align-self: flex-start;
  background: var(--bg);
}

.ai-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.ai-form {
  align-items: center;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  padding: 14px;
}

.ai-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  flex: 1;
  min-height: 42px;
  min-width: 0;
  outline: none;
  padding: 0 12px;
}

.download-panel {
  display: grid;
  justify-items: center;
  padding: 34px;
  text-align: center;
}

.download-panel p {
  max-width: 680px;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

.download-note {
  font-size: 13px;
}

.download-checksum {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.download-checksum code {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
}

.download-details {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0;
  margin-top: 30px;
  text-align: left;
  width: 100%;
}

.download-details section {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}

.download-details section:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.download-details h2 {
  font-size: 18px;
  margin: 0 0 8px;
}

.download-details p {
  margin: 0;
}

.download-details ul {
  color: var(--muted);
  line-height: 1.65;
  margin: 10px 0 0;
  padding-left: 22px;
}

.text-link {
  color: var(--primary);
  display: inline-flex;
  font-weight: 700;
  margin-top: 12px;
  text-decoration: underline;
}

.account-warning-banner {
  background: color-mix(in srgb, var(--gold) 22%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 46%, var(--border));
  color: var(--text);
  font-weight: 700;
  padding: 12px 24px;
}

.connection-mode-banner {
  background: color-mix(in srgb, var(--gold) 20%, var(--surface));
  border-bottom: 1px solid color-mix(in srgb, var(--gold) 50%, var(--border));
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  padding: 11px 24px;
  text-align: center;
}

.brand-mark--admin {
  background-image: url("/assets/gerabox-logo.svg?v=20260701-2");
}

.admin-shell,
.privacy-shell {
  display: grid;
  gap: 18px;
  padding: 28px 40px 60px;
}

.admin-hero,
.admin-panel,
.privacy-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin-hero {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 20px;
}

.admin-hero h1,
.privacy-panel h1 {
  font-size: 30px;
  margin: 0 0 6px;
}

.admin-hero p,
.privacy-panel p {
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

.admin-panel {
  padding: 18px;
}

.admin-panel__head {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 14px;
}

.admin-panel__head h2,
.privacy-panel h2 {
  font-size: 18px;
  margin: 0;
}

.admin-users-list,
.admin-events-list {
  display: grid;
  gap: 12px;
}

.admin-user-card,
.admin-event {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
}

.admin-user-card--deleted {
  opacity: 0.86;
}

.admin-user-main {
  align-items: start;
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(0, 1fr) 120px;
}

.admin-user-card h3 {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 8px;
}

.admin-user-card p,
.admin-event p,
.admin-event span {
  color: var(--muted);
  line-height: 1.45;
  margin: 4px 0 0;
  overflow-wrap: anywhere;
}

.admin-device-list {
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 10px;
}

.admin-device-row {
  align-items: center;
  display: grid;
  gap: 6px;
  grid-template-columns: 10px minmax(80px, auto) minmax(0, 1fr);
}

.admin-device-row > span:last-child,
.admin-device-empty {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.device-status {
  background: #8b949b;
  border-radius: 50%;
  height: 8px;
  width: 8px;
}

.device-status.is-online {
  background: #1d9d6c;
  box-shadow: 0 0 0 3px color-mix(in srgb, #1d9d6c 18%, transparent);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-review-card {
  border-left: 4px solid var(--gold);
  padding-left: 14px;
}

.admin-event a {
  color: var(--primary);
  font-weight: 700;
}

.admin-days-field {
  display: grid;
  gap: 6px;
}

.admin-days-field span {
  color: var(--muted);
  font-size: 12px;
}

.admin-days-field input {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  min-height: 38px;
  padding: 0 10px;
  width: 100%;
}

.privacy-panel {
  margin: 0 auto;
  max-width: 860px;
  padding: 28px;
}

.privacy-panel h2 {
  margin-top: 24px;
}

.tabs {
  align-items: center;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.tab {
  background: transparent;
  border: 0;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  min-height: 44px;
  padding: 0 14px;
}

.tab.is-active {
  border-bottom-color: var(--primary);
  color: var(--text);
}

.library-actions {
  justify-content: flex-start;
}

.empty-state,
.loading-state {
  color: var(--muted);
  padding: 28px 0;
}

.support-shell {
  margin: 0 auto;
  max-width: 1120px;
  padding: 40px 32px 64px;
}

.support-intro {
  border-bottom: 1px solid var(--border);
  margin-bottom: 28px;
  padding-bottom: 24px;
}

.support-intro .eyebrow {
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  margin: 0 0 8px;
  text-transform: uppercase;
}

.support-intro h1 {
  font-size: 34px;
  margin: 0 0 10px;
}

.support-intro > p:last-child {
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
  max-width: 760px;
}

.support-layout {
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
}

.support-form-panel h2,
.support-faq h2 {
  font-size: 20px;
  margin: 0 0 20px;
}

.support-form {
  display: grid;
}

.support-form input,
.support-form select,
.support-form textarea,
.admin-support-card textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  outline: 0;
  padding: 11px 12px;
  width: 100%;
}

.support-form textarea {
  line-height: 1.5;
  resize: vertical;
}

.admin-support-card textarea {
  line-height: 1.45;
  min-height: 84px;
  resize: vertical;
}

.support-form input:focus,
.support-form select:focus,
.support-form textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--focus);
}

.support-diagnostics-choice {
  align-items: flex-start;
  color: var(--muted);
  display: flex;
  font-size: 13px;
  gap: 10px;
  line-height: 1.45;
  margin: 0 0 18px;
}

.support-result {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--border));
  border-radius: var(--radius);
  margin-top: 18px;
  padding: 16px;
}

.support-faq details {
  border-bottom: 1px solid var(--border);
  padding: 14px 0;
}

.support-faq summary {
  cursor: pointer;
  font-weight: 750;
}

.support-faq p {
  color: var(--muted);
  line-height: 1.55;
  margin: 10px 0 0;
}

.toast-root {
  bottom: 22px;
  display: grid;
  gap: 10px;
  pointer-events: none;
  position: fixed;
  right: 22px;
  z-index: 20;
}

.toast {
  background: #1d242d;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #fff;
  max-width: min(360px, calc(100vw - 44px));
  padding: 12px 14px;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

@media (max-width: 900px) {
  .app-header,
  .viewer-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
    padding: 12px;
  }

  .header-nav {
    justify-content: flex-start;
    order: 5;
    width: 100%;
  }

  .header-search {
    flex-basis: 100%;
    order: 6;
  }

  .results-layout {
    grid-template-columns: 1fr;
    padding: 20px;
  }

  .results-list--media {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .filters-panel {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    position: static;
  }

  .feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-shell,
  .privacy-shell,
  .support-shell {
    padding: 20px;
  }

  .support-layout {
    grid-template-columns: 1fr;
  }

  .admin-hero,
  .admin-user-main {
    grid-template-columns: 1fr;
  }

  .admin-hero {
    align-items: stretch;
    display: grid;
    gap: 12px;
  }

  .filters-panel h2 {
    grid-column: 1 / -1;
    margin-bottom: 0;
  }

  .viewer-layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  .browser-frame {
    height: 55vh;
  }

  .reader-panel {
    border-left: 0;
    border-top: 1px solid var(--border);
    min-height: 40vh;
  }
}

@media (max-width: 560px) {
  .start-shell {
    padding-top: 44px;
  }

  .start-title {
    flex-direction: column;
  }

  .start-title h1 {
    font-size: 48px;
  }

  .shortcut-tile,
  .material-button {
    width: 100%;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }

  .ai-form {
    align-items: stretch;
    flex-direction: column;
  }

  .filters-panel {
    grid-template-columns: 1fr;
  }

  .results-list--media {
    grid-template-columns: 1fr;
  }

  .library-shell {
    padding: 22px 16px 48px;
  }
}
