/* =====================================================================
   LentilsOS — Frutiger Aero stylesheet
   glossy glass, aqua buttons, bubbles, deep-blue sky and green meadows
   ===================================================================== */

:root {
  --font: "Hind", "Segoe UI", "Frutiger", "Helvetica Neue", Arial, sans-serif;
  --font-display: "Exo 2", "Hind", "Segoe UI", sans-serif;

  --sky-deep: #0a3fb0;
  --sky: #2b8cff;
  --aqua: #63d8ff;
  --leaf: #7ddc2b;
  --leaf-dark: #2f8f0e;
  --white-glass: rgba(255, 255, 255, 0.55);

  --glass-bg: linear-gradient(180deg,
      rgba(255, 255, 255, 0.80) 0%,
      rgba(230, 244, 255, 0.60) 48%,
      rgba(210, 236, 255, 0.50) 52%,
      rgba(225, 242, 255, 0.66) 100%);
  --glass-border: 1px solid rgba(255, 255, 255, 0.75);
  --glass-shadow: 0 12px 40px rgba(0, 35, 110, 0.35),
                  0 1px 0 rgba(255, 255, 255, 0.9) inset,
                  0 -1px 0 rgba(0, 60, 150, 0.15) inset;

  --text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65), 0 0 10px rgba(0, 60, 150, 0.55);
}

* { box-sizing: border-box; }

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

img { -webkit-user-drag: none; }

/* ---------- screens ---------- */
.screen {
  position: fixed;
  inset: 0;
  overflow: hidden;
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.screen.hidden { display: none !important; }
.screen.leaving {
  opacity: 0;
  transform: scale(1.08);
  pointer-events: none;
}
.screen.entering { animation: screen-in 1.1s cubic-bezier(.2,.8,.2,1) both; }
@keyframes screen-in {
  from { opacity: 0; transform: scale(0.96); filter: blur(12px) brightness(1.6); }
  to   { opacity: 1; transform: scale(1);    filter: blur(0)    brightness(1); }
}

/* ---------- wallpaper ---------- */
.wallpaper {
  position: absolute;
  inset: -2%;
  background: url("../assets/wallpaper.jpg") center / cover no-repeat, var(--sky-deep);
}
#login .wallpaper { background-image: url("../assets/wallpaper-login.jpg"); filter: saturate(1.1); }
@keyframes wall-drift {
  from { transform: scale(1)    translate(0, 0); }
  to   { transform: scale(1.04) translate(-0.6%, 0.4%); }
}

/* ---------- lens flare ---------- */
.flare {
  position: absolute;
  top: -8vh; right: -6vw;
  width: 46vw; max-width: 720px;
  opacity: 0.75;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: flare-pulse 7s ease-in-out infinite;
}
@keyframes flare-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 0.85; } }

/* ---------- bubbles ---------- */
.bubbles { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.bubble {
  position: absolute;
  bottom: -20vh;
  opacity: 0;
  will-change: transform;
  animation: bubble-rise linear infinite;
}
@keyframes bubble-rise {
  0%   { transform: translate(0, 0) scale(0.7);   opacity: 0; }
  10%  { opacity: 0.85; }
  50%  { transform: translate(4vw, -60vh) scale(1); }
  90%  { opacity: 0.7; }
  100% { transform: translate(-3vw, -125vh) scale(1.05); opacity: 0; }
}

/* ---------- glass ---------- */
.glass {
  background: var(--glass-bg);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
  border-radius: 20px;
  position: relative;
}
/* blur only on the login card: everywhere else backdrop-filter made the whole desktop repaint on every frame */
.login-card { backdrop-filter: blur(14px) saturate(1.4); -webkit-backdrop-filter: blur(14px) saturate(1.4); }
.glass::before { /* glossy reflection band */
  content: "";
  position: absolute;
  left: 2px; right: 2px; top: 1px;
  height: 46%;
  border-radius: inherit;
  border-bottom-left-radius: 40% 60%;
  border-bottom-right-radius: 40% 60%;
  background: linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.05));
  pointer-events: none;
}

