/* ============================================================
   apps.css — внутренности окон
   ============================================================ */

/* ---------- Общее ---------- */

.term-dim { color: var(--text-dim); }
.term-accent { color: var(--sand-dark); font-weight: 600; }

.term-link {
  color: var(--sand-dark);
  text-decoration: none;
  border-bottom: 1px dotted var(--prompt-user);
  font-weight: 500;
}

.term-link:hover {
  border-bottom-style: solid;
  color: var(--accent-deep, var(--sand-dark));
}

.icon-btn {
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-dim);
  border-radius: 4px;
  padding: 2px 6px;
  line-height: 1.4;
  transition: background 0.15s ease, color 0.15s ease;
}

.icon-btn:hover:not(:disabled),
.icon-btn:focus-visible {
  background: var(--sand-badge);
  color: var(--text);
  outline: none;
}

.icon-btn svg {
  width: 14px;
  height: 14px;
  display: block;
}

.icon-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.empty-note {
  color: var(--text-dim);
  font-size: 12px;
  padding: 14px 4px;
}

/* ---------- Терминал ---------- */

.app-terminal {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
}

.term-line {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prompt-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.prompt {
  display: inline-flex;
  gap: 4px;
  font-weight: 600;
  user-select: none;
}

.p-user { color: var(--prompt-user); }
.p-path { color: var(--prompt-path); }
.p-sym { color: var(--text-dim); }

.command {
  color: var(--sand-dark);
  font-weight: 600;
}

.fetch-container {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin-top: 4px;
}

.fetch-ascii {
  color: var(--sand-dark);
  font-size: 11.5px;
  line-height: 1.25;
  white-space: pre;
  user-select: none;
  flex-shrink: 0;
  font-weight: 500;
  opacity: 0.95;
  font-family: var(--font-mono);
}

.fetch-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.fetch-title {
  font-weight: 700;
  color: var(--sand-dark);
  margin-bottom: 2px;
}

.fetch-sep {
  color: var(--border-dark);
  font-size: 12px;
  margin-bottom: 4px;
  user-select: none;
}

.fetch-row {
  display: flex;
  gap: 8px;
}

.f-icon {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--sand-dark);
  margin-top: 2px;
}

.f-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.f-key {
  color: var(--prompt-user);
  font-weight: 600;
  min-width: 70px;
  flex-shrink: 0;
}

.f-val {
  color: var(--text);
  overflow-wrap: anywhere;
}

.quick-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}

.nav-btn {
  background: var(--sand-badge);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px dashed var(--border-dark);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.nav-icon-btn svg {
  width: 12px;
  height: 12px;
  display: block;
}

.nav-icon-btn:hover,
.nav-icon-btn:focus-visible {
  background: var(--sand-badge);
  border-color: var(--prompt-user);
  color: var(--sand-dark);
  outline: none;
}

.nav-btn:hover,
.nav-btn:focus-visible {
  background: var(--hover-strong);
  border-color: var(--border-dark);
  color: var(--sand-dark);
  outline: none;
}

.terminal-output {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.term-output {
  color: var(--text);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.table-view {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.table-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 4px;
}

.table-key {
  color: var(--text-dim);
  flex-shrink: 0;
}

.table-val {
  text-align: right;
  color: var(--text);
  overflow-wrap: anywhere;
}

.tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.term-tag {
  background: var(--sand-badge);
  border: 1px solid var(--border);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text);
}

.interactive-line {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--sand-badge);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 6px 10px;
}

.cmd-input {
  background: transparent;
  border: none;
  outline: none;
  color: var(--sand-dark);
  font-family: var(--font-mono);
  font-size: 13.5px;
  width: 100%;
  text-transform: lowercase;
}

.cmd-input::placeholder {
  color: var(--text-dim);
  opacity: 0.7;
}

/* ---------- Заметки ---------- */

.app-notes {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 20px 22px;
}

.note-card {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.note-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-dim);
  border-bottom: 1px dashed var(--border-dark);
  padding-bottom: 4px;
}

.note-title {
  font-weight: 700;
  color: var(--sand-dark);
  font-size: 13px;
}

.note-body {
  color: var(--text);
  white-space: pre-wrap;
  line-height: 1.5;
}

/* ---------- Содержимое: текст или html ---------- */

.note-body .content-block {
  white-space: normal;
}

.content-text {
  margin: 0 0 10px;
  line-height: 1.55;
}

.content-text:last-child {
  margin-bottom: 0;
}

.content-html {
  line-height: 1.55;
}

.content-html p {
  margin: 0 0 10px;
}

.content-html blockquote,
.note-body blockquote,
blockquote {
  margin: 8px 0 12px;
  padding: 8px 14px 8px 12px;
  background: var(--surface-soft);
  border-right: 3px solid var(--accent);
  border-radius: 6px 0 0 6px;
  color: var(--text);
  font-style: italic;
}

.content-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 12px;
}

.content-link {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px dashed var(--accent);
  font-size: 13px;
  line-height: 1.4;
}

.content-link:hover,
.content-link:focus-visible {
  border-bottom-style: solid;
}

.content-heading {
  margin: 0 0 14px;
  font-size: 19px;
  font-weight: 700;
  color: var(--sand-dark);
}

.app-page {
  padding: 22px 24px 28px;
  line-height: 1.55;
}

.app-page .content-link {
  font-size: 14px;
}

/* ---------- Браузер ---------- */

.app-browser {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.browser-chrome {
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-dark);
  flex: none;
}

.browser-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 6px 10px 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.browser-tabs::-webkit-scrollbar {
  display: none;
}

.browser-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  font-size: 11.5px;
  color: var(--text);
  background: var(--border);
  border: 1px solid var(--border-dark);
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  white-space: nowrap;
  font-family: var(--font-mono);
  text-transform: lowercase;
  flex: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.browser-tab:hover {
  background: var(--sand-badge);
  color: var(--text);
}

.browser-tab.active {
  background: var(--term-bg);
  color: var(--text);
  font-weight: 600;
  border-color: var(--border-dark);
  margin-bottom: -1px;
  padding-bottom: 6px;
}

.browser-toolbar {
  background: var(--term-bg);
  border-bottom: 1px solid var(--border-dark);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.browser-nav {
  display: flex;
  gap: 2px;
  flex: none;
}

.url-bar {
  flex: 1;
  min-width: 0;
  background: var(--sand-badge);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
}

.url-lock {
  color: var(--prompt-user);
  width: 11px;
  height: 11px;
  flex: none;
}

.url-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.browser-view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 26px 28px;
  font-family: var(--font-serif);
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--text);
  scrollbar-width: thin;
}

.browser-footer {
  flex: none;
  border-top: 1px solid var(--border);
  background: var(--header-bg);
  padding: 5px 12px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  color: var(--text-dim);
  text-transform: lowercase;
}

.browser-view::-webkit-scrollbar {
  width: 6px;
}

.browser-view::-webkit-scrollbar-thumb {
  background-color: var(--border);
  border-radius: 3px;
}

/* Демо-страницы внутри браузера */

.demo-page {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.demo-kicker {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--prompt-user);
  text-transform: lowercase;
}

.demo-title {
  font-family: var(--font-serif);
  font-size: 26px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--text);
}

.demo-lead {
  font-size: 14.5px;
  color: var(--text-dim);
  max-width: 52ch;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.demo-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.demo-card-title {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--sand-dark);
  font-weight: 600;
}

.demo-card-text {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

.demo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
}

.demo-list li {
  padding-left: 16px;
  position: relative;
}

.demo-list li::before {
  content: "—";
  position: absolute;
  left: 0;
  color: var(--prompt-user);
}

/* ---------- Файлы ---------- */

.app-files {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
}

.files-toolbar {
  flex: none;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-dark);
  background: var(--surface-soft);
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  font-size: 12px;
}

.breadcrumb {
  border: none;
  background: transparent;
  color: var(--sand-dark);
  padding: 2px 4px;
  border-radius: 3px;
  font-family: var(--font-mono);
  font-size: 12px;
}

.breadcrumb:hover {
  background: var(--sand-badge);
}

.breadcrumb-sep {
  color: var(--text-dim);
  opacity: 0.6;
}

.files-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  text-align: left;
  width: 100%;
  font-size: 12.5px;
}

.file-row:hover,
.file-row:focus-visible {
  background: var(--sand-badge);
  border-color: var(--border-dark);
  outline: none;
}

.file-glyph {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--sand-dark);
  flex: none;
}

.file-glyph svg {
  width: 100%;
  height: 100%;
  display: block;
}

.file-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  color: var(--text);
  font-size: 11px;
  flex: none;
}

.file-preview {
  flex: none;
  border-top: 1px solid var(--border-dark);
  background: var(--surface-inset);
  max-height: 46%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.file-preview[hidden] {
  display: none;
}

.file-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px dashed var(--border-dark);
  font-size: 12px;
  color: var(--sand-dark);
}

