@font-face {
  font-family: "EB Garamond";
  src: url("../assets/fonts/EB_Garamond/EBGaramond-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "EB Garamond";
  src: url("../assets/fonts/EB_Garamond/EBGaramond-Italic-VariableFont_wght.ttf") format("truetype");
  font-weight: 400 800;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "La Garpia";
  src: url("../assets/fonts/la-garpia/La%20Garpia.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --accent: #0067c0;
  --accent-hover: #1a7ad1;
  --taskbar-h: 48px;
  --win-radius: 8px;
  --title-h: 32px;
  --font: "Segoe UI Variable", "Segoe UI", system-ui, sans-serif;
  --shadow-win: 0 8px 32px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12);
  --mica: rgba(243, 243, 243, 0.72);
  --lock-photo: url("../assets/lock.jpg");
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: var(--font);
  background: #000;
  color: #111;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

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

/* user-select:auto still computes to none under a none parent — that
   blocks native video seek / time / volume. Force text on controls. */
input,
textarea,
select,
video {
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}

button {
  cursor: pointer;
}

img,
video {
  max-width: 100%;
}

.ico {
  display: inline-flex;
  width: 1em;
  height: 1em;
  line-height: 0;
}

.ico svg {
  width: 100%;
  height: 100%;
}

/* ---------- boot ---------- */
#boot {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #000;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 48px;
  transition: opacity 0.5s ease;
}

#boot.hide {
  opacity: 0;
  pointer-events: none;
}

.boot-logo {
  width: 52px;
  height: 52px;
}

.boot-logo .ico {
  width: 52px;
  height: 52px;
}

.boot-dots {
  display: flex;
  gap: 8px;
}

.boot-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  animation: boot-dot 1s ease-in-out infinite;
}

.boot-dots span:nth-child(2) {
  animation-delay: 0.12s;
}

.boot-dots span:nth-child(3) {
  animation-delay: 0.24s;
}

.boot-dots span:nth-child(4) {
  animation-delay: 0.36s;
}

.boot-dots span:nth-child(5) {
  animation-delay: 0.48s;
}

@keyframes boot-dot {
  0%,
  80%,
  100% {
    opacity: 0.2;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-6px);
  }
}

/* ---------- lock ---------- */
#lock {
  position: fixed;
  inset: 0;
  z-index: 900;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 8vh 7vw 10vh;
  cursor: pointer;
  overflow: hidden;
}

#lock.hide {
  pointer-events: none;
  animation: lock-up 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes lock-up {
  to {
    transform: translateY(-100%);
    opacity: 0.4;
  }
}

.lock-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.62) 100%),
    var(--lock-photo) center / cover no-repeat;
  transform: scale(1.04);
}

.lock-time {
  position: relative;
  font-weight: 300;
  font-size: clamp(64px, 10vw, 108px);
  letter-spacing: -2px;
  line-height: 0.9;
}

.lock-date {
  position: relative;
  margin-top: 10px;
  font-size: clamp(18px, 2.4vw, 28px);
  font-weight: 400;
}

.lock-invite {
  position: relative;
  margin-top: 28px;
  font-family: "La Garpia", "EB Garamond", cursive;
  font-size: clamp(28px, 4vw, 44px);
}

.lock-wedding {
  position: relative;
  margin-top: 8px;
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.88;
}

.lock-hint {
  position: relative;
  margin-top: 18px;
  opacity: 0.8;
  font-size: 14px;
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

.lock-tray {
  position: absolute;
  right: 22px;
  bottom: 18px;
  display: flex;
  gap: 14px;
  font-size: 18px;
  opacity: 0.9;
}

/* ---------- desktop ---------- */
#os {
  position: fixed;
  inset: 0;
}

.wallpaper {
  position: absolute;
  inset: 0;
  background: #4ea0d1 url("../assets/wallpaper.jpg") center / cover no-repeat;
}

.wallpaper.bloom {
  background:
    radial-gradient(ellipse 70% 55% at 18% 38%, rgba(255, 176, 168, 0.62), transparent 55%),
    radial-gradient(ellipse 55% 45% at 82% 18%, rgba(164, 196, 255, 0.75), transparent 55%),
    radial-gradient(ellipse 50% 50% at 72% 82%, rgba(206, 176, 255, 0.5), transparent 55%),
    radial-gradient(ellipse 40% 40% at 8% 86%, rgba(255, 224, 186, 0.45), transparent 50%),
    linear-gradient(180deg, #c9d8ec 0%, #e7eef6 42%, #f3e6df 100%);
}

#desktop-icons {
  position: absolute;
  inset: 0 var(--taskbar-h) 0 0;
  padding: 8px;
  touch-action: manipulation;
}