/* ---------- aero text (glossy logo) ---------- */
.aero-text {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(180deg, #ffffff 0%, #e6f7ff 45%, #9fd9ff 50%, #ffffff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 30, 100, 0.6)) drop-shadow(0 0 12px rgba(120, 210, 255, 0.55));
}
.aero-text span {
  background: linear-gradient(180deg, #e9ffb8 0%, #b6f556 45%, #5fc41a 50%, #d7ff9a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- aqua button ---------- */
.aqua-btn {
  position: relative;
  border: 1px solid #0b4ea8;
  border-radius: 999px;
  padding: 0.55em 1.4em;
  font: 600 1rem var(--font);
  color: #fff;
  text-shadow: 0 -1px 0 rgba(0, 40, 120, 0.7);
  background: linear-gradient(180deg, #a9ecff 0%, #3aa8ff 45%, #0f7de8 50%, #0b5fd6 100%);
  box-shadow: 0 4px 12px rgba(0, 60, 160, 0.45), 0 1px 0 rgba(255,255,255,0.8) inset;
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
}
.aqua-btn::before {
  content: "";
  position: absolute;
  left: 6%; right: 6%; top: 6%;
  height: 44%;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.15));
  pointer-events: none;
}
.aqua-btn:hover  { filter: brightness(1.12) saturate(1.15); box-shadow: 0 6px 18px rgba(20, 120, 255, 0.6), 0 1px 0 rgba(255,255,255,0.9) inset; }
.aqua-btn:active { transform: translateY(1px) scale(0.98); filter: brightness(0.95); }

/* ---------- clock ---------- */
.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.05;
  text-shadow: var(--text-shadow);
}
.clock-time { font-size: 1.7rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.clock-date { font-size: 0.85rem; text-transform: capitalize; opacity: 0.95; }

/* =====================================================================
   BOOT
   ===================================================================== */
#boot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  background: radial-gradient(ellipse at 50% 30%, #2a7cff 0%, #0a3fb0 55%, #051f66 100%);
  cursor: pointer;
}
.boot-logo { display: flex; align-items: center; gap: 18px; animation: float 4s ease-in-out infinite; }
.boot-orb-wrap { position: relative; width: 96px; height: 96px; filter: drop-shadow(0 6px 16px rgba(0,0,0,0.45)); }
.boot-orb { position: absolute; inset: -6%; width: 112%; height: 112%; object-fit: contain; }
.boot-lentils { position: absolute; inset: 6%; width: 88%; height: 88%; object-fit: cover; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,0.5) inset; }
.boot-logo h1 { font-size: 4.2rem; margin: 0; }
.boot-bar {
  width: 260px; height: 12px;
  border-radius: 999px;
  background: rgba(0, 20, 80, 0.45);
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 4px 10px rgba(0,0,0,0.35);
  overflow: hidden;
}
.boot-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, #9be7ff, #ffffff, #7ddc2b, #9be7ff);
  background-size: 200% 100%;
  animation: boot-progress 1.9s ease-in-out infinite, shimmer 1s linear infinite;
  box-shadow: 0 0 14px rgba(160, 240, 255, 0.9);
}
@keyframes boot-progress { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }
@keyframes shimmer { from { background-position: 0 0; } to { background-position: 200% 0; } }
.boot-hint { margin: 0; opacity: 0.8; font-size: 0.95rem; text-shadow: var(--text-shadow); }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* =====================================================================
   LOGIN
   ===================================================================== */
.login-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 26px 34px;
  z-index: 3;
}
.brand { font-size: 2.2rem; }
.brand.small { font-size: 1.35rem; }