.preview-close {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 3px;
}

.preview-close:hover {
  background: var(--sand-badge);
  color: var(--text);
}

.file-preview-body {
  margin: 0;
  padding: 12px 14px;
  overflow: auto;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}

.file-preview-text {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}

.file-preview-image {
  display: block;
  max-width: 100%;
  max-height: 32vh;
  object-fit: contain;
  align-self: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
}

.file-preview-audio {
  width: 100%;
}

.file-preview-pdf {
  width: 100%;
  height: 240px;
  min-height: 180px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-paper);
}

.file-preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: none;
}

/* Большой просмотр файла поверх окна */
.file-big {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(var(--accent-rgb), 0.16);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.file-big-panel {
  width: min(760px, 100%);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  background: var(--surface-paper);
  border: 1px solid var(--border-dark);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(var(--accent-rgb), 0.24);
}

.file-big-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border-dark);
  font-size: 12px;
  color: var(--sand-dark);
}

.file-big-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  overflow: auto;
  min-height: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--text);
}

.file-big-content .file-preview-image {
  max-height: 70vh;
}

.file-big-content .file-preview-pdf {
  height: 68vh;
}

.file-big-content .file-preview-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.preview-action {
  font-size: 11.5px;
  padding: 4px 9px;
  border: 1px solid var(--border-dark);
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--sand-dark);
  text-decoration: none;
}

.preview-action:hover,
.preview-action:focus-visible {
  background: var(--sand-badge);
  color: var(--text);
  outline: none;
}

.file-unknown {
  padding: 14px;
  border: 1px dashed var(--border-dark);
  border-radius: 8px;
  background: var(--surface-soft);
}

.file-unknown-title {
  display: block;
  color: var(--sand-dark);
  margin-bottom: 4px;
}

.file-unknown-text {
  color: var(--text-dim);
  font-size: 12px;
}

/* ---------- Фотографии ---------- */

.app-photos {
  position: relative;
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.photo-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: start;
}

.photo-tile {
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-deep);
  padding: 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.photo-tile:hover,
.photo-tile:focus-visible {
  transform: translateY(-2px);
  border-color: var(--border-dark);
  box-shadow: 0 6px 16px rgba(var(--accent-rgb), 0.14);
  outline: none;
}

.photo-tile img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-mute);
}

.photo-tile img.is-missing {
  opacity: 0;
}

.photo-caption {
  padding: 7px 9px;
  font-size: 11.5px;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.photo-caption strong {
  color: var(--sand-dark);
  font-weight: 600;
}

.photo-lightbox {
  position: absolute;
  inset: 0;
  background: var(--photo-overlay);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.photo-lightbox[hidden] {
  display: none;
}

.lightbox-card {
  background: var(--term-bg);
  border-radius: 8px;
  overflow: hidden;
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-card img {
  display: block;
  max-width: min(100%, 560px);
  max-height: 62vh;
  object-fit: contain;
  background: var(--surface-mute);
}

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-top: 1px solid var(--border);
  font-size: 11.5px;
  color: var(--text-dim);
}

.lightbox-nav {
  display: flex;
  gap: 4px;
}

/* ---------- Плеер ---------- */

.app-music {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 22px 22px 24px;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
}

/* ---------- Обложки треков (как в старом плеере) ---------- */

.music-coverflow {
  width: 100%;
  display: none;
}

.app-music:not(.is-single) .music-coverflow {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.app-music:not(.is-single) .music-card {
  display: none;
}

.music-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  width: 100%;
  animation: musicCardIn 0.3s ease both;
}

.music-coverflow-stage {
  --cf-size: clamp(120px, min(36vw, 36vh), 240px);
  display: flex;
  gap: clamp(12px, 2.5vw, 28px);
  padding-block: 22px 26px;
  padding-inline: calc(50% - var(--cf-size, 140px) / 2);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  perspective: 900px;
  perspective-origin: 50% 50%;
  scrollbar-width: none;
  -ms-overflow-style: none;
  align-items: center;
  box-sizing: border-box;
}

.music-coverflow-stage::-webkit-scrollbar {
  display: none;
}

.cf-item {
  --cf-a: var(--accent-rgb);
  --cf-b: var(--accent-rgb);
  position: relative;
  isolation: isolate;
  flex: none;
  width: var(--cf-size, 140px);
  scroll-snap-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  transform: rotateY(34deg) scale(0.85);
  transform-style: preserve-3d;
  opacity: 0.65;
  transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.25, 1), opacity 0.35s ease;
  user-select: none;
  -webkit-user-select: none;
}

.cf-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: calc(var(--cf-size, 140px) * 1.25);
  height: calc(var(--cf-size, 140px) * 1.25);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--cf-a), 0.62) 0%, rgba(var(--cf-b), 0.32) 46%, transparent 72%);
  filter: blur(16px);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.82);
  transition: opacity 0.35s ease, transform 0.35s ease;
  pointer-events: none;
}

.cf-item.is-before {
  transform: rotateY(34deg) scale(0.85);
}

.cf-item.is-after {
  transform: rotateY(-34deg) scale(0.85);
}

.cf-item.is-active,
.cf-item:hover {
  transform: rotateY(0deg) scale(1);
  opacity: 1;
  z-index: 4;
}

.cf-item.is-active::before,
.cf-item:hover::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.cf-art {
  width: var(--cf-size, 140px);
  height: var(--cf-size, 140px);
  border-radius: 10px;
  border: 1px solid rgba(var(--cf-a), 0.45);
  background: var(--surface-mute);
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(var(--cf-a), 0.25);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

.cf-item.cf-auto .cf-art {
  filter: hue-rotate(var(--cf-hue, 0deg)) saturate(1.2);
}

/* Сгенерированная обложка: трек без картинки или битая ссылка. */
.cf-art.is-generated {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.3), transparent 55%),
    linear-gradient(135deg, rgb(var(--cf-a)) 0%, rgb(var(--cf-b)) 100%);
}

.cf-item.is-active .cf-art,
.cf-item:hover .cf-art {
  border-color: rgba(var(--cf-a), 0.88);
  box-shadow: 0 14px 34px rgba(var(--cf-a), 0.45), 0 0 0 1px rgba(var(--cf-b), 0.35);
}

.cf-art.is-missing {
  opacity: 0;
}

.cf-art.is-accent {
  filter: none;
  object-fit: contain;
  background: var(--sand-dark);
}

.cf-name {
  font-size: clamp(10.5px, calc(var(--cf-size, 140px) * 0.08), 13px);
  color: var(--text-dim);
  text-align: center;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: color 0.3s ease;
  pointer-events: none;
}

.cf-item.is-active .cf-name {
  color: var(--text);
  font-weight: 600;
}

.music-back {
  align-self: flex-start;
  padding: 2px 0;
  border: 0;
  background: none;
  color: var(--text-dim);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.music-back:hover {
  color: var(--text);
}

@keyframes musicCardIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.music-card {
  --cf-a: var(--accent-rgb);
  --cf-b: var(--accent-rgb);
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
  width: 100%;
  animation: musicCardIn 0.3s ease both;
}

.music-cover {
  width: min(100%, 220px);
  aspect-ratio: 1;
  border-radius: 10px;
  border: 1px solid rgba(var(--cf-a), 0.45);
  background: var(--surface-mute);
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(var(--cf-a), 0.35);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.music-cover.is-missing {
  opacity: 0;
}

/* Трек без своей обложки получает сгенерированную градиентную. */
.music-cover.is-generated {
  background:
    radial-gradient(circle at 32% 24%, rgba(255, 255, 255, 0.3), transparent 55%),
    linear-gradient(135deg, rgb(var(--cf-a)) 0%, rgb(var(--cf-b)) 100%);
}

/* Картинки подстраиваются под ключевой цвет. */
.photo-tile img,
.lightbox-card img {
  filter: grayscale(1) sepia(0.55) saturate(1.8) hue-rotate(calc(var(--accent-hue, 35) * 1deg - 35deg));
}

.music-meta {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.music-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--sand-dark);
}

.music-artist {
  font-size: 11.5px;
  color: var(--text-dim);
}

.music-progress {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.music-range {
  width: 100%;
  accent-color: var(--sand-dark);
  cursor: pointer;
}

.music-time {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-dim);
}

.music-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.music-btn {
  border: 1px solid var(--border);
  background: var(--sand-badge);
  color: var(--sand-dark);
  border-radius: 50%;
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background 0.15s ease, transform 0.15s ease;
}

.music-btn:hover,
.music-btn:focus-visible {
  background: var(--hover-strong);
  transform: translateY(-1px);
  outline: none;
}

.music-btn.play {
  width: 46px;
  height: 46px;
  background: var(--sand-dark);
  border-color: var(--sand-dark);
  color: var(--on-accent);
  font-size: 16px;
}

.music-btn.play:hover {
  background: var(--accent-dark);
}

.music-cover.is-accent {
  filter: none;
  object-fit: contain;
  background: var(--sand-dark);
}

.music-note {
  font-size: 10.5px;
  color: var(--text-dim);
}

/* ---------- Настройки ---------- */

.app-settings {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 18px 20px;
}

.settings-intro {
  color: var(--text-dim);
  font-size: 11.5px;
  padding: 4px 2px 10px;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--border-dark);
}

