:root {
  /* The scale everything but the menu bar is drawn at. main.js sets it: a little under life size,
     and smaller still when the window is too short for the widget columns */
  --ui: 0.9;
  --edge: 20px;
  --small: 164px;
  --gap: 20px;
  --column: calc(var(--small) * 2 + var(--gap));
}

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  background: #0e3a4a;
}

body {
  font: 400 13px/1.4 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", sans-serif;
  -webkit-font-smoothing: antialiased;
  color: #fff;
  user-select: none;
  -webkit-user-select: none;
}

a { color: inherit; }
h1, h2, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

#wallpaper, #glass, #glass-top {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
}

#wallpaper { object-fit: cover; }
#glass, #glass-top { pointer-events: none; }

/* The wallpaper's stand-in until it has loaded: a 40px copy, blurred */
body::before {
  content: "";
  position: fixed;
  inset: -60px;
  background: url("data:image/webp;base64,UklGRloBAABXRUJQVlA4IE4BAACwBwCdASooABoAPrVKoUsnJCMhqrgMAOAWiUAWI+7BgjrjhY7lpSVkvJNjh17sVHDCILtLGgYUOyGcKiQugoXDio4fPpwAAP7pD6NNhQtDWzxnFLXdOEKG5F06lUbEduSt5jiqOWaChUKh69BAIPBZ5UlYGXcPURYGMOjjTT5yUMT7nceaSo7OkYrxyze7MkAvsVQYkhCZyJVlq/XuF+9xiCYwfpq/L54mOKzgXBHll5ygzZ/vxUC/NOb/WwaAsJalHXpc2hLLMmOigmItqtHu7ucHFRjhFJatEBgcTjustg5Qzqv0BUBLpsFoRCOvl/kCGDDG22psV8j5uSyjuE5RjyykEaHW/1/H0moatRy7uhBZLKfQxxt5iN8IPzqrqp9q8Z9Kv5zmvcREj5sA+Kq+GvQKJ2Bd1lIiDa0JFl0zUuqFn5t0xZ9wIKL8QIAA") center / cover no-repeat;
  filter: blur(28px);
}

/* The wallpaper fades in over its stand-in once it has loaded */
#wallpaper { transition: opacity 0.5s; }
.wallpaper-pending #wallpaper { opacity: 0; }

/* Until main.js has laid the desk out, only the stand-in and the menu bar show; then the rest fades in
   together, instead of the windows and widgets showing up first in a heap */