.login-card {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(400px, 90vw);
  padding: 36px 34px 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 4;
  animation: card-in 1s cubic-bezier(.2,.9,.2,1) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translate(-50%, -42%) scale(0.92); }
  to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.avatar-ring {
  width: 128px; height: 128px;
  border-radius: 50%;
  padding: 6px;
  background: linear-gradient(180deg, #ffffff, #bfe9ff 50%, #4fb3ff 51%, #cfefff);
  box-shadow: 0 8px 24px rgba(0, 50, 150, 0.45), 0 0 0 4px rgba(255,255,255,0.35);
  position: relative;
  margin-bottom: 14px;
}
.avatar-ring::after { /* gloss */
  content: "";
  position: absolute;
  left: 14%; right: 14%; top: 5%;
  height: 40%;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0));
  pointer-events: none;
}
.avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: radial-gradient(circle at 40% 35%, #dff6ff, #3f9cff 70%, #0b4ea8);
}
.user-name {
  margin: 0;
  font-size: 1.9rem;
  font-weight: 600;
  color: #fff;
  text-shadow: var(--text-shadow);
}
.user-sub { margin: 2px 0 18px; opacity: 0.9; text-shadow: var(--text-shadow); }
.field { display: flex; gap: 8px; width: 100%; }
.field input {
  flex: 1;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(20, 80, 170, 0.55);
  padding: 0 18px;
  font: 500 1rem var(--font);
  color: #0b3a80;
  background: linear-gradient(180deg, #ffffff 0%, #eef8ff 100%);
  box-shadow: 0 2px 6px rgba(0, 40, 120, 0.25) inset, 0 1px 0 rgba(255,255,255,0.8);
  outline: none;
  transition: box-shadow 0.2s ease;
}
.field input::placeholder { color: #6d94c9; }
.field input:focus { box-shadow: 0 2px 6px rgba(0,40,120,0.25) inset, 0 0 0 4px rgba(120, 210, 255, 0.55); }
.aqua-btn.go { width: 44px; height: 44px; padding: 0; font-size: 1.2rem; display: grid; place-items: center; }
.hint { margin: 14px 0 6px; font-size: 0.8rem; opacity: 0.85; text-shadow: var(--text-shadow); min-height: 1.2em; }
.hint.error { color: #ffd0c6; opacity: 1; font-weight: 600; }
.login-links { display: flex; gap: 22px; margin-top: 8px; }
.login-links a {
  color: #fff;
  font-size: 0.85rem;
  text-decoration: none;
  text-shadow: var(--text-shadow);
  border-bottom: 1px solid rgba(255,255,255,0.4);
}
.login-links a:hover { border-bottom-color: #fff; }

.login-card.shake { animation: shake 0.45s ease; }
@keyframes shake {
  0%,100% { transform: translate(-50%,-50%); }
  20% { transform: translate(-52%,-50%); } 40% { transform: translate(-48%,-50%); }
  60% { transform: translate(-51%,-50%); } 80% { transform: translate(-49%,-50%); }
}

/* grass in the foreground of the login screen */
.grass {
  position: absolute;
  left: -2%; right: -2%; bottom: -2%;
  width: 104%;
  max-height: 30vh;
  object-fit: cover;
  object-position: top;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 -6px 12px rgba(0, 40, 0, 0.35));
  animation: grass-sway 7s ease-in-out infinite;
  transform-origin: bottom center;
}
@keyframes grass-sway { 0%,100% { transform: skewX(0deg); } 50% { transform: skewX(1.2deg); } }
.sparkles {
  position: absolute;
  left: 5%; top: 8%;
  width: 60%;
  pointer-events: none;
  opacity: 0.8;
  animation: twinkle 4s ease-in-out infinite;
}
@keyframes twinkle { 0%,100% { opacity: 0.35; } 50% { opacity: 0.95; } }

/* =====================================================================
   DESKTOP
   ===================================================================== */
.leaves {
  position: absolute;
  top: -1vh;
  pointer-events: none;
  z-index: 2;
  will-change: transform;
  transform-origin: top center;
  animation: leaves-sway 9s ease-in-out infinite;
}
.leaves-tl { left: -1vw; width: 30vw; max-width: 520px; }
.leaves-tr { right: -2vw; width: 20vw; max-width: 360px; opacity: 0.9; animation-delay: -4s; }
@keyframes leaves-sway { 0%,100% { transform: rotate(0deg); } 50% { transform: rotate(1.4deg); } }
.leaves-float {
  position: absolute;
  top: 12%; left: 55%;
  width: 34vw; max-width: 560px;
  pointer-events: none;
  z-index: 3;
  opacity: 0.9;
  animation: leaves-drift 28s ease-in-out infinite;
}
@keyframes leaves-drift {
  0%,100% { transform: translate(0, 0) rotate(0deg); }
  25%     { transform: translate(-4vw, 3vh) rotate(-3deg); }
  50%     { transform: translate(2vw, 6vh) rotate(2deg); }
  75%     { transform: translate(5vw, 2vh) rotate(-1deg); }
}
.topbar {
  position: absolute;
  top: 14px; left: 14px; right: 14px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 22px;
  z-index: 20;
}
.topbar-center { font-size: 0.85rem; opacity: 0.9; text-shadow: var(--text-shadow); }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar .clock-time { font-size: 1.25rem; }
.topbar .clock-date { font-size: 0.72rem; }
.mini-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.85);
  box-shadow: 0 3px 8px rgba(0, 40, 120, 0.4);
  background: radial-gradient(circle at 40% 35%, #dff6ff, #3f9cff 70%, #0b4ea8);
}
.tb-btn {
  padding: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.8);
  background: linear-gradient(180deg, rgba(255,255,255,0.9), rgba(200,235,255,0.5));
  color: #0b4ea8;
  font-size: 1rem;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,40,120,0.3);
}
.tb-btn img { width: 22px; height: 22px; object-fit: contain; display: block; margin: auto; }
.tb-btn:hover { filter: brightness(1.08); }