.setting-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.setting-label {
  font-size: 12.5px;
  color: var(--text);
}

.setting-hint {
  font-size: 11px;
  color: var(--text-dim);
}

.setting-toggle {
  width: 38px;
  height: 22px;
  border-radius: 11px;
  border: 1px solid var(--border-dark);
  background: var(--border);
  position: relative;
  flex: none;
  padding: 0;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.setting-toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface-paper);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.18s ease;
}

.setting-toggle[aria-checked="true"] {
  background: var(--sand-dark);
  border-color: var(--sand-dark);
}

.setting-toggle[aria-checked="true"]::after {
  transform: translateX(16px);
}

/* Ключевой цвет: палитра + пипетка */
.theme-block {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 2px 12px;
  border-bottom: 1px solid var(--border-dark);
}

.theme-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.swatch {
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.swatch:hover,
.swatch:focus-visible {
  transform: scale(1.12);
  outline: none;
}

.swatch.is-active {
  box-shadow: 0 0 0 2px var(--term-bg), 0 0 0 3.5px var(--text);
}

.swatch.custom {
  position: relative;
  overflow: hidden;
  background: conic-gradient(#c4644f, #c8a24a, #6f8b52, #3d7196, #8a5580, #c4644f);
  cursor: pointer;
}

.swatch-picker {
  position: absolute;
  inset: -6px;
  width: 40px;
  height: 40px;
  border: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}

.setting-toggle:focus-visible {
  outline: 1px dotted var(--prompt-user);
  outline-offset: 2px;
}

/* Группы настроек */
.settings-group {
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 16px 2px 4px;
}

.settings-tabs {
  display: flex;
  gap: 4px;
  margin: 2px 0 0;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-dark);
  scrollbar-width: none;
}

.settings-tabs::-webkit-scrollbar {
  display: none;
}

.settings-tab {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.settings-tab:hover {
  color: var(--text);
  background: var(--surface-mute);
}

.settings-tab.is-active {
  color: var(--text);
  background: var(--surface-paper);
  border-color: var(--border-dark);
}

.settings-tab:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: -1px;
}

.settings-panel {
  display: flex;
  flex-direction: column;
}

/* Выпадающий список */
.setting-select {
  flex: none;
  max-width: 190px;
  padding: 6px 26px 6px 9px;
  border-radius: 7px;
  border: 1px solid var(--border-dark);
  background: var(--surface-paper);
  color: var(--text);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-dim) 50%),
    linear-gradient(135deg, var(--text-dim) 50%, transparent 50%);
  background-position: calc(100% - 14px) 50%, calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.setting-select:focus-visible {
  outline: 1px dotted var(--prompt-user);
  outline-offset: 2px;
}

/* Обои: список + выбор файла */
.setting-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.setting-pick {
  padding: 6px 11px;
  border-radius: 7px;
  border: 1px solid var(--border-dark);
  background: var(--surface-mute);
  color: var(--text);
  font: inherit;
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}

.setting-pick:hover {
  background: var(--surface-paper);
  border-color: var(--sand-dark);
}

.setting-pick:focus-visible {
  outline: 1px dotted var(--prompt-user);
  outline-offset: 2px;
}

/* ---------- Документ ---------- */

.app-pdf {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--surface-mute);
}

.pdf-viewport {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.pdf-sheet {
  background: var(--surface-paper);
  border: 1px solid var(--border-dark);
  border-radius: 3px;
  box-shadow: 0 8px 26px rgba(var(--accent-rgb), 0.12);
  width: 100%;
  max-width: 520px;
  min-height: 100%;
  padding: 32px 34px 36px;
  font-family: var(--font-serif);
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.pdf-sheet h3 {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--sand-dark);
  letter-spacing: 0.03em;
}

.pdf-sheet p {
  margin: 0;
}

.pdf-toolbar {
  flex: none;
  border-top: 1px solid var(--border);
  background: var(--header-bg);
  padding: 7px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-dim);
}

.pdf-pager {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pdf-download {
  border: 1px solid var(--border-dark);
  background: var(--sand-badge);
  color: var(--sand-dark);
  border-radius: 4px;
  padding: 4px 9px;
  font-size: 11px;
}

.pdf-download:hover,
.pdf-download:focus-visible {
  background: var(--hover-strong);
  outline: none;
}

/* ---------- Мобильные мелочи ---------- */

@media (max-width: 768px) {
  .app-terminal {
    padding: 12px 10px;
    gap: 14px;
  }

  .fetch-container {
    flex-direction: column;
    gap: 10px;
  }

  .fetch-ascii {
    font-size: 9.5px;
    line-height: 1.15;
  }

  .cmd-input {
    font-size: 16px;
  }

  .browser-view {
    padding: 18px 16px;
  }

  .demo-title {
    font-size: 22px;
  }

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

  .photo-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px;
  }

  .app-music {
    padding: 16px;
  }

  .music-card {
    max-width: 360px;
    margin: 0 auto;
  }

  .music-cover {
    width: min(62vw, 190px);
  }

  .win-btn {
    width: 26px;
    height: 28px;
  }

  .win-btn::before {
    width: 12px;
    height: 12px;
  }

  .window-spacer {
    width: 78px;
  }

  .pdf-viewport {
    padding: 10px;
  }

  .pdf-sheet {
    padding: 22px 20px;
  }

  .note-card {
    padding: 10px 12px;
  }
}

/* Кнопка сброса настроек */
.settings-reset {
  margin-top: 18px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-dark);
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim);
  font-size: 11.5px;
  text-align: center;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.settings-reset:hover,
.settings-reset:focus-visible {
  background: var(--surface-mute);
  border-color: var(--sand-dark);
  color: var(--text);
  outline: none;
}

/* Вотермарка в конце настроек */
.settings-watermark {
  margin-top: 14px;
  padding-top: 10px;
  text-align: center;
  font-size: 10px;
  color: var(--text-dim);
  opacity: 0.65;
  border-top: 1px dashed var(--border);
  letter-spacing: 0.02em;
}

.settings-watermark a {
  color: var(--text-dim);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: normal;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.settings-watermark a:hover,
.settings-watermark a:focus-visible {
  color: var(--accent);
  opacity: 1;
}

/* ------------------------------------------------------------
   Жидкое стекло (liquid glass) — элементы приложений
   ------------------------------------------------------------ */

/* Документ / PDF */
body[data-style="glass"] .pdf-sheet {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.45) 0%, rgba(var(--accent-rgb), 0.18) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  border-radius: 14px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 14px 36px rgba(var(--accent-rgb), 0.2);
}

body.theme-dark[data-style="glass"] .pdf-sheet {
  background: linear-gradient(135deg, rgba(20, 20, 26, 0.65) 0%, rgba(var(--accent-rgb), 0.2) 100%);
  border-color: rgba(var(--accent-rgb), 0.3);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 16px 40px rgba(0, 0, 0, 0.5);
}