.booting :is(#wallpaper, #glass, #glass-top, .widgets, .window, .dock, #pill, #hint) { visibility: hidden; }
.revealed :is(#wallpaper, #glass, #glass-top, .widgets, .window, .dock, #hint) { animation: reveal 0.35s ease-out; }
@keyframes reveal { from { opacity: 0; } }

/* Over the app windows, under the Dock's icons and the pill's content */
#glass-top { z-index: 9; }

/* MARK: menu bar */

.menubar {
  position: fixed;
  z-index: 10;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.2), 0 1px 1px rgba(0, 0, 0, 0.14);
  white-space: nowrap;
}

.menubar-left, .menubar-menus, .menubar-status {
  display: flex;
  align-items: center;
}

/* The LiquidType menu (menu.css) where the Apple menu would be, since Apple's logo is Apple's to use;
   then the frontmost app's menus, which only look the part */
.menubar-left { gap: 22px; }
.menubar-menus { gap: 19px; }
.menubar-menus strong { font-weight: 700; }

/* A MacBook's camera housing, as deep as the menu bar, where the display's top edge curves down into it.
   Menus stay clear of it: those that don't fit on its left wrap onto a line that's cut off, and the
   status items on the right go under it, as they do on a Mac */
.notch {
  position: absolute;
  top: 0;
  left: calc(50% - 98px);
  width: 196px;
  height: 28px;
  fill: #000;
}

.menubar-left { max-width: calc(50vw - 92px - 12px - 18px); }
.brand-menu { flex-shrink: 0; }

.menubar-menus {
  min-width: 0;
  height: 28px;
  /* Room for the first menu's shadow */
  margin-left: -6px;
  padding-left: 6px;
  flex-wrap: wrap;
  align-content: flex-start;
  line-height: 28px;
  overflow: hidden;
}

.menubar-status { gap: 16px; }

.menubar-status svg {
  height: 16px;
  fill: currentColor;
  filter: drop-shadow(0 0 3px rgba(0, 0, 0, 0.2));
}

.menubar-status .status-battery { height: 15px; }
.menubar-status time { margin-left: 2px; }

/* MARK: widgets */

.widgets {
  position: fixed;
  top: 44px;
  width: var(--column);
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  transform: scale(var(--ui));
}

.widgets-left { left: var(--edge); transform-origin: top left; }
.widgets-right { right: var(--edge); transform-origin: top right; }

.widget-row {
  display: flex;
  gap: var(--gap);
}

/* Sizes are the system's: a small widget is a square, a medium one two squares and the gap wide.
   The surface (clear, dark, black or white glass) is drawn on the canvas underneath; these boxes
   only carry the content */
.widget {
  box-sizing: border-box;
  height: var(--small);
  padding: 16px;
  border-radius: 24px;
  display: block;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
}

.widget-small {
  flex: 0 0 var(--small);
  display: flex;
  flex-direction: column;
}

.widget[data-glass="white"] { color: #1d1d1f; }

.widget a:focus-visible, a.widget:focus-visible, .dock a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  border-radius: 6px;
}

a.widget:focus-visible { border-radius: 24px; }

/* A large widget: two medium ones and the gap tall */
.widget-large { height: calc(var(--small) * 2 + var(--gap)); }

/* Beta: the way in, so it's the biggest widget on the desk, and of the pill's clear glass. Laid out like
   Weather's: a label and a name at the top left, a symbol at the top right, the rest under a hairline.
   No logo yet, so the name stands on its own. The text carries a soft shadow, the way the desktop's
   labels do, since the wallpaper shows through behind it */

.widget-beta {
  position: relative;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.22), 0 0 8px rgba(0, 0, 0, 0.12);
}

.beta-head { margin-bottom: 14px; }

/* Over the name, the way Calendar heads its widget with the month */
.beta-badge {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
}

.beta-head h1 {
  margin-top: 4px;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.beta-tagline {
  margin-top: 4px;
  font-size: 15px;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.86);
}

/* The invite, under a hairline, at the foot of the card */
.beta-body {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
}

.widget-beta h2 {
  font-size: 17px;
  font-weight: 650;
  line-height: 1.25;
}

.beta-lede {
  margin-top: 3px;
  font-size: 13px;
  line-height: 1.38;
  color: rgba(255, 255, 255, 0.86);
}