/* ---------- globe ---------- */
.globe {
  position: absolute;
  inset: 90px 0 96px;
  z-index: 5;
  cursor: grab;
  touch-action: none;
}
.globe.dragging { cursor: grabbing; }
.globe { contain: layout; }
.sphere {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  overflow: hidden;
  pointer-events: none;
  z-index: 1;
  box-shadow: 0 30px 60px rgba(0, 30, 120, 0.35), 0 0 0 1px rgba(255,255,255,0.35);
  contain: strict;
}
.sphere .water {
  position: absolute; inset: 0;
  background: radial-gradient(circle at 32% 28%, rgba(220,245,255,0.95) 0%, rgba(120,205,255,0.85) 22%, rgba(40,150,240,0.8) 50%, rgba(10,70,190,0.9) 100%);
}
.sphere .fish {
  position: absolute;
  top: 40%; left: 50%;
  width: 30%;
  margin-left: -15%;
  will-change: transform;
  animation: swim 22s ease-in-out infinite;
}
.sphere .fish-b { top: 62%; width: 20%; margin-left: -10%; animation: swim-b 17s ease-in-out infinite; animation-delay: -6s; }
@keyframes swim {
  0%   { transform: translate(-95%, 0) scaleX(1); }
  46%  { transform: translate(95%, -18%) scaleX(1); }
  50%  { transform: translate(95%, -18%) scaleX(-1); }
  96%  { transform: translate(-95%, 0) scaleX(-1); }
  100% { transform: translate(-95%, 0) scaleX(1); }
}
@keyframes swim-b {
  0%   { transform: translate(120%, 0) scaleX(-1); }
  46%  { transform: translate(-120%, 14%) scaleX(-1); }
  50%  { transform: translate(-120%, 14%) scaleX(1); }
  96%  { transform: translate(120%, 0) scaleX(1); }
  100% { transform: translate(120%, 0) scaleX(-1); }
}
.sphere .sbubble { position: absolute; bottom: -10%; width: 7%; opacity: 0; will-change: transform; animation: sbubble 9s linear infinite; }
.sphere .b1 { left: 30%; animation-delay: 0s; }
.sphere .b2 { left: 55%; width: 5%; animation-delay: -3s; animation-duration: 7s; }
.sphere .b3 { left: 70%; width: 9%; animation-delay: -6s; animation-duration: 11s; }
@keyframes sbubble { 0% { transform: translateY(0); opacity: 0; } 15% { opacity: 0.8; } 100% { transform: translateY(-1100%); opacity: 0; } }
.sphere .glass-shell { position: absolute; inset: -13%; width: 126%; height: 126%; opacity: 0.9; }
body.lite .sphere .fish, body.lite .sphere .sbubble { animation-play-state: paused; }
body.lite .bubbles, body.lite .leaves-float, body.lite .sparkles, body.lite .flare { display: none; }
.icons { position: absolute; inset: 0; z-index: 3; }