body[data-style="glass"] .pdf-toolbar {
  background: rgba(var(--accent-rgb), 0.14);
  border-top: 1px solid rgba(var(--accent-rgb), 0.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body.theme-dark[data-style="glass"] .pdf-toolbar {
  background: rgba(20, 20, 26, 0.5);
  border-top-color: rgba(var(--accent-rgb), 0.22);
}

body[data-style="glass"] .pdf-download {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--text);
}

body[data-style="glass"] .pdf-download:hover {
  background: rgba(var(--accent-rgb), 0.35);
  border-color: var(--sand-accent);
}

/* Браузер и карточки */
body[data-style="glass"] .browser-chrome {
  background: rgba(var(--accent-rgb), 0.16);
  border-bottom-color: rgba(var(--accent-rgb), 0.28);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

body[data-style="glass"] .browser-toolbar {
  background: rgba(var(--accent-rgb), 0.1);
  border-bottom-color: rgba(var(--accent-rgb), 0.25);
}

body[data-style="glass"] .browser-tab {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.32);
  color: var(--text);
}

body[data-style="glass"] .browser-tab:hover {
  background: rgba(var(--accent-rgb), 0.3);
}

body[data-style="glass"] .browser-tab.active {
  background: rgba(var(--accent-rgb), 0.42);
  border-color: var(--sand-accent);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body[data-style="glass"] .browser-url,
body[data-style="glass"] .url-bar {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.38);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body[data-style="glass"] .url-lock {
  color: var(--sand-accent);
}

body[data-style="glass"] .icon-btn {
  color: var(--text);
}

body[data-style="glass"] .icon-btn:hover:not(:disabled),
body[data-style="glass"] .icon-btn:focus-visible {
  background: rgba(var(--accent-rgb), 0.25);
  color: var(--text);
}

body[data-style="glass"] .demo-card {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body.theme-dark[data-style="glass"] .browser-chrome {
  background: rgba(var(--accent-rgb), 0.18);
  border-bottom-color: rgba(var(--accent-rgb), 0.3);
}

body.theme-dark[data-style="glass"] .browser-toolbar {
  background: rgba(var(--accent-rgb), 0.12);
  border-bottom-color: rgba(var(--accent-rgb), 0.25);
}

body.theme-dark[data-style="glass"] .browser-tab {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.25);
}

body.theme-dark[data-style="glass"] .browser-tab.active {
  background: rgba(var(--accent-rgb), 0.35);
  border-color: var(--sand-accent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

body.theme-dark[data-style="glass"] .browser-url,
body.theme-dark[data-style="glass"] .url-bar {
  background: rgba(var(--accent-rgb), 0.2);
  border-color: rgba(var(--accent-rgb), 0.4);
  color: #f0f0f5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.theme-dark[data-style="glass"] .pdf-toolbar {
  background: rgba(var(--accent-rgb), 0.18);
  border-top-color: rgba(var(--accent-rgb), 0.3);
}

body.theme-dark[data-style="glass"] .files-toolbar {
  background: rgba(var(--accent-rgb), 0.18);
  border-bottom-color: rgba(var(--accent-rgb), 0.3);
}

body.theme-dark[data-style="glass"] .file-preview {
  background: rgba(var(--accent-rgb), 0.12);
  border-top-color: rgba(var(--accent-rgb), 0.28);
}

body.theme-dark[data-style="glass"] .demo-card {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Файлы */
body[data-style="glass"] .files-toolbar {
  background: rgba(var(--accent-rgb), 0.12);
  border-bottom-color: rgba(var(--accent-rgb), 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.theme-dark[data-style="glass"] .files-toolbar {
  background: rgba(20, 20, 26, 0.45);
  border-bottom-color: rgba(var(--accent-rgb), 0.2);
}

body[data-style="glass"] .breadcrumb {
  color: var(--text);
  border-radius: 4px;
}

body[data-style="glass"] .breadcrumb:hover {
  background: rgba(var(--accent-rgb), 0.22);
}

body[data-style="glass"] .file-glyph {
  color: var(--sand-accent);
}

body[data-style="glass"] .breadcrumb-sep {
  color: var(--sand-accent);
  opacity: 0.8;
}

body[data-style="glass"] .file-meta {
  color: var(--text-dim);
  opacity: 0.85;
}

body[data-style="glass"] .file-row {
  border-radius: 6px;
}

body[data-style="glass"] .file-row:hover,
body[data-style="glass"] .file-row:focus-visible {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.38);
}

body[data-style="glass"] .file-preview {
  background: rgba(var(--accent-rgb), 0.08);
  border-top-color: rgba(var(--accent-rgb), 0.25);
}

body.theme-dark[data-style="glass"] .file-preview {
  background: rgba(20, 20, 26, 0.45);
  border-top-color: rgba(var(--accent-rgb), 0.2);
}

body[data-style="glass"] .preview-action {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.35);
}

body[data-style="glass"] .preview-action:hover {
  background: rgba(var(--accent-rgb), 0.32);
  border-color: var(--sand-accent);
}

/* Настройки */
body[data-style="glass"] .settings-tabs {
  border-bottom-color: rgba(var(--accent-rgb), 0.25);
}

body[data-style="glass"] .settings-tab {
  border-radius: 8px 8px 0 0;
}

body[data-style="glass"] .settings-tab:hover {
  background: rgba(var(--accent-rgb), 0.15);
  color: var(--text);
}

body[data-style="glass"] .settings-tab.is-active {
  background: rgba(var(--accent-rgb), 0.32);
  border-color: rgba(var(--accent-rgb), 0.38);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

body.theme-dark[data-style="glass"] .settings-tab.is-active {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body[data-style="glass"] .setting-toggle {
  background: rgba(var(--accent-rgb), 0.18);
  border-color: rgba(var(--accent-rgb), 0.35);
}

body[data-style="glass"] .setting-toggle[aria-checked="true"] {
  background: var(--sand-accent);
  border-color: var(--sand-accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.5);
}

body[data-style="glass"] .setting-row {
  border-bottom-color: rgba(var(--accent-rgb), 0.2);
}

body[data-style="glass"] .theme-block {
  border-bottom-color: rgba(var(--accent-rgb), 0.2);
}

body[data-style="glass"] .setting-select,
body[data-style="glass"] .setting-input,
body[data-style="glass"] .cmd-input,
body[data-style="glass"] .interactive-line {
  background-color: rgba(var(--accent-rgb), 0.16);
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--text);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

body.theme-dark[data-style="glass"] .setting-select,
body.theme-dark[data-style="glass"] .setting-input,
body.theme-dark[data-style="glass"] .cmd-input,
body.theme-dark[data-style="glass"] .interactive-line {
  background-color: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.28);
  color: #f0f0f5;
}

body[data-style="glass"] .setting-select:focus,
body[data-style="glass"] .setting-input:focus {
  border-color: var(--sand-accent);
  box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.45);
}

body[data-style="glass"] .settings-reset {
  background: rgba(var(--accent-rgb), 0.15);
  border-color: rgba(var(--accent-rgb), 0.35);
  color: var(--text);
}

body[data-style="glass"] .settings-reset:hover,
body[data-style="glass"] .settings-reset:focus-visible {
  background: rgba(var(--accent-rgb), 0.3);
  border-color: var(--sand-accent);
}

body.theme-dark[data-style="glass"] .settings-reset {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.25);
  color: #ddd;
}

body.theme-dark[data-style="glass"] .settings-reset:hover,
body.theme-dark[data-style="glass"] .settings-reset:focus-visible {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: var(--sand-accent);
  color: #fff;
}

/* Заметки, Фото, Музыка, Терминал */
body[data-style="glass"] .note-card,
body[data-style="glass"] .photo-card,
body[data-style="glass"] .music-card,
body[data-style="glass"] .player-panel,
body[data-style="glass"] .track-row {
  background: rgba(var(--accent-rgb), 0.12);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 10px;
}

body.theme-dark[data-style="glass"] .note-card,
body.theme-dark[data-style="glass"] .photo-card,
body.theme-dark[data-style="glass"] .music-card,
body.theme-dark[data-style="glass"] .player-panel,
body.theme-dark[data-style="glass"] .track-row {
  background: rgba(var(--accent-rgb), 0.08);
  border-color: rgba(var(--accent-rgb), 0.2);
}

body[data-style="glass"] .track-row:hover,
body[data-style="glass"] .track-row.is-active {
  background: rgba(var(--accent-rgb), 0.26);
  border-color: var(--sand-accent);
}

body[data-style="glass"] .fetch-container {
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 8px;
}

/* Стеклянный терминал */
body[data-style="glass"] .interactive-line {
  background: rgba(var(--accent-rgb), 0.14);
  border-color: rgba(var(--accent-rgb), 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

body[data-style="glass"] .nav-icon-btn,
body[data-style="glass"] .nav-btn,
body[data-style="glass"] .term-tag {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

body[data-style="glass"] .nav-icon-btn:hover,
body[data-style="glass"] .nav-btn:hover {
  background: rgba(var(--accent-rgb), 0.28);
  border-color: var(--sand-accent);
}

body.theme-dark[data-style="glass"] .interactive-line {
  background: rgba(var(--accent-rgb), 0.12);
  border-color: rgba(var(--accent-rgb), 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* Стеклянный аудиоплеер */
body[data-style="glass"] .music-btn {
  background: rgba(var(--accent-rgb), 0.15);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

body[data-style="glass"] .music-btn:hover,
body[data-style="glass"] .music-btn:focus-visible {
  background: rgba(var(--accent-rgb), 0.35);
  border-color: var(--sand-accent);
}

body[data-style="glass"] .music-btn.play {
  background: var(--sand-accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.45);
}

body[data-style="glass"] .music-cover {
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(var(--accent-rgb), 0.25);
}

body.theme-dark[data-style="glass"] .music-btn {
  background: rgba(var(--accent-rgb), 0.1);
  border-color: rgba(var(--accent-rgb), 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.theme-dark[data-style="glass"] .music-btn:hover {
  background: rgba(var(--accent-rgb), 0.25);
  border-color: var(--sand-accent);
}

/* ------------------------------------------------------------
   Стиль Windows 98 — элементы приложений
   ------------------------------------------------------------ */

/* Общие кнопки и элементы управления */
body[data-style="win98"] .icon-btn,
body[data-style="win98"] .nav-btn,
body[data-style="win98"] .nav-icon-btn,
body[data-style="win98"] .preview-action,
body[data-style="win98"] .pdf-download,
body[data-style="win98"] .setting-pick,
body[data-style="win98"] .settings-reset,
body[data-style="win98"] .music-back {
  border-radius: 0;
  border: 1px solid var(--border-dark);
  background: var(--surface-mute);
  color: var(--text);
  box-shadow: inset 1px 1px 0 var(--surface-paper), inset -1px -1px 0 rgba(0, 0, 0, 0.35);
  transition: none;
}

body[data-style="win98"] .icon-btn:hover:not(:disabled),
body[data-style="win98"] .nav-btn:hover,
body[data-style="win98"] .nav-icon-btn:hover,
body[data-style="win98"] .preview-action:hover,
body[data-style="win98"] .pdf-download:hover,
body[data-style="win98"] .setting-pick:hover,
body[data-style="win98"] .settings-reset:hover,
body[data-style="win98"] .music-back:hover {
  background: var(--surface-soft);
  color: var(--text);
  transform: none;
}

body[data-style="win98"] .icon-btn:active:not(:disabled),
body[data-style="win98"] .nav-btn:active,
body[data-style="win98"] .nav-icon-btn:active,
body[data-style="win98"] .preview-action:active,
body[data-style="win98"] .pdf-download:active,
body[data-style="win98"] .setting-pick:active,
body[data-style="win98"] .settings-reset:active,
body[data-style="win98"] .music-back:active {
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5), inset -1px -1px 0 var(--surface-paper);
  transform: translate(1px, 1px);
}

/* Вдавленные поля ввода (sunken inputs) */
body[data-style="win98"] .setting-select,
body[data-style="win98"] .setting-input,
body[data-style="win98"] .browser-url,
body[data-style="win98"] .url-bar,
body[data-style="win98"] .cmd-input {
  border-radius: 0;
  border: 1px solid var(--border-dark);
  background-color: var(--surface-paper);
  color: var(--text);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.35), inset -1px -1px 0 var(--surface-paper);
}

/* Слайдер и прогресс-бар в плеере */
body[data-style="win98"] input[type="range"],
body[data-style="win98"] .music-range {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 22px;
  cursor: pointer;
  accent-color: auto;
}

body[data-style="win98"] .music-range::-webkit-slider-runnable-track,
body[data-style="win98"] input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  background: var(--surface-deep);
  border: 1px solid var(--border-dark);
  border-bottom-color: var(--surface-paper);
  border-right-color: var(--surface-paper);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.35);
  border-radius: 0;
}

body[data-style="win98"] .music-range::-moz-range-track,
body[data-style="win98"] input[type="range"]::-moz-range-track {
  height: 5px;
  background: var(--surface-deep);
  border: 1px solid var(--border-dark);
  border-bottom-color: var(--surface-paper);
  border-right-color: var(--surface-paper);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.35);
  border-radius: 0;
}

body[data-style="win98"] .music-range::-webkit-slider-thumb,
body[data-style="win98"] input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 20px;
  margin-top: -9px;
  border-radius: 0;
  background: var(--surface-mute);
  border: 1px solid var(--border-dark);
  box-shadow: inset 1px 1px 0 var(--surface-paper), inset -1px -1px 0 rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

body[data-style="win98"] .music-range::-moz-range-thumb,
body[data-style="win98"] input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 20px;
  border-radius: 0;
  background: var(--surface-mute);
  border: 1px solid var(--border-dark);
  box-shadow: inset 1px 1px 0 var(--surface-paper), inset -1px -1px 0 rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

body[data-style="win98"] .music-range:active::-webkit-slider-thumb,
body[data-style="win98"] input[type="range"]:active::-webkit-slider-thumb {
  background: var(--surface-paper);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5), inset -1px -1px 0 var(--surface-paper);
}

body[data-style="win98"] .music-range:active::-moz-range-thumb,
body[data-style="win98"] input[type="range"]:active::-moz-range-thumb {
  background: var(--surface-paper);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5), inset -1px -1px 0 var(--surface-paper);
}

/* Кнопки плеера */
body[data-style="win98"] .music-btn {
  border-radius: 0;
  width: 32px;
  height: 30px;
  border: 1px solid var(--border-dark);
  background: var(--surface-mute);
  color: var(--text);
  box-shadow: inset 1px 1px 0 var(--surface-paper), inset -1px -1px 0 rgba(0, 0, 0, 0.4);
  transform: none;
  transition: none;
}

body[data-style="win98"] .music-btn:hover,
body[data-style="win98"] .music-btn:focus-visible {
  background: var(--surface-soft);
  transform: none;
}

body[data-style="win98"] .music-btn:active {
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5), inset -1px -1px 0 var(--surface-paper);
  transform: translate(1px, 1px);
}

body[data-style="win98"] .music-btn.play {
  width: 44px;
  height: 36px;
  border-radius: 0;
  border: 1px solid var(--border-dark);
  background: var(--surface-mute);
  color: var(--text);
  box-shadow: inset 1px 1px 0 var(--surface-paper), inset -1px -1px 0 rgba(0, 0, 0, 0.4);
}

body[data-style="win98"] .music-btn.play:hover {
  background: var(--surface-soft);
}

body[data-style="win98"] .music-btn.play:active {
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5), inset -1px -1px 0 var(--surface-paper);
  transform: translate(1px, 1px);
}

/* Карточка плеера и обложка */
body[data-style="win98"] .music-card {
  border-radius: 0;
  border: 2px solid var(--border-dark);
  background: var(--surface-mute);
  box-shadow: inset 1px 1px 0 var(--surface-paper), inset -1px -1px 0 rgba(0, 0, 0, 0.2);
}

body[data-style="win98"] .music-cover {
  border-radius: 0;
  border: 2px solid var(--border-dark);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.35);
}

body[data-style="win98"] .music-coverflow-stage,
body[data-style="win98"] .cf-item,
body[data-style="win98"] .cf-art,
body[data-style="win98"] .cf-item::before,
body[data-style="win98"] .cf-name {
  border-radius: 0;
}

body[data-style="win98"] .cf-art {
  border: 1px solid var(--border-dark);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
}

body[data-style="win98"] .cf-name {
  background: var(--surface-paper);
  border: 1px solid var(--border-dark);
}

/* Настройки: вкладки, переключатели, палитра */
body[data-style="win98"] .settings-tabs {
  border-bottom: 2px solid var(--border-dark);
  gap: 2px;
}

body[data-style="win98"] .settings-tab {
  border-radius: 0;
  border: 1px solid var(--border-dark);
  border-bottom: 0;
  background: var(--surface-mute);
  box-shadow: inset 1px 1px 0 var(--surface-paper);
  margin-bottom: -2px;
  padding: 6px 12px;
}

body[data-style="win98"] .settings-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

body[data-style="win98"] .settings-tab.is-active {
  background: var(--surface-paper);
  color: var(--text);
  border-color: var(--border-dark);
  border-bottom: 2px solid var(--surface-paper);
  font-weight: 700;
}

body[data-style="win98"] .setting-toggle {
  border-radius: 0;
  width: 36px;
  height: 20px;
  background: var(--surface-deep);
  border: 1px solid var(--border-dark);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.4), inset -1px -1px 0 var(--surface-paper);
  transition: none;
}

body[data-style="win98"] .setting-toggle::after {
  border-radius: 0;
  width: 14px;
  height: 14px;
  top: 2px;
  left: 2px;
  background: var(--surface-mute);
  border: 1px solid var(--border-dark);
  box-shadow: inset 1px 1px 0 var(--surface-paper), inset -1px -1px 0 rgba(0, 0, 0, 0.4);
  transition: transform 0.1s ease;
}

body[data-style="win98"] .setting-toggle[aria-checked="true"] {
  background: var(--sand-accent);
  border-color: var(--sand-dark);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.4);
}

