:root {
  --primary-blue: #3976c5;
  --dark-blue: #243b68;
  --light-blue: #b7e4fa;
  --neon-blue: #67d9ed;
  --primary-yellow: #f6d878;
  --neon-yellow: #f6d878;
  --neon-pink: #df92c0;
  --neon-purple: #9879d6;
  --neon-green: #5aa57e;
  --white: #fff;
  --off-white: #f3f5fa;
  --font-heading: 'Trebuchet MS', 'Segoe UI', sans-serif;
  --font-body: 'Segoe UI', Arial, sans-serif;
}

html,
body {
  width: 100%;
  min-width: 320px;
  min-height: 100%;
  overflow: hidden;
  background: #496fb4;
  color: #172841;
  font-family: var(--font-body);
}

.desktop {
  width: 100%;
  height: 100vh;
  min-height: 420px;
  background: #496fb4;
}

.desktop-wallpaper {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: var(--wallpaper-sky,
    radial-gradient(circle at 72% 53%, rgba(255, 222, 151, 0.98) 0 5.4%, rgba(255, 210, 156, 0.32) 5.5% 8%, transparent 8.2%),
    repeating-linear-gradient(0deg, transparent 0 13px, rgba(202, 204, 255, 0.1) 14px 15px, transparent 16px 22px),
    linear-gradient(180deg, #3464b1 0%, #6481c2 36%, #e09ac1 57%, #635fb2 74%, #286eab 100%));
}

.desktop-wallpaper::before,
.desktop-wallpaper::after {
  content: '';
  position: absolute;
  inset: 42% 0 0;
  pointer-events: none;
}

.desktop-wallpaper::before {
  background: var(--wallpaper-ridge, linear-gradient(180deg, #3d528f 0%, #252f69 48%, #233964 100%));
  clip-path: var(--wallpaper-ridge-clip, polygon(0 40%, 7% 33%, 12% 39%, 21% 21%, 28% 36%, 35% 27%, 44% 44%, 51% 22%, 58% 37%, 68% 16%, 74% 32%, 82% 20%, 90% 39%, 96% 27%, 100% 35%, 100% 100%, 0 100%));
}

.desktop-wallpaper::after {
  inset: 58% 0 0;
  background: var(--wallpaper-foreground,
    repeating-linear-gradient(0deg, transparent 0 17px, rgba(118, 189, 238, 0.2) 18px 20px, transparent 21px 29px),
    linear-gradient(180deg, #31558d 0%, #22477f 100%));
  clip-path: var(--wallpaper-foreground-clip, polygon(0 36%, 9% 20%, 17% 38%, 25% 26%, 33% 42%, 42% 18%, 51% 39%, 60% 16%, 68% 34%, 77% 14%, 85% 39%, 92% 23%, 100% 36%, 100% 100%, 0 100%));
}

.desktop-wallpaper[data-wallpaper="blue-hour"] {
  --wallpaper-sky: radial-gradient(circle at 27% 39%, rgba(215, 233, 255, 0.9) 0 4.5%, rgba(215, 233, 255, 0.18) 4.6% 7%, transparent 7.2%), linear-gradient(180deg, #142b58 0%, #3b5d9b 47%, #9c9bd1 68%, #4d6399 100%);
  --wallpaper-ridge: linear-gradient(180deg, #35436d, #19294e);
  --wallpaper-foreground: linear-gradient(180deg, #365d8c, #203e67);
}

.desktop-wallpaper[data-wallpaper="lavender"] {
  --wallpaper-sky: radial-gradient(circle at 75% 45%, rgba(255, 222, 211, 0.96) 0 5%, rgba(255, 202, 222, 0.24) 5.1% 8%, transparent 8.2%), repeating-linear-gradient(0deg, transparent 0 18px, rgba(250, 226, 255, 0.09) 19px 20px, transparent 21px 28px), linear-gradient(180deg, #625f9f 0%, #b485bd 44%, #e6a7c0 64%, #7168a5 100%);
  --wallpaper-ridge: linear-gradient(180deg, #655080, #3a385f);
  --wallpaper-foreground: linear-gradient(180deg, #695684, #41426f);
}

.desktop-wallpaper[data-wallpaper="forest"] {
  --wallpaper-sky: radial-gradient(circle at 55% 42%, rgba(240, 220, 153, 0.92) 0 4.8%, rgba(230, 203, 134, 0.2) 4.9% 7.5%, transparent 7.7%), linear-gradient(180deg, #274b56 0%, #5f8879 48%, #b6a77a 70%, #49685b 100%);
  --wallpaper-ridge: linear-gradient(180deg, #365a4d, #203e3e);
  --wallpaper-foreground: linear-gradient(180deg, #355a4b, #1f4142);
}

.desktop-overlay {
  background: linear-gradient(180deg, rgba(15, 35, 82, 0.06), rgba(13, 35, 71, 0.12));
  pointer-events: none;
}

.desktop-icons {
  top: 16px;
  left: 10px;
  right: 10px;
  bottom: 82px;
  width: auto;
  display: block;
  overflow: visible;
  scrollbar-width: none;
}

.desktop-icons::-webkit-scrollbar {
  display: none;
}

.desktop-icon {
  position: absolute;
  width: 98px;
  height: 94px;
  padding: 0.35rem;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #fff;
  text-shadow: 0 1px 3px rgba(20, 34, 70, 0.7);
}

.desktop-icon:hover,
.desktop-icon.selected {
  transform: none;
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(237, 244, 255, 0.24);
  box-shadow: 0 2px 12px rgba(28, 42, 81, 0.16);
}

.desktop-icon-graphic {
  width: 46px;
  height: 46px;
  margin-bottom: 0.2rem;
  border-radius: 11px;
  background: rgba(245, 249, 255, 0.88);
  box-shadow: 0 3px 10px rgba(20, 37, 75, 0.2);
}

.desktop-icon-graphic img {
  padding: 4px;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.desktop-icon-label {
  max-width: 96px;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.2;
  text-shadow: 0 1px 4px #18284c, 0 0 3px #18284c;
}

.desktop-icon-menu,
.start-menu,
.start-menu-submenu,
.taskbar-window-list,
.taskbar-context-menu,
.notifications-panel,
.volume-panel,
.calendar-popup,
.settings-panel {
  color: #23334c;
  background: rgba(246, 248, 252, 0.97);
  border: 1px solid rgba(94, 116, 148, 0.35);
  border-radius: 11px;
  box-shadow: 0 16px 42px rgba(21, 36, 68, 0.28);
  backdrop-filter: blur(18px);
}

.start-menu-submenu {
  color: #23334c;
  background: rgba(246, 248, 252, 0.97);
  border-color: rgba(94, 116, 148, 0.35);
}

.wallpaper-overlay {
  position: fixed;
  inset: 0;
  z-index: 1500;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(10, 22, 42, 0.54);
  backdrop-filter: blur(8px);
}

.wallpaper-dialog-panel {
  width: min(560px, calc(100vw - 2rem));
  max-height: min(90vh, 760px);
  overflow-y: auto;
  padding: 1.25rem;
  border: 1px solid rgba(94, 116, 148, 0.4);
  border-radius: 16px;
  background: rgba(249, 251, 255, 0.98);
  box-shadow: 0 24px 70px rgba(8, 20, 42, 0.4);
  color: #24334a;
}

.wallpaper-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.wallpaper-dialog-header h2 {
  margin: 0;
  color: #274c76;
  font-size: 1.1rem;
}

.wallpaper-dialog-header p {
  margin: 0.35rem 0 0;
  color: #687a90;
  font-size: 0.85rem;
}

.wallpaper-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid #d3dce8;
  border-radius: 8px;
  background: #fff;
  color: #3a516c;
  font-size: 1.3rem;
  line-height: 1;
}

.wallpaper-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.65rem;
}

.wallpaper-option {
  display: grid;
  gap: 0.45rem;
  padding: 0.45rem;
  border: 1px solid #d7e0eb;
  border-radius: 10px;
  background: #fff;
  color: #334760;
  font: inherit;
  font-size: 0.8rem;
  text-align: left;
}

.wallpaper-option:hover,
.wallpaper-option[aria-pressed="true"] {
  border-color: #5593cf;
  background: #f0f6fc;
  box-shadow: 0 0 0 2px rgba(85, 147, 207, 0.14);
}

.wallpaper-swatch {
  display: block;
  height: 58px;
  border-radius: 6px;
}

.wallpaper-swatch-sunset {
  background: linear-gradient(165deg, #3464b1 0%, #e09ac1 55%, #252f69 56%, #286eab);
}

.wallpaper-swatch-blue-hour {
  background: linear-gradient(165deg, #142b58, #9c9bd1 57%, #19294e 58%, #203e67);
}

.wallpaper-swatch-lavender {
  background: linear-gradient(165deg, #625f9f, #e6a7c0 58%, #3a385f 59%, #41426f);
}

.wallpaper-swatch-forest {
  background: linear-gradient(165deg, #274b56, #b6a77a 59%, #203e3e 60%, #1f4142);
}

.wallpaper-seed-form {
  display: grid;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e0e6ef;
}

.wallpaper-seed-form > label {
  color: #344b65;
  font-size: 0.85rem;
  font-weight: 650;
}

.wallpaper-seed-form > label span {
  color: #75859a;
  font-weight: 400;
}

.wallpaper-seed-controls {
  display: flex;
  gap: 0.5rem;
}

.wallpaper-seed-controls input {
  min-width: 0;
  flex: 1 1 auto;
  padding: 0.55rem 0.65rem;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #25364e;
}

.wallpaper-action-button,
.wallpaper-random-button,
.wallpaper-settings-button {
  padding: 0.55rem 0.75rem;
  border: 1px solid #c9d7e7;
  border-radius: 7px;
  background: #edf3fa;
  color: #315a84;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
}

.wallpaper-action-button:hover,
.wallpaper-random-button:hover,
.wallpaper-settings-button:hover {
  border-color: #9fbada;
  background: #e4eef8;
}

.wallpaper-random-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.wallpaper-auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #526780;
  font-size: 0.8rem;
}

.wallpaper-auto-toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: #477fbd;
}

.wallpaper-settings-button {
  width: 100%;
  margin-bottom: 0.8rem;
  text-align: left;
}

.os-window {
  min-width: 340px;
  min-height: 260px;
  border: 1px solid rgba(95, 118, 149, 0.46);
  border-radius: 12px;
  background: rgba(247, 249, 253, 0.98);
  box-shadow: 0 16px 44px rgba(17, 31, 59, 0.34), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
  color: #24334a;
}

.desktop .os-window:not(.hidden) {
  opacity: var(--desktop-window-opacity, 1);
}

.os-window.maximized {
  top: 12px !important;
  left: 12px !important;
  right: 12px !important;
  bottom: 78px !important;
  border-radius: 12px;
}

.window-titlebar {
  min-height: 42px;
  padding: 0 0.75rem 0 0.9rem;
  background: linear-gradient(180deg, #f8f9fc, #e9edf4);
  border-bottom: 1px solid #d5dce7;
  cursor: grab;
}

.desktop:not(.dark-theme) .settings-icon {
  color: #294e7a;
}

.desktop:not(.dark-theme) .taskbar-status {
  color: #2d4058;
}

.window-title {
  overflow: hidden;
  color: #274466;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 650;
  letter-spacing: 0;
  text-overflow: ellipsis;
  text-transform: none;
  text-shadow: none;
  white-space: nowrap;
}

.window-controls {
  gap: 0.2rem;
}

.window-btn {
  width: 29px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #45566d;
  font-size: 0.86rem;
}

.window-btn:hover {
  border-color: #c6d4e5;
  background: #dfe8f3;
}

.window-content {
  min-height: 0;
  padding: 1rem;
  color: #33445d;
}

.window-content h2,
.window-content h3 {
  color: #2d5888;
  font-family: var(--font-body);
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.window-content h2 {
  margin-bottom: 0.1rem;
  font-size: 1.45rem;
}

.window-content h3 {
  font-size: 1rem;
}

.window-content p,
.window-content li,
.window-content a,
.window-content span {
  color: #4c5f78;
}

.window-content p {
  line-height: 1.5;
}

.window-content input:not([type="checkbox"]):not([type="range"]):not([type="file"]),
.window-content select,
.window-content textarea {
  border: 1px solid #c8d2df;
  border-radius: 6px;
  background: #fff;
  color: #25364e;
  font: inherit;
}

.window-content input:focus-visible,
.window-content select:focus-visible,
.window-content textarea:focus-visible,
.start-menu input:focus-visible {
  outline: 2px solid #4b8ac9;
  outline-offset: 1px;
}

.window-content .btn,
.os-launch-btn {
  min-height: 36px;
  padding: 0.45rem 0.75rem;
  border: 1px solid #b7c7d9;
  border-radius: 6px;
  background: #f5f7fa;
  color: #284b70;
  font-family: var(--font-body);
  font-size: 0.86rem;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
  box-shadow: none;
}

.window-content .btn:hover,
.os-launch-btn:hover {
  transform: translateY(-1px);
  border-color: #90b3d9;
  background: #eaf2fb;
  box-shadow: 0 2px 7px rgba(59, 104, 153, 0.12);
}

.window-content .btn-primary {
  border-color: #3671b2;
  background: #477fbd;
  color: #fff;
}

.window-content .btn-primary:hover {
  border-color: #2f639f;
  background: #386fae;
  color: #fff;
}

.window-content .app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.window-content .app-card {
  min-height: 240px;
  border: 1px solid #dbe2eb;
  border-radius: 9px;
  background: #fff;
}

.window-content .app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  padding: 0.7rem;
  background: #f2f5f9;
}

.window-content .app-icon img {
  width: 64px;
  height: 64px;
  object-fit: contain;
}

.window-content .app-info {
  flex: 1;
  gap: 0.45rem;
  padding: 0.85rem;
}

.window-content .app-title {
  margin: 0;
  color: #2d5888;
  font-family: var(--font-body);
  font-size: 1rem;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: none;
}

.window-content .app-description {
  flex: 1;
  font-size: 0.84rem;
}

.taskbar {
  height: 68px;
  min-height: 68px;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.68);
  background: rgba(239, 243, 250, 0.84);
  box-shadow: 0 -5px 25px rgba(26, 47, 83, 0.12);
  backdrop-filter: blur(18px);
}

.taskbar-left {
  position: absolute;
  left: 12px;
  gap: 0.4rem;
}

.start-button {
  min-width: 42px;
  min-height: 42px;
  padding: 0.5rem 0.8rem;
  border: 1px solid #cad5e3;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.76);
  color: #294e7a;
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
  box-shadow: 0 2px 5px rgba(45, 68, 101, 0.1);
}

.start-button:hover,
.start-button[aria-expanded="true"] {
  background: #fff;
}

.start-menu {
  bottom: calc(100% + 10px);
  width: 310px;
  padding: 0.8rem;
}

.start-menu-title,
.submenu-title {
  color: #274c76;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

.start-menu-subtitle {
  color: #738096;
  font-size: 0.8rem;
}

.launcher-search-label,
.start-menu-section-title {
  color: #6b7c93;
  font-size: 0.73rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.launcher-search {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #fff;
  color: #25364e;
}

.start-menu-section {
  border-top-color: #e1e6ee;
}

.start-menu-item,
.submenu-back {
  min-height: 38px;
  margin-bottom: 0.2rem;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #334760;
  font-family: var(--font-body);
  font-size: 0.88rem;
}

.start-menu-item:hover,
.submenu-back:hover {
  transform: none;
  border-color: #d9e4f0;
  background: #edf3fa;
}

.start-menu-icon {
  width: 25px;
  height: 25px;
}

.taskbar-items {
  max-width: min(52vw, 610px);
  justify-content: center;
  gap: 0.35rem;
  padding: 0 0.4rem;
}

.taskbar-item {
  position: relative;
  flex: 0 0 46px;
  width: 46px;
  min-width: 46px;
  max-width: 46px;
  height: 46px;
  min-height: 46px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #315274;
  text-align: center;
}

.taskbar-item:hover,
.taskbar-item.active {
  border-color: #cfdaea;
  background: rgba(255, 255, 255, 0.88);
}

.taskbar-item:hover {
  transform: translateY(-3px);
}

.taskbar-item.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 5px;
  height: 3px;
  border-radius: 3px;
  background: #4b80ba;
  transform: translateX(-50%);
}

.taskbar-item-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.taskbar-item-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.taskbar-tools {
  position: absolute;
  right: 12px;
  width: auto;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 0.2rem;
  color: #34465e;
}

.taskbar-windows-toggle {
  position: absolute;
  right: 150px;
  color: #425a75;
}

.clock-button,
.notifications-button,
.volume-button,
.taskbar-network {
  color: #34465e;
}

.clock-button {
  min-height: 40px;
  padding: 0.35rem 0.5rem;
}

.taskbar-context-menu button,
.desktop-icon-menu button,
.submenu-items button,
.launcher-search-result {
  color: #334760;
}

.boot-screen {
  background: #043158;
}

.boot-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: min(520px, calc(100vw - 36px));
  padding: 1rem;
  border: 1px solid rgba(75, 213, 216, 0.18);
  border-radius: 14px;
  background: #043158;
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.3);
}

.boot-image {
  display: block;
  width: min(100%, 380px);
  max-height: min(42vh, 300px);
  margin: 0 auto 0.75rem;
  object-fit: contain;
  filter: none;
}

.boot-status {
  position: static;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.6rem;
  color: #c7f9fa;
  font-family: var(--font-body);
  font-size: 0.82rem;
  line-height: 1.3;
  text-shadow: none;
}

.boot-status-line,
.boot-progress-label {
  color: #c7f9fa;
  font-family: var(--font-body);
  letter-spacing: 0;
}

.boot-progress-bar {
  position: static;
  width: 100%;
  height: 10px;
  border: 1px solid rgba(126, 230, 235, 0.38);
  background: #092747;
}

.boot-progress-fill {
  background: linear-gradient(90deg, #43d4d1, #7fe7de);
  transition: width 0.12s linear;
}

.boot-version {
  position: static;
  align-self: flex-end;
  margin-top: 0.65rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #87dfe3;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  line-height: 1.2;
  text-shadow: none;
}

.os-window.countdown-alert {
  border-color: #e9ad60;
  box-shadow: 0 0 0 3px rgba(238, 172, 89, 0.2), 0 16px 44px rgba(17, 31, 59, 0.34);
}

.taskbar-clock,
.taskbar-clock .clock-button {
  color: #34465e;
  letter-spacing: 0;
}

.settings-panel,
.settings-panel label,
.settings-panel p,
.settings-panel span,
.settings-panel output,
.calendar-popup,
.calendar-header,
.calendar-day-label,
.calendar-day,
.notification-panel-title,
.notification-empty,
.notification-item,
.volume-panel,
.volume-panel label {
  color: #334760;
}

.calendar-day {
  border-color: #d8e0eb;
  background: #f3f6fa;
}

.calendar-day.today,
.calendar-day.selected {
  border-color: #a8c3e0;
  background: #e4eef8;
  color: #294d72;
}

.calendar-day.blank {
  background: transparent;
}

.settings-note {
  color: #687a90 !important;
}

.settings-option-disabled {
  opacity: 0.5;
}

.settings-option-disabled label,
.settings-option-disabled input:disabled {
  cursor: not-allowed;
}

.settings-panel input[type="range"],
.subamp-volume input {
  accent-color: #477fbd;
}

.calc-display,
.timer-display,
.ping-results,
.conversion-card,
.file-explorer-sidebar,
.info-card {
  border: 1px solid #d8e0eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
  color: #33445d;
}

.calc-display,
.timer-display {
  color: #294d72;
}

.calc-key {
  border: 1px solid #d2dce8;
  border-radius: 6px;
  background: #f4f6f9;
  color: #334a64;
}

.calc-key.operator {
  background: #eaf2fa;
  color: #356fa9;
}

.calc-key:hover {
  background: #e4eff9;
}

.form-row label,
.conversion-card h4,
.info-label {
  color: #526b87;
}

.conversion-list,
.info-value,
.ping-summary {
  color: #33445d;
}

.ping-summary {
  border-top-color: #dbe2eb;
}

.countdown-progress-bar {
  background: #e5ebf2;
}

.countdown-progress-fill {
  background: linear-gradient(90deg, #66b8d2, #4c82bf);
}

textarea#notesArea {
  min-height: 220px;
  border: 1px solid #c8d2df;
  border-radius: 7px;
  background: #fff;
  color: #25364e;
}

.system-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
}

.info-card {
  padding: 0.85rem;
}

.info-card.info-full {
  grid-column: 1 / -1;
}

.file-explorer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.file-explorer-breadcrumb {
  color: #365b82;
  font-weight: 650;
}

.file-explorer-body {
  display: grid;
  grid-template-columns: 155px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  gap: 0.75rem;
}

.file-explorer-sidebar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding: 0.55rem;
}

.file-explorer-folder {
  min-height: 36px;
  padding: 0.45rem 0.55rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #405a77;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.file-explorer-folder:hover,
.file-explorer-folder:focus-visible {
  border-color: #d9e4f0;
  background: #edf3fa;
}

.file-explorer-main {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(230px, 1.1fr);
  min-width: 0;
  min-height: 0;
  gap: 0.75rem;
}

.file-explorer-list {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.3rem;
  overflow: auto;
}

.file-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #3a506b;
}

.file-list-item:hover {
  border-color: #c9d9eb;
  background: #edf4fb;
}

.subamp-window-content {
  background: #f7f9fc;
}

.window-content .subamp-player {
  border: 1px solid #d6e0ea;
  outline: 0;
  background: #f5f8fc;
  box-shadow: none;
  color: #33445d;
}

.subamp-brandbar {
  border-bottom-color: #d6e0ea;
}

.subamp-wordmark,
.subamp-track-name {
  color: #2d5888;
  text-shadow: none;
}

.subamp-wordmark span {
  color: #4789b8;
}

.subamp-version,
.subamp-track-heading,
.subamp-station-row label,
.subamp-volume {
  color: #657c96;
}

.subamp-display {
  border-color: #d1dce8;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(81, 123, 165, 0.035) 4px), linear-gradient(135deg, #fff, #f2f6fa 70%);
  color: #4385a7;
  box-shadow: inset 0 0 14px rgba(59, 98, 145, 0.04);
}

.subamp-status {
  color: #64758a;
}

.subamp-spectrum {
  border-color: #d4dce7;
}

.subamp-spectrum span {
  background: #67b7cf;
  box-shadow: none;
}

.subamp-spectrum span:nth-child(3n) {
  background: #e8bd65;
}

.subamp-spectrum span:nth-child(5n) {
  background: #d993b8;
}

.subamp-transport > button,
.subamp-open {
  border: 1px solid #bccbda;
  border-radius: 6px;
  background: #f5f7fa;
  color: #355577;
  box-shadow: none;
}

.subamp-transport > button:not(:disabled):hover,
.subamp-open:not(:disabled):hover {
  background: #e7f0f8;
  color: #284b70;
  box-shadow: none;
}

.subamp-station-row {
  border-top-color: #d6e0ea;
}

.subamp-station-row select {
  border-color: #c8d2df;
  border-radius: 6px;
  background: #fff;
  color: #25364e;
}

.subamp-load {
  border-color: #b7c7d9;
  border-radius: 6px;
  background: #eaf2fa;
  color: #315c86;
}

.subamp-file-row {
  color: #667b94;
}

.pdf-editor {
  color: #33445d;
  background: #f7f9fc;
}

.pdf-editor-toolbar {
  border-color: #d5dfe9;
  background: #edf2f7;
}

.pdf-file-name,
.pdf-local-note,
.pdf-setting,
.pdf-editor-navigation,
.pdf-editor-status,
.pdf-empty-state,
.pdf-signature-dialog p {
  color: #526983;
}

.pdf-setting select,
.pdf-setting input {
  border-color: #c8d2df;
  border-radius: 6px;
  background: #fff;
  color: #25364e;
}

.pdf-editor .btn[aria-pressed="true"],
.pdf-editor .btn.is-active {
  border-color: #8db1d5;
  background: #e3eff9;
  box-shadow: none;
  color: #29577f;
}

.pdf-editor-status.error {
  color: #b42318;
}

.pdf-viewer {
  border-color: #d4dce7;
  background: #e8edf3;
}

.pdf-empty-icon {
  color: #4c83bb;
  text-shadow: none;
}

.pdf-save-label,
.pdf-save-dialog-content p {
  color: #485d75;
}

.pdf-save-dialog-content .pdf-save-filename {
  border-color: #c8d2df;
  background: #fff;
  color: #25364e;
}

.reset-dialog-overlay {
  background: rgba(33, 48, 71, 0.4);
}

.reset-dialog-window {
  border-color: #cbd5e1;
  background: #f8fafc;
  box-shadow: 0 18px 48px rgba(17, 31, 59, 0.25);
}

.reset-dialog-content {
  color: #33445d;
}

.pdf-signature-dialog {
  border-color: #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  box-shadow: 0 16px 42px rgba(17, 31, 59, 0.24);
}

.pdf-signature-dialog h3 {
  color: #2d5888;
}

.pdf-signature-modal {
  background: rgba(33, 48, 71, 0.56);
}

@media (max-width: 767px) {
  .file-explorer-body {
    grid-template-columns: 1fr;
  }

  .file-explorer-sidebar {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-explorer-main {
    grid-template-columns: minmax(0, 1fr);
  }

  .system-info-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .info-card.info-full {
    grid-column: auto;
  }

  .desktop-icons {
    top: 10px;
    left: 8px;
    right: 8px;
    bottom: 70px;
    width: auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(82px, 1fr));
    align-content: start;
    gap: 0.5rem;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .desktop-icon {
    position: static;
    width: auto;
    height: 84px;
  }

  .desktop-icon-graphic {
    width: 40px;
    height: 40px;
  }

  .desktop-icon-label {
    font-size: 0.68rem;
  }

  .taskbar {
    height: 60px;
    min-height: 60px;
    justify-content: center;
    padding: 0.3rem;
  }

  .taskbar-left {
    left: 4px;
  }

  .start-button {
    min-width: 38px;
    min-height: 38px;
    padding: 0.35rem;
  }

  .start-label {
    display: none;
  }

  .start-button::before {
    content: '▦';
    font-size: 1.2rem;
    line-height: 1;
  }

  .taskbar-items {
    max-width: calc(100vw - 198px);
    margin-left: 42px;
    overflow-x: auto;
  }

  .taskbar-tools {
    right: 4px;
    width: auto;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .taskbar-tools > :not(.taskbar-clock):not(.taskbar-settings) {
    display: none;
  }

  .taskbar-settings {
    display: inline-flex;
  }

  .settings-button {
    min-height: 38px;
    padding: 0.35rem 0.55rem;
    border: 1px solid #cad5e3;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.76);
    color: #294e7a;
  }

  .settings-panel {
    max-height: calc(100vh - 76px);
    overflow-y: auto;
  }

  .wallpaper-dialog-panel {
    padding: 1rem;
  }

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

  .wallpaper-seed-controls {
    flex-wrap: wrap;
  }

  .taskbar-windows-toggle {
    display: none;
  }

  .os-window.maximized {
    top: 6px !important;
    left: 6px !important;
    right: 6px !important;
    bottom: 66px !important;
  }
}

.desktop.dark-theme {
  color-scheme: dark;
}

.desktop.dark-theme .desktop-overlay {
  background: linear-gradient(180deg, rgba(4, 12, 28, 0.22), rgba(4, 12, 28, 0.38));
}

.desktop.dark-theme .os-window {
  border-color: #334b6d;
  background: #101f35;
  color: #d9e5f5;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

.desktop.dark-theme .window-titlebar {
  border-bottom-color: #304666;
  background: linear-gradient(180deg, #203957, #182b45);
  color: #e4edfb;
}

.desktop.dark-theme .settings-icon {
  color: #dce9f8;
}

.desktop.dark-theme .window-title,
.desktop.dark-theme .window-content,
.desktop.dark-theme .window-content p,
.desktop.dark-theme .window-content li,
.desktop.dark-theme .window-content span,
.desktop.dark-theme .window-content label {
  color: #d1deef;
}

.desktop.dark-theme .window-content h2,
.desktop.dark-theme .window-content h3,
.desktop.dark-theme .window-content .app-title {
  color: #a9ceff;
}

.desktop.dark-theme .window-content .app-card {
  border-color: #344d6d;
  background: #142842;
  color: #d8e5f4;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.desktop.dark-theme .window-content .app-icon {
  border-color: #3a5577;
  background: #203957;
}

.desktop.dark-theme .window-content .app-description,
.desktop.dark-theme .window-content .form-row label,
.desktop.dark-theme .window-content .info-label {
  color: #9fb3ce;
}

.desktop.dark-theme .window-content input:not([type="checkbox"]):not([type="range"]):not([type="file"]),
.desktop.dark-theme .window-content select,
.desktop.dark-theme .window-content textarea,
.desktop.dark-theme .wallpaper-seed-controls input,
.desktop.dark-theme .launcher-search {
  border-color: #3a5272;
  background: #0b192c;
  color: #e1ebf8;
}

.desktop.dark-theme .window-content input:focus-visible,
.desktop.dark-theme .window-content select:focus-visible,
.desktop.dark-theme .window-content textarea:focus-visible,
.desktop.dark-theme .launcher-search:focus-visible {
  outline-color: #6bb4ff;
  box-shadow: 0 0 0 3px rgba(80, 157, 232, 0.22);
}

.desktop.dark-theme .window-content .btn,
.desktop.dark-theme .window-controls button,
.desktop.dark-theme .settings-button,
.desktop.dark-theme .taskbar-windows-toggle,
.desktop.dark-theme .notifications-button,
.desktop.dark-theme .wallpaper-close,
.desktop.dark-theme .wallpaper-action-button,
.desktop.dark-theme .wallpaper-random-button,
.desktop.dark-theme .wallpaper-settings-button {
  border-color: #3b5578;
  background: #203754;
  color: #dce9f8;
}

.desktop.dark-theme .window-content .btn:hover,
.desktop.dark-theme .window-controls button:hover,
.desktop.dark-theme .settings-button:hover,
.desktop.dark-theme .taskbar-windows-toggle:hover,
.desktop.dark-theme .notifications-button:hover,
.desktop.dark-theme .wallpaper-close:hover,
.desktop.dark-theme .wallpaper-action-button:hover,
.desktop.dark-theme .wallpaper-random-button:hover,
.desktop.dark-theme .wallpaper-settings-button:hover {
  border-color: #638bb8;
  background: #29466a;
}

.desktop.dark-theme .desktop-icon-menu,
.desktop.dark-theme .start-menu,
.desktop.dark-theme .start-menu-submenu,
.desktop.dark-theme .taskbar-window-list,
.desktop.dark-theme .taskbar-context-menu,
.desktop.dark-theme .notifications-panel,
.desktop.dark-theme .volume-panel,
.desktop.dark-theme .calendar-popup,
.desktop.dark-theme .settings-panel,
.desktop.dark-theme .wallpaper-dialog-panel {
  border-color: #334b6d;
  background: rgba(15, 29, 49, 0.97);
  color: #d8e4f3;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.48);
}

.desktop.dark-theme .start-menu-title,
.desktop.dark-theme .start-menu-section-title,
.desktop.dark-theme .settings-title,
.desktop.dark-theme .wallpaper-dialog-header h2 {
  color: #a9ceff;
}

.desktop.dark-theme .start-menu-subtitle,
.desktop.dark-theme .settings-note,
.desktop.dark-theme .wallpaper-dialog-header p,
.desktop.dark-theme .wallpaper-seed-form > label span {
  color: #9aadc6 !important;
}

.desktop.dark-theme .start-menu-item,
.desktop.dark-theme .taskbar-window-list button,
.desktop.dark-theme .taskbar-context-menu button,
.desktop.dark-theme .desktop-icon-menu button,
.desktop.dark-theme .start-menu-submenu button,
.desktop.dark-theme .launcher-search-results button,
.desktop.dark-theme .notification-item,
.desktop.dark-theme .volume-panel label,
.desktop.dark-theme .calendar-popup,
.desktop.dark-theme .calendar-header,
.desktop.dark-theme .calendar-day-label,
.desktop.dark-theme .settings-panel label,
.desktop.dark-theme .settings-panel p,
.desktop.dark-theme .settings-panel span,
.desktop.dark-theme .settings-panel output,
.desktop.dark-theme .wallpaper-option,
.desktop.dark-theme .wallpaper-seed-form > label {
  color: #d0deef;
}

.desktop.dark-theme .start-menu-item:hover,
.desktop.dark-theme .taskbar-window-list button:hover,
.desktop.dark-theme .taskbar-context-menu button:hover,
.desktop.dark-theme .desktop-icon-menu button:hover,
.desktop.dark-theme .start-menu-submenu button:hover,
.desktop.dark-theme .launcher-search-results button:hover,
.desktop.dark-theme .wallpaper-option:hover,
.desktop.dark-theme .wallpaper-option[aria-pressed="true"] {
  border-color: #577ca6;
  background: #1b3452;
  color: #edf5ff;
}

.desktop.dark-theme .start-menu-section,
.desktop.dark-theme .wallpaper-seed-form {
  border-color: #2d425e;
}

.desktop.dark-theme .wallpaper-option {
  border-color: #344d6d;
  background: #142842;
  color: #d0deef;
}

.desktop.dark-theme .taskbar {
  border-top-color: rgba(109, 143, 183, 0.38);
  background: rgba(9, 21, 38, 0.92);
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.22);
}

.desktop.dark-theme .taskbar-item {
  color: #cbd9eb;
}

.desktop.dark-theme .taskbar-item:hover,
.desktop.dark-theme .taskbar-item.active {
  background: rgba(83, 127, 180, 0.26);
}

.desktop.dark-theme .taskbar-item-label,
.desktop.dark-theme .taskbar-clock,
.desktop.dark-theme .taskbar-clock .clock-button,
.desktop.dark-theme .taskbar-network {
  color: #c4d3e6;
}

.desktop.dark-theme .volume-button {
  color: #fff;
}

.desktop.dark-theme .calc-display,
.desktop.dark-theme .timer-display,
.desktop.dark-theme .ping-results,
.desktop.dark-theme .conversion-card,
.desktop.dark-theme .file-explorer-sidebar,
.desktop.dark-theme .info-card,
.desktop.dark-theme .calc-key {
  border-color: #334b6d;
  background: #142842;
  color: #d2e0f1;
}

.desktop.dark-theme .calc-key:hover {
  background: #203b5b;
}

.desktop.dark-theme .window-content .subamp-player {
  border-color: #334b6d;
  background: linear-gradient(145deg, #142842, #0b192c);
  color: #dce8f6;
}

.desktop.dark-theme .subamp-version,
.desktop.dark-theme .subamp-track-heading,
.desktop.dark-theme .subamp-track-name,
.desktop.dark-theme .subamp-status,
.desktop.dark-theme .subamp-file-row,
.desktop.dark-theme .subamp-station-row label {
  color: #c3d3e7;
}

.desktop.dark-theme .subamp-display {
  border-color: #2f4968;
  background: #0b192c;
}

.desktop.dark-theme .subamp-station-row select,
.desktop.dark-theme .subamp-load,
.desktop.dark-theme .subamp-transport > button,
.desktop.dark-theme .subamp-open {
  border-color: #3b5578;
  background: #203754;
  color: #dce9f8;
}

.desktop.dark-theme .pdf-editor {
  background: #101f35;
  color: #d9e5f5;
}

.desktop.dark-theme .pdf-editor-toolbar {
  border-color: #334b6d;
  background: #182b45;
}

.desktop.dark-theme .pdf-file-name,
.desktop.dark-theme .pdf-local-note,
.desktop.dark-theme .pdf-setting,
.desktop.dark-theme .pdf-editor-navigation,
.desktop.dark-theme .pdf-editor-status,
.desktop.dark-theme .pdf-empty-state,
.desktop.dark-theme .pdf-signature-dialog p,
.desktop.dark-theme .pdf-save-label,
.desktop.dark-theme .pdf-save-dialog-content p {
  color: #c3d3e7;
}

.desktop.dark-theme .pdf-setting select,
.desktop.dark-theme .pdf-setting input,
.desktop.dark-theme .pdf-save-dialog-content .pdf-save-filename {
  border-color: #3a5272;
  background: #0b192c;
  color: #e1ebf8;
}

.desktop.dark-theme .pdf-editor .btn[aria-pressed="true"],
.desktop.dark-theme .pdf-editor .btn.is-active {
  border-color: #527da9;
  background: #24466b;
  color: #e5f1ff;
}

.desktop.dark-theme .pdf-viewer {
  border-color: #334b6d;
  background: #0a1728;
}

.desktop.dark-theme .pdf-signature-dialog,
.desktop.dark-theme .reset-dialog-window {
  border-color: #334b6d;
  background: #142842;
  color: #d9e5f5;
}

.desktop.dark-theme .pdf-signature-dialog h3 {
  color: #a9ceff;
}

.desktop.dark-theme .calendar-day {
  border-color: #334b6d;
  background: #192e49;
  color: #cbd9eb;
}

.desktop.dark-theme .calendar-day.today,
.desktop.dark-theme .calendar-day.selected {
  border-color: #527da9;
  background: #24466b;
  color: #e5f1ff;
}

.desktop.dark-theme .calendar-day.blank {
  background: transparent;
}

.desktop.dark-theme .settings-panel input[type="checkbox"],
.desktop.dark-theme .settings-panel input[type="range"] {
  accent-color: #65aef2;
}

.desktop.dark-theme .wallpaper-formula,
.desktop.dark-theme .window-content .spreadsheet-formula,
.desktop.dark-theme .window-content .spreadsheet-cell {
  color: #e1ebf8;
}
.desktop-wallpaper {
  --wallpaper-orb-x: 72%;
  --wallpaper-orb-y: 53%;
  --wallpaper-orb-color: rgb(255 222 151);
}

.desktop-wallpaper[data-wallpaper="blue-hour"] {
  --wallpaper-orb-x: 27%;
  --wallpaper-orb-y: 39%;
  --wallpaper-orb-color: rgb(215 233 255);
}

.desktop-wallpaper[data-wallpaper="lavender"] {
  --wallpaper-orb-x: 75%;
  --wallpaper-orb-y: 45%;
  --wallpaper-orb-color: rgb(255 222 211);
}

.desktop-wallpaper[data-wallpaper="forest"] {
  --wallpaper-orb-x: 55%;
  --wallpaper-orb-y: 42%;
  --wallpaper-orb-color: rgb(240 220 153);
}

.wallpaper-orb {
  position: absolute;
  top: var(--wallpaper-orb-y);
  left: var(--wallpaper-orb-x);
  width: clamp(12rem, 24vw, 28rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--wallpaper-orb-color) 0 20%, transparent 72%);
  filter: blur(12px);
  opacity: 0.42;
  pointer-events: none;
  animation: wallpaper-orb-pulse 6s ease-in-out infinite alternate;
}

@keyframes wallpaper-orb-pulse {
  from {
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0.38;
  }

  to {
    transform: translate(-50%, -50%) scale(1.35);
    opacity: 0.58;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wallpaper-orb {
    animation: none;
  }
}

.word-processor.window-content {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dictionary-app.window-content {
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.dictionary-search {
  flex: none;
}

.dictionary-search-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dictionary-search-row input {
  flex: 1;
  min-width: 0;
}

.dictionary-search-row .btn {
  flex: 0 0 auto;
  width: auto;
}

.dictionary-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
}

.dictionary-entry {
  margin-bottom: 0.65rem;
  padding: 0.8rem;
  border: 1px solid #d8e0eb;
  border-radius: 7px;
  background: #fff;
}

.dictionary-entry h3,
.dictionary-entry h4,
.dictionary-entry p {
  margin-top: 0;
}

.dictionary-entry h3 {
  margin-bottom: 0.2rem;
}

.dictionary-entry h4 {
  margin-bottom: 0.25rem;
  text-transform: capitalize;
}

.dictionary-entry ol {
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
}

.dictionary-entry li + li {
  margin-top: 0.4rem;
}

.dictionary-example,
.dictionary-attribution,
.dictionary-status {
  color: #526176;
  font-size: 0.9rem;
}

.dictionary-example {
  margin: 0.25rem 0 0;
  font-style: italic;
}

.dictionary-attribution {
  flex: none;
  margin: 0;
}

.desktop.dark-theme .dictionary-entry {
  border-color: #334b6d;
  background: #142842;
}

.desktop.dark-theme .dictionary-example,
.desktop.dark-theme .dictionary-attribution,
.desktop.dark-theme .dictionary-status {
  color: #aebfd5;
}

.word-processor-toolbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex: none;
  overflow-x: auto;
}

.window-content .word-processor-toolbar > * {
  align-self: center;
  margin-top: 0;
  margin-bottom: 0;
}

.window-content .word-processor-toolbar .btn {
  align-self: center;
  margin: 0;
}

.word-processor-toolbar .btn {
  flex: 0 0 auto;
  width: auto;
  white-space: nowrap;
}

.word-processor-toolbar .word-processor-file-button {
  width: auto;
  min-width: 0;
  min-height: 30px;
  padding: 0.3rem 0.55rem;
  font-size: 0.82rem;
  line-height: 1;
}

.word-processor-toolbar .word-format-button {
  min-width: 30px;
  min-height: 30px;
  padding: 0.2rem 0.4rem;
  font-size: 0.86rem;
  line-height: 1;
}

.word-processor-name {
  flex: 0 1 230px;
  min-width: 130px;
  padding: 0.45rem 0.6rem;
}

.word-processor-toolbar select {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0.35rem 0.5rem;
}

.word-processor-font {
  width: 150px;
}

.word-processor-export-format {
  width: 78px;
}

.word-processor-color-input {
  flex: 0 0 38px;
  width: 38px;
  height: 32px;
  padding: 2px;
}

.word-processor-toolbar .word-processor-icon-button {
  display: inline-flex;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
}

.word-processor-icon-button svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.word-processor-table-control {
  position: static;
  flex: 0 0 auto;
}

.word-processor-table-menu {
  position: fixed;
  inset: auto;
  z-index: 10000;
  width: min(320px, calc(100vw - 16px));
  margin: 0;
  padding: 0.85rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #26364b;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.24);
}

.word-processor-table-menu[popover] {
  position: fixed;
  inset: auto;
}

.word-processor-table-options {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 1.2fr);
  align-items: center;
  gap: 0.45rem 0.6rem;
}

.word-processor-table-options label {
  font-size: 0.82rem;
}

.word-processor-table-options input,
.word-processor-table-options select {
  width: 100%;
  min-width: 0;
  min-height: 32px;
}

.word-processor-table-options input[type="color"] {
  padding: 2px;
}

.word-processor-table-hint {
  margin: 0.85rem 0 0.25rem;
  color: #526176;
  font-size: 0.82rem;
}

.word-processor-table-size {
  display: block;
  min-height: 1.35em;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.word-processor-table-grid {
  display: grid;
  grid-template-columns: repeat(8, 24px);
  gap: 3px;
  width: max-content;
  max-width: 100%;
}

.word-processor-table-cell {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #94a3b8;
  border-radius: 3px;
  background: #f8fafc;
  cursor: pointer;
}

.word-processor-table-cell:hover,
.word-processor-table-cell:focus-visible,
.word-processor-table-cell.is-preview {
  border-color: #3978c5;
  background: #cfe3ff;
}

.word-processor-page {
  flex: 1;
  min-height: 180px;
  padding: 2.5rem clamp(1rem, 8vw, 5rem);
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  color: #1e293b;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  font: 1rem/1.65 Georgia, 'Times New Roman', serif;
}

.word-processor-page:focus {
  border-color: #4c83ca;
  box-shadow: 0 0 0 2px rgba(76, 131, 202, 0.16);
}

.word-processor-page h1,
.word-processor-page h2 {
  margin: 0.6em 0;
  line-height: 1.2;
}

.word-processor-page table {
  max-width: 100%;
  table-layout: fixed;
}

.word-processor-page td,
.word-processor-page th {
  overflow-wrap: anywhere;
}

.word-processor-page .word-processor-image-wrapper {
  position: relative;
  display: inline-block;
  max-width: 100%;
  margin: 0.15em 0.25em;
  vertical-align: middle;
  line-height: 0;
  cursor: grab;
}

.word-processor-page .word-processor-image-wrapper:active {
  cursor: grabbing;
}

.word-processor-page .word-processor-image-wrapper.is-selected {
  outline: 2px solid #3978c5;
  outline-offset: 2px;
}

.word-processor-page .word-processor-image {
  display: block;
  max-width: 100%;
}

.word-processor-page .word-processor-image-resize {
  position: absolute;
  right: -7px;
  bottom: -7px;
  display: none;
  width: 14px;
  min-width: 0;
  height: 14px;
  min-height: 0;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 3px;
  background: #3978c5;
  cursor: nwse-resize;
  touch-action: none;
}

.word-processor-page .word-processor-image-wrapper.is-selected .word-processor-image-resize,
.word-processor-page .word-processor-image-wrapper:focus-within .word-processor-image-resize {
  display: block;
}

.word-processor-note,
.word-processor-status,
.file-explorer-explanation {
  flex: none;
  margin: 0;
  color: #526176;
  font-size: 0.88rem;
}

.word-processor-status {
  margin-bottom: -0.45rem;
}

.file-explorer-status {
  flex: none;
  margin: 0;
  color: #526176;
  font-size: 0.85rem;
}

.file-picker-button {
  width: auto;
  cursor: pointer;
}

.file-explorer .file-explorer-list {
  display: flex;
  flex: 1;
  min-height: 70px;
  flex-direction: column;
  gap: 0.25rem;
  overflow: auto;
}

.file-explorer .file-list-item {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 1px solid #d4dce8;
  border-radius: 5px;
  color: #26364b;
  background: #fff;
}

.file-explorer .file-list-item:hover {
  border-color: #6b9ed8;
  background: #eff6ff;
}

.file-explorer .file-list-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.desktop.dark-theme .file-explorer .file-list-name {
  color: #1e293b;
}

.desktop.dark-theme .word-processor-table-menu {
  border-color: #425b7a;
  color: #e3edf9;
  background: #142842;
}

.desktop.dark-theme .word-processor-table-hint {
  color: #aebfd5;
}

.desktop.dark-theme .word-processor-table-cell {
  border-color: #7188a5;
  background: #1b3554;
}

.desktop.dark-theme .word-processor-table-cell:hover,
.desktop.dark-theme .word-processor-table-cell:focus-visible,
.desktop.dark-theme .word-processor-table-cell.is-preview {
  border-color: #83b7f3;
  background: #315b88;
}

.file-explorer .file-list-open {
  width: auto;
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 767px) {
  .word-processor-toolbar {
    flex-wrap: wrap;
  }

  .dictionary-search-row {
    align-items: stretch;
  }

  .word-processor-name {
    flex-basis: 100%;
  }

  .word-processor-page {
    padding: 1rem;
  }
}