.desk-icon {
  position: absolute;
  appearance: none;
  background: transparent;
  width: 92px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 4px 8px;
  border-radius: 4px;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  font-size: 12px;
  text-align: center;
  cursor: default;
  border: 1px solid transparent;
}

.desk-icon .ico {
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}

.desk-thumb {
  position: relative;
  width: 48px;
  height: 40px;
}

.desk-thumb img {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
}

.desk-thumb .play-badge {
  position: absolute;
  right: 2px;
  bottom: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #c42b1c;
  color: #fff;
  font-size: 8px;
  display: grid;
  place-items: center;
  line-height: 1;
  text-shadow: none;
}

.desk-icon span.name {
  line-height: 1.2;
  max-width: 88px;
  overflow-wrap: break-word;
  word-break: normal;
}

.desk-icon.selected {
  background: rgba(0, 103, 192, 0.38);
  border-color: rgba(255, 255, 255, 0.35);
}

.desk-icon:hover:not(.selected) {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- windows ---------- */
#windows {
  position: absolute;
  inset: 0 0 var(--taskbar-h) 0;
  pointer-events: none;
}

.window {
  position: absolute;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  min-width: 280px;
  min-height: 180px;
  background: #fff;
  border-radius: var(--win-radius);
  box-shadow: var(--shadow-win);
  overflow: hidden;
  isolation: isolate;
}

.window.inactive {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
}

.window.maximized {
  inset: 0 !important;
  width: auto !important;
  height: auto !important;
  border-radius: 0;
}

.window.minimized {
  opacity: 0;
  pointer-events: none;
  transform: translateY(40px) scale(0.92);
}

.window.dark {
  background: #1c1c1c;
  color: #f3f3f3;
}

.titlebar {
  position: relative;
  z-index: 4;
  height: var(--title-h);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  padding-left: 10px;
  background: #fff;
  cursor: grab;
  touch-action: manipulation;
}

.window.dark .titlebar {
  background: #1c1c1c;
  color: #fff;
}

.window.inactive .titlebar {
  color: #6b6b6b;
}

.titlebar .titlebar-icon {
  width: 16px;
  height: 16px;
  margin-right: 8px;
}

.titlebar .titlebar-icon .ico {
  width: 16px;
  height: 16px;
}

.titlebar-title {
  font-size: 12px;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.caption-btns {
  position: relative;
  z-index: 5;
  display: flex;
  height: 100%;
}

.caption-btn {
  width: 46px;
  height: 100%;
  min-width: 44px;
  border: 0;
  background: transparent;
  color: inherit;
  display: grid;
  place-items: center;
  pointer-events: auto;
}

.caption-btn .ico {
  width: 11px;
  height: 11px;
}

.caption-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

.window.dark .caption-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

.caption-btn.close:hover {
  background: #c42b1c;
  color: #fff;
}

.window-body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: inherit;
}

.window-body > * {
  flex: 1;
  min-height: 0;
  width: 100%;
}

.resize-handle {
  position: absolute;
  z-index: 6;
  right: 0;
  bottom: 0;
  width: 22px;
  height: 22px;
  cursor: nwse-resize;
  pointer-events: auto;
  touch-action: none;
}

.window.maximized .resize-handle {
  display: none;
}

/* ---------- taskbar ---------- */
#taskbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--taskbar-h);
  touch-action: manipulation;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 10px;
  background: var(--mica);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border-top: 1px solid rgba(255, 255, 255, 0.4);
  z-index: 80;
}

.tb-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tb-widgets {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: #1a1a1a;
}

.tb-widgets:hover {
  background: rgba(255, 255, 255, 0.45);
}

.tb-center {
  display: flex;
  gap: 4px;
  align-items: center;
}

.tb-btn {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  display: grid;
  place-items: center;
  font-size: 22px;
  color: #1a1a1a;
  position: relative;
}

.tb-btn:hover,
.tb-btn.open-fly {
  background: rgba(255, 255, 255, 0.55);
}

.tb-btn.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  transform: translateX(-50%);
}

.tb-btn.focused::after {
  width: 16px;
}

.tb-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 2px;
}

.tb-tray {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #1a1a1a;
}

.tb-tray:hover {
  background: rgba(255, 255, 255, 0.45);
}

.tb-tray .ico {
  width: 16px;
  height: 16px;
  margin: 0 4px;
}

.tb-clock {
  padding: 2px 10px;
  border-radius: 6px;
  text-align: right;
  line-height: 1.15;
  font-size: 12px;
}

.tb-clock:hover {
  background: rgba(255, 255, 255, 0.45);
}

