/* Round 2 prototype: Cover's menu works. Positions come from the GraphitePlay boards (1440×900). */

:root {
  --ink: #f5f4f1;
  --muted: #c4c2bd;
  --faint: #8e8c88;
  --ground: #1c1c1e;
  --font: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); }
body { -webkit-font-smoothing: antialiased; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* The hero is the Mac's screen. --k scales a 1440×900 board to the viewport; main.js sets it. */
.hero { --k: 1; position: relative; height: 100vh; height: 100dvh; overflow: hidden; }
.screen { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--ground); }

.layer, .ui { position: absolute; inset: 0; pointer-events: none; }
.layer[hidden] { display: none; }
.ui-bar { z-index: 90; }
.ui-menu { z-index: 95; }

/* A board-sized box, scaled from the top left; its far edges follow the viewport. */
.fit {
  position: absolute; left: 0; top: 0;
  width: calc(100% / var(--k)); height: calc(100% / var(--k));
  transform: scale(var(--k)); transform-origin: 0 0;
}

/* 1. The warm wallpaper from Cover's icon. */
.wall { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 20% 30%; }

/* 2. Desktop icons and files. */
.icons-grid { position: absolute; left: 0; top: 0; width: 300px; height: 1125px; transform: scale(0.8); transform-origin: 0 0; }
.it { position: absolute; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.iw { height: 48px; display: flex; align-items: flex-end; justify-content: center; filter: drop-shadow(0 2px 4px rgba(80, 10, 30, 0.35)); }
.ph { display: block; width: 62px; height: 44px; border: 2.5px solid #ffffff; border-radius: 3px; }
.sh { display: block; width: 64px; height: 40px; border: 1.5px solid rgba(255, 255, 255, 0.95); border-radius: 3px; }
.dc, .pdf, .xl { display: block; width: 38px; height: 48px; clip-path: polygon(0 0, 71% 0, 100% 23%, 100% 100%, 0 100%); }
.fd { display: block; width: 54px; height: 40px; border-radius: 3px; clip-path: polygon(0 0, 38% 0, 46% 14%, 100% 14%, 100% 100%, 0 100%); }
.lb {
  max-width: 84px; font-size: 10.5px; line-height: 13px; font-weight: 600; color: #ffffff; text-align: center;
  text-shadow: 0 1px 2px rgba(70, 0, 25, 0.6), 0 0 6px rgba(70, 0, 25, 0.3);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word;
}

/* 3. Widgets. */
.wg {
  position: absolute; width: 150px; height: 150px; border-radius: 20px; overflow: hidden;
  background: rgba(44, 44, 46, 0.82); border: 1px solid rgba(255, 255, 255, 0.10); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.wg-cal { left: 232px; top: 60px; padding: 14px 16px; }
.wg-photo { left: 232px; top: 226px; background: radial-gradient(circle at 62% 38%, #ffe4bb 0 16%, #ec8d5c 17% 42%, #7b2d3c 43%); }
.wg-day { font-size: 10px; line-height: 12px; font-weight: 700; letter-spacing: 0.06em; color: #ff6a4d; }
.wg-date { font-size: 38px; line-height: 42px; font-weight: 500; color: var(--ink); }
.wg-events { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; font-size: 11px; line-height: 13px; color: #e8e6e1; }
.wg-events span { border-left: 2px solid; padding-left: 6px; }

/* 4. App windows. */
.win {
  position: absolute; display: flex; flex-direction: column; overflow: hidden; pointer-events: auto;
  border-radius: 12px; background: #232325; border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.7), 0 22px 60px rgba(0, 0, 0, 0.55);
  color: #e8e6e1; font-size: 11px; line-height: 14px;
}
.tb {
  height: 28px; flex: none; display: flex; align-items: center; gap: 7px; padding: 0 10px;
  background: #2c2c2e; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11.5px; font-weight: 600; color: #a8a6a1;
}
.tl { width: 10px; height: 10px; border-radius: 50%; background: #4a4a4c; flex: none; padding: 0; border: 0; }
.tt { flex: 1; text-align: center; margin-right: 44px; }
/* The active window keeps its coloured controls and bright title. */
.win.is-key .tl:nth-child(1) { background: #ff5f57; }
.win.is-key .tl:nth-child(2) { background: #febc2e; }
.win.is-key .tl:nth-child(3) { background: #28c840; }
.win.is-key .tt { color: #f2f2f2; }

.w-sheet { left: 430px; top: 52px; width: 500px; height: 300px; }
.w-chat { left: 820px; top: 84px; width: 290px; height: 280px; }
.w-pitch { left: 470px; top: 132px; width: 480px; height: 276px; }

table.grid { border-collapse: collapse; width: 100%; font-size: 10.5px; line-height: 13px; }
.grid th, .grid td { padding: 5px 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); text-align: left; white-space: nowrap; }
.grid th { color: #8e8e93; font-weight: 600; background: #262628; }

.chat { flex: 1; display: flex; }
.chat-list { width: 100px; flex: none; border-right: 1px solid rgba(255, 255, 255, 0.06); padding: 8px 0; display: flex; flex-direction: column; gap: 2px; }
.ch { font-size: 10.5px; padding: 5px 8px; margin: 0 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-on { background: rgba(255, 255, 255, 0.08); }
.chat-pane { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 8px; }
.bb { align-self: flex-start; max-width: 150px; padding: 7px 10px; border-radius: 12px; background: #3a3a3c; color: #f2f2f2; font-size: 11px; line-height: 14px; }

.pitch { flex: 1; display: flex; }
.pitch-thumbs { width: 74px; flex: none; padding: 10px 8px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid rgba(255, 255, 255, 0.06); }
.th { display: block; width: 58px; height: 33px; border-radius: 3px; background: #f3f1ec; opacity: 0.85; }
.th-on { outline: 2px solid #ff9a3c; outline-offset: 1px; }
.pitch-stage { flex: 1; display: flex; align-items: center; justify-content: center; background: #1b1b1d; }
.slide { width: 340px; height: 192px; padding: 22px 26px; border-radius: 4px; background: #f3f1ec; color: #1c1c1e; }
.slide-title { font-size: 20px; line-height: 24px; font-weight: 700; letter-spacing: -0.02em; }
.slide-sub { font-size: 10px; line-height: 13px; color: #6b6965; margin-top: 3px; }
.bars { display: flex; align-items: flex-end; gap: 14px; height: 92px; margin-top: 16px; }
.bars span { width: 54px; border-radius: 3px; }

/* Cover's own windows (filled in by settings.js), kept above the headline. */
.w-settings { left: 560px; top: 44px; width: 520px; background: #1e1e20; font-size: 12px; line-height: 15px; color: #e8e6e1; }
.w-about { left: 640px; top: 120px; width: 260px; background: #1e1e20; }
.tl-close { cursor: default; }
.tl-close:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.settings-body { padding: 12px 16px 16px; }
.set-head { margin: 0 0 6px 4px; font-size: 11px; line-height: 14px; font-weight: 600; color: #8e8e93; }
.set-group { border-radius: 9px; background: #2a2a2c; border: 1px solid rgba(255, 255, 255, 0.06); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 12px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.set-row:first-child { border-top: 0; }
.set-row[hidden] { display: none; }
.set-label { display: flex; flex-direction: column; gap: 2px; }
.set-label small { font-size: 10.5px; line-height: 13px; color: #8e8e93; max-width: 300px; }

.set-gallery-row { flex-direction: column; align-items: stretch; gap: 6px; }
.set-gallery { display: flex; gap: 10px; }
.set-tile, .set-preset { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: default; }
.set-thumb {
  display: block; width: 80px; height: 50px; border-radius: 6px; background: #3a3a3c center / cover no-repeat;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10);
}
.set-thumb-custom { background-color: transparent; box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.28); }
.set-thumb-custom:not([style*="url"])::after { content: '+'; display: grid; place-items: center; height: 100%; font-size: 20px; color: #8e8e93; }
.set-tile[aria-pressed="true"] .set-thumb { box-shadow: 0 0 0 2px #0a84ff; }
.set-cap { font-size: 10.5px; line-height: 13px; color: #c4c2bd; }
.set-tile[aria-pressed="true"] .set-cap, .set-preset[aria-pressed="true"] .set-cap { color: #ffffff; }
.set-tile:focus-visible, .set-preset:focus-visible, .set-select:focus-visible, .set-well:focus-visible { outline: 2px solid #0a84ff; outline-offset: 2px; border-radius: 6px; }
.set-error { margin: 0; font-size: 11px; color: #ff6b5c; }
.set-error[hidden] { display: none; }

.set-well { width: 44px; height: 24px; padding: 0; border: 0; border-radius: 6px; background: none; cursor: default; }
.set-well::-webkit-color-swatch-wrapper { padding: 2px; }
.set-well::-webkit-color-swatch { border: 0; border-radius: 4px; }
.set-select {
  height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid rgba(255, 255, 255, 0.12);
  background: #3a3a3c; color: #f2f2f2; font: inherit;
}
.set-presets { flex-direction: column; align-items: stretch; gap: 8px; }
.set-strip { display: flex; gap: 8px; }
.set-preset { width: 56px; }
.set-swatch { display: block; width: 28px; height: 28px; border-radius: 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
.set-preset[aria-pressed="true"] .set-swatch { box-shadow: 0 0 0 2px #1e1e20, 0 0 0 4px #0a84ff; }

.about-body { padding: 18px 20px 22px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.about-icon { display: block; width: 64px; height: 64px; margin-bottom: 10px; }
.about-name { margin: 0; font-size: 14px; line-height: 18px; font-weight: 700; color: #f2f2f2; }
.about-version { margin: 4px 0 0; font-size: 11px; line-height: 14px; color: #a8a6a1; }

/* 5. The Dock, centred at the bottom. */
.dock {
  position: absolute; left: 50%; bottom: calc(16px * var(--k)); transform: translateX(-50%) scale(var(--k)); transform-origin: 50% 100%;
  height: 64px; padding: 6px; display: flex; gap: 10px; border-radius: 20px; pointer-events: auto;
  background: rgba(46, 46, 48, 0.55); border: 1px solid rgba(255, 255, 255, 0.14);
  -webkit-backdrop-filter: blur(20px) saturate(1.3); backdrop-filter: blur(20px) saturate(1.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.tile {
  display: block; width: 52px; height: 52px; border-radius: 12px; position: relative; flex: none; padding: 0; border: 0;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset; font: inherit; color: inherit;
}
.tile i { position: absolute; display: block; background: #ffffff; }
.run { position: absolute; left: 50%; bottom: -5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); }
.t-pitch { background: linear-gradient(160deg, #ffc46b, #f06a2c); }
.t-pitch .g1 { left: 13px; top: 14px; width: 26px; height: 17px; border-radius: 2px; }
.t-pitch .g2 { left: 25px; top: 31px; width: 2px; height: 8px; }
.t-chat { background: linear-gradient(160deg, #ff8fa3, #d93a66); }
.t-chat .g1 { left: 12px; top: 13px; width: 28px; height: 22px; border-radius: 11px; }
.t-chat .g2 { left: 15px; top: 31px; width: 9px; height: 9px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.t-sheet { background: linear-gradient(160deg, #5fd3c4, #1f8f86); }
.t-sheet .g1 {
  left: 13px; top: 13px; width: 26px; height: 26px; border-radius: 3px;
  background: repeating-linear-gradient(90deg, transparent 0 8px, #2a9d92 8px 9px), repeating-linear-gradient(0deg, transparent 0 8px, #2a9d92 8px 9px), #ffffff;
}
.t-a { background: linear-gradient(160deg, #6b7480, #3a414c); }
.t-a .g1 { left: 12px; top: 22px; width: 28px; height: 8px; border-radius: 4px; }
.t-b { background: linear-gradient(160deg, #f0d264, #c99a1a); }
.t-b .g1 { left: 16px; top: 16px; width: 20px; height: 20px; border-radius: 50%; }
.t-c { background: linear-gradient(160deg, #9a9fa8, #5d626b); }
.t-c .g1 { left: 14px; top: 15px; width: 24px; height: 22px; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* 6. The backdrop: the canvas fills the screen; sweep.js clips the sheet and moves the rim. */
.backdrop-sheet { position: absolute; inset: 0; clip-path: polygon(100% 0, 100% 0, 100% 100%, 100% 100%); }
.backdrop-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* The rim, drawn as on the boards: shadow on the Desktop side, amber and raspberry lines, a white core, warm spill on the sheet. */
.rim { position: absolute; left: 0; top: 0; width: 0; height: 100%; transform-origin: 0 0; transform: translateX(200vw); will-change: transform; }
.rim i { position: absolute; top: 0; height: 100%; display: block; }
.rim-spill { left: 0; width: calc(800px * var(--k)); background: linear-gradient(90deg, rgba(255, 160, 110, 0.24) 0%, rgba(255, 120, 85, 0.07) 18%, rgba(255, 110, 80, 0) 60%); }
.rim-shadow { left: calc(-40px * var(--k)); width: calc(40px * var(--k)); background: linear-gradient(90deg, rgba(40, 0, 15, 0) 0%, rgba(40, 0, 15, 0.35) 100%); }
.rim-amber { left: -4px; width: 1px; background: rgba(255, 196, 107, 0.95); }
.rim-core {
  left: -1px; width: 3px; background: #ffffff;
  box-shadow: 0 0 9px 2px #ffffff, 0 0 46px 12px rgba(255, 190, 140, 0.55), 0 0 170px 50px rgba(255, 110, 80, 0.22);
}
.rim-berry { left: 7px; width: 1px; background: rgba(226, 51, 111, 0.6); }
/* The backdrop takes the clicks on whatever it covers, as Cover's window does; the clip limits it to the sheet.
   Only at As a normal window does a click do anything (scene.js). */
[data-layer="backdrop"] .backdrop-sheet { pointer-events: auto; }
[data-layer="backdrop"]:focus-visible { outline: none; }
[data-layer="backdrop"]:focus-visible .backdrop-sheet::after { content: ''; position: absolute; inset: 0; box-shadow: inset 0 0 0 3px #ffffff; }
/* 44 pixels to grab, touch included. */
.rim-hit { position: absolute; top: 0; left: -22px; width: 44px; height: 100%; pointer-events: auto; touch-action: none; cursor: ew-resize; }

/* 7. The menu bar. */
.menubar {
  position: absolute; left: 0; top: 0; width: 100%; height: 30px; padding: 0 18px 0 20px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px; line-height: 16px; color: var(--ink);
}
.mb-left { display: flex; align-items: center; gap: 18px; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); white-space: nowrap; }
.mb-app { font-weight: 700; }
.mb-menus { display: flex; gap: 18px; }
.mb-right { display: flex; align-items: center; gap: 14px; white-space: nowrap; }
.pill { display: flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.10); font-weight: 500; }
.pill i { width: 7px; height: 7px; border-radius: 50%; background: #ff5a3c; }
.glyph {
  width: 32px; height: 24px; border-radius: 6px; border: 0; padding: 0; background: transparent; color: var(--ink);
  display: flex; align-items: center; justify-content: center; pointer-events: auto; cursor: default;
}
.glyph[hidden] { display: none; }
.glyph[aria-expanded="true"] { background: rgba(255, 255, 255, 0.20); }
.glyph svg path { fill: currentColor; }
.glyph.is-hidden .glyph-sheet { opacity: 0.3; }
.glyph:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.clock { font-weight: 500; }

/* 8. Cover's menu at 130%, anchored under the glyph at the right. */
.menuwrap { position: absolute; right: 10px; top: 34px; width: 240px; transform: scale(1.3); transform-origin: 100% 0; }
.cmenu {
  padding: 5px 0; border-radius: 12px; pointer-events: auto;
  background: rgba(34, 34, 36, 0.72); border: 1px solid rgba(255, 255, 255, 0.13);
  -webkit-backdrop-filter: blur(28px) saturate(1.4); backdrop-filter: blur(28px) saturate(1.4);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.6), 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 18px 48px rgba(0, 0, 0, 0.55);
  font-size: 13px; line-height: 16px; color: #f2f2f2; user-select: none;
}
.cmenu[hidden] { display: none; }
/* The Depth submenu opens to the left: there's no room to its right. */
.cmenu.sub { position: absolute; right: calc(100% - 2px); top: 59px; width: 196px; }
.mi {
  height: 24px; padding: 0 10px 0 22px; margin: 0 5px; border-radius: 6px; position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; cursor: default; outline: none;
}
.mi:hover, .mi:focus, .mi[aria-expanded="true"] { background: rgba(255, 255, 255, 0.14); }
.ks { color: #8e8e93; font-size: 13px; }
.ks-arrow { color: #f2f2f2; }
.sep { height: 1px; margin: 5px 15px; background: rgba(255, 255, 255, 0.12); }
.ck { position: absolute; left: 8px; top: 4px; font-size: 12px; line-height: 16px; font-weight: 600; visibility: hidden; }
.mi[aria-checked="true"] .ck { visibility: visible; }

/* The page's copy: one layer above the whole screen. */
.copy { position: absolute; inset: 0; z-index: 100; pointer-events: none; }
.copy a, .copy button { pointer-events: auto; }
.copy p { margin: 0; }
.eyebrow { position: absolute; left: 232px; top: 424px; display: flex; align-items: center; gap: 10px; font-size: 17px; line-height: 22px; }
.eyebrow .name { font-weight: 600; }
.muted { color: var(--muted); }
.copy h1 {
  position: absolute; left: 228px; top: 462px; width: 1100px; margin: 0;
  font-size: 112px; line-height: 106px; font-weight: 600; letter-spacing: -0.05em; white-space: nowrap; color: var(--ink);
}
.lede { display: none; }
.cta { position: absolute; left: 232px; top: 718px; display: flex; align-items: center; gap: 24px; }

/* Stand-in for Apple's Mac App Store badge: flat, never moved, never covered. */
.badge {
  display: flex; flex-direction: column; justify-content: center; width: 172px; height: 52px; flex: none; padding: 0 16px;
  border-radius: 11px; background: #000000; border: 1px solid #a6a6a6; color: #ffffff; text-decoration: none;
}
.badge-small { font-size: 10px; line-height: 12px; font-weight: 500; letter-spacing: 0.02em; }
.badge-big { font-size: 20px; line-height: 23px; font-weight: 600; letter-spacing: -0.02em; }
.badge:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.req { font-size: 13px; line-height: 18px; color: #b9b7b2; }
.divider { width: 1px; height: 36px; background: rgba(255, 255, 255, 0.12); }
.keys { display: flex; align-items: center; gap: 24px; }
.keyrow { display: flex; align-items: center; gap: 14px; }
.keytext { display: flex; flex-direction: column; gap: 2px; }
.keytext .muted { font-size: 13px; line-height: 18px; }
.kt { font-size: 15px; line-height: 20px; font-weight: 600; }
.key {
  width: 52px; height: 52px; flex: none; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.16); background: #18181a;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.10) inset, 0 3px 0 #000000, 0 12px 26px rgba(0, 0, 0, 0.5);
  font-family: inherit; font-size: 21px; font-weight: 500; color: var(--ink); cursor: pointer;
}
.key:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.10) inset, 0 1px 0 #000000, 0 6px 14px rgba(0, 0, 0, 0.5); }
.key:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

/* After Quit Cover: a plain button brings it back. */
.open-cover {
  height: 44px; padding: 0 18px; border-radius: 10px; flex: none; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.22); background: rgba(255, 255, 255, 0.10);
  font: 600 15px/20px var(--font); color: var(--ink);
}
.open-cover[hidden] { display: none; }
.open-cover:hover { background: rgba(255, 255, 255, 0.16); }
.open-cover:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }

.hint { position: absolute; right: 10px; top: 386px; width: 312px; font-size: 13px; line-height: 18px; color: var(--muted); }
.credit { position: absolute; left: 232px; bottom: 18px; font-size: 11px; line-height: 14px; color: var(--faint); }

/* Phone-only parts. */
.pill-short, .phone-button, .send-status, .hint-phone { display: none; }

/* With the backdrop hidden the copy sits on the wallpaper: a soft shadow keeps it readable. The badge stays flat. */
@media (min-width: 768px) {
  .hero[data-backdrop="hidden"] :is(.eyebrow, h1, .req, .keytext, .kt, .hint, .credit) {
    text-shadow: 0 1px 2px rgba(60, 0, 20, 0.45), 0 2px 18px rgba(60, 0, 20, 0.35);
  }
  .hero[data-backdrop="hidden"] :is(.muted, .req, .hint, .credit) { color: #fffaf2; }
}

/* Phones, and screens too short for the board (a phone held sideways): the screen is a 380-pixel band at board
   scale (--k = 1), positions from the phone board; the copy follows below it on the page's ground. */
@media (max-width: 767px), (max-height: 500px) {
  .hero { height: auto; overflow: visible; }
  .screen { position: relative; inset: auto; height: 380px; }

  .icons-grid { transform: scale(0.5); }
  .wg-cal { left: auto; right: 16px; top: 226px; width: 84px; height: 84px; padding: 9px 10px; border-radius: 16px; }
  .wg-cal .wg-day { font-size: 7px; line-height: 9px; }
  .wg-cal .wg-date { font-size: 22px; line-height: 26px; }
  .wg-cal .wg-events { margin-top: 4px; font-size: 7.5px; line-height: 10px; }
  .wg-cal .wg-events span + span, .wg-photo { display: none; }

  /* The windows keep their desktop markup, each scaled to its place on the phone board. */
  .win { transform-origin: 0 0; }
  .w-sheet { left: 150px; top: 40px; transform: scale(0.4); }
  .w-chat { left: 70px; top: 58px; transform: scale(0.62); }
  .w-pitch { left: 34px; top: 124px; transform: scale(0.48); }
  .w-settings { left: 6px; top: 30px; transform: scale(0.7); }
  .w-about { left: 50%; top: 60px; transform: translateX(-50%) scale(0.85); transform-origin: 50% 0; }
  .dock { bottom: 10px; transform: translateX(-50%) scale(0.58); transform-origin: 50% 100%; }

  .menubar { height: 26px; padding: 0 12px 0 14px; font-size: 11px; line-height: 14px; }
  .mb-left, .mb-menus { gap: 12px; }
  .mb-menus span:nth-child(n + 3), .clock-day, .pill-long { display: none; }
  .mb-right { gap: 9px; }
  .pill { gap: 5px; padding: 1px 8px; }
  .pill i { width: 6px; height: 6px; }
  .pill-short { display: inline; }
  .glyph { width: 26px; height: 20px; border-radius: 5px; }
  .glyph svg { width: 14px; height: 14px; }

  /* The menu at 110% under the glyph; with no room on either side, Depth overlaps it, as macOS does. */
  .menuwrap { right: 6px; top: 30px; transform: scale(1.1); }
  /* Beside the menu where it fits (-194 is the desktop place); otherwise over it, 6 pixels from the left edge. */
  .cmenu.sub { right: auto; left: max(calc((276px - 100vw) / 1.1), -194px); }

  .rim-spill { width: 300px; }
  .rim-core { width: 2.5px; box-shadow: 0 0 7px 2px #ffffff, 0 0 30px 8px rgba(255, 190, 140, 0.55), 0 0 100px 30px rgba(255, 110, 80, 0.22); }

  .copy { position: relative; inset: auto; pointer-events: auto; border-top: 1px solid rgba(255, 255, 255, 0.10); }
  .copy .fit { position: static; width: auto; height: auto; transform: none; padding: 11px 24px 28px; }
  .copy .fit > * { position: static; }
  .copy .eyebrow { gap: 8px; font-size: 15px; line-height: 20px; }
  .copy h1 { width: auto; margin: 14px 0 0 -2px; font-size: min(42px, 10.8vw); line-height: 1; letter-spacing: -0.045em; white-space: normal; }
  .copy .lede { display: block; max-width: 342px; margin-top: 18px; font-size: 16px; line-height: 23px; color: var(--muted); }
  .copy .cta { margin-top: 22px; gap: 16px; flex-wrap: wrap; }
  .badge { width: 156px; height: 48px; padding: 0 14px; border-radius: 10px; }
  .badge-small { font-size: 9px; line-height: 11px; }
  .badge-big { font-size: 18px; line-height: 21px; }
  .divider, .keys { display: none; }
  .open-cover { width: 100%; max-width: 342px; }

  .phone-button {
    display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; max-width: 342px;
    border-radius: 12px; font: 600 15px/20px var(--font); color: var(--ink); cursor: pointer;
  }
  .phone-button:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
  .ce-button {
    height: 44px; margin-top: 18px; border: 1px solid rgba(255, 255, 255, 0.16); background: #18181a;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.10) inset, 0 3px 0 #000000;
  }
  .ce-button[aria-pressed="true"] { transform: translateY(2px); background: #2c2c2e; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.10) inset, 0 1px 0 #000000; }
  .send { height: 48px; margin-top: 12px; border: 1px solid rgba(255, 255, 255, 0.18); background: rgba(28, 28, 30, 0.8); font-size: 16px; }
  .copy .send-status { display: block; min-height: 18px; max-width: 342px; margin-top: 6px; font-size: 13px; line-height: 18px; color: var(--muted); text-align: center; }
  .copy .hint { width: auto; max-width: 342px; margin-top: 4px; text-align: center; color: #b9b7b2; }
  .hint-mac { display: none; }
  .hint-phone { display: inline; }
  .copy .credit { margin-top: 24px; }
}

/* Reduce transparency: Cover's menus and the windows go opaque. */
@media (prefers-reduced-transparency: reduce) {
  .cmenu, .win, .dock {
    background: #2a2a2c; -webkit-backdrop-filter: none; backdrop-filter: none;
  }
}

/* Increase contrast: separators and secondary text go up to white at 60%. */
@media (prefers-contrast: more) {
  :root { --muted: rgba(255, 255, 255, 0.6); --faint: rgba(255, 255, 255, 0.6); }
  .sep, .divider { background: rgba(255, 255, 255, 0.6); }
  .ks, .req, .hint, .set-cap, .set-label small, .set-head, .about-version { color: rgba(255, 255, 255, 0.6); }
  .set-row, .cmenu, .win { border-color: rgba(255, 255, 255, 0.6); }
}