.icon {
  position: absolute;
  left: 0; top: 0;
  width: 124px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  will-change: transform, opacity;
  cursor: pointer;
  transform-origin: center center;
  -webkit-tap-highlight-color: transparent;
}
.icon .tile {
  width: 96px; height: 96px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.12) 55%, rgba(255,255,255,0.28));
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 8px 22px rgba(0, 35, 110, 0.4), 0 1px 0 rgba(255,255,255,0.9) inset;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.icon .tile::before {
  content: "";
  position: absolute;
  left: 8%; right: 8%; top: 4%;
  height: 42%;
  border-radius: 18px 18px 40% 40%;
  background: linear-gradient(180deg, rgba(255,255,255,0.8), rgba(255,255,255,0.05));
  pointer-events: none;
}
.icon .tile img {
  width: 72px; height: 72px;
  object-fit: contain;
  position: relative;
  z-index: 1;
}
/* app icons live inside glossy glass bubbles */
.icon.type-app .tile {
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.85), rgba(180,230,255,0.45) 45%, rgba(60,150,255,0.35) 75%, rgba(20,90,200,0.45));
  border: 1px solid rgba(255,255,255,0.85);
  box-shadow: 0 10px 24px rgba(0, 35, 110, 0.4), 0 0 0 1px rgba(120,200,255,0.4), 0 2px 0 rgba(255,255,255,0.9) inset, 0 -6px 14px rgba(0,60,180,0.25) inset;
}
.icon.type-app .tile::before { display: none; }
.icon.type-app .tile::after {
  content: "";
  position: absolute; inset: -3%;
  background: url("../assets/ui/bubble.png") center / 100% 100% no-repeat;
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
}
.icon.type-app .tile img { width: 68px; height: 68px; }
.icon.type-folder .tile,
.icon.type-file .tile,
.icon.type-system .tile {
  background: linear-gradient(180deg, rgba(255,255,255,0.35), rgba(255,255,255,0.05) 55%, rgba(255,255,255,0.15));
  border-radius: 50%;
}
.icon .label {
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.15;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9), 0 0 6px rgba(0, 40, 120, 0.9);
  max-width: 124px;
  word-break: break-word;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(0, 30, 90, 0.38);
}
.icon .hebrew {
  position: absolute;
  bottom: 6px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.82rem;
  font-weight: 700;
  color: #0b3a80;
  background: linear-gradient(180deg, #fff, #dbefff);
  border: 1px solid rgba(20,80,170,0.4);
  border-radius: 6px;
  padding: 0 6px;
  z-index: 2;
  direction: rtl;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,40,120,0.3);
}
.icon:hover .tile {
  transform: scale(1.12);
  box-shadow: 0 12px 30px rgba(0, 40, 140, 0.5), 0 0 22px rgba(140, 220, 255, 0.9), 0 1px 0 rgba(255,255,255,1) inset;
}
.icon.bounce .tile { animation: bounce 0.5s cubic-bezier(.3,1.6,.5,1); }
@keyframes bounce {
  0% { transform: scale(1); } 40% { transform: scale(0.82); } 100% { transform: scale(1.12); }
}
.icon.pop { animation: pop 0.9s cubic-bezier(.2,1.4,.3,1) both; }
@keyframes pop { from { opacity: 0; } to { opacity: 1; } }