.tb-clock small {
  display: block;
  font-size: 11px;
  opacity: 0.8;
}

.show-desktop {
  width: 6px;
  height: 40px;
  margin-left: 6px;
  border: 0;
  background: transparent;
  border-left: 1px solid rgba(0, 0, 0, 0.18);
}

/* ---------- flyouts ---------- */
.flyout {
  position: absolute;
  bottom: calc(var(--taskbar-h) + 10px);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(40px) saturate(1.5);
  -webkit-backdrop-filter: blur(40px) saturate(1.5);
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.6);
  z-index: 90;
  display: none;
  overflow: hidden;
}

.flyout.show {
  display: block;
  animation: fly 0.16s ease-out;
}

@keyframes fly {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

#start-menu {
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 20px));
  padding: 20px 20px 12px;
}

#start-menu.show {
  transform: translateX(-50%);
}

.start-search {
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 20px;
  padding: 10px 16px;
  background: #fff;
  outline: none;
  font-size: 14px;
}

.start-label {
  margin: 18px 4px 10px;
  font-size: 13px;
  font-weight: 600;
}

.pinned {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.pinned-app,
.rec-row {
  border: 0;
  background: transparent;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  font-size: 12px;
  color: #1a1a1a;
}

.pinned-app:hover,
.rec-row:hover {
  background: rgba(255, 255, 255, 0.7);
}

.pinned-app .ico {
  width: 32px;
  height: 32px;
}

.recommended {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rec-row {
  flex-direction: row;
  justify-content: flex-start;
  gap: 12px;
  padding: 8px 10px;
  width: 100%;
  text-align: left;
}

.rec-row .ico {
  width: 28px;
  height: 28px;
}

.start-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  padding-top: 10px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.start-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.start-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #c9a227, #e8c96a);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 600;
}

.icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font-size: 18px;
}

.icon-btn:hover {
  background: rgba(0, 0, 0, 0.06);
}

#search-panel {
  left: 50%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 20px));
  min-height: 280px;
  padding: 16px;
}

#search-panel.show {
  transform: translateX(-50%);
}

.search-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid #ddd;
  padding: 10px 4px 12px;
  font-size: 16px;
  outline: none;
  background: transparent;
}

.search-results {
  margin-top: 10px;
}

#cal-panel {
  right: 12px;
  width: 300px;
  padding: 16px;
}

.cal-head {
  font-size: 13px;
  color: #555;
}

.cal-big {
  font-size: 42px;
  font-weight: 300;
  margin: 4px 0 12px;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
  font-size: 12px;
}

.cal-grid span {
  padding: 6px 0;
  border-radius: 50%;
}

.cal-grid .dow {
  color: #777;
  font-size: 11px;
}

.cal-grid .today {
  background: var(--accent);
  color: #fff;
}

.cal-grid .wedding {
  outline: 2px solid #c9a227;
  outline-offset: -2px;
}

.cal-note {
  margin-top: 14px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(201, 162, 39, 0.15);
  font-size: 13px;
}

#quick-panel {
  right: 12px;
  width: 360px;
  padding: 14px;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.quick-tile {
  border: 0;
  border-radius: 8px;
  padding: 14px 10px;
  background: rgba(255, 255, 255, 0.7);
  text-align: left;
  font-size: 12px;
}

.quick-tile.on {
  background: var(--accent);
  color: #fff;
}

/* ---------- explorer ---------- */
.explorer {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  height: 100%;
  background: #f3f3f3;
  font-size: 13px;
}

.ex-toolbar {
  display: flex;
  gap: 6px;
  padding: 6px 8px;
  background: #fff;
  border-bottom: 1px solid #e6e6e6;
}

.ex-toolbar button {
  border: 0;
  background: transparent;
  border-radius: 4px;
  padding: 4px 8px;
}

.ex-toolbar button:hover {
  background: #eee;
}

.ex-addr {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px;
  background: #fff;
  border: 1px solid #d0d0d0;
  border-radius: 4px;
  padding: 4px 8px;
}

.crumb {
  border: 0;
  background: transparent;
  padding: 2px 4px;
  border-radius: 4px;
}

.crumb:hover {
  background: #eee;
}

.ex-main {
  display: grid;
  grid-template-columns: 200px 1fr;
  min-height: 0;
}

.ex-side {
  padding: 8px;
  overflow: auto;
}

.ex-side button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 8px;
  border-radius: 4px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.ex-side button:hover,
.ex-side button.active {
  background: #e8e8e8;
}

.ex-files {
  margin: 0 8px 8px 0;
  background: #fff;
  border-radius: 6px;
  overflow: auto;
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  align-content: start;
  gap: 6px;
}