body[data-style="win98"] .setting-toggle[aria-checked="true"]::after {
  transform: translateX(16px);
  background: var(--surface-paper);
}

body[data-style="win98"] .swatch {
  border-radius: 0;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-dark);
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.4), inset -1px -1px 0 var(--surface-paper);
  transition: none;
}

body[data-style="win98"] .swatch:hover,
body[data-style="win98"] .swatch:focus-visible {
  transform: none;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5), 0 0 0 1px var(--text);
}

body[data-style="win98"] .swatch.is-active {
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.5), 0 0 0 2px var(--text);
  outline: 1px dotted var(--text);
  outline-offset: 1px;
}

/* Браузер: вкладки, тулбар и карточки */
body[data-style="win98"] .browser-chrome,
body[data-style="win98"] .browser-toolbar {
  background: var(--header-bg);
  border-bottom: 2px solid var(--border-dark);
}

body[data-style="win98"] .browser-tabs {
  border-bottom: 2px solid var(--border-dark);
  gap: 2px;
}

body[data-style="win98"] .browser-tab {
  border-radius: 0;
  border: 1px solid var(--border-dark);
  border-bottom: 0;
  background: var(--surface-mute);
  box-shadow: inset 1px 1px 0 var(--surface-paper);
  margin-bottom: -2px;
}