/* ---------- desktop files column ---------- */
.desk-files {
  position: absolute; left: 22px; top: 92px; bottom: 100px;
  width: 236px;
  display: flex; flex-direction: column; gap: 8px; align-content: flex-start;
  flex-wrap: wrap; overflow: hidden;
  z-index: 6;
}
.dfile { width: 104px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; padding: 4px 0; border-radius: 12px; }
.dfile:hover { background: rgba(255,255,255,0.18); }
.dfile .dtile { width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,0.9), rgba(180,230,255,0.5) 50%, rgba(60,150,255,0.35)); border: 1px solid rgba(255,255,255,0.85); box-shadow: 0 6px 14px rgba(0,35,110,0.35), 0 1px 0 rgba(255,255,255,0.9) inset; }
.dfile .dtile img { width: 44px; height: 44px; object-fit: contain; }
.dfile.photo .dtile img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.dfile .label { font-size: 0.78rem; font-weight: 700; text-align: center; line-height: 1.1; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,0.9), 0 0 6px rgba(0,40,120,0.9); background: rgba(0,30,90,0.38); border-radius: 6px; padding: 1px 6px; max-width: 104px; word-break: break-word; }
.dfile .label .rename { width: 96px; font: 600 0.78rem var(--font); color: #0b3a80; text-align: center; border: 1px solid #3a8fe0; border-radius: 6px; padding: 1px 3px; outline: none; background: #fff; }

/* ---------- dock ---------- */
.dock {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  height: 72px;
  min-width: 420px;
  padding: 0 14px 0 10px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 20;
}
.start-orb {
  width: 58px; height: 58px;
  border: none;
  background: transparent;
  position: relative;
  cursor: pointer;
  padding: 0;
  filter: drop-shadow(0 4px 10px rgba(0,40,120,0.5));
  transition: transform 0.15s ease, filter 0.2s ease;
}
.start-orb img { width: 100%; height: 100%; object-fit: contain; }
.start-orb span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 1.5rem var(--font-display);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,30,100,0.8);
}
.start-orb:hover { transform: scale(1.08); filter: drop-shadow(0 4px 14px rgba(120,220,255,0.9)); }
.dock-apps { display: flex; gap: 8px; }
.dock-app {
  width: 52px; height: 52px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.6);
  background: linear-gradient(180deg, rgba(255,255,255,0.5), rgba(255,255,255,0.1));
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dock-app img { width: 36px; height: 36px; object-fit: contain; filter: drop-shadow(0 2px 4px rgba(0,20,80,0.4)); }
.dock-app:hover { transform: translateY(-6px) scale(1.1); box-shadow: 0 10px 20px rgba(0,40,140,0.4), 0 0 14px rgba(140,220,255,0.8); }
.dock-tray {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.5);
  text-shadow: var(--text-shadow);
}
.tray-clock { font-size: 1rem; font-weight: 600; }