.file-tile {
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  text-align: center;
  color: #222;
  content-visibility: auto;
  contain-intrinsic-size: 72px 80px;
}

.file-tile .ico {
  width: 40px;
  height: 40px;
}

.file-thumb {
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 3px;
  background: #ddd;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.file-tile:hover {
  background: #f4f8fc;
}

.file-tile.selected {
  background: #cfe8fc;
  border-color: #99c9e8;
}

.ex-status {
  padding: 4px 12px;
  font-size: 12px;
  color: #555;
  border-top: 1px solid #e6e6e6;
  background: #f3f3f3;
}

.empty-folder {
  grid-column: 1 / -1;
  color: #777;
  text-align: center;
  padding: 40px 12px;
}

/* ---------- photos ---------- */
.photos {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #111;
  color: #fff;
}

.photos-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  position: relative;
}

.photos-stage img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
}

.photos-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 20px;
}

.photos-nav.prev {
  left: 12px;
}

.photos-nav.next {
  right: 12px;
}

.photos-film {
  display: flex;
  gap: 8px;
  padding: 10px;
  overflow-x: auto;
  background: #1a1a1a;
}

.photos-film img {
  height: 56px;
  width: 80px;
  object-fit: cover;
  border-radius: 4px;
  opacity: 0.55;
  cursor: pointer;
}

.photos-film img.on {
  opacity: 1;
  outline: 2px solid #fff;
}

.photos-caption {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
}

/* ---------- player ---------- */
.player {
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  background: #000;
  color: #fff;
}

.player-stage {
  min-height: 0;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.player-stage video,
.film-slide {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  pointer-events: auto;
  user-select: text;
  -webkit-user-select: text;
  touch-action: auto;
}

.film-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1s ease, transform 8s linear;
}

.film-slide.on {
  opacity: 1;
  transform: scale(1);
}

.film-title {
  position: relative;
  z-index: 2;
  text-align: center;
  text-shadow: 0 2px 16px #000;
  pointer-events: none;
}

.film-title h2 {
  font-family: "La Garpia", "EB Garamond", cursive;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 400;
  margin: 0;
}

.film-title p {
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-size: 12px;
  opacity: 0.85;
}

.player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 10px;
  background: #161616;
  z-index: 3;
  pointer-events: auto;
  touch-action: auto;
}

.player-bar button {
  border: 0;
  background: #2a2a2a;
  color: #fff;
  min-width: 44px;
  height: 32px;
  border-radius: 4px;
  font-size: 12px;
  letter-spacing: 0.02em;
  pointer-events: auto;
}

.player-bar button.player-play {
  min-width: 40px;
  font-size: 13px;
}

.player-bar button:hover {
  background: #3a3a3a;
}

.player-time {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  min-width: 36px;
  color: #ddd;
}

.scrub {
  flex: 1;
  appearance: none;
  -webkit-appearance: none;
  height: 28px;
  margin: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
  touch-action: pan-x;
  user-select: text;
  -webkit-user-select: text;
}

.scrub::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 99px;
  background: #4a4a4a;
}

.scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px #0006;
  cursor: grab;
}

.scrub::-moz-range-track {
  height: 8px;
  border-radius: 99px;
  background: #4a4a4a;
}

.scrub::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: #fff;
  cursor: grab;
}

/* ---------- edge ---------- */
.edge {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: #fff;
}

.edge-tabs {
  display: flex;
  background: #e8e8e8;
  padding: 6px 8px 0;
  gap: 4px;
}

.edge-tab {
  background: #fff;
  border-radius: 8px 8px 0 0;
  padding: 7px 16px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.edge-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.edge-nav button {
  border: 0;
  background: #f3f3f3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.edge-addr {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 16px;
  padding: 6px 12px;
  font-size: 12px;
  background: #f7f7f7;
  color: #444;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.edge iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
  display: block;
}

.edge-frame {
  min-height: 0;
  position: relative;
}

.edge-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

/* ---------- notepad ---------- */
.notepad {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.np-menu {
  display: flex;
  gap: 2px;
  padding: 2px 6px;
  background: #f0f0f0;
  font-size: 12px;
  border-bottom: 1px solid #ddd;
}

.np-menu span {
  padding: 4px 8px;
}

.notepad .np-body {
  overflow: auto;
  width: 100%;
  height: 100%;
  padding: 12px 14px;
  font: 14px/1.5 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
  user-select: text;
}

.notepad .np-body strong {
  font-weight: 700;
}

/* ---------- camera ---------- */
.camera {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #0b0b0b;
  color: #fff;
}

.cam-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  font-size: 13px;
  background: #161616;
}

.cam-view {
  min-height: 0;
  position: relative;
  background: #000;
}

.cam-view video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cam-msg {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: #ccc;
  pointer-events: none;
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #e81123;
  display: inline-block;
  margin-right: 8px;
  animation: rec 1s steps(1) infinite;
}

@keyframes rec {
  50% {
    opacity: 0.2;
  }
}

.cam-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  padding: 16px;
  background: #161616;
}