body[data-style="win98"] .browser-tab:hover {
  background: var(--surface-soft);
  color: var(--text);
}

body[data-style="win98"] .browser-tab.active {
  background: var(--surface-paper);
  color: var(--text);
  border-color: var(--border-dark);
  border-bottom: 2px solid var(--surface-paper);
  font-weight: 700;
}

/* Документ / PDF */
body[data-style="win98"] .pdf-sheet {
  border-radius: 0;
  border: 1px solid var(--border-dark);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.2);
}

body[data-style="win98"] .pdf-toolbar {
  border-top: 2px solid var(--border-dark);
}

/* Файлы */
body[data-style="win98"] .files-toolbar {
  border-bottom: 2px solid var(--border-dark);
}

body[data-style="win98"] .breadcrumb,
body[data-style="win98"] .file-row {
  border-radius: 0;
}

body[data-style="win98"] .file-row:hover,
body[data-style="win98"] .file-row:focus-visible {
  background: var(--surface-mute);
  outline: 1px dotted var(--text);
}

body[data-style="win98"] .file-row.is-active {
  background: var(--sand-accent);
  color: var(--on-accent);
}

body[data-style="win98"] .file-preview {
  border-radius: 0;
  border-left: 2px solid var(--border-dark);
}

/* Заметки, Фото и карточки */
body[data-style="win98"] .note-card,
body[data-style="win98"] .photo-card,
body[data-style="win98"] .photo-item,
body[data-style="win98"] .demo-card {
  border-radius: 0;
  border: 1px solid var(--border-dark);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.15);
}

body[data-style="win98"] .tag,
body[data-style="win98"] .badge,
body[data-style="win98"] .link-pill {
  border-radius: 0;
  border: 1px solid var(--border-dark);
}

/* Тёмная тема: фаски в приложениях */
body.theme-dark[data-style="win98"] .icon-btn,
body.theme-dark[data-style="win98"] .nav-btn,
body.theme-dark[data-style="win98"] .nav-icon-btn,
body.theme-dark[data-style="win98"] .preview-action,
body.theme-dark[data-style="win98"] .pdf-download,
body.theme-dark[data-style="win98"] .setting-pick,
body.theme-dark[data-style="win98"] .settings-reset,
body.theme-dark[data-style="win98"] .music-back,
body.theme-dark[data-style="win98"] .music-btn,
body.theme-dark[data-style="win98"] .music-btn.play {
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.12), inset -1px -1px 0 rgba(0, 0, 0, 0.65);
}

body.theme-dark[data-style="win98"] .icon-btn:active:not(:disabled),
body.theme-dark[data-style="win98"] .nav-btn:active,
body.theme-dark[data-style="win98"] .nav-icon-btn:active,
body.theme-dark[data-style="win98"] .preview-action:active,
body.theme-dark[data-style="win98"] .pdf-download:active,
body.theme-dark[data-style="win98"] .setting-pick:active,
body.theme-dark[data-style="win98"] .settings-reset:active,
body.theme-dark[data-style="win98"] .music-back:active,
body.theme-dark[data-style="win98"] .music-btn:active,
body.theme-dark[data-style="win98"] .music-btn.play:active {
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.75), inset -1px -1px 0 rgba(255, 255, 255, 0.1);
}

/* ------------------------------------------------------------
   Стиль Aero / Aqua — элементы приложений (Frutiger Aero)
   ------------------------------------------------------------ */

/* Общие кнопки и элементы управления (Aqua Jelly Buttons) */
body[data-style="aero"] .icon-btn,
body[data-style="aero"] .nav-btn,
body[data-style="aero"] .nav-icon-btn,
body[data-style="aero"] .preview-action,
body[data-style="aero"] .pdf-download,
body[data-style="aero"] .setting-pick,
body[data-style="aero"] .settings-reset,
body[data-style="aero"] .music-back {
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.25) 48%, rgba(var(--accent-rgb), 0.08) 50%, rgba(255, 255, 255, 0.25) 100%),
    var(--surface-mute);
  color: var(--text);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.95),
    0 2px 5px rgba(0, 0, 0, 0.08),
    0 1px 2px rgba(var(--accent-rgb), 0.15);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

body[data-style="aero"] .icon-btn:hover:not(:disabled),
body[data-style="aero"] .nav-btn:hover,
body[data-style="aero"] .nav-icon-btn:hover,
body[data-style="aero"] .preview-action:hover,
body[data-style="aero"] .pdf-download:hover,
body[data-style="aero"] .setting-pick:hover,
body[data-style="aero"] .settings-reset:hover,
body[data-style="aero"] .music-back:hover {
  transform: translateY(-1px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.35) 48%, rgba(var(--accent-rgb), 0.14) 50%, rgba(255, 255, 255, 0.35) 100%),
    var(--hover-strong);
  box-shadow:
    0 0 10px rgba(var(--accent-rgb), 0.45),
    0 3px 8px rgba(0, 0, 0, 0.12),
    inset 0 1px 0 #ffffff;
  color: var(--text);
}

body[data-style="aero"] .icon-btn:active:not(:disabled),
body[data-style="aero"] .nav-btn:active,
body[data-style="aero"] .nav-icon-btn:active,
body[data-style="aero"] .preview-action:active,
body[data-style="aero"] .pdf-download:active,
body[data-style="aero"] .setting-pick:active,
body[data-style="aero"] .settings-reset:active,
body[data-style="aero"] .music-back:active {
  transform: translateY(1px);
  box-shadow:
    inset 0 1.5px 3px rgba(0, 0, 0, 0.3),
    0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Аудиоплеер — Слайдер прогресса и громкости (Aqua Glass Capsule) */
body[data-style="aero"] .music-range {
  -webkit-appearance: none;
  appearance: none;
  height: 22px;
  background: transparent;
  accent-color: var(--sand-accent);
}

body[data-style="aero"] .music-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.05) 50%, rgba(255, 255, 255, 0.35) 100%),
    var(--surface-inset);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.22), 0 1px 0 rgba(255, 255, 255, 0.85);
}

body[data-style="aero"] .music-range::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.05) 50%, rgba(255, 255, 255, 0.35) 100%),
    var(--surface-inset);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.22), 0 1px 0 rgba(255, 255, 255, 0.85);
}

body[data-style="aero"] .music-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -6px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #ffffff 0%, rgba(255, 255, 255, 0.85) 25%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(0, 0, 0, 0.12) 100%),
    var(--sand-accent);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.25),
    0 0 8px rgba(var(--accent-rgb), 0.5),
    inset 0 1px 1px #ffffff,
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

body[data-style="aero"] .music-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, #ffffff 0%, rgba(255, 255, 255, 0.85) 25%, transparent 60%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.45) 0%, rgba(0, 0, 0, 0.12) 100%),
    var(--sand-accent);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 2px 6px rgba(0, 0, 0, 0.25),
    0 0 8px rgba(var(--accent-rgb), 0.5),
    inset 0 1px 1px #ffffff,
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.4);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

body[data-style="aero"] .music-range:hover::-webkit-slider-thumb {
  transform: scale(1.15);
  box-shadow:
    0 0 14px var(--sand-accent),
    0 3px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px #ffffff;
}

body[data-style="aero"] .music-range:hover::-moz-range-thumb {
  transform: scale(1.15);
  box-shadow:
    0 0 14px var(--sand-accent),
    0 3px 8px rgba(0, 0, 0, 0.3),
    inset 0 1px 1px #ffffff;
}

body[data-style="aero"] .music-range:active::-webkit-slider-thumb {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow:
    0 0 18px var(--sand-accent),
    0 1px 4px rgba(0, 0, 0, 0.35),
    inset 0 1.5px 2px rgba(0, 0, 0, 0.3);
}

body[data-style="aero"] .music-range:active::-moz-range-thumb {
  transform: scale(1.05);
  filter: brightness(1.1);
  box-shadow:
    0 0 18px var(--sand-accent),
    0 1px 4px rgba(0, 0, 0, 0.35),
    inset 0 1.5px 2px rgba(0, 0, 0, 0.3);
}

/* Кнопки плеера — Aqua жемчужины */
body[data-style="aero"] .music-btn {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.25) 48%, rgba(var(--accent-rgb), 0.08) 50%, rgba(255, 255, 255, 0.3) 100%),
    var(--sand-badge);
  color: var(--text);
  box-shadow:
    inset 0 1px 0.5px rgba(255, 255, 255, 0.95),
    0 2px 6px rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(var(--accent-rgb), 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

body[data-style="aero"] .music-btn:hover,
body[data-style="aero"] .music-btn:focus-visible {
  transform: translateY(-1px) scale(1.08);
  box-shadow:
    0 0 10px rgba(var(--accent-rgb), 0.5),
    0 3px 8px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 #ffffff;
  filter: brightness(1.05);
}

body[data-style="aero"] .music-btn:active {
  transform: scale(0.96);
  box-shadow:
    inset 0 1.5px 3px rgba(0, 0, 0, 0.35),
    0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Главная кнопка воспроизведения — сияющая сфера */
body[data-style="aero"] .music-btn.play {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.2) 48%, rgba(0, 0, 0, 0.08) 50%, rgba(255, 255, 255, 0.2) 100%),
    var(--sand-dark);
  border-color: rgba(255, 255, 255, 0.85);
  color: var(--on-accent);
  box-shadow:
    0 6px 18px rgba(var(--accent-rgb), 0.45),
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 1.5px 0.5px rgba(255, 255, 255, 0.95),
    inset 0 -2px 4px rgba(0, 0, 0, 0.3);
}

