/* Apple skin (Angela 23 Nov 01:58): no Microsoft frame. Loaded after site.css on index.html.
   The site's XP taskbar stays in the DOM (the penguin stands on it) but becomes an invisible floor the height of
   the dock, so the penguin walks along the top of the dock. */
:root { --menubar-h: 28px; --tile: clamp(52px, 4.6vw, 70px); --dock-h: calc(var(--tile) * 111 / 118 + 17px); --taskbar-h: 6px; --dock-clear: calc(var(--dock-h) + 14px);
  --cream: #f4e9d6; --cream-2: #eadcc5; --ink: #3b352d; }
body.mac { font-family: -apple-system, "SF Pro Text", "Helvetica Neue", "PingFang SC", sans-serif; }

/* moving wallpaper */
body.mac #wallpaper, body.mac .crt-overlay { display: none; }
.moving-wall { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* paints before any request: blurred inline still, then the 98 KB poster, then the moving canvas fades in on its
   first drawn frame (Angela's phone showed a blank lilac page while 3 MB of wallpaper loaded) */
body.mac .desktop { background: url(../assets/soft/wall-poster-a2b81a5c.jpg) center 42% / cover no-repeat, url(data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAoHBwgHBgoICAgLCgoLDhgQDg0NDh0VFhEYIx8lJCIfIiEmKzcvJik0KSEiMEExNDk7Pj4+JS5ESUM8SDc9Pjv/2wBDAQoLCw4NDhwQEBw7KCIoOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozv/wAARCAAaABgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwCzbrJAH/0YOzDHzdB+FEAkgZiYFfcMcjGPpXRSX1oBxb3I/wC+T/hT11+zVESRJlC/37UHHuMGun+0aMtjkUPM5Q2zknbGcdh1orsk17SGGFv4oskEh7Yrz+XWir/tCPl95Xsl3OaGuE/eiJp41aJ/vRDn3FYYpK+Y9lEjmZum7smHzQqP+BUVhdqKPZruFz//2Q==) center 42% / cover no-repeat, #8fa6c8; }
.moving-wall { opacity: 0; transition: opacity .6s ease; }
.wall-drawn .moving-wall { opacity: 1; }

/* top menu bar */
.mac-bar { position: absolute; inset: 0 0 auto 0; height: var(--menubar-h); z-index: 720; display: flex; align-items: center;
  gap: 2px; padding: 0 12px; font-size: 13px; color: #fff;
  background: rgba(40, 44, 36, .28); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4);
  color: #fff; text-shadow: 0 0 1px rgba(0, 0, 0, .25); }
.mac-bar .mb { all: unset; padding: 3px 9px; border-radius: 5px; cursor: default; white-space: nowrap; }
.mac-bar button.mb { cursor: pointer; }
.mac-bar button.mb:hover, .mac-bar button.mb:focus-visible { background: rgba(255, 255, 255, .18); }
.mac-bar .who { font-weight: 700; }
.mac-bar .apple svg { width: 14px; height: 17px; fill: var(--ink); display: block; }
.mac-bar .grow { flex: 1; }
.mac-bar .clock { font-variant-numeric: tabular-nums; }
.mb-tray { display: flex; gap: 4px; align-items: center; }
.mb-tray .tray-btn svg { filter: brightness(0) invert(1); width: 16px; height: 16px; }
body.mac .langbar { display: none; }

/* XP frame off: taskbar becomes the invisible floor under the dock */
body.mac .taskbar { background: none; box-shadow: none; pointer-events: none; opacity: 0; }
body.mac .startmenu { top: calc(var(--menubar-h) + 4px); bottom: auto; left: 6px; width: 240px; border: 0; border-radius: 10px;
  background: rgba(246, 238, 224, .96); backdrop-filter: blur(20px); box-shadow: 0 14px 40px rgba(40, 40, 20, .28); }
body.mac .sm-head { background: none; color: var(--ink); text-shadow: none; font-size: 13px; padding: 10px 12px 6px; }
body.mac .sm-avatar { display: none; }
body.mac .sm-list { border-top: 1px solid rgba(110, 90, 60, .12); }
body.mac .sm-list button { color: var(--ink); font-size: 13px; border-radius: 5px; margin: 0 4px; width: calc(100% - 8px); }
body.mac .sm-list button svg { width: 18px; height: 18px; }
body.mac .sm-list button:hover, body.mac .sm-list button:focus-visible { background: #4d7fd0; color: #fff; }
body.mac .sm-foot { background: none; border-top: 1px solid rgba(110, 90, 60, .12); }
body.mac .sm-off { color: var(--ink); }
body.mac .sm-off svg { filter: brightness(0) opacity(.7); }

/* desktop: folders on the left, under the menu bar, the reel's blue folder */
body.mac .icons { inset: calc(var(--menubar-h) + 6px) 0 calc(var(--dock-clear) + 10px) auto; padding: 12px 14px; direction: rtl; }
body.mac .icons li { direction: ltr; }
body.mac .icons .mac-hidden { display: none; }
body.mac .icon { width: 96px; color: #fff; font-weight: 600; font-size: 12.5px; }
body.mac .icon svg { display: none; }
body.mac .icon::before { content: none; }
body.mac .icon:hover::before { transform: translateY(-2px) scale(1.05); }
body.mac .icon span { text-shadow: 0 1px 2px rgba(0, 0, 0, .55), 0 0 6px rgba(0, 0, 0, .2); border-radius: 5px; }
body.mac .icon.selected::before { filter: drop-shadow(0 3px 2px rgba(40, 50, 30, .22)) brightness(.86); }
body.mac .icon.selected span { background: #4d7fd0; text-shadow: none; }

/* dock: Apple-style translucent glass tray; equal 3D tiles (the reel's tile shell + her web icons) */
.mac-dock { position: absolute; left: 0; right: 0; bottom: 8px; z-index: 600; display: flex; justify-content: center; pointer-events: none; }
.mac-dock-box { pointer-events: auto; display: flex; align-items: flex-end; gap: 10px; padding: 8px 12px 9px; border-radius: 22px;
  background: rgba(255, 255, 255, .22); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .38), 0 8px 28px rgba(20, 40, 20, .18); }
.mac-tile { all: unset; position: relative; cursor: pointer; width: var(--tile, 64px); aspect-ratio: 118 / 111;
  transform-origin: 50% 100%; transition: transform .22s cubic-bezier(.3, 1.5, .5, 1); }
.mac-tile img { width: 100%; height: 100%; display: block; pointer-events: none; filter: drop-shadow(0 3px 3px rgba(30, 30, 10, .22)); }
.mac-tile:hover, .mac-tile:focus-visible { transform: translateY(-10px) scale(1.16); }
.mac-tile:active { transform: translateY(-4px) scale(1.06); transition-duration: .08s; }
.mac-tile .tip { position: absolute; left: 50%; bottom: calc(100% + 14px); transform: translateX(-50%); white-space: nowrap;
  padding: 4px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--ink);
  background: rgba(246, 238, 222, .95); box-shadow: 0 4px 12px rgba(40, 30, 10, .18); opacity: 0; pointer-events: none; transition: opacity .12s; }
.mac-tile:hover .tip, .mac-tile:focus-visible .tip { opacity: 1; }
@keyframes mac-bounce { 0%, 100% { transform: none; } 35% { transform: translateY(-30%); } 60% { transform: none; } 78% { transform: translateY(-10%); } }
.mac-tile.launch { animation: mac-bounce .7s ease-out; }
/* the penguin walks in front of the dock, never behind it */
body.mac .pet { z-index: 680; }

/* windows: the reel's cream Finder, traffic lights on the left */
body.mac #windows { position: absolute; inset: var(--menubar-h) 0 0 0; pointer-events: none; }   /* empty layer must not eat clicks (folders 'not responding', 23 Nov) */
body.mac #windows > * { pointer-events: auto; }
body.mac .win { border: 0; border-radius: 12px; overflow: hidden; background: var(--cream);
  box-shadow: 0 0 0 1px rgba(110, 90, 60, .16), 0 22px 54px rgba(40, 40, 20, .3), 0 4px 12px rgba(40, 40, 20, .14);
  max-height: calc(100% - var(--dock-clear) - 20px); }
body.mac .win-title { background: var(--cream-2); color: var(--ink); text-shadow: none; border-radius: 0; height: 34px; gap: 0; }
body.mac .win-title svg { display: none; }
body.mac .win-title-text { text-align: center; padding-right: 60px; font-size: 13px; }
body.mac .win-btns { order: -1; gap: 8px; margin: 0 4px 0 6px; }
body.mac .win-btns button { width: 12px; height: 12px; border: 0; border-radius: 50%; font-size: 0; color: transparent; padding: 0;
  box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .18); }
body.mac .win-btns button.close { order: -1; background: #ee6a5f; }
body.mac .win-btns button:nth-child(1) { background: #f5bd4f; }
body.mac .win-btns button:nth-child(2) { background: #61c454; }
body.mac .win-menu { display: none; }
body.mac .win-body { background: #fbf6ec; border: 0; }
body.mac .win-status { background: var(--cream-2); color: #7a6e60; }
body.mac .xp-btn { border-radius: 8px; }

@media (max-width: 640px) {
  :root { --tile: min(52px, 13vw); }
  body.mac .icons { direction: ltr; bottom: calc(var(--dock-clear) + 4px); overflow: hidden; }
  body.mac .icon { width: 84px; }
  body.mac .icon::before { width: 52px; height: 40px; }
  .mac-bar .who { display: none; }
  .mac-tile:hover, .mac-tile:focus-visible { transform: none; }
  body.mac .icons { right: 0; inset-inline-end: 0; padding-top: 10px; }
  body.mac .win { top: calc(var(--menubar-h) + 6px) !important; }
}
@media (prefers-reduced-motion: reduce) { .mac-tile.launch { animation: none; } }

/* folders: a real <img> (WebKit on iPhone did not paint the ::before data-URI SVG, so the folders were blank) */
body.mac .icon .mac-folder { width: 64px; height: 50px; margin: 2px 0 3px; display: block;
  filter: drop-shadow(0 3px 2px rgba(40, 50, 30, .22)); transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); }
body.mac .icon:hover .mac-folder { transform: translateY(-2px) scale(1.05); }
body.mac .icon.selected .mac-folder { filter: drop-shadow(0 3px 2px rgba(40, 50, 30, .22)) brightness(.86); }
@media (max-width: 640px) { body.mac .icon .mac-folder { width: 52px; height: 40px; } }

/* phone: folders in two columns on the right (Angela 23 Nov 03:51), all 8 above the dock */
@media (max-width: 640px) {
  body.mac .icons { display: grid; grid-template-columns: repeat(2, 76px); grid-auto-rows: 74px; gap: 4px 6px;
    grid-auto-flow: row; justify-content: end; align-content: start; left: auto; right: 0; direction: ltr;
    padding: 8px 8px 0; bottom: calc(var(--dock-clear) + 4px); overflow: visible; }
  body.mac .icon { width: 76px; padding: 2px 0; font-size: 11px; }
  body.mac .icon .mac-folder { width: 48px; height: 37px; margin: 1px 0 2px; }
  body.mac .icon span { line-height: 1.15; }
}

/* phone: the dock is almost full width, so the penguin stands ON the dock's top edge instead of covering a tile
   (pet.js puts its feet on top of .taskbar; the invisible taskbar is made as tall as the dock) */
@media (max-width: 640px) { body.mac .taskbar { height: calc(var(--dock-clear) - 6px); } }

/* windows: blue chrome like her browser screenshot (23 Nov): title bar #73a1e2, strip #c2d6f4, body #f2f7fc */
body.mac .win { background: #f2f7fc; box-shadow: 0 0 0 1px rgba(40, 80, 150, .22), 0 22px 54px rgba(20, 40, 80, .3), 0 4px 12px rgba(20, 40, 80, .14); }
body.mac .win-title { background: linear-gradient(180deg, #7aa7e6, #6f9bd9); color: #fff; text-shadow: 0 1px 1px rgba(20, 50, 110, .35); }
body.mac .win-body { background: #f2f7fc; }
body.mac .win-status { background: #c2d6f4; color: #2c4a78; }
body.mac .win-btns button { box-shadow: inset 0 0 0 .5px rgba(0, 0, 0, .25); }
body.mac .xp-btn { background: #c2d6f4; border-color: #8fb3e6; color: #1f3d6b; }

/* Minesweeper: Game | Leaderboard tabs, in the blue window style */
.ms-tabs { display: flex; gap: 4px; margin: 0 0 10px; padding: 3px; border-radius: 9px; background: #c2d6f4; }
.ms-tab { all: unset; flex: 1; white-space: nowrap; text-align: center; padding: 5px 10px; border-radius: 7px; font-size: 12.5px; font-weight: 600; color: #2c4a78; cursor: pointer; }
.ms-tab[aria-selected="true"] { background: #fff; color: #1f3d6b; box-shadow: 0 1px 2px rgba(20, 50, 110, .2); }
.ms-board { min-width: 240px; font-size: 13px; color: #1f2d44; }
.lb-levels { display: flex; gap: 6px; margin-bottom: 8px; }
.lb-levels button { all: unset; cursor: pointer; padding: 3px 9px; border-radius: 6px; font-size: 12px; color: #2c4a78; background: #e3edfb; }
.lb-levels button[aria-pressed="true"] { background: #316ac5; color: #fff; }
.lb-list { list-style: none; margin: 0 0 10px; padding: 0; border-radius: 8px; background: #fff; box-shadow: inset 0 0 0 1px #c2d6f4; }
.lb-list li { display: grid; grid-template-columns: 22px 1fr 48px 52px; gap: 6px; padding: 6px 10px; border-top: 1px solid #e3edfb; }
.lb-list li:first-child { border-top: 0; }
.lb-list li b { color: #6f9bd9; }
.lb-list .tm { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.lb-list .dt { text-align: right; color: #7a8aa3; font-size: 11.5px; }
.lb-list .fresh { background: #316ac5; color: #fff; }
.lb-list .fresh b, .lb-list .fresh .dt { color: #fff; }
.lb-list .empty { display: block; color: #7a8aa3; padding: 14px 10px; }
.lb-name { display: flex; gap: 8px; align-items: center; font-size: 12px; color: #2c4a78; }
.lb-name input { flex: 1; font: inherit; padding: 4px 8px; border-radius: 6px; border: 1px solid #8fb3e6; background: #fff; }
.lb-note { margin: 8px 0 0; font-size: 11.5px; color: #566884; }
.lb-note.lb-down { color: #a0522d; }