/* ---------- windows ---------- */
#windows { position: absolute; inset: 0; pointer-events: none; z-index: 30; }
.win {
  position: absolute;
  width: 520px; height: 380px;
  min-width: 260px; min-height: 160px;
  pointer-events: auto;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(240,250,255,0.97), rgba(220,239,255,0.95));
  border: 1px solid rgba(255,255,255,0.95);
  box-shadow: 0 20px 60px rgba(0, 30, 110, 0.45), 0 0 0 1px rgba(0,60,150,0.25);
  color: #0b3a80;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: win-in 0.35s cubic-bezier(.2,1.2,.3,1) both;
}
.win.resizable { resize: both; }
.win.active { box-shadow: 0 26px 70px rgba(0, 30, 110, 0.55), 0 0 0 1px rgba(0,60,150,0.35), 0 0 30px rgba(120,210,255,0.35); }
.win.minimized { display: none; }
.win.maxed { left: 8px !important; top: 80px !important; width: calc(100% - 16px) !important; height: calc(100% - 176px) !important; resize: none; }
@keyframes win-in { from { opacity: 0; transform: scale(0.85) translateY(20px); } to { opacity: 1; transform: none; } }
.win.closing { animation: win-out 0.22s ease both; pointer-events: none; }
@keyframes win-out { to { opacity: 0; transform: scale(0.9) translateY(10px); } }
.win-title {
  height: 40px; flex: none;
  display: flex; align-items: center; gap: 10px;
  padding: 0 10px 0 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(200,230,255,0.6) 50%, rgba(170,215,255,0.5) 51%, rgba(210,236,255,0.8));
  border-bottom: 1px solid rgba(0,60,150,0.25);
  cursor: move; user-select: none;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255,255,255,0.9);
}
.win-title img { width: 22px; height: 22px; object-fit: contain; }
.win-name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.win-controls { margin-left: auto; display: flex; gap: 6px; }
.win-controls button {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1px solid rgba(0,40,120,0.45);
  cursor: pointer; font-size: 0.7rem; line-height: 1; padding: 0;
  color: #fff; text-shadow: 0 -1px 0 rgba(0,0,0,0.4);
  box-shadow: 0 1px 0 rgba(255,255,255,0.8) inset, 0 2px 4px rgba(0,0,0,0.25);
}
.win-controls button:hover { filter: brightness(1.15); }
.win-controls .min { background: linear-gradient(180deg, #9be7ff, #1e90ff); }
.win-controls .max { background: linear-gradient(180deg, #c8ff8a, #4fb31a); }
.win-controls .close { background: linear-gradient(180deg, #ffb3a3, #e0432a); }
.win-body { flex: 1; min-height: 0; overflow: auto; position: relative; }
.win-error { padding: 20px; color: #a00; }
.placeholder { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; }
.placeholder img { width: 96px; height: 96px; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0,20,80,0.35)); }
.placeholder h3 { margin: 6px 0 0; font-size: 1.4rem; }
.placeholder p { margin: 0; opacity: 0.8; }

/* ---------- dialogs ---------- */
.dlg-back {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(0, 20, 80, 0.25);
  display: grid; place-items: center;
  animation: fade-in 0.2s ease both;
}
.dlg-back.closing { animation: fade-out 0.2s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { to { opacity: 0; } }
.dlg {
  width: min(420px, 92vw);
  padding: 18px 20px 16px;
  color: #0b3a80;
  background: linear-gradient(180deg, rgba(240,250,255,0.95), rgba(210,236,255,0.92));
  animation: win-in 0.3s cubic-bezier(.2,1.2,.3,1) both;
}
.dlg::before { display: none; }
.dlg-title { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; margin-bottom: 10px; }
.dlg-title img { width: 32px; height: 32px; object-fit: contain; }
.dlg-body { font-size: 0.95rem; line-height: 1.4; }
.dlg-body p { margin: 0 0 8px; }
.dlg-input, .app-input {
  width: 100%; height: 38px;
  border-radius: 10px; border: 1px solid rgba(20, 80, 170, 0.5);
  padding: 0 12px; font: 500 1rem var(--font); color: #0b3a80;
  background: linear-gradient(180deg, #ffffff, #eef8ff);
  box-shadow: 0 2px 6px rgba(0, 40, 120, 0.2) inset;
  outline: none;
}
.dlg-input:focus, .app-input:focus { box-shadow: 0 2px 6px rgba(0,40,120,0.2) inset, 0 0 0 3px rgba(120,210,255,0.6); }
.dlg-buttons { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
.aqua-btn.secondary { background: linear-gradient(180deg, #ffffff 0%, #dbeeff 45%, #bcdcf7 50%, #d9ecff 100%); color: #0b3a80; text-shadow: 0 1px 0 rgba(255,255,255,0.8); border-color: #7fa9d8; }
.aqua-btn.green { background: linear-gradient(180deg, #e2ffb0 0%, #8fe040 45%, #4fb31a 50%, #3f9a12 100%); border-color: #2f7a0c; }
.aqua-btn.red { background: linear-gradient(180deg, #ffd0c6 0%, #ff7a5c 45%, #e0432a 50%, #c2321c 100%); border-color: #8f2312; }
.aqua-btn.small { padding: 0.35em 1em; font-size: 0.85rem; }
.aqua-btn:disabled { opacity: 0.5; cursor: default; filter: none; transform: none; }

/* ---------- context menu ---------- */
.ctx {
  position: absolute; z-index: 70;
  min-width: 190px; padding: 6px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(245,251,255,0.96), rgba(220,238,255,0.94));
  animation: fade-in 0.12s ease both;
}
.ctx::before { display: none; }
.ctx-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 7px 10px; border: 0; border-radius: 8px;
  background: transparent; color: #0b3a80; font: 500 0.9rem var(--font); text-align: left; cursor: pointer;
}
.ctx-item img, .ctx-item i { width: 20px; height: 20px; object-fit: contain; display: inline-block; }
.ctx-item:hover { background: linear-gradient(180deg, #8fd0ff, #3aa0ff); color: #fff; text-shadow: 0 1px 1px rgba(0,30,90,0.5); }
.ctx-item.disabled { opacity: 0.45; cursor: default; }
.ctx-item.disabled:hover { background: transparent; color: #0b3a80; text-shadow: none; }
.ctx-sep { height: 1px; margin: 4px 8px; background: rgba(0,60,150,0.2); }

/* ---------- inline rename on the globe ---------- */
.icon .label .rename {
  width: 120px; font: 600 0.8rem var(--font); color: #0b3a80; text-align: center;
  border: 1px solid #3a8fe0; border-radius: 6px; padding: 2px 4px; outline: none;
  background: #fff; box-shadow: 0 0 0 3px rgba(120,210,255,0.6);
}
.icon.photo .tile img { width: 100%; height: 100%; border-radius: 16px; object-fit: cover; }

/* ---------- start menu ---------- */
.startmenu {
  position: absolute; left: 50%; bottom: 96px; transform: translateX(-50%);
  width: min(560px, 94vw); padding: 14px; z-index: 40;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(240,250,255,0.95), rgba(205,232,255,0.92));
  animation: win-in 0.25s cubic-bezier(.2,1.2,.3,1) both;
  color: #0b3a80;
}
.startmenu::before { display: none; }
.sm-head { display: flex; align-items: center; gap: 12px; padding: 4px 6px 12px; border-bottom: 1px solid rgba(0,60,150,0.2); margin-bottom: 10px; }
.sm-head img { width: 46px; height: 46px; border-radius: 50%; }
.sm-head small { display: block; opacity: 0.7; }
.sm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 6px; }
.sm-app { border: 0; background: transparent; border-radius: 12px; padding: 8px 4px; display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; color: #0b3a80; font: 600 0.75rem var(--font); }
.sm-app img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 3px 5px rgba(0,20,80,0.35)); }
.sm-app:hover { background: rgba(120,200,255,0.35); }
.sm-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; padding-top: 10px; border-top: 1px solid rgba(0,60,150,0.2); }
.sm-btn { border: 1px solid #7fa9d8; border-radius: 999px; padding: 6px 14px; background: linear-gradient(180deg, #fff, #d9ecff); color: #0b3a80; font: 600 0.85rem var(--font); cursor: pointer; }
.sm-btn.danger { background: linear-gradient(180deg, #ffd0c6, #ff8b70); border-color: #c2321c; color: #6b1a0c; }

/* running windows in the dock */
.dock-running { display: flex; gap: 6px; padding-left: 10px; margin-left: 4px; border-left: 1px solid rgba(255,255,255,0.5); }
.dock-running.empty { display: none; }
.dock-run { width: 44px; height: 44px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.7); background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(180,225,255,0.5)); display: grid; place-items: center; cursor: pointer; position: relative; }
.dock-run img { width: 28px; height: 28px; object-fit: contain; }
.dock-run::after { content: ""; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%); width: 6px; height: 6px; border-radius: 50%; background: #7ddc2b; box-shadow: 0 0 6px #7ddc2b; }
.dock-run.min { opacity: 0.6; }
.dock-run:hover { transform: translateY(-4px); }

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .brand { font-size: 1.6rem; }
  .topbar-center { display: none; }
  .icon { width: 90px; }
  .icon .tile { width: 66px; height: 66px; border-radius: 18px; }
  .icon .tile img { width: 50px; height: 50px; }
  .icon .label { font-size: 0.7rem; }
  .dock { min-width: 0; width: calc(100% - 28px); }
  .dock-apps { overflow-x: auto; }
  .leaf-a { width: 44vw; }
}