body[data-style="aero"] .music-btn.play:hover {
  transform: translateY(-2px) scale(1.08);
  box-shadow:
    0 0 20px var(--sand-accent),
    0 6px 20px rgba(0, 0, 0, 0.25),
    inset 0 1.5px 0.5px #ffffff;
}

body[data-style="aero"] .music-btn.play:active {
  transform: scale(0.96);
  box-shadow:
    inset 0 2px 5px rgba(0, 0, 0, 0.5),
    0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Панели плеера и обложка */
body[data-style="aero"] .music-card,
body[data-style="aero"] .player-panel {
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.2) 100%),
    var(--surface-paper);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 16px rgba(0, 0, 0, 0.06);
}

body[data-style="aero"] .music-cover {
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.16),
    0 2px 6px rgba(var(--accent-rgb), 0.2),
    inset 0 1px 0.5px rgba(255, 255, 255, 0.8);
}

body[data-style="aero"] .track-row {
  border-radius: 8px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

body[data-style="aero"] .track-row:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(var(--accent-rgb), 0.12) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 1px 3px rgba(0, 0, 0, 0.06);
}

body[data-style="aero"] .track-row.is-active {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7) 0%, rgba(var(--accent-rgb), 0.25) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 0 8px rgba(var(--accent-rgb), 0.3);
}

/* Окно «Настройки» — вкладки и контролы */
body[data-style="aero"] .settings-tab {
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-bottom: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(var(--accent-rgb), 0.08) 100%),
    var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

body[data-style="aero"] .settings-tab:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(var(--accent-rgb), 0.15) 100%),
    var(--surface-paper);
}

body[data-style="aero"] .settings-tab.is-active {
  background: var(--surface-paper);
  border-color: rgba(var(--accent-rgb), 0.4);
  border-bottom: 1px solid var(--surface-paper);
  box-shadow: inset 0 1.5px 0.5px rgba(255, 255, 255, 0.95), 0 -2px 6px rgba(0, 0, 0, 0.04);
}

/* Переключатели (Toggles) — Aqua капсулы */
body[data-style="aero"] .setting-toggle {
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.16) 0%, rgba(0, 0, 0, 0.04) 50%, rgba(255, 255, 255, 0.3) 100%),
    var(--surface-inset);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.22), 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body[data-style="aero"] .setting-toggle::after {
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.85) 25%, var(--surface-mute) 65%, var(--border-dark) 100%);
  border: 0.5px solid rgba(255, 255, 255, 0.95);
  box-shadow:
    0 1.5px 4px rgba(0, 0, 0, 0.25),
    inset 0 1px 0.5px rgba(255, 255, 255, 1),
    inset 0 -1px 1.5px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body[data-style="aero"] .setting-toggle[aria-checked="true"] {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0.18) 48%, rgba(0, 0, 0, 0.06) 50%, rgba(255, 255, 255, 0.25) 100%),
    var(--sand-accent);
  border-color: rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.8), 0 0 10px rgba(var(--accent-rgb), 0.5);
}

body[data-style="aero"] .setting-toggle[aria-checked="true"]::after {
  transform: translateX(20px);
}

/* Образцы цветов (Swatches) — стеклянные леденцы */
body[data-style="aero"] .swatch {
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background-image: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.25) 30%, transparent 60%);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.95),
    inset 0 -1.5px 2px rgba(0, 0, 0, 0.35),
    0 2px 5px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

body[data-style="aero"] .swatch:hover {
  transform: scale(1.15);
  box-shadow:
    inset 0 1.5px 1px rgba(255, 255, 255, 0.95),
    0 0 10px var(--sand-accent),
    0 3px 6px rgba(0, 0, 0, 0.22);
}

body[data-style="aero"] .swatch.is-active {
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 0 4px var(--sand-accent),
    0 3px 8px rgba(0, 0, 0, 0.25);
  transform: scale(1.1);
}

/* Выпадающие списки и поля ввода */
body[data-style="aero"] .setting-select,
body[data-style="aero"] .setting-number,
body[data-style="aero"] input[type="text"],
body[data-style="aero"] input[type="number"],
body[data-style="aero"] select {
  border-radius: 8px;
  background: linear-gradient(180deg, var(--surface-paper) 0%, var(--surface-inset) 100%);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: inset 0 1.5px 2px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body[data-style="aero"] .setting-select:focus,
body[data-style="aero"] .setting-number:focus,
body[data-style="aero"] input:focus,
body[data-style="aero"] select:focus {
  border-color: var(--sand-accent);
  box-shadow:
    0 0 0 3px rgba(var(--accent-rgb), 0.35),
    inset 0 1.5px 2px rgba(0, 0, 0, 0.08);
  outline: none;
}

/* Браузер — вкладки и адресная строка */
body[data-style="aero"] .browser-tab {
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-bottom: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(var(--accent-rgb), 0.08) 100%),
    var(--surface-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body[data-style="aero"] .browser-tab.active {
  background: var(--surface-paper);
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: inset 0 1.5px 0 rgba(255, 255, 255, 0.95);
}

body[data-style="aero"] .browser-toolbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(var(--accent-rgb), 0.08) 100%),
    var(--header-bg);
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

body[data-style="aero"] .url-bar {
  border-radius: 999px;
  background: var(--surface-paper);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: inset 0 1.5px 2px rgba(0, 0, 0, 0.08), 0 1px 0 rgba(255, 255, 255, 0.85);
  padding: 5px 12px;
}

/* Файлы — строки и хлебные крошки */
body[data-style="aero"] .breadcrumb {
  border-radius: 999px;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
  padding: 3px 8px;
}

body[data-style="aero"] .file-row {
  border-radius: 6px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

body[data-style="aero"] .file-row:hover,
body[data-style="aero"] .file-row:focus-visible {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(var(--accent-rgb), 0.15) 100%),
    var(--sand-badge);
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

body[data-style="aero"] .file-row.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.25) 48%, rgba(var(--accent-rgb), 0.12) 50%, rgba(var(--accent-rgb), 0.28) 100%),
    var(--surface-soft);
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: inset 0 1px 0.5px #ffffff, 0 0 8px rgba(var(--accent-rgb), 0.35);
}

/* Документы / PDF */
body[data-style="aero"] .pdf-sheet {
  border-radius: 8px;
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  box-shadow:
    0 8px 24px rgba(0, 0, 0, 0.1),
    0 2px 6px rgba(var(--accent-rgb), 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body[data-style="aero"] .pdf-toolbar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.6) 0%, rgba(var(--accent-rgb), 0.08) 100%),
    var(--surface-soft);
  border-top: 1px solid rgba(var(--accent-rgb), 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Заметки, фото, бейджи */
body[data-style="aero"] .note-card,
body[data-style="aero"] .photo-card {
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.2) 100%),
    var(--surface-paper);
  border: 1px solid rgba(var(--accent-rgb), 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 4px 16px rgba(0, 0, 0, 0.06);
}

body[data-style="aero"] .photo-card img {
  border-radius: 8px;
}

body[data-style="aero"] .tag,
body[data-style="aero"] .badge,
body[data-style="aero"] .link-pill,
body[data-style="aero"] .term-tag {
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.2) 48%, rgba(var(--accent-rgb), 0.08) 50%, rgba(255, 255, 255, 0.25) 100%),
    var(--surface-soft);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), 0 1px 3px rgba(0, 0, 0, 0.06);
}

body[data-style="aero"] .interactive-line {
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(var(--accent-rgb), 0.08) 100%),
    var(--surface-inset);
  border: 1px solid rgba(var(--accent-rgb), 0.35);
  box-shadow: inset 0 1.5px 2px rgba(0, 0, 0, 0.06), 0 1px 0 rgba(255, 255, 255, 0.85);
}

