/* macOS desktop — 1:1 with Figma (1512 × 993 px), the whole canvas is scaled by desktop.js */

:root {
  --sf: -apple-system, BlinkMacSystemFont, "SF Pro", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --sf-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  --inter: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

/* The wallpaper's own colours, not black: while the camera moves, tiles the browser hasn't drawn yet show this
   (sky at the top, sand below) instead of flashing black */
html, body { background: linear-gradient(#c5d2d6, #a19583 50%, #a99782); }

body {
  margin: 0;
  overflow: hidden;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: none; }

.mac {
  position: absolute;
  left: 0;
  top: 0;
  width: 1512px;
  height: 993px;
  overflow: hidden;
  transform: translate(var(--x, 0px), var(--y, 0px)) scale(var(--s, 1));
  transform-origin: 0 0;
}

.mac__wallpaper {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.mac__files { position: absolute; inset: 0; }

/* Existing folders sit under the clutter, as in Figma; while tidying, folders go on top so files vanish into them */
.mac__folders { z-index: 0; }
.mac__files:first-of-type { z-index: 1; }
.is-tidying .mac__folders { z-index: 2; }

/* no will-change here: ~60 separate layers inside the moving laptop screen made every label flicker */
.orb { cursor: pointer; }

/* Inside the laptop on the main page (?embed): no backdrop blur — redrawing it under a moving, perspective-warped
   screen is what made the camera moves stutter. Slightly more opaque glass instead. */
.is-embed .dock__panel::before { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, .26); }

.is-embed .notice { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(240, 241, 244, .95); }

/* ───────────── Menu bar ───────────── */

.menubar {
  position: absolute;
  left: 0;
  top: 0;
  width: 1512px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 11px 10px;
  font-family: var(--sf);
  font-size: 13px;
  font-weight: 590;
  line-height: 16px;
  color: #fff;
  white-space: nowrap;
}

.menubar__lead,
.menubar__trail { display: flex; align-items: center; }

.menubar__item { display: block; padding: 4px 9px; border-radius: 4px; }
.menubar__item--app { padding-left: 11px; font-weight: 860; }

.menubar__apple {
  width: 33px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
}

.menubar__wifi { width: 34.5px; height: 20px; }
.menubar__spotlight { display: flex; align-items: center; height: 24px; }
.menubar__cc { width: 31.15px; height: 21.41px; }

.menubar__clock {
  display: flex;
  gap: 8px;
  padding-left: 9px;
  font-size: 13.1px;
}

/* ───────────── Desktop items ───────────── */

.file {
  position: absolute;
  width: 104px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.file__label {
  margin: 0;
  width: 100%;
  font-family: var(--inter);
  font-size: 13px;
  font-weight: 600;
  line-height: normal;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
  overflow-wrap: break-word;
}

.icon {
  position: relative;
  width: 64px;
  height: 64px;
  flex: none;
}

/* Folder */
.icon--folder { overflow: hidden; }
.icon--folder img {
  position: absolute;
  left: -15.67%;
  top: 6%;
  width: 132.35%;
  height: 89.06%;
}

/* Thumbnails: photos and documents, framed differently by aspect ratio */
.thumb {
  position: absolute;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, .5);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}
.thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 5px;
}

.icon--portrait .thumb { inset: 4.69% 16.44%; }
.icon--square   .thumb { inset: 4.69% 6.25%; }
.icon--wide     .thumb { inset: 20.31% 4.69%; }
.icon--tall     .thumb { inset: 4.69% 21.87% 4.69% 21.88%; }

.icon--doc .thumb { inset: 4.69% 16.44%; border: 0; border-radius: 2px; }
.icon--doc .thumb img { border-radius: 2px; }

/* Archive */
.icon--zip .zip { position: absolute; inset: 7.81% 18.75%; }
.icon--zip .zip img { position: absolute; inset: -1.85% -5% -5.56% -5%; width: 110%; height: 107.41%; }
.icon--zip .zip__badge { position: absolute; left: 42px; top: 5px; width: 10px; height: 10px; }
.icon--zip .zip__badge img { position: absolute; left: -30%; top: -10%; width: 140%; height: 140%; }

/* Audio */
.icon--audio img {
  position: absolute;
  left: calc(4px - 3px);   /* 56 px glyph centred, SVG carries its shadow margin */
  top: calc(4px - 2px);
  width: 62px;
  height: 62px;
}

/* Calendar invite */
.cal {
  position: absolute;
  left: 4px;
  top: 4px;
  width: 56px;
  height: 56px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, .45);
  background: linear-gradient(#fff, #f6f6f6);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
}
.cal__day,
.cal__date {
  position: absolute;
  left: 32px;
  transform: translate(-50%, -50%);
  font-family: var(--sf-display);
  line-height: normal;
  text-align: center;
  white-space: nowrap;
}
.cal__day  { top: 18px; font-size: 10px; font-weight: 600; color: #ff373c; }
.cal__date { top: 37px; font-size: 30px; font-weight: 400; color: #000; }

/* ───────────── Dock ───────────── */

.dock {
  position: absolute;
  z-index: 5; /* above the windows that go down into it */
  left: calc(50% + .25px);
  top: 862px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 18px;
}

.dock__panel {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 100px;
  padding: 16px;
  border-radius: 34.294px;
}
.dock__panel::before {
  content: "";
  position: absolute;
  inset: 0 .07% 0 0;
  border-radius: 34px;
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  box-shadow:
    1.25px 0 0 -.75px #d0d0d0,
    -1.25px 0 0 -.75px #d0d0d0,
    0 0 0 .5px #e8e8e8,
    0 8px 15px rgba(0, 0, 0, .02);
}

.dock__icon,
.dock__trash {
  position: relative;
  width: 68px;
  height: 68px;
  flex: none;
}
.dock__icon { object-fit: cover; }
.dock__icon--round { border-radius: 18px; }

.dock__sep {
  position: relative;
  width: .5px;
  height: 62px;
  border-radius: 100px;
  background: #fff;
  flex: none;
}

.dock__trash { overflow: hidden; }
.dock__trash img {
  position: absolute;
  left: -7.12%;
  top: -10%;
  width: 115.25%;
  height: 115.25%;
}

/* Mirai orb: sharp colour shapes under a frosted-glass disc (Figma "Group 3" 729:17458) */
.orb {
  position: relative;
  width: 80px;
  height: 80px;
  flex: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .16); /* the glass itself, a little milky where the eye isn't */
  /* and it blurs what's behind it, like real glass */
  -webkit-backdrop-filter: blur(8px) saturate(1.3);
  backdrop-filter: blur(8px) saturate(1.3);
}
/* The eye (desktop.js: Eye): the shapes move by transform every frame, clipped to the disc */
.orb__eye {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  overflow: hidden;
  /* Safari ignores the rounded overflow clip for filtered content (the blurred eye came out square): clip-path holds */
  -webkit-clip-path: circle(40px at 40px 40px);
  clip-path: circle(40px at 40px 40px);
}

/* The eye (Figma 872:8953, its 44 px ball × 80/44): an orange shell, a yellow slit, a pupil */
/* the eye itself is drawn by desktop.js (Eye: paint) into this canvas, every frame */
.orb__canvas { position: absolute; left: 0; top: 0; width: 80px; height: 80px; }
/* the glass filter (desktop.js: glass) goes on this layer; the eye around it clips it to the disc */
.orb__lens { position: absolute; inset: 0; }
.orb::after {
  /* Liquid glass on top (Figma "top"; the lens itself is the SVG filter on .orb__lens): the light caught along the
     rim, drawn once by desktop.js (glass) into --orb-rim */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
  background: var(--orb-rim, none) center / 100% 100% no-repeat;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .06), 0 6px 14px rgba(0, 0, 0, .08);
}

/* ───────────── The castle photo (Figma "06" 839:17473) ───────────── */

/* Selected on the desktop: grey box around the icon, blue label */
.file--selected .icon {
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, .36);
  background: rgba(0, 0, 0, .32);
}
.file--selected .file__label {
  width: auto;
  padding: 1px 4px;
  border-radius: 4px;
  background: #0066e9;
  text-shadow: none;
  white-space: nowrap;
}

/* Preview window Mirai opens (flat render, cut out of the Figma frame: corners clipped here, shadow added) */
.finder {
  position: absolute;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}
.finder--castle {
  left: 505px;
  top: 109px;
  width: 745px;
  height: 548.5px;
  border-radius: 22px;
  box-shadow: 0 0 0 .5px rgba(0, 0, 0, .25), 0 22px 60px rgba(0, 0, 0, .35);
}
.finder--messages { left: 282px; top: 90px; width: 948px; height: 691px; }
#messages-sent { z-index: 4; }

/* ───────────── Peter's notification (Figma 839:18292): slides in from the right, top right corner ───────────── */

.notice {
  position: absolute;
  z-index: 6;
  left: 1172px;
  top: 50px;
  width: 324px;
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px 10px 12px;
  border-radius: 18px;
  background: rgba(236, 238, 242, .72);
  -webkit-backdrop-filter: blur(24px) saturate(1.6);
  backdrop-filter: blur(24px) saturate(1.6);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .5) inset, 0 8px 24px rgba(0, 0, 0, .18);
  font-family: var(--sf);
  color: #000;
  opacity: 0;
  transform: translateX(40px);
  pointer-events: none;
}
.notice__icon { width: 32px; height: 32px; flex: none; }
/* Mirai's notification: her orb, small, as the app icon */
.notice__orb { width: 32px; height: 32px; flex: none; }
.notice__orb .orb { display: block; transform: scale(.4); transform-origin: 0 0; cursor: default; }
.notice__body { margin: 0; font-size: 13px; line-height: 16px; letter-spacing: -.01em; }
.notice__body b { display: block; font-weight: 700; }
.notice__clip { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* The photo's long name: two lines at most, each on one line (it would wrap into four under a 104 px icon) */
.file--castle .file__label { width: 150px; margin: 0 -23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file--castle.file--selected .file__label { width: auto; margin: 0; }
.file--q1 { opacity: 0; } /* appears when Mirai gathers the receipts (desktop.js: build, zip) */
.finder--receipts { left: 433px; top: 79px; width: 647px; height: 781px; }
.finder--reply    { left: 599px; top: 34px; width: 719px; height: 828px; z-index: 4; }
/* The publisher (Figma 840:22978 / 840:23807): flat renders with their own corners and shadow */
.finder--letter { left: 256px; top: 42px; width: 991px; height: 820px; z-index: 4; }
.finder--answer { left: 397px; top: 78px; width: 719px; height: 763px; z-index: 5; }
.finder--answer > img { display: block; width: 100%; height: 100%; }
.answer__line { position: absolute; background: #fff; transform-origin: 100% 50%; }
/* the Send button going darker under the click (its middle: 636.5, 63.5 in the window) */
.answer__press { position: absolute; left: 618.5px; top: 45.5px; width: 36px; height: 36px; border-radius: 50%; background: rgba(0, 0, 0, .25); opacity: 0; }
.pointer { position: absolute; z-index: 7; left: 0; top: 0; opacity: 0; pointer-events: none; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .35)); }
.notice__time { position: absolute; right: 14px; top: 10px; font-size: 12px; color: rgba(0, 0, 0, .4); }