.beta-lede b { font-weight: 600; color: #fff; }

.beta-form {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.beta-form input, .beta-form button {
  height: 38px;
  border: 0;
  border-radius: 19px;
  font: inherit;
  font-size: 14px;
}

.beta-form input {
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  color: #fff;
  text-shadow: none;
  outline: none;
}

.beta-form input::placeholder { color: rgba(255, 255, 255, 0.78); }
.beta-form input:focus { background: rgba(255, 255, 255, 0.24); box-shadow: inset 0 0 0 1.5px #fff; }

/* The one white button on the desk */
.beta-form button {
  background: #fff;
  color: #1d1d1f;
  font-weight: 650;
  text-shadow: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: background 0.15s;
}

.beta-form button:hover { background: #ececee; }
.beta-form button:active { background: #dcdce0; }
.beta-form button:disabled { background: rgba(255, 255, 255, 0.75); cursor: default; }
.beta-form button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* For screen readers only: the field's placeholder says the rest */
.beta-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* A field people never see; a bot that fills it in is told it worked, and nothing is sent */
.beta-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.beta-status {
  font-size: 12px;
  line-height: 1.3;
  color: #ffd60a;
}

.beta-status:empty { display: none; }

.beta-fine {
  margin-top: 10px;
  font-size: 11.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.76);
}

/* Once the address is in, the card says so, with a tick where the form was */
.widget-beta.joined .beta-form, .widget-beta.joined .beta-fine { display: none; }

.widget-beta.joined .beta-body::before {
  content: "";
  display: block;
  width: 40px;
  height: 40px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.4 6.6 11.3 12.4 4.9' fill='none' stroke='%231d1d1f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

/* Notes */

.widget-notes h2 {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 650;
  color: #d99a00;
}

.widget-notes h2 svg { width: 15px; height: 15px; fill: currentColor; }

.widget-notes ul {
  margin-top: 7px;
  display: grid;
}

/* A title and what it means, a row each, the way the widget lists notes */
.widget-notes li {
  padding: 6px 0;
  border-top: 1px solid rgba(60, 60, 67, 0.13);
  display: grid;
  grid-template-columns: 124px 1fr;
  gap: 8px;
  font-size: 12.5px;
  line-height: 1.3;
}

.widget-notes li:last-child { padding-bottom: 0; }
.widget-notes b { font-weight: 650; }
.widget-notes span { color: #6e6e73; }

/* Stocks, on its near-black glass. A rise is green, or red where that's the custom (main.js) */

.widget-stocks {
  --move: #30d158;
  padding: 14px 15px 12px;
}

.widget-stocks.red-up { --move: #ff453a; }

.stocks-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.stocks-head > div { min-width: 0; }

.stocks-head b {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 13px;
  font-weight: 700;
}

.stocks-head b svg { width: 9px; height: 9px; fill: var(--move); }

.stocks-head div span {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: rgba(255, 255, 255, 0.55);
}

.stocks-head p {
  flex: none;
  display: grid;
  justify-items: end;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--move);
}

/* The day so far against the last close, the dotted line */
.stocks-chart {
  display: block;
  width: 100%;
  height: 34px;
  margin-top: auto;
  overflow: visible;
  color: var(--move);
}

.stocks-close { stroke: rgba(255, 255, 255, 0.35); stroke-width: 1; stroke-dasharray: 1.5 2.5; }

.widget-stocks strong {
  margin-top: 6px;
  text-align: right;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Calendar */

.widget-calendar { padding: 13px 13px 10px; }

.widget-calendar h2 {
  margin: 0 0 4px 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #ff3b30;
}

#calendar-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: center;
  justify-items: center;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1;
}

#calendar-grid i {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-style: normal;
}

#calendar-grid .weekend { color: #8e8e93; }
#calendar-grid .weekday { font-size: 9.5px; color: #8e8e93; }
#calendar-grid .today { background: #ff3b30; color: #fff; }

/* World clock */

.widget-clocks {
  padding: 16px 10px 12px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.widget-clocks figure {
  margin: 0;
  display: grid;
  justify-items: center;
  align-content: space-between;
  font-size: 11px;
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.55);
}

.widget-clocks svg { width: 66px; height: 66px; margin-bottom: 5px; }
.widget-clocks b { font-size: 12.5px; font-weight: 650; color: #fff; }

.clock-face { fill: #fff; }
.clock-numerals { fill: #1d1d1f; font-size: 11.5px; font-weight: 600; text-anchor: middle; dominant-baseline: central; }
.clock-hour, .clock-minute { stroke: #1d1d1f; }
.night .clock-face { fill: #2c2c2e; }
.night .clock-numerals { fill: #fff; }
.night .clock-hour, .night .clock-minute { stroke: #fff; }

.clock-hour, .clock-minute, .clock-second {
  stroke-linecap: round;
  /* --clock-start is how far into its 12 hours the clock was when drawn, in seconds; the hands run on from there */
  animation: clock-turn linear infinite;
  animation-delay: calc(var(--clock-start, 0) * -1s);
}

.clock-hour { stroke-width: 4.5; animation-duration: 43200s; }
.clock-minute { stroke-width: 3; animation-duration: 3600s; }
.clock-second { stroke: #ff9f0a; stroke-width: 1.2; animation-duration: 60s; }
.clock-cap { fill: #ff9f0a; }

@keyframes clock-turn { to { transform: rotate(360deg); } }

/* MARK: app windows */

.window {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #1d1d1f;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.24), 0 10px 28px rgba(0, 0, 0, 0.22);
  transform: scale(var(--ui));
  transform-origin: top left;
}

.window.active {
  z-index: 3;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.3), 0 22px 60px rgba(0, 0, 0, 0.42);
}

.window-bar {
  position: relative;
  flex: none;
  height: 38px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  touch-action: none;
}

.window-bar b {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  color: #a6a6ab;
  pointer-events: none;
}

.window.active .window-bar b { color: #4a4a4d; }

.lights { display: flex; gap: 8px; }

.lights i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #d4d4d8;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.12);
}

.window.active .lights i:nth-child(1) { background: #ff5f57; }
.window.active .lights i:nth-child(2) { background: #febc2e; }
.window.active .lights i:nth-child(3) { background: #28c840; }

/* Where dictated text lands. The caret only blinks in the frontmost window */
.field {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  cursor: text;
}

.caret {
  display: none;
  width: 1.5px;
  height: 1.15em;
  margin: 0 1px;
  vertical-align: text-bottom;
  animation: caret-blink 1.1s steps(1) infinite;
}

.window.active .caret { display: inline-block; }
.field.empty::after { content: attr(data-placeholder); }

@keyframes caret-blink { 50% { opacity: 0; } }

/* ChatGPT, after its desktop app in Work mode: a rail of icons on the window's bluish chrome, and a white
   panel with Chat and Work at the top, the question in the middle, the composer under it and a tray
   tucked beneath that. Drawn with what paint.js can repaint: flat colors, one radius a box, paths for
   icons */
.window-chatgpt {
  width: 560px;
  height: 420px;
  background: #e7edf3;
}

.window-chatgpt .window-bar { height: 36px; }

.chatgpt-nav {
  margin-left: 22px;
  display: flex;
  gap: 12px;
  color: #7b8488;
}

.chatgpt-nav svg { width: 16px; height: 16px; }
.chatgpt-nav .off { color: #b9c2c5; }

.chatgpt-plus {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 500;
  color: #3b78d8;
}

.chatgpt-plus svg { width: 14px; height: 14px; color: #2f7bf5; }

.chatgpt-new { margin-left: 14px; display: grid; color: #7b8488; }
.chatgpt-new svg { width: 15px; height: 15px; }

.chatgpt {
  flex: 1;
  min-height: 0;
  display: flex;
}

.chatgpt-rail {
  flex: none;
  width: 43px;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #778184;
}

.chatgpt-rail span {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}

.chatgpt-rail .on { background: #d9e4e7; color: #141716; }
.chatgpt-rail svg { width: 15px; height: 15px; }
.chatgpt-rail i { width: 20px; height: 1px; margin: 3px 0; background: rgba(0, 0, 0, 0.1); }

/* The account, at the foot of the rail */
.chatgpt-avatar {
  width: 20px;
  height: 20px;
  margin-top: auto;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #be3a28;
  color: #fff;
  font-size: 8.5px;
  font-weight: 500;
}

.chatgpt-main {
  flex: 1;
  min-width: 0;
  margin: 0 3px 3px 0;
  padding: 8px 22px 14px;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fdfdfd;
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.06);
}

.chatgpt-modes {
  flex: none;
  padding: 2px;
  border-radius: 15px;
  display: flex;
  background: #f3f3f3;
  font-size: 12.5px;
  color: #505050;
}

.chatgpt-modes span {
  width: 80px;
  height: 26px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}

.chatgpt-modes .on {
  background: #fff;
  color: #1d1d1f;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 0 0.5px rgba(0, 0, 0, 0.05);
}

/* The question and the composer, a little above the middle as in the app */
.chatgpt-hello {
  flex: 1;
  align-self: stretch;
  padding-bottom: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
}

.chatgpt-hello > p {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #121212;
}

.chatgpt-ask {
  align-self: stretch;
  display: flex;
  flex-direction: column-reverse;
}

/* Its top edge is under the composer's bottom one */
.chatgpt-tray {
  margin: -14px 11px 0;
  padding: 22px 14px 8px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 18px;
  background: #f3f3f3;
  font-size: 12.5px;
  color: #161616;
}

.chatgpt-tray span { display: flex; align-items: center; gap: 6px; }
.chatgpt-tray svg { width: 14px; height: 14px; }
.chatgpt-tray .laptop { margin-left: auto; width: 15px; height: 15px; color: #8a8a8a; }

/* Over the tray's top edge: Chrome paints a column-reverse flex row bottom first, tray last */
.composer {
  position: relative;
  z-index: 1;
  flex: none;
  padding: 12px 10px 8px 14px;
  border-radius: 16px;
  background: #fdfdfd;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.06);
}

.composer .field {
  min-height: 38px;
  max-height: 96px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.45;
}

.composer .field.empty::after { color: #b4b4b4; }
.composer .caret { background: #121212; }

.composer-bar {
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  color: #888;
}

.composer-bar > span { display: flex; align-items: center; gap: 14px; }
.composer-bar svg { width: 16px; height: 16px; color: #161616; }

.chatgpt-approval { display: flex; align-items: center; gap: 5px; }
.chatgpt-approval svg { width: 15px; height: 15px; color: #888; }

.chatgpt-model { display: flex; align-items: center; gap: 3px; color: #161616; }
.chatgpt-model em { font-style: normal; color: #8a8a8a; }
.chatgpt-model svg { width: 11px; height: 11px; margin-left: 3px; color: #8a8a8a; }

.send {
  width: 26px;
  height: 26px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #9dc1fd;
}

/* Blue in full once there's something to send */
.composer:has(.field:not(.empty)) .send { background: #2f7bf5; }
.send svg { width: 14px; height: 14px; color: #fff; }

.window-notes {
  width: 400px;
  height: 340px;
}

.note {
  flex: 1;
  min-height: 0;
  padding: 8px 20px 14px;
  border-top: 1px solid rgba(60, 60, 67, 0.12);
  overflow-y: auto;
  font-size: 13.5px;
  line-height: 1.5;
}

.note time {
  display: block;
  margin-bottom: 8px;
  text-align: center;
  font-size: 11px;
  color: #a1a1a6;
}

.note h3 {
  margin: 0 0 4px;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
}

.note p { margin-bottom: 7px; }
.note .caret { background: #e0a100; }

/* MARK: Dock */

.dock {
  position: fixed;
  z-index: 10;
  left: 0;
  right: 0;
  bottom: 8px;
  width: fit-content;
  height: 66px;
  margin: 0 auto;
  padding: 0 7px;
  border-radius: 24px;
  display: flex;
  align-items: center;
  gap: 2px;
  transform: scale(var(--ui));
  transform-origin: bottom center;
}

.dock-item {
  position: relative;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  display: block;
  background: none;
}

button.dock-item { cursor: pointer; }

.dock-item img {
  width: 100%;
  height: 100%;
  transition: transform 0.15s ease-out;
}

a.dock-item:hover img, button.dock-item:hover img { transform: translateY(-5px) scale(1.08); }

.dock-running::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.85);
}

/* The app's name over its icon, on the light frosted glass macOS 26 shows it on, pointing down at it */
.dock-label {
  position: absolute;
  left: 50%;
  bottom: 76px;
  padding: 3px 11px 4px;
  border-radius: 999px;
  background: rgba(246, 246, 246, 0.74);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.1), 0 3px 10px rgba(0, 0, 0, 0.16);
  color: #1d1d1f;
  font-size: 13px;
  line-height: 1.25;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-50%);
  transition: opacity 0.12s;
  pointer-events: none;
}

.dock-label::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 0.5px);
  width: 12px;
  height: 6px;
  margin-left: -6px;
  background: inherit;
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.dock-item:hover .dock-label, .dock-item:focus-visible .dock-label { opacity: 1; }

.dock-divider {
  width: 1px;
  height: 44px;
  margin: 0 7px;
  background: rgba(255, 255, 255, 0.3);
}

/* MARK: pill */

.pill {
  position: fixed;
  z-index: 11;
  left: 0;
  top: 0;
  width: 116px;
  height: 46px;
  border-radius: 23px;
  overflow: hidden;
  font-size: 15px;
  font-weight: 500;
  line-height: 1;
  /* Like the app's, it lets clicks through; main.js brings it up */
  pointer-events: none;
  opacity: 0;
  transform: scale(var(--ui));
  transform-origin: center bottom;
}

.pill-icon {
  position: absolute;
  left: 10px;
  top: 8px;
  width: 30px;
  height: 30px;
  pointer-events: none;
}

.pill-wave {
  position: absolute;
  left: 46px;
  right: 10px;
  top: 9px;
  bottom: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.pill-wave i {
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.92);
}

.pill-text {
  position: absolute;
  left: 50px;
  right: 16px;
  top: 0;
  bottom: 0;
  overflow: hidden;
}

/* Longer than the box: only the tail shows, and the left end fades to say there's more before it */
.pill-text.overflow {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%);
  mask-image: linear-gradient(to right, transparent, #000 12%);
}

.pill-text span {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 46px;
  white-space: nowrap;
}

.pill-text span.sliding { transition: transform 0.22s ease-out; }
.pill-text span.placeholder { opacity: 0.9; }

/* A status word and three dots hopping in turn, between the last word spoken and the text landing */
.pill-thinking {
  position: absolute;
  left: 50px;
  right: 16px;
  top: 0;
  bottom: 0;
  line-height: 46px;
  text-align: center;
  white-space: nowrap;
}

.pill-thinking span { display: inline-block; }

.pill-thinking b {
  padding: 0 2px;
  font-weight: inherit;
  opacity: 0.9;
}

.pill-thinking i {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-left: 4px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.9);
  animation: thinking-hop 1s ease-in-out infinite;
}

.pill-thinking b + i { margin-left: 6px; }
.pill-thinking i:nth-of-type(2) { animation-delay: 0.15s; }
.pill-thinking i:nth-of-type(3) { animation-delay: 0.3s; }

@keyframes thinking-hop {
  18% { transform: translateY(-3.2px); }
  0%, 36%, 100% { transform: none; }
}

/* One line when the text can't be typed where it was meant to go */
.pill-note {
  position: absolute;
  left: 50px;
  right: 16px;
  top: 0;
  bottom: 0;
  line-height: 46px;
  text-align: center;
  white-space: nowrap;
}

.pill-note span { padding: 0 2px; opacity: 0.95; }

.pill:not([data-show="wave"]) .pill-wave,
.pill:not([data-show="text"]) .pill-text,
.pill:not([data-show="thinking"]) .pill-thinking,
.pill:not([data-show="note"]) .pill-note { display: none; }

#hint {
  position: fixed;
  z-index: 11;
  left: 0;
  right: 0;
  margin: 0;
  display: grid;
  justify-items: center;
  font-size: 12px;
  color: #fff;
  pointer-events: none;
  /* It hangs upward from the spot main.js gives it, just over the pill */
  transform: translateY(-100%);
}

/* A chip of its own, so it reads over a white window as well as over the water */
.hint-line {
  padding: 3px 10px;
  border-radius: 13px;
  background: rgba(22, 28, 32, 0.46);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

/* The key in the hint is a real button: tapping it is tapping the key */
.talk-key {
  min-width: 24px;
  height: 20px;
  margin: 0 1px;
  padding: 0 5px;
  border: 0;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
  color: #fff;
  font: 600 11.5px/20px -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  text-shadow: inherit;
  cursor: pointer;
  pointer-events: auto;
}

.talk-key:hover { background: rgba(255, 255, 255, 0.32); }
.talk-key:active { transform: translateY(1px); }
.talk-key:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* MARK: tuning panel (development) */

#tuning {
  position: fixed;
  z-index: 12;
  top: 40px;
  left: 50%;
  width: 268px;
  margin-left: -148px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(22, 26, 30, 0.78);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  font-size: 12px;
  line-height: 1.3;
}

#tuning label {
  display: grid;
  grid-template-columns: 96px 1fr 38px;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
}

#tuning input { width: 100%; margin: 0; }
#tuning output { text-align: right; font-variant-numeric: tabular-nums; opacity: 0.75; }

#tuning button {
  margin-top: 8px;
  padding: 4px 10px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  color: inherit;
  font: inherit;
  cursor: pointer;
}

/* MARK: no WebGL2 — plain backdrop blur, no refraction */

.no-glass .pill, .no-glass .widget, .no-glass .dock {
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 9px 18px rgba(0, 0, 0, 0.21), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.no-glass .pill { background: rgba(20, 30, 34, 0.2); }
.no-glass .dock { background: rgba(255, 255, 255, 0.16); }
.no-glass [data-glass="dark"] { background: rgba(12, 15, 22, 0.74); }
.no-glass [data-glass="black"] { background: rgba(8, 8, 10, 0.94); }
.no-glass [data-glass="white"] { background: rgba(255, 255, 255, 0.95); }
.no-glass [data-glass="clear"] { background: linear-gradient(135deg, rgba(10, 18, 24, 0.22), rgba(10, 18, 24, 0.4)); }

/* MARK: narrow windows */

@media (max-width: 1160px) {
  .widgets-right { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dock-item img, .pill-text span.sliding { transition: none; }
  .pill-thinking i, .caret { animation: none; }
}