/* Тёмная тема для приложений Aero */
body.theme-dark[data-style="aero"] .icon-btn,
body.theme-dark[data-style="aero"] .nav-btn,
body.theme-dark[data-style="aero"] .nav-icon-btn,
body.theme-dark[data-style="aero"] .preview-action,
body.theme-dark[data-style="aero"] .pdf-download,
body.theme-dark[data-style="aero"] .setting-pick,
body.theme-dark[data-style="aero"] .settings-reset,
body.theme-dark[data-style="aero"] .music-back,
body.theme-dark[data-style="aero"] .music-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.05) 48%, rgba(var(--accent-rgb), 0.12) 50%, rgba(255, 255, 255, 0.08) 100%),
    var(--surface-mute);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.theme-dark[data-style="aero"] .music-btn.play {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.1) 48%, rgba(0, 0, 0, 0.2) 50%, rgba(255, 255, 255, 0.1) 100%),
    var(--sand-dark);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 12px rgba(var(--accent-rgb), 0.4), inset 0 1px 0.5px rgba(255, 255, 255, 0.4);
}

body.theme-dark[data-style="aero"] .music-range::-webkit-slider-runnable-track,
body.theme-dark[data-style="aero"] .music-range::-moz-range-track {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.2) 100%),
    var(--surface-inset);
  border-color: rgba(var(--accent-rgb), 0.35);
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.theme-dark[data-style="aero"] .setting-toggle {
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.2) 100%),
    var(--surface-inset);
  box-shadow: inset 0 1.5px 3px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.1);
}

body.theme-dark[data-style="aero"] .setting-toggle::after {
  background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.8) 25%, var(--surface-mute) 100%);
  border-color: rgba(255, 255, 255, 0.3);
}

body.theme-dark[data-style="aero"] .settings-tab {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, rgba(var(--accent-rgb), 0.08) 100%),
    var(--surface-soft);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

body.theme-dark[data-style="aero"] .settings-tab.is-active {
  background: var(--surface-paper);
  border-color: rgba(var(--accent-rgb), 0.45);
  box-shadow: inset 0 1.5px 0.5px rgba(255, 255, 255, 0.35);
}

body.theme-dark[data-style="aero"] .note-card,
body.theme-dark[data-style="aero"] .photo-card,
body.theme-dark[data-style="aero"] .music-card,
body.theme-dark[data-style="aero"] .player-panel {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, rgba(var(--accent-rgb), 0.06) 100%),
    var(--surface-paper);
  border-color: rgba(255, 255, 255, 0.15);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 4px 16px rgba(0, 0, 0, 0.35);
}


/* ------------------------------------------------------------
   Material 3 / Material Design: app controls and tonal components
   ------------------------------------------------------------ */
body[data-style="material"] .app-page,
body[data-style="material"] .app-settings,
body[data-style="material"] .app-terminal,
body[data-style="material"] .app-pdf {
  background: transparent;
}

body[data-style="material"] .icon-btn,
body[data-style="material"] .nav-btn,
body[data-style="material"] .nav-icon-btn,
body[data-style="material"] .preview-action,
body[data-style="material"] .pdf-download,
body[data-style="material"] .setting-pick,
body[data-style="material"] .settings-reset,
body[data-style="material"] .music-back,
body[data-style="material"] .music-btn {
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-mute) 78%, var(--accent) 22%);
  color: var(--text);
  box-shadow: none;
  min-height: 40px;
  transition: background 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

body[data-style="material"] .nav-btn,
body[data-style="material"] .setting-pick,
body[data-style="material"] .settings-reset,
body[data-style="material"] .music-back,
body[data-style="material"] .pdf-download {
  padding: 9px 16px;
}

body[data-style="material"] .music-btn {
  width: 40px;
  height: 40px;
}

body[data-style="material"] .icon-btn,
body[data-style="material"] .nav-icon-btn {
  width: 40px;
  padding: 8px;
}

body[data-style="material"] .icon-btn:hover:not(:disabled),
body[data-style="material"] .icon-btn:focus-visible,
body[data-style="material"] .nav-btn:hover,
body[data-style="material"] .nav-btn:focus-visible,
body[data-style="material"] .nav-icon-btn:hover,
body[data-style="material"] .nav-icon-btn:focus-visible,
body[data-style="material"] .preview-action:hover,
body[data-style="material"] .preview-action:focus-visible,
body[data-style="material"] .pdf-download:hover,
body[data-style="material"] .pdf-download:focus-visible,
body[data-style="material"] .setting-pick:hover,
body[data-style="material"] .setting-pick:focus-visible,
body[data-style="material"] .settings-reset:hover,
body[data-style="material"] .settings-reset:focus-visible,
body[data-style="material"] .music-back:hover,
body[data-style="material"] .music-back:focus-visible,
body[data-style="material"] .music-btn:hover,
body[data-style="material"] .music-btn:focus-visible {
  background: color-mix(in srgb, var(--sand-accent) 24%, var(--surface-mute) 76%);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.16);
  outline: 2px solid color-mix(in srgb, var(--sand-accent) 70%, transparent);
  outline-offset: 2px;
}

body[data-style="material"] .nav-btn:active,
body[data-style="material"] .music-btn:active,
body[data-style="material"] .setting-pick:active,
body[data-style="material"] .settings-reset:active {
  transform: scale(0.97);
}

body[data-style="material"] .setting-select,
body[data-style="material"] .setting-input,
body[data-style="material"] .browser-url,
body[data-style="material"] .url-bar,
body[data-style="material"] .cmd-input,
body[data-style="material"] input[type="text"],
body[data-style="material"] input[type="number"],
body[data-style="material"] select {
  border: 0;
  border-bottom: 2px solid var(--border-dark);
  border-radius: 8px 8px 4px 4px;
  background: color-mix(in srgb, var(--surface-inset) 88%, var(--accent) 12%);
  color: var(--text);
  box-shadow: none;
  min-height: 40px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

body[data-style="material"] .setting-select:focus,
body[data-style="material"] .setting-input:focus,
body[data-style="material"] .browser-url:focus,
body[data-style="material"] .url-bar:focus,
body[data-style="material"] .cmd-input:focus,
body[data-style="material"] input:focus,
body[data-style="material"] select:focus {
  border-bottom-color: var(--sand-accent);
  box-shadow: 0 2px 0 var(--sand-accent);
  outline: none;
}

body[data-style="material"] .settings-tab {
  border: 0;
  border-radius: 999px;
  background: transparent;
  min-height: 40px;
  padding: 8px 14px;
}

body[data-style="material"] .settings-tab:hover,
body[data-style="material"] .settings-tab:focus-visible {
  background: color-mix(in srgb, var(--sand-accent) 12%, transparent);
  outline: none;
}

body[data-style="material"] .settings-tab.is-active {
  border: 0;
  background: color-mix(in srgb, var(--sand-accent) 22%, var(--surface-mute) 78%);
  color: var(--text);
}

body[data-style="material"] .setting-toggle {
  border: 2px solid var(--border-dark);
  border-radius: 999px;
  background: transparent;
  width: 52px;
  height: 32px;
  transition: background 0.18s ease, border-color 0.18s ease;
}

body[data-style="material"] .setting-toggle::after {
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: var(--border-dark);
  box-shadow: none;
  transition: transform 0.18s ease, background 0.18s ease;
}

body[data-style="material"] .setting-toggle[aria-checked="true"] {
  border-color: var(--sand-accent);
  background: color-mix(in srgb, var(--sand-accent) 34%, transparent);
}

body[data-style="material"] .setting-toggle[aria-checked="true"]::after {
  background: var(--sand-accent);
  transform: translateX(20px);
}

body[data-style="material"] input[type="range"],
body[data-style="material"] .music-range {
  accent-color: var(--sand-accent);
  height: 40px;
}

body[data-style="material"] input[type="range"]::-webkit-slider-runnable-track,
body[data-style="material"] .music-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 68%, var(--sand-accent) 32%);
}

body[data-style="material"] input[type="range"]::-webkit-slider-thumb,
body[data-style="material"] .music-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin-top: -8px;
  border: 0;
  border-radius: 50%;
  background: var(--sand-accent);
  box-shadow: 0 2px 6px rgba(var(--accent-rgb), 0.3);
}

body[data-style="material"] input[type="range"]::-moz-range-track,
body[data-style="material"] .music-range::-moz-range-track {
  height: 4px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--border) 68%, var(--sand-accent) 32%);
}

body[data-style="material"] input[type="range"]::-moz-range-thumb,
body[data-style="material"] .music-range::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 50%;
  background: var(--sand-accent);
  box-shadow: 0 2px 6px rgba(var(--accent-rgb), 0.3);
}

body[data-style="material"] .browser-tab {
  border: 0;
  border-radius: 14px 14px 0 0;
  background: transparent;
}

body[data-style="material"] .browser-tab:hover,
body[data-style="material"] .browser-tab.active {
  background: color-mix(in srgb, var(--sand-accent) 14%, var(--surface-mute) 86%);
}

body[data-style="material"] .file-row:hover,
body[data-style="material"] .file-row:focus-visible,
body[data-style="material"] .note-card:hover,
body[data-style="material"] .track-row:hover {
  background: color-mix(in srgb, var(--sand-accent) 10%, var(--surface-soft) 90%);
  outline: none;
}