.shutter {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 4px solid #fff;
  background: #e81123;
}

.shutter.idle {
  background: #fff;
}

.shutter.idle.photo {
  background: #fff;
}

.ghost-btn {
  border: 1px solid #555;
  background: transparent;
  color: #fff;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
}

/* ---------- auth ---------- */
.modal-layer {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  z-index: 120;
  pointer-events: auto;
}

.auth-card,
.props-card {
  width: min(420px, calc(100vw - 28px));
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-win);
  overflow: hidden;
}

.auth-head {
  background: var(--accent);
  color: #fff;
  padding: 12px 16px;
  font-size: 13px;
}

.auth-body {
  padding: 18px 16px 16px;
}

.auth-body p {
  margin: 0 0 12px;
  font-size: 13px;
}

.auth-body input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #adadad;
  border-radius: 4px;
  outline: none;
}

.auth-body input:focus {
  border-color: var(--accent);
}

.auth-error {
  color: #c42b1c;
  font-size: 12px;
  min-height: 16px;
  margin: 8px 0 0;
}

.auth-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 16px 16px;
}

.auth-actions button {
  min-width: 80px;
  padding: 6px 12px;
  border: 1px solid #adadad;
  background: #fff;
  border-radius: 4px;
}

.auth-actions .primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  25% {
    transform: translateX(-6px);
  }
  50% {
    transform: translateX(6px);
  }
  75% {
    transform: translateX(-4px);
  }
}

/* ---------- context / toasts ---------- */
#ctx-menu {
  position: fixed;
  z-index: 200;
  min-width: 196px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-radius: 8px;
  padding: 6px;
  box-shadow: var(--shadow-win);
  display: none;
  font-size: 13px;
}

#ctx-menu.show {
  display: block;
}

#ctx-menu button {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 7px 10px;
  border-radius: 4px;
}

#ctx-menu button:hover {
  background: #eee;
}

#ctx-menu hr {
  border: 0;
  border-top: 1px solid #e5e5e5;
  margin: 4px 0;
}

#toasts {
  position: absolute;
  right: 16px;
  bottom: calc(var(--taskbar-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 150;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  width: min(320px, calc(100vw - 32px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow-win);
  font-size: 13px;
  animation: fly 0.2s ease;
}

.toast b {
  display: block;
  margin-bottom: 4px;
}

/* ---------- misc ---------- */
.locked-state {
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 24px;
  color: #555;
}

.locked-state .ico {
  width: 48px;
  height: 48px;
  margin-bottom: 8px;
}

.rec-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rec-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid #eee;
  border-radius: 8px;
  text-align: left;
  background: #fff;
}

.rec-item video {
  width: 100%;
  border-radius: 8px;
  margin-top: 8px;
  background: #000;
}

@media (max-width: 780px) {
  #desktop-icons {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 4px 2px calc(var(--taskbar-h) + env(safe-area-inset-bottom, 0px) + 8px);
    inset: 0 auto 0 0;
    width: 108px;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .desk-icon {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100px;
    padding: 3px 2px 2px;
    gap: 2px;
  }

  .desk-icon .ico {
    width: 40px;
    height: 40px;
  }

  .desk-thumb,
  .desk-thumb img {
    width: 40px;
    height: 28px;
  }

  .desk-icon span.name {
    font-size: 11px;
    max-width: 96px;
  }

  .window {
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0;
    min-width: 0;
  }

  .titlebar {
    height: calc(var(--title-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
  }

  .caption-btn {
    width: 52px;
  }

  .resize-handle {
    display: none;
  }

  .tb-left,
  .show-desktop {
    display: none;
  }

  #taskbar {
    grid-template-columns: 1fr auto;
    padding-bottom: env(safe-area-inset-bottom);
    height: calc(var(--taskbar-h) + env(safe-area-inset-bottom));
  }

  .tb-center {
    justify-content: flex-start;
  }

  .pinned {
    grid-template-columns: repeat(4, 1fr);
  }

  .ex-main {
    grid-template-columns: 1fr;
  }

  .ex-side {
    display: none;
  }

  .lock-tray {
    display: none;
  }

  .lock-wedding {
    letter-spacing: 0.06em;
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
