/* Copyright 2026 massivehadron.com ltd. */

@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  color-scheme: dark;
  font: 16px Barlow, system-ui, sans-serif;
  color: #eef5f7;
  background: #101820;
  --text: #eef5f7;
  --muted: #a6bac5;
  --panel: #142128;
  --border: #31434c;
  --accent: #87e2ce;
  --danger: #ff9f9e;
  --mono: 'IBM Plex Mono', ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body, .tablet-page {
  -webkit-user-select: none;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}
html ::selection, body ::selection { background: transparent; }
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
}
input::selection, textarea::selection, [contenteditable="true"]::selection { background: highlight; }
[hidden] { display: none !important; }
html {
  height: var(--tablet-height, 100dvh);
  overflow: hidden;
  overscroll-behavior: none;
  background: #101820;
}
body {
  position: fixed;
  left: 0;
  right: 0;
  top: var(--tablet-top, 0px);
  width: 100%;
  height: var(--tablet-height, 100dvh);
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  display: flex;
  flex-direction: column;
  padding:
    env(safe-area-inset-top)
    max(8px, env(safe-area-inset-right), clamp(8px, 3vw, 42px))
    max(18px, env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left), clamp(8px, 3vw, 42px));
  background: radial-gradient(ellipse at 50% 14%, #253642, transparent 72%), #101820;
}
button, a { -webkit-tap-highlight-color: transparent; }
button, .action-link {
  font: 600 1rem Barlow, system-ui, sans-serif;
  color: var(--text);
  background: #21333d;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 13px;
  min-height: 39px;
  cursor: pointer;
}
button:hover:not(:disabled), .action-link:hover { background: #304753; }
button:disabled { opacity: .58; cursor: default; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid #adebdc; outline-offset: -2px; }
button.primary { background: var(--accent); color: #092522; border-color: transparent; }
button.primary:hover:not(:disabled) { background: #aef1e2; }
button.danger, .negative { color: var(--danger); }
h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
.muted, small { color: var(--muted); }
.masthead {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  max-width: 1260px; min-height: 64px; margin: auto; padding-inline: 8px;
}
.masthead h1 { font-size: clamp(1rem, 2vw, 1.28rem); font-weight: 700; }
.portal-link { text-decoration: none; font-weight: 600; }
.portal-link:hover { text-decoration: underline; }
#maximise-tablet {
  flex: none; display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0;
  color: var(--accent); font-size: 1.65rem; line-height: 1;
}
.device {
  position: relative;
  display: flex; flex-direction: column;
  width: min(100%, 1260px); margin-inline: auto;
  flex: 1 1 auto; min-height: 0; max-height: 860px;
  padding: 18px 18px 5px;
  border: 1px solid #4d5b65; border-radius: 29px;
  background: linear-gradient(145deg, #3c4852 0%, #1a252e 23%, #151d25 69%, #273643);
  box-shadow: 0 18px 54px #0009, inset 0 0 0 3px #0c12186b;
}
@media (min-width: 1024px) and (orientation: landscape) {
  .masthead { min-height: 40px; margin-block: 0; }
  .device { max-height: 960px; }
}
html.browser-fullscreen .device { max-height: none; }
.camera {
  position: absolute; top: 6px; left: 50%; width: 7px; aspect-ratio: 1;
  transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 36% 37%, #537088, #020407 64%);
}
.glass {
  position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column;
  overflow: hidden; border: 1px solid #080d10; border-radius: 13px; background: #10191e;
}
.status-bar {
  flex: none; display: grid; grid-template-columns: 1fr minmax(0, 1fr) 1fr;
  align-items: center; height: 34px; padding: 0 14px;
  color: #dbe8ec; background: #0a1116; font: 500 .76rem var(--mono);
}
.status-left { display: flex; align-items: center; gap: 6px; }
.status-center { min-width: 0; display: grid; place-items: center; align-self: stretch; }
.status-center > * { grid-area: 1 / 1; }
#app-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; color: #a7c1cc; }
.status-center:has(#status-transport:not([hidden])) #app-name { visibility: hidden; }
.status-transport { display: flex; align-items: stretch; height: 100%; gap: 14px; }
.status-transport button, .status-transport button:hover:not(:disabled) {
  display: grid; place-items: center; width: 44px; height: 100%; min-height: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent; color: #e7f2f6;
}
.status-transport i {
  width: 18px; height: 18px; background: currentColor; pointer-events: none;
}
#status-previous i, #status-next i {
  -webkit-mask: url("./art/bot-tunes/next.png") center / contain no-repeat;
  mask: url("./art/bot-tunes/next.png") center / contain no-repeat;
}
#status-previous i { transform: scaleX(-1); }
#status-play i {
  -webkit-mask: url("./art/bot-tunes/play.png") center / contain no-repeat;
  mask: url("./art/bot-tunes/play.png") center / contain no-repeat;
}
#status-play.is-pause i {
  -webkit-mask: url("./art/bot-tunes/pause.png") center / contain no-repeat;
  mask: url("./art/bot-tunes/pause.png") center / contain no-repeat;
}
.status-right { display: flex; justify-content: end; align-items: center; gap: clamp(6px, 1.6vw, 14px); white-space: nowrap; }
.battery { display: flex; justify-content: end; align-items: center; gap: 6px; }
.battery i { width: 20px; height: 10px; border: 1px solid #a7bcc5; border-radius: 2px; padding: 1px; }
.battery i::before { content: ''; display: block; height: 100%; width: 20%; background: #ffb989; }
.display { min-height: 0; position: relative; flex: 1; }
.home, .app-view, .app-frame, .waiting { width: 100%; height: 100%; }
.home {
  container: tablet-home / size;
  display: flex; flex-direction: column; justify-content: center; touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  background: linear-gradient(135deg, #09161ed9, #102a339e 55%, #10232edb), var(--wallpaper, none) center / cover;
}
.home-pages { flex: 1; min-height: 0; overflow: hidden; overflow: clip; container-type: size; }
.slide-track {
  display: flex; width: 100%; height: 100%;
  transform: translate3d(var(--slide-offset, 0%), 0, 0);
}
.home-page { flex: 0 0 100%; min-width: 0; }
.app-grid {
  display: grid; width: min(92%, 1000px); height: 100%; margin: auto;
  grid-template-columns: repeat(5, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 10px clamp(4px, 2vw, 30px); padding: clamp(8px, 4cqh, 32px) 0 6px;
}
.app-icon {
  position: relative; align-self: center; justify-self: stretch; display: grid; justify-items: center;
  gap: 10px; min-width: 0; padding: 6px 0; border: 0; background: transparent; color: white;
  font-size: clamp(.8rem, 1.65vw, 1.05rem); line-height: 1.1; text-align: center; text-shadow: 0 2px 5px #000;
}
.app-icon:hover:not(:disabled) { background: #d7faff16; }
.icon-art {
  position: relative; display: grid; place-items: center;
  flex: none; width: clamp(48px, 9vw, 100px); aspect-ratio: 1; border-radius: 24%;
  background: linear-gradient(145deg, #315b70, #172933);
  box-shadow: 0 5px 14px #0006, inset 0 0 0 1px #dbf7ff30;
  font-weight: 700; text-shadow: none;
}
.app-icon > .icon-art { width: clamp(22px, min(9vw, calc(33.333cqh - 38px)), 88px); }
.app-icon > .icon-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icon-art img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.icon-art img.exhaust-icon { object-fit: contain; }
.icon-image { width: 100%; height: 100%; border-radius: inherit; overflow: hidden; }
.icon-art img.botflix { transform: scale(1.28); }
.icon-art img.snapbot { transform: scale(1.4); }
.icon-art img.settings { object-position: 32% center; }
.offloaded .icon-art img { filter: grayscale(1) brightness(.73); }
.offloaded .icon-label { color: #bfd0d6; }
.cloud, .badge {
  position: absolute; display: grid; place-items: center; min-width: 22px; height: 22px; border-radius: 11px;
  font: 500 .73rem var(--mono); padding-inline: 4px;
}
.cloud { right: -5px; bottom: -4px; color: #19333b; background: #d2e2e8; }
.badge { right: -6px; top: -5px; color: white; background: #b82e48; }
.page-dots { display: flex; justify-content: center; flex: none; padding-bottom: 12px; }
.page-dots button { display: grid; place-items: center; width: 42px; border: 0; background: transparent; }
.page-dots button::after { content: ''; width: 9px; height: 9px; border: 1px solid #d4e8ee; border-radius: 50%; }
.page-dots button[aria-current="page"]::after { background: #d4e8ee; }
.home-button {
  flex: none; align-self: center; display: grid; place-items: center; min-height: 32px; width: 32px;
  margin-top: 4px; border: 1px solid #61727c; border-radius: 50%; padding: 0; background: #141e27;
}
.home-button:active { transform: translateY(1px); }
.home-button i { border: 1px solid #8ca4af; border-radius: 3px; width: 11px; height: 11px; }
.app-view { background: #111c22; overflow: auto; overscroll-behavior: contain; touch-action: pan-y; }
.app-view.bot-tunes {
  --bt-matte: #0f0f1d;
  --bt-player: #261e41;
  --bt-row: #181b2d;
  --bt-selected: #372e58;
  --bt-control: #3b355b;
  --bt-accent: #cbaeff;
  --bt-pink: #ff6397;
  --bt-muted: #b2b6cf;
  display: flex; flex-direction: column; gap: clamp(6px, 1.4vw, 15px); padding: clamp(6px, 1.5vw, 16px);
  background: var(--bt-matte); overflow: hidden; container-type: inline-size;
}
.bt-player {
  --bt-player-gap: 6px;
  flex: none; display: grid; align-items: center; grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--bt-player-gap) clamp(8px, 2vw, 20px); padding: clamp(6px, 1.4vw, 14px);
  border-inline-start: 3px solid var(--bt-accent); background: var(--bt-player);
}
.bt-player button.bt-meter {
  position: relative; display: block; width: clamp(108px, 21cqw, 136px); aspect-ratio: 1; min-height: 0;
  padding: 0; border: 1px solid #48405f; border-radius: 0; background: #080714;
}
.bt-meter canvas { display: block; width: 100%; height: 100%; pointer-events: none; }
.bt-meter:has(> .bt-play-icon:not([hidden])) > :is(canvas, img, picture) { opacity: .55; }
.bt-title { min-width: 0; }
.bt-title :is(h2, h3, p), .bt-status { margin: 0; }
.bt-title h2 { color: var(--bt-accent); font-size: clamp(.82rem, 2.2cqw, 1.2rem); margin-bottom: .18em; }
.bt-title h3 { font-size: clamp(.98rem, 3cqw, 1.65rem); line-height: 1.08; overflow-wrap: anywhere; }
.bt-title-copy, .bt-title-copy:hover:not(:disabled) {
  display: block; max-width: 100%; min-height: 0; padding: 0; border: 0; background: none;
  font: inherit; color: inherit; text-align: left; overflow-wrap: anywhere;
}
.bt-credit, .bt-status { color: var(--bt-muted); font-size: clamp(.74rem, 1.8cqw, .94rem); }
.bt-credit { padding-top: .3em; line-height: 1.2; overflow-wrap: anywhere; }
.bt-credit-search, .bt-credit-search:hover:not(:disabled) {
  font: inherit; color: inherit; background: none; border: 0; padding: 0; min-height: 0; cursor: pointer;
  max-width: 100%; vertical-align: baseline; overflow-wrap: anywhere;
  text-align: left; text-decoration: underline; text-underline-offset: .15em;
}
.bt-time { padding-top: .3em; color: var(--bt-accent); font-size: .85rem; font-variant-numeric: tabular-nums; }
.bt-status {
  grid-column: 2 / -1; min-width: 0; line-height: 1.2; overflow-wrap: anywhere;
}
.bt-controls {
  display: grid; grid-template-columns: repeat(2, 44px); gap: var(--bt-player-gap);
}
.bt-controls button.bt-icon, .bt-track-action, .bt-retry, .bt-download-modes button, .bt-search button, .bt-pagination button, .bt-upload button, .bt-my-uploads button {
  color: #fff; background: var(--bt-control); border: 0; border-radius: 3px; padding-inline: 10px;
  min-height: 34px; font-weight: 600;
}
.bt-controls button.bt-favourites[aria-pressed="true"] { background: var(--bt-pink); color: var(--bt-matte); }
.bt-controls button.bt-icon:disabled, .bt-track-action:disabled, .bt-upload button:disabled { opacity: .55; }
.bt-controls button.bt-icon {
  display: grid; place-content: center; justify-items: center; width: 44px; height: 44px; min-height: 0; padding: 0;
}
.bt-icon i {
  width: 20px; height: 20px; background: currentColor; pointer-events: none;
}
.bt-previous i, .bt-next i {
  -webkit-mask: url("./art/bot-tunes/next.png") center / contain no-repeat;
  mask: url("./art/bot-tunes/next.png") center / contain no-repeat;
}
.bt-previous i { transform: scaleX(-1); }
.bt-play-icon {
  pointer-events: none; position: absolute; inset: 0; margin: auto; width: 36px; height: 36px; background: #fff;
  -webkit-mask: url("./art/bot-tunes/play.png") center / contain no-repeat;
  mask: url("./art/bot-tunes/play.png") center / contain no-repeat;
}
.bt-meter .bt-pause-indicator {
  pointer-events: none; position: absolute; inset-block-start: 7px; inset-inline-end: 7px;
  width: 13px; height: 13px; background: var(--bt-muted);
  -webkit-mask: url("./art/bot-tunes/pause.png") center / contain no-repeat;
  mask: url("./art/bot-tunes/pause.png") center / contain no-repeat;
}
.bt-shuffle i {
  background: var(--bt-pink);
  -webkit-mask: url("./art/bot-tunes/shuffle.png") center / contain no-repeat;
  mask: url("./art/bot-tunes/shuffle.png") center / contain no-repeat;
}
.bt-shuffle[aria-pressed="true"] i { background: currentColor; }
.bt-favourites i {
  background: var(--bt-pink);
  -webkit-mask: url("./art/bot-tunes/heart.png") center / contain no-repeat;
  mask: url("./art/bot-tunes/heart.png") center / contain no-repeat;
}
.bt-heart img, .bt-apple img { width: 16px; height: 16px; object-fit: contain; }
.bt-heart[aria-pressed="true"] img, a.bt-apple img {
  filter: brightness(0) saturate(100%) invert(55%) sepia(59%) saturate(1462%) hue-rotate(303deg);
}
.bt-favourites[aria-pressed="true"] i { background: currentColor; }
.bt-library {
  flex: 1; min-width: 0; min-height: 0; overflow-x: hidden; overflow-y: auto;
  touch-action: pan-y pinch-zoom; overscroll-behavior-x: none; overscroll-behavior-y: contain; overflow-anchor: none;
}
.bt-list-section > h3 { margin: 0; padding: .35em 0 .55em; font-size: clamp(1rem, 2.8cqw, 1.4rem); }
.bt-list-section + .bt-list-section { margin-top: clamp(8px, 1.4cqw, 14px); }
.bt-shared-tracks[hidden] + .bt-list-section { margin-top: 0; }
.bt-empty { margin: 0 0 .55em; color: var(--bt-muted); }
.bt-download-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
.bt-download-modes button[aria-pressed="true"] { background: var(--bt-selected); box-shadow: inset 0 -2px var(--bt-accent); }
.bt-search, .bt-upload-details { display: flex; gap: 8px; }
.bt-search { flex: none; min-width: 0; margin: 0; }
.bt-input, .bt-file { flex: 1; min-width: 0; font: inherit; color: #fff; }
.bt-input, .bt-filter { border: 1px solid transparent; border-radius: 3px; padding: 7px 9px; background: var(--bt-control); }
.bt-filter { width: clamp(6.6rem, 20cqw, 12rem); min-width: 0; color: #fff; font: inherit; }
.bt-search .bt-input { background: var(--bt-row); }
.bt-input::placeholder { color: var(--bt-muted); }
.bt-share-link { width: 100%; }
.bt-pagination { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; }
.bt-pagination button:last-child { margin-inline-start: auto; }
.bt-upload-panel { background: var(--bt-row); padding: clamp(8px, 1.5cqw, 14px); }
.bt-upload-panel > h3 { padding-top: 0; }
.bt-upload { display: grid; gap: 8px; }
.bt-file { align-self: center; color: var(--bt-muted); }
.bt-file::file-selector-button {
  min-height: 34px; margin-inline-end: 8px; padding-inline: 10px; color: #fff; background: var(--bt-control);
  border: 0; border-radius: 3px; font: inherit; font-weight: 600;
}
.bt-upload .bt-publish { background: var(--bt-accent); color: var(--bt-matte); }
.bt-publish { justify-self: start; }
.bt-rights { display: grid; gap: 8px; font-size: .9rem; color: var(--bt-muted); }
.bt-rights p { margin: 0; }
.bt-rights-info summary { cursor: pointer; color: var(--bt-accent); }
.bt-rights-info p { margin-block: 6px; }
.bt-rights-info a { overflow-wrap: anywhere; }
.bt-rights-confirm { display: flex; align-items: flex-start; gap: 8px; color: #fff; cursor: pointer; }
.bt-rights-confirm input { flex: none; width: 1.1rem; height: 1.1rem; margin: .05em 0 0; accent-color: var(--bt-accent); }
.bt-my-uploads { margin-bottom: 10px; }
.bt-my-uploads summary { cursor: pointer; color: var(--bt-accent); }
.bt-owned-track { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.bt-owned-track span { overflow-wrap: anywhere; }
.bt-upload-status { margin: 0; color: var(--bt-accent); overflow-wrap: anywhere; }
.bt-upload-status:empty { display: none; }
.bt-row {
  display: grid; grid-template-columns: minmax(0, 1fr) repeat(3, 34px) auto;
  gap: 6px; align-items: center; padding: 3px 8px 3px 3px; margin-bottom: 5px; background: var(--bt-row);
}
.bt-row.bt-selected { background: var(--bt-selected); }
.bt-select, .bt-heart, .bt-apple, .bt-share { border: 0; background: transparent; color: inherit; }
.bt-select {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px;
  width: 100%; padding: 4px; line-height: 1.08; text-align: left;
}
.bt-select:hover:not(:disabled), .bt-heart:hover:not(:disabled), .bt-share:hover:not(:disabled) { background: #ffffff12; }
.bt-track-art { display: grid; place-items: center; width: clamp(31px, 6cqw, 47px); aspect-ratio: 1; object-fit: cover; }
.bt-portrait { background: url('./art/bot-tunes/tilestorm-portraits.png') no-repeat; background-size: 400% 200%; }
.bt-monogram { background: var(--bt-control); font-weight: 700; }
.bt-row-copy strong, .bt-row-copy small { display: block; }
.bt-row-copy strong { font-size: clamp(.8rem, 2.1cqw, 1.06rem); overflow-wrap: anywhere; }
.bt-row-copy small { margin-top: .25em; color: var(--bt-muted); overflow-wrap: anywhere; }
.bt-duration { color: var(--bt-muted); font-size: .77rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bt-heart, .bt-apple, .bt-share { display: grid; place-items: center; width: 100%; min-height: 32px; padding: 0; border-radius: 3px; }
.bt-share i {
  position: relative; width: 14px; height: 11px; margin-top: 4px;
  border: 1.5px solid currentColor; border-top: 0; border-radius: 2px;
}
.bt-share i::before, .bt-share i::after { content: ''; position: absolute; left: 50%; }
.bt-share i::before { top: -5px; width: 1.5px; height: 12px; background: currentColor; transform: translateX(-50%); }
.bt-share i::after {
  top: -5px; width: 6px; height: 6px; border: solid currentColor; border-width: 1.5px 0 0 1.5px;
  transform: translateX(-50%) rotate(45deg);
}
.bt-heart img, span.bt-apple img { opacity: .42; }
.bt-heart[aria-pressed="true"], a.bt-apple { background: #512542; }
.bt-heart[aria-pressed="true"] img { opacity: 1; }
.bt-actions { display: flex; gap: 4px; }
.bt-track-action { width: auto; min-width: 4.4rem; padding-inline: 8px; white-space: nowrap; }
@container (max-width: 640px) {
  .bt-player { --bt-player-gap: 4px; column-gap: 8px; }
  .bt-player button.bt-meter { width: clamp(100px, 32cqw, 140px); }
  .bt-status { grid-column: 1 / -1; }
  .bt-search :is(.bt-input, .bt-filter) { font-size: 16px; }
  .bt-album-actions { flex-direction: column; }
}
@container (max-width: 385px) {
  .bt-download-modes, .bt-search { gap: 4px; }
  .bt-download-modes button, .bt-search button { padding-inline: 6px; font-size: .76rem; }
  .bt-filter { padding-inline: 5px; }
  .bt-upload-details { flex-direction: column; }
  .bt-file { align-self: stretch; }
  .bt-row { grid-template-columns: minmax(0, 1fr) 28px 25px 25px auto; gap: 2px; padding-right: 4px; }
  .bt-select { gap: 4px; }
  .bt-actions { flex-direction: column; }
  .bt-track-action { min-width: 0; min-height: 28px; padding-inline: 6px; font-size: .73rem; }
}
.app-view.turtle-app {
  display: grid; place-items: center; overflow: hidden; container-type: size; background: #000;
}
@font-face {
  font-family: "Turtle Permanent Marker";
  src: url("./art/turtle-time-marker.ttf") format("truetype");
  font-display: swap;
}
.turtle-stage {
  position: relative; width: min(100cqw, 75cqh); height: min(100cqh, 133.3333cqw);
  overflow: hidden; container-type: inline-size; color: white;
  font-family: "Turtle Permanent Marker", system-ui, sans-serif;
  -webkit-user-select: none; user-select: none;
}
.turtle-beach, .turtle-overlay, .turtle-title { position: absolute; inset: 0; width: 100%; height: 100%; }
.turtle-beach { display: block; touch-action: none; }
.turtle-seagull { position: absolute; inset: 0 auto auto 0; width: 16%; pointer-events: none; will-change: transform; }
.turtle-overlay, .turtle-title, .turtle-title span, .turtle-label, .turtle-wave-icon { pointer-events: none; }
.turtle-title span, .turtle-label, .turtle-wave-icon, .turtle-wood { position: absolute; }
.turtle-title span, .turtle-wave-icon, .turtle-wood { background-repeat: no-repeat; }
.turtle-app button.turtle-wood {
  pointer-events: auto; touch-action: manipulation; min-height: 0; padding: 0; border: 0; border-radius: 0;
  background-color: transparent; color: inherit; font: inherit; line-height: 1;
}
.turtle-app button.turtle-wood:hover:not(:disabled) {
  background-color: transparent;
}
.turtle-app button.turtle-wood:active:not(:disabled) { filter: brightness(.83); }
.turtle-app button.turtle-wood:disabled { opacity: 1; }
.turtle-app button.turtle-wood:focus-visible { outline-offset: -3px; }
.turtle-app button.turtle-wood {
  filter: sepia(var(--turtle-record, 0)) saturate(calc(1 + var(--turtle-record, 0) * 1.6));
}
.turtle-title-button { white-space: nowrap; text-shadow: 1px 2px 2px #20150bf2; }
.turtle-start-label {
  position: absolute; inset: 0; display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center;
}
.turtle-start-label > span {
  --start-zoom: 1.3;
  font-size: calc(1em * var(--start-zoom));
  transform: scale(calc(1 / var(--start-zoom)));
}
@media (prefers-reduced-motion: no-preference) {
  .turtle-start-label > span {
    will-change: transform;
    animation: turtle-start-pulse 3s cubic-bezier(.37, 0, .63, 1) 2s infinite;
  }
}
@keyframes turtle-start-pulse {
  0%, 20%, 100% { transform: scale(calc(1 / var(--start-zoom))); }
  10% { transform: scale(1); }
}
.turtle-donate {
  pointer-events: auto; touch-action: manipulation;
  color: #a4df71; text-shadow: 0 2px 2px #182b0e; text-decoration: none;
}
.turtle-donate-artwork { position: absolute; pointer-events: none; }
.turtle-donation-plaque-wood {
  top: 50%; left: 50%; transform: translate(-50%, -50%) scaleX(-1) rotate(-90deg); pointer-events: none;
}
.turtle-donate-hatchling { position: absolute; pointer-events: none; background-repeat: no-repeat; }
.turtle-donate:active { filter: brightness(.83); }
.turtle-donate:focus-visible { outline-offset: -3px; }
.turtle-donate-word { display: inline-flex; align-items: baseline; }
@media (prefers-reduced-motion: no-preference) {
  .turtle-donate-word > span {
    animation: turtle-donate-shimmer 7s ease-in-out infinite;
    animation-delay: calc(.55s + var(--letter-index) * .08s);
  }
}
@keyframes turtle-donate-shimmer {
  0%, 4.6%, 100% { color: inherit; transform: scale(1); }
  2.3% { color: #f6fff1; transform: scale(1.18); }
}
.turtle-label {
  display: grid; place-items: center; white-space: pre-line; text-align: center; line-height: 1.28; font-weight: normal;
}
.turtle-label.left { justify-items: start; text-align: left; white-space: nowrap; }
.turtle-rescue-counter { position: absolute; }
.turtle-rescue-counter, .turtle-worldwide-tally { color: #a4df71; text-shadow: 0 2px 2px #182b0e; }
.turtle-rescue-viewport {
  position: absolute; overflow: hidden;
  display: flex; justify-content: center;
}
.turtle-rescue-counter .turtle-rescue-viewport { top: 0; left: .67%; right: .67%; height: 64.6%; }
.turtle-rescue-reel { position: relative; flex: 0 0 auto; }
.turtle-rescue-digits, .turtle-rescue-caption {
  position: absolute; display: grid; place-items: center; white-space: nowrap; line-height: 1;
}
.turtle-rescue-digits { inset: 0; }
.turtle-rescue-caption { left: 0; right: 0; top: 60.4%; height: 39.6%; }
.turtle-rescue-caption-face {
  --caption-zoom: 1.16;
  display: grid; place-items: center; font-size: calc(2.96cqw * var(--caption-zoom));
  /* Rasterize at peak size and keep both text layers on the same centered transform. */
  transform: scale(calc(1 / var(--caption-zoom))); transform-origin: center;
}
.turtle-rescue-caption-face > span { grid-area: 1 / 1; }
.turtle-rescue-caption-highlight { color: #fff; text-shadow: none; opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  .turtle-rescue-caption-face { will-change: transform; }
  .turtle-rescue-caption-highlight { will-change: opacity; }
  .turtle-rescue-caption-face.is-pulsing { animation: turtle-rescue-caption-zoom .65s ease-in-out; }
  .turtle-rescue-caption-face.is-pulsing > .turtle-rescue-caption-highlight { animation: turtle-rescue-caption-flash .65s ease-in-out; }
}
@keyframes turtle-rescue-caption-zoom {
  0%, 100% { transform: scale(calc(1 / var(--caption-zoom))); }
  18.46% { transform: scale(1); }
}
@keyframes turtle-rescue-caption-flash {
  0%, 100% { opacity: 0; }
  18.46% { opacity: 1; }
}
.turtle-corner-button, .turtle-corner-button:hover:not(:disabled) {
  position: absolute; pointer-events: auto; touch-action: manipulation;
  min-height: 0; padding: 0; border: 0; background: transparent;
}
.turtle-music-note, .turtle-share-icon { display: block; width: 100%; height: 100%; pointer-events: none; }
.turtle-share-icon {
  background: #fff;
  mask: url('./art/turtle-time-share-thumb.png?v=alpha') center / contain no-repeat;
  mask-mode: alpha;
}
.turtle-hurry { color: #ffc275; }
.turtle-pop { text-shadow: -1px -1px #21140c, 1px -1px #21140c, -1px 1px #21140c, 1px 1px #21140c; }
.turtle-bonus { color: #b3ffab; }
.turtle-gold { color: #ffcf63; }
.turtle-loss { color: #ffa894; }
.turtle-stage > .high-scores { font-family: Barlow, system-ui, sans-serif; }
.turtle-loading {
  position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 1rem;
  padding: 1rem; color: white; background: #10202a; font: 1rem Barlow, system-ui, sans-serif; text-align: center;
}
.app-frame { display: block; border: 0; background: #10191e; overflow: hidden; overscroll-behavior: none; touch-action: none; }
.app-content { width: min(100%, 890px); margin: auto; padding: clamp(12px, 3vw, 27px); }
.app-heading {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px;
  margin-bottom: 17px;
}
.app-heading h2 { flex: 1; min-width: max-content; font-size: clamp(1.45rem, 3vw, 2.1rem); }
.waiting { display: grid; place-content: center; justify-items: center; gap: 16px; padding: 20px; text-align: center; }
.actions, .tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tabs { margin-bottom: 12px; }
.tabs button[aria-pressed="true"] { color: var(--accent); border-color: #599a89; background: #1e3a3a; }
.rows { display: grid; gap: 9px; }
.row {
  display: flex; gap: 13px; align-items: center; min-width: 0;
  border: 1px solid var(--border); border-radius: 12px; background: var(--panel); padding: 11px 13px;
}
.row .icon-art { width: 50px; }
.row h3 { font-size: 1.05rem; }
.row p { line-height: 1.4; }
.row-copy { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.exhaust-board {
  -webkit-user-select: none; user-select: none;
  min-height: 100%;
  display: grid;
  grid-template-rows: minmax(min-content, 1fr) auto minmax(min-content, 1fr);
}
.exhaust-board .app-heading { align-self: start; }
.exhaust-board .app-heading h2 { min-width: 0; }
.exhaust-buttons {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr));
  gap: clamp(6px, 2vw, 18px);
}
.exhaust-button, .exhaust-button:hover:not(:disabled) {
  display: grid; justify-items: center; gap: 4px; padding: 0 2px 6px;
  background: transparent; border: 0; touch-action: manipulation; -webkit-touch-callout: none;
}
.exhaust-button > span { pointer-events: none; }
.exhaust-button-art { position: relative; display: block; width: min(100%, 255px); aspect-ratio: 257 / 211; }
.exhaust-face { position: absolute; inset: 0; isolation: isolate; background: var(--button-colour); }
.exhaust-face img { width: 100%; height: 100%; mix-blend-mode: multiply; }
.exhaust-face-up { clip-path: ellipse(38.9% 45.5% at 49.2% 51.7%); }
.exhaust-face-down { clip-path: ellipse(37.6% 44.7% at 50.2% 50.7%); opacity: 0; }
.exhaust-button:active .exhaust-face-up { opacity: 0; }
.exhaust-button:active .exhaust-face-down { opacity: 1; }
.exhaust-status { text-align: center; color: var(--danger); }
.avatar {
  position: relative; display: grid; place-items: center; overflow: hidden; flex: none; width: 42px;
  aspect-ratio: 1; border-radius: 50%; color: white; font-weight: 700;
}
.avatar img { position: absolute; max-width: none; width: 100%; height: 100%; object-fit: cover; }
.row-button {
  width: 100%; text-align: left; padding: 9px 11px; font-weight: 500;
  display: flex; align-items: center; gap: 11px; border-radius: 0; border-width: 0 0 1px; background: var(--panel);
}
.row-button[aria-pressed="true"] { background: #284239; }
.row-button .excerpt { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-button .count { color: #092522; background: var(--accent); border-radius: 20px; padding: 2px 7px; font: 500 .75rem var(--mono); }
.split-view { display: grid; grid-template-columns: minmax(205px, .72fr) minmax(0, 1.5fr); height: 100%; }
.split-list { overflow: auto; overscroll-behavior: contain; background: var(--panel); border-right: 1px solid var(--border); }
.split-list h2 { font-size: 1.45rem; padding: 14px; }
.split-detail { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.detail-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--border); }
.detail-head .back { display: none; }
.detail-head .contact { flex: 1; display: flex; gap: 10px; align-items: center; text-align: left; min-width: 0; }
.detail-head small { display: block; }
.detail-empty { margin: auto; color: var(--muted); padding: 16px; }
.messages {
  flex: 1; overflow: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 8px;
  padding: 14px clamp(10px, 3vw, 28px); background: radial-gradient(ellipse at top, #183033, #111d22 75%);
}
.message { align-self: start; max-width: min(88%, 510px); border-radius: 10px 10px 10px 3px; padding: 7px 10px; background: #21353d; white-space: pre-wrap; overflow-wrap: anywhere; }
.message.mine { align-self: end; border-radius: 10px 10px 3px 10px; background: #225044; }
.message.notice { align-self: center; color: #b7cbd1; font-size: .84rem; }
.message small { display: block; margin-top: 3px; text-align: right; font: .67rem var(--mono); }
.message .seen { color: #8ee6ff; }
.message .sender { display: block; color: var(--accent); margin-bottom: 2px; font-size: .86rem; }
.compose { flex: none; display: flex; align-items: center; gap: 10px; padding: 10px; background: #17262c; border-top: 1px solid var(--border); }
.compose p { flex: 1; overflow-wrap: anywhere; }
.mail-app { container-type: inline-size; display: flex; flex-direction: column; overflow: hidden; }
.mail-header {
  display: flex; align-items: center; gap: 10px; flex: none; min-height: 54px;
  padding: 8px 14px; border-bottom: 1px solid var(--border);
}
.mail-header h2 { flex: 1; font-size: 1.45rem; }
.mail-header .icon-art { width: 34px; }
.mail-columns {
  flex: 1; min-height: 0; display: grid;
  grid-template-columns: minmax(138px, 21fr) minmax(180px, 32fr) minmax(0, 47fr);
  grid-template-rows: minmax(0, 1fr);
}
.mail-filters {
  display: flex; flex-direction: column; gap: 4px; padding: 9px;
  overflow: auto; overscroll-behavior: contain; border-right: 1px solid var(--border); background: #17252d;
}
.mail-filter {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex: none; text-align: left; padding: 8px 9px; border-color: transparent; background: transparent;
}
.mail-filter[aria-pressed="true"] { color: var(--accent); border-color: #599a89; background: #1e3a3a; }
.mail-filter-count { color: var(--accent); font: 500 .75rem var(--mono); }
.mail-list, .mail-preview { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.mail-list { border-right: 1px solid var(--border); background: var(--panel); }
.mail-list-header, .mail-preview-header { flex: none; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.mail-list-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mail-list-header h3 { font-size: 1rem; }
.mail-messages, .mail-preview > .mail-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.mail-messages .excerpt { white-space: normal; overflow-wrap: anywhere; }
.mail-subject, .mail-from { display: flex; gap: 8px 12px; align-items: baseline; justify-content: space-between; }
.mail-subject { align-items: flex-start; margin-bottom: 8px; }
.mail-subject h3 { font-size: clamp(1.08rem, 2vw, 1.35rem); overflow-wrap: anywhere; min-width: 0; }
.mail-subject button { flex: none; }
.mail-from { flex-wrap: wrap; }
.mail-from time, .mail-address { font-size: .86rem; overflow-wrap: anywhere; }
.mail-pane-nav { display: none; }
.mail-body { padding: 0 14px 14px; }
.mail-body p { white-space: pre-wrap; overflow-wrap: anywhere; margin-block: 12px; }
.mail-messages > .mail-body { padding-top: 14px; }
.mail-body .actions button { max-width: 100%; overflow-wrap: anywhere; text-align: left; }
.mail-body .link-button { padding: 0; min-height: 0; border: 0; background: transparent; text-decoration: underline; color: var(--accent); }
.statement { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.statement th, .statement td { padding: 9px; text-align: left; border-bottom: 1px solid var(--border); }
.statement th { position: sticky; top: 0; background: #243439; }
.statement th:last-child, .statement td:last-child { text-align: right; }
.balance { background: #28281e; border: 1px solid #5c5332; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.balance output { display: block; font: 500 clamp(1.8rem, 5vw, 3rem) var(--mono); }
.accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 8px; margin-bottom: 17px; }
.accounts .row { display: block; }
.gallery { height: 100%; display: flex; flex-direction: column; background: #060b0d; touch-action: none; }
.gallery-stage { position: relative; flex: 1; min-height: 0; border: 0; background: #060b0d; padding: 0; overflow: hidden; border-radius: 0; }
.gallery-stage:hover:not(:disabled) { background: #060b0d; }
.gallery-stage img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.gallery-stage > img, .gallery-stage .slide-track { position: absolute; inset: 0; }
.gallery-stage .slide-track { pointer-events: none; }
.gallery-stage .slide-track img { flex: 0 0 100%; min-width: 0; }
.gallery-controls { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 10px; }
.gallery-controls output { min-width: 6ch; text-align: center; font: .86rem var(--mono); }
.app-view.love-app {
  --love-ink: #2b203a;
  --love-green: #24d586;
  --love-red: #ff4562;
  overflow-x: hidden;
  color: var(--love-ink);
  background: #f7f4fa;
}
.love-heading { border-bottom: 1px solid #2b203a1a; padding-bottom: 12px; }
.love-heading img { width: 42px; height: 42px; border-radius: 10px; }
.love-heading h2 {
  color: #ae287f;
  background: linear-gradient(110deg, #c92b78, #6d42c6) text;
  -webkit-text-fill-color: transparent;
}
.love-heading output { color: #62556f; }
.love-deck {
  display: grid; align-items: center;
  grid-template-columns: 1fr minmax(0, 390px) 1fr;
  gap: clamp(12px, 4vw, 50px);
  width: min(100%, 720px); margin: 22px auto 0;
}
.love-stage { position: relative; width: 100%; aspect-ratio: 3 / 4; isolation: isolate; }
.love-card {
  position: absolute; inset: 0;
  display: grid; align-content: end;
  border-radius: 20px; overflow: hidden;
  color: #fff; background: #633b7b;
  box-shadow: 0 5px 0 #37234c26, 0 12px 25px #37234c26;
}
.love-behind { transform: translateY(11px) scale(.97); pointer-events: none; }
.love-front { touch-action: none; user-select: none; cursor: grab; }
.love-front:active { cursor: grabbing; }
.love-photo {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
}
.love-photo > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.love-photo .avatar { width: clamp(70px, 35%, 140px); }
.love-photo-bars { position: absolute; inset: 10px 12px auto; display: flex; gap: 5px; }
.love-photo-bars span {
  flex: 1; height: 4px; border-radius: 3px;
  background: #4d42574d; box-shadow: 0 0 0 1px #ffffff4d;
}
.love-photo-bars .current { background: #31253d; }
.love-copy {
  position: relative; padding: 46px clamp(12px, 5%, 22px) clamp(12px, 5%, 22px);
  overflow-wrap: anywhere;
  background: linear-gradient(transparent, #30203dea 36%, #30203d);
}
.love-copy h3 { font-size: clamp(1.55rem, 4vw, 2.55rem); line-height: 1.05; }
.love-copy h3 span { font-size: .85em; font-weight: 400; }
.love-profile-detail { margin: 3px 0; color: #e6dbea; }
.love-profile-detail:empty { display: none; }
.love-stamps { position: absolute; inset: 0; pointer-events: none; }
.love-stamp {
  position: absolute; top: 12%;
  padding: 3px 12px; border: 4px solid; border-radius: 9px;
  background: #2b203ae6; opacity: 0;
  font-size: clamp(1.25rem, 4vw, 2.25rem); font-weight: 700; text-transform: uppercase;
}
.love-stamp.like { left: 8%; color: var(--love-green); transform: rotate(-15deg); }
.love-stamp.pass { right: 8%; color: var(--love-red); transform: rotate(15deg); }
.love-choice {
  position: relative; z-index: 1; justify-self: center;
  display: grid; place-items: center; width: clamp(49px, 7vw, 82px); aspect-ratio: 1;
  border: 1px solid #39294f1a; border-radius: 50%; padding: 0;
  background: white; box-shadow: 0 5px 0 #37234c22;
}
.love-choice:hover:not([aria-disabled="true"]) { background: #f2e9f6; }
.love-choice:active:not([aria-disabled="true"]) { transform: translateY(2px); box-shadow: 0 3px 0 #37234c22; }
.love-app button:focus-visible { outline-color: #6d42c6; }
.love-choice[aria-disabled="true"], .love-photo-controls button[aria-disabled="true"] { cursor: default; opacity: .68; }
.love-choice-icon { position: relative; display: block; width: 45%; aspect-ratio: 1; }
.love-choice.pass .love-choice-icon::before, .love-choice.pass .love-choice-icon::after {
  content: ''; position: absolute; inset: 40% 0; border-radius: 2px;
  background: var(--love-red); transform: rotate(45deg);
}
.love-choice.pass .love-choice-icon::after { transform: rotate(-45deg); }
.love-choice.like .love-choice-icon::before {
  content: ''; position: absolute; left: 34%; top: 6%; width: 40%; height: 72%;
  border: solid #0e9d61; border-width: 0 clamp(4px, .6vw, 7px) clamp(4px, .6vw, 7px) 0;
  transform: rotate(44deg);
}
.love-photo-controls { display: flex; justify-content: center; gap: 14px; margin-top: 14px; }
.love-photo-controls button {
  border-color: #6d42a345; background: transparent; color: #59416d;
}
.love-photo-controls button:hover:not([aria-disabled="true"]) { background: #eee4f5; }
.love-empty {
  display: grid; justify-items: center; gap: 14px;
  width: min(100%, 390px); margin: 22px auto; padding: 24px;
  border-radius: 16px; background: white; text-align: center;
}
.love-empty button.primary { background: #b62870; color: white; }
.love-empty button.primary:hover { background: #9b215f; }
@media (max-width: 620px) {
  .love-deck { grid-template-columns: repeat(2, 1fr); gap: 16px 24px; }
  .love-stage { grid-area: 1 / 1 / 2 / -1; width: min(100%, 340px, 67dvh); justify-self: center; }
  .love-choice.pass { grid-area: 2 / 1; justify-self: end; }
  .love-choice.like { grid-area: 2 / 2; justify-self: start; }
}
.store-capacity { font: .8rem var(--mono); }
.settings-app .app-content { width: min(100%, 1040px); }
.settings-app .app-heading .icon-art { width: 48px; }
.settings-grid {
  display: grid; align-items: start; gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 350px), 1fr));
}
.settings-column, .settings-panel { display: grid; align-content: start; gap: 12px; min-width: 0; }
.settings-panel {
  padding: clamp(14px, 2.3vw, 22px); border: 1px solid var(--border);
  border-radius: 12px; background: var(--panel);
}
.settings-panel h3 { font-size: 1.25rem; }
.settings-panel h4 { margin: 6px 0 0; font-size: 1rem; }
.settings-panel > button { justify-self: start; }
.settings-panel-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 14px; }
.settings-details {
  display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 7px clamp(10px, 2vw, 24px); margin: 0;
}
.settings-details dt { color: var(--muted); }
.settings-details dd { margin: 0; }
.settings-meter { display: block; width: 100%; height: 14px; accent-color: var(--accent); }
.settings-usage { font: 500 .82rem var(--mono); }
.settings-toggle button { min-width: min(100px, 100%); }
.settings-toggle button[aria-pressed="true"],
.settings-panel .actions button[aria-pressed="true"] { color: var(--accent); border-color: #599a89; background: #1e3a3a; }
.settings-app { overscroll-behavior-y: contain; }
.subscription-level { display: flex; align-items: center; gap: 12px; }
.subscription-certificate {
  width: 50px; height: 50px; background: #656a72;
  mask: url('./art/subscription-certificate.png') center / contain no-repeat;
}
.subscription-certificate[data-tier="Bronze"] { background: #c88a42; }
.subscription-certificate[data-tier="Silver"] { background: #c2cbd3; }
.subscription-certificate[data-tier="Gold"] { background: #ffda32; }
.subscription-certificate[data-tier="Platinum"] { background: #fff; }
.promotion-entry { display: flex; gap: 8px; flex-wrap: wrap; }
.promotion-entry input {
  flex: 1 1 12rem; min-width: 0; border: 1px solid #4e6876; border-radius: 8px;
  padding: 8px 10px; font: inherit; color: inherit; background: #111c22;
}
.market .price { display: block; margin-block: 5px; font: 500 1rem var(--mono); color: var(--accent); }
.toast, .notification {
  position: absolute; z-index: 2; box-shadow: 0 4px 20px #0008;
  border: 1px solid #4e6876; border-radius: 11px; background: #152a34; color: var(--text);
}
.toast { left: 50%; bottom: 12px; translate: -50% 0; width: max-content; max-width: calc(100% - 24px); padding: 10px 14px; }
.notification { top: 42px; right: 8px; display: flex; width: min(380px, calc(100% - 16px)); }
.notification[data-position="bottom"] { top: auto; bottom: 12px; }
.notification button { border: 0; background: transparent; text-align: left; }
.notification #open-notification { flex: 1; white-space: pre-line; }
.notification-tip {
  position: absolute; inset: 0; z-index: 10; display: grid; place-items: center;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  padding: clamp(6px, 2vmin, 16px); background: #02070b94;
}
.notification-tip-card {
  display: grid; gap: 10px; width: min(100%, 460px); max-height: 100%; overflow: auto;
  overscroll-behavior: contain; padding: clamp(12px, 3vmin, 20px); border: 1px solid #4e6876;
  border-radius: 12px; color: var(--text); background: #17262f; box-shadow: 0 4px 20px #0008;
  font-size: .95rem; line-height: 1.35;
}
.notification-tip-card header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.notification-tip-card h2 { color: var(--accent); font-size: 1.25rem; }
.notification-tip-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.notification-tip-card label { display: flex; align-items: center; gap: 6px; padding-block: 4px; }
.notification-tip-card input { accent-color: var(--accent); }
dialog { width: min(445px, calc(100% - 28px)); max-height: min(85dvh, 100%); overflow: auto; overscroll-behavior: contain; border: 1px solid #4e6876; border-radius: 15px; color: var(--text); background: #17262f; padding: 20px; }
dialog::backdrop { background: #02070bc7; }
#prompt-text { margin: 12px 0 18px; line-height: 1.5; white-space: pre-line; }
#prompt-text progress { width: 100%; margin-top: 10px; accent-color: var(--accent); }
.facebook-share-card { display: grid; gap: 12px; }
.facebook-share-card img { width: 100%; height: auto; border-radius: 8px; }
.facebook-share-card p { text-align: center; }
dialog:has(.facebook-share-card) .actions {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch;
}
dialog:has(.facebook-share-card) .actions > * { display: grid; place-items: center; text-align: center; }
.facebook-share-link { background: #2163cd; color: white; text-decoration: none; }
.facebook-share-link:hover { background: #2458aa; }
.product-details { display: grid; gap: 8px; }
.product-details p:empty { display: none; }
.contact-card { display: flex; gap: 13px; align-items: center; }
.contact-card .avatar { width: 74px; }
dialog .actions { justify-content: end; }
dialog:has(.upgrade-details) { width: min(510px, calc(100% - 28px)); }
dialog:has(.upgrade-details) .actions { align-items: stretch; }
dialog:has(.botcloud-details) .actions button { flex: 1 1 45%; }
@media (max-width: 500px) {
  dialog:has(.upgrade-details) .actions { flex-direction: column; }
}
.action-link { text-decoration: none; }
.premium-entry { display: grid; gap: 8px; }
.premium-entry input {
  width: 100%; border: 1px solid #4e6876; border-radius: 8px; padding: 8px 10px;
  font: inherit; color: inherit; background: #111c22;
}
.premium-entry input[aria-invalid="true"] { border-color: var(--danger); }
.app-view.firebot { background: #101b2a; }
.firebot-toolbar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 14px;
  padding: 12px clamp(12px, 3vw, 24px); background: #162539; border-bottom: 1px solid #334459;
}
.firebot-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.firebot-brand .icon-art { width: 40px; }
.firebot-brand h2 { font-size: 1.4rem; }
.firebot-search { grid-column: 1 / -1; display: flex; gap: 8px; }
.firebot-query {
  flex: 1; min-width: 0; padding: 8px 12px; border: 1px solid #45576c; border-radius: 8px;
  font: inherit; color: var(--text); background: #0e1826;
}
.firebot-search-button { color: #251606; background: #ffc47d; border-color: transparent; }
.firebot-search-button:hover:not(:disabled) { background: #ffdaa6; }
.firebot-content { width: min(100%, 840px); margin: auto; padding: clamp(14px, 3vw, 28px); }
.firebot-content h3 { margin-bottom: 12px; font-size: 1.4rem; }
.firebot-news, .firebot-results { display: grid; gap: 10px; }
.firebot-results { list-style: none; margin: 0; padding: 0; }
.firebot-story, .firebot-result {
  padding: 12px 15px; border: 1px solid #334459; border-radius: 9px; background: #162539;
}
.firebot-content h4 { margin: 3px 0 5px; font-size: 1.05rem; }
.firebot-content p { line-height: 1.4; }
.firebot-result small, .firebot-error-code { font: .8rem var(--mono); overflow-wrap: anywhere; }
.firebot-result strong { display: block; margin-top: 5px; color: #ffc47d; }
.firebot-error { display: grid; justify-items: start; gap: 10px; }
.firebot-error-code { color: var(--muted); }
.app-view.scratch-app {
  position: relative; overflow: hidden; container: scratch / size;
  color: #fff; background: #0d0f14; font-family: Arial, sans-serif;
}
.scratch-card-area { position: absolute; inset: 10% 0 0; display: grid; place-items: center; }
.scratch-card, .scratch-card:hover:not(:disabled) {
  position: relative; width: min(94cqw, 145.7cqh); aspect-ratio: 1984 / 1152;
  background: transparent; border: 0; border-radius: 0; padding: 0; min-height: 0;
  cursor: crosshair; touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.scratch-card:focus-visible { outline-offset: 3px; }
.scratch-card canvas, .scratch-finger { position: absolute; pointer-events: none; }
.scratch-unlucky {
  position: absolute; left: 2%; right: 2%; bottom: 1.5%; z-index: 2; margin: 0;
  color: #fff; font-weight: 900; font-size: min(5.6cqw, 9cqh); line-height: 1;
  letter-spacing: .01em; text-align: center; pointer-events: none;
  text-shadow: 0 .06em 0 #161616, 0 .12em .16em #000;
}
.scratch-finger {
  left: 36.7%; top: 20.77%; width: 60%; opacity: 0; transform-origin: 50% 303%;
  animation: scratch-point 10s 10s linear infinite, scratch-wiggle .785s ease-in-out infinite;
}
@keyframes scratch-point { 0%, 29.99% { opacity: 1; } 30%, 100% { opacity: 0; } }
@keyframes scratch-wiggle { 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
.scratch-cash {
  position: absolute; inset: 0 0 90%; z-index: 2; display: grid;
  grid-template-columns: 1fr auto 1fr; align-items: center;
  background: #111; font-weight: 700; pointer-events: none;
}
.scratch-free, .scratch-collect { grid-column: 2; grid-row: 1; }
.scratch-free {
  margin: 0; color: #fff; font-size: clamp(.72rem, min(2.5cqw, 4cqh), 1.7rem);
  letter-spacing: .02em; white-space: nowrap;
}
.scratch-free b { color: #ffcc00; }
.scratch-collect {
  pointer-events: auto; min-height: 0; padding: .18em .9em; border: 2px solid #ffcc00;
  border-radius: 4px; background: #2a2410; color: #fff; cursor: pointer;
  font: 700 clamp(.72rem, min(2.5cqw, 4cqh), 1.7rem)/1 Arial, sans-serif;
}
.scratch-collect:hover { background: #3d3416; }
.scratch-balance {
  grid-column: 1; justify-self: start; display: flex; align-items: baseline; gap: .35em;
  margin: 0 0 0 4%;
}
.scratch-balance span { color: #fff9; font-size: clamp(.8rem, min(3.08cqw, 6cqh), 2.5rem); }
.scratch-cash output { color: #ffd640; font-size: clamp(1.05rem, min(4.62cqw, 8cqh), 4rem); }
.scratch-panel { position: absolute; inset: 0; text-align: center; }
.scratch-panel.shaded { background: rgb(0 0 0 / 82%); }
.scratch-message { position: absolute; inset: 0; pointer-events: none; }
.scratch-headline, .scratch-detail, .scratch-countdown, .scratch-panel button {
  position: absolute; display: grid; place-items: center; font-weight: 700; line-height: 1.06;
}
.scratch-headline { inset: 20% 5% 56%; font-size: min(10.77cqw, 19cqh); }
.scratch-headline.gold, .scratch-countdown { color: #ffd640; }
.scratch-panel:not(.shaded) .scratch-headline {
  inset: 36% 10% 45%; font-size: clamp(1.1rem, min(4.92cqw, 10cqh), 3.5rem);
}
.scratch-detail { inset: 45% 10% 40%; font-size: min(6.92cqw, 12cqh); }
.scratch-panel button, .scratch-countdown {
  inset: 72% 52% 12% 20%; font: 700 clamp(.78rem, min(4.4cqw, 8cqh), 3.5rem)/1.06 Arial, sans-serif;
  white-space: pre-line;
}
.scratch-panel button { min-height: 0; padding: 0; border: 0; border-radius: 0; color: #fff; }
.scratch-panel .scratch-play { background: #1f8c4d; }
.scratch-panel .scratch-play:hover { background: #47a66d; }
.scratch-panel .scratch-quit { inset-inline: 52% 20%; background: #4d525c; }
.scratch-panel .scratch-quit:hover { background: #6d7079; }
@media (prefers-reduced-motion: no-preference) {
  .scratch-panel.shaded { animation: scratch-fade .25s linear; }
}
@media (prefers-reduced-motion: reduce) {
  .scratch-finger { animation: scratch-point 10s 10s linear infinite; }
}
@keyframes scratch-fade { from { opacity: 0; } to { opacity: 1; } }
.app-view.fruit-app {
  --fruit-gold: #ffe38a;
  --fruit-coral: #ffa092;
  --fruit-ink: #e8f8f5;
  --fruit-caption: #b1d4cf;
  --fruit-divider: #caebe52e;
  position: relative; overflow: hidden; container: fruit / size;
  background: #182e38; color: var(--fruit-ink);
}
.fruit-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fruit-layout { position: relative; display: grid; grid-template-columns: 30% 70%; width: 100%; height: 100%; }
.fruit-panel {
  min-width: 0; display: grid; grid-template-rows: 27cqh 48cqh minmax(0, 1fr);
  gap: 2cqh; padding: 4cqh 6% 3cqh 12%;
}
.fruit-title, .fruit-result-title {
  color: var(--fruit-gold); font-family: "Turtle Permanent Marker", system-ui, sans-serif;
  font-weight: 400; text-transform: uppercase;
}
.fruit-title {
  display: grid; align-self: center; gap: .08em;
  font-size: clamp(1.3rem, min(7.4cqw, 12.8cqh), 6.3rem); line-height: 1.06;
}
.fruit-word-accent { color: var(--fruit-coral); }
.fruit-stats {
  min-width: 0; display: grid; grid-template-rows: 2fr 1fr 1fr; padding: 0 8%; background: #0c1c22d3;
}
.fruit-stat {
  min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: .3em;
}
.fruit-stat + .fruit-stat { border-top: 1px solid var(--fruit-divider); }
.fruit-current-score { align-items: start; justify-content: center; flex-direction: column; gap: 1.2cqh; }
.fruit-label {
  color: var(--fruit-caption); font-size: clamp(.68rem, min(1.8cqw, 3.2cqh), 1.45rem);
  font-weight: 700; letter-spacing: .035em; line-height: 1.12; text-transform: uppercase;
}
.fruit-value {
  flex-shrink: 0; font-size: clamp(1rem, min(3.35cqw, 6.4cqh), 3rem);
  font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
}
.fruit-current-score .fruit-value { font-size: clamp(1.6rem, min(5.9cqw, 10.6cqh), 5rem); }
button.fruit-score-link {
  position: relative; padding: 0; border-width: 1px 0 0; border-radius: 0;
  min-height: 0; background: transparent; font: inherit; text-align: left;
}
button.fruit-score-link:hover:not(:disabled) { background: #e8f8f512; }
.fruit-score-link .fruit-label { flex: 1; }
.fruit-score-link .fruit-value, .fruit-score-arrow { color: #ffd640; }
.fruit-score-arrow { font-size: clamp(1.1rem, min(2.9cqw, 5.5cqh), 2.6rem); line-height: 1; }
.fruit-hurry { color: #ff6b52; }
.fruit-controls {
  --fruit-control-size: clamp(40px, 10cqh, 76px);
  display: flex; justify-content: space-between; align-items: center;
}
.fruit-controls button, .fruit-controls button:hover:not(:disabled) {
  display: grid; place-items: center; width: var(--fruit-control-size); aspect-ratio: 1; min-height: 0; padding: 0;
  border: 0; border-radius: 0; background: transparent;
}
.fruit-music-mark { display: block; width: 100%; height: 100%; pointer-events: none; }
.fruit-like .turtle-share-icon { width: 74%; height: 74%; }
.fruit-play-area { position: relative; min-width: 0; min-height: 0; }
.fruit-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.fruit-cells {
  position: absolute; display: grid;
  grid-template: repeat(8, minmax(0, 1fr)) / repeat(10, minmax(0, 1fr));
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.fruit-cells button, .fruit-cells button:hover:not(:disabled) {
  min-width: 0; min-height: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
}
.fruit-loading { position: absolute; inset: 0; display: grid; place-content: center; padding: 1rem; text-align: center; }
.fruit-result {
  position: absolute; inset: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center; padding: 3cqh 4cqw; background: #070f12be;
}
.fruit-result-card {
  width: min(100%, clamp(21rem, 50cqw, 43rem)); max-height: 100%; overflow: auto;
  display: grid; gap: clamp(.65rem, 2.3cqh, 1.4rem);
  padding: clamp(1.15rem, min(4.8cqw, 6cqh), 3rem) clamp(1.1rem, 6cqw, 5rem) clamp(1rem, 3.5cqh, 2.2rem);
  border: 2px solid #426165; border-radius: clamp(18px, 3.2cqh, 30px);
  background: #102229; box-shadow: 0 8px 0 #0006; text-align: center;
}
.fruit-result-title { font-size: clamp(1.65rem, min(6.7cqw, 11cqh), 5.5rem); line-height: 1.05; }
.fruit-result-score { display: grid; gap: .2em; }
.fruit-result-score .fruit-label, .fruit-result-records .fruit-label { font-size: clamp(.72rem, 3cqh, 1.4rem); }
.fruit-result-score .fruit-new-best { color: var(--fruit-gold); }
.fruit-final-score {
  font-size: clamp(2.5rem, min(8.6cqw, 14cqh), 7rem); font-weight: 700; line-height: .94;
  font-variant-numeric: tabular-nums;
}
.fruit-result-records {
  display: flex; justify-content: center; gap: 1rem; margin: 0; padding-top: clamp(.6rem, 2.4cqh, 1.4rem);
  border-top: 1px solid var(--fruit-divider);
}
.fruit-result-records > div { flex: 1; min-width: 0; }
.fruit-result-records dd {
  margin: .1em 0 0; font-size: clamp(1.25rem, 5.5cqh, 2.9rem); line-height: 1; font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fruit-result-records > div:first-child dd { color: var(--fruit-gold); }
.fruit-result-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(.4rem, 1.4cqh, .9rem); }
.fruit-result-actions button {
  min-height: 0; padding: .55em .5em; border: 0; border-radius: 999px;
  color: var(--fruit-ink); font-size: clamp(.78rem, min(2.1cqw, 3.7cqh), 1.35rem);
  font-weight: 700; text-transform: uppercase;
}
.fruit-result-actions .fruit-again {
  grid-column: 1 / -1; background: var(--fruit-gold); color: #102229;
  font-size: clamp(1rem, min(2.8cqw, 4.5cqh), 1.8rem);
}
.fruit-result-actions .fruit-again:hover:not(:disabled) { background: #fff0b4; }
.fruit-result-actions .fruit-again:focus-visible { outline-color: #34535b; }
.fruit-result-actions .fruit-scores { background: #2a4b51; }
.fruit-result-actions .fruit-scores:hover:not(:disabled) { background: #38616a; }
.fruit-result-actions .fruit-quit { background: #22363d; }
.fruit-result-actions .fruit-quit:hover:not(:disabled) { background: #334b52; }
.fruit-result-actions .fruit-result-share, .fruit-result-actions .fruit-result-share:hover:not(:disabled) {
  grid-column: 1 / -1; justify-self: center; display: inline-flex; align-items: center; gap: .45em;
  padding: .25em .55em; background: transparent;
}
.fruit-result-share .turtle-share-icon { width: 1.2em; height: 1.2em; flex: none; }
@container fruit (max-width: 580px) {
  .fruit-layout { grid-template: auto minmax(0, 1fr) / minmax(0, 1fr); }
  .fruit-panel { grid-template: auto auto / auto minmax(0, 1fr) auto; gap: .55rem; padding: .55rem 4% .4rem; }
  .fruit-title { grid-area: 1 / 2; display: block; text-align: center; font-size: clamp(1.2rem, 7cqw, 2.6rem); }
  .fruit-controls { --fruit-control-size: clamp(36px, 8cqw, 48px); display: contents; }
  .fruit-music { grid-area: 1 / 1; align-self: center; }
  .fruit-like { grid-area: 1 / 3; align-self: center; }
  .fruit-stats { grid-area: 2 / 1 / 3 / -1; grid-template: auto / repeat(3, minmax(0, 1fr)); padding: .35rem 0; }
  .fruit-stat, button.fruit-score-link { flex-direction: column; align-items: center; gap: .2em; padding: .15rem; }
  .fruit-stat + .fruit-stat { border-top: 0; border-left: 1px solid var(--fruit-divider); }
  .fruit-score-link .fruit-label { flex: none; }
  .fruit-score-arrow { position: absolute; inset-inline-end: .2em; bottom: .12em; }
  .fruit-value, .fruit-current-score .fruit-value { font-size: clamp(1rem, 4.6cqw, 1.8rem); }
}
@media (prefers-reduced-motion: no-preference) {
  .fruit-result { animation: fruit-result-fade .25s linear; }
}
@keyframes fruit-result-fade { from { opacity: 0; } to { opacity: 1; } }
@container (max-width: 620px) {
  .mail-columns { grid-template-columns: minmax(0, 1fr); }
  .mail-columns:not([data-pane="filters"]) .mail-filters,
  .mail-columns:not([data-pane="list"]) .mail-list,
  .mail-columns:not([data-pane="detail"]) .mail-preview { display: none; }
  .mail-filters, .mail-list { border-right: 0; }
  .mail-pane-nav { display: inline-block; }
  .mail-filters > .mail-pane-nav, .mail-preview-header > .mail-pane-nav { margin-bottom: 8px; }
}
@media (max-width: 660px) {
  .masthead { min-height: 50px; }
  .device { max-height: none; padding: 15px 7px 3px; border-radius: 19px; }
  .status-bar { height: 30px; }
  .glass { border-radius: 10px; }
  .app-grid { width: 94%; }
  .app-icon { gap: 7px; }
  .row { flex-wrap: wrap; }
  .row > .actions { margin-left: auto; }
  .split-view { grid-template-columns: 1fr; }
  .split-view.has-detail .split-list, .split-view:not(.has-detail) .split-detail { display: none; }
  .detail-head .back { display: inline-block; }
  .notification { top: 34px; }
}
@media (orientation: landscape) and (min-width: 500px) and (max-height: 500px) and (pointer: coarse) {
  .tablet-page {
    padding: max(4px, env(safe-area-inset-top)) max(4px, env(safe-area-inset-right))
      max(4px, env(safe-area-inset-bottom)) max(4px, env(safe-area-inset-left));
  }
  .masthead { min-height: 44px; margin-block: 0 4px; }
  .device { padding: 8px 6px 2px; border-radius: 14px; }
  .camera { top: 2px; width: 4px; }
  .glass { border-radius: 8px; }
  .status-bar { height: 24px; padding-inline: 8px; }
  .status-transport { gap: 8px; }
  .status-transport button { width: 36px; }
  .status-transport i { width: 14px; height: 14px; }
  .notification { top: 30px; }
}
.tablet-maximised {
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
  background: #0a1116;
}
.tablet-maximised .masthead, .tablet-maximised .camera { display: none; }
.tablet-maximised .device {
  width: 100%; max-height: none; padding: 0; border: 0; border-radius: 0;
  background: none; box-shadow: none;
}
.tablet-maximised .glass { border: 0; border-radius: 0; }
.tablet-maximised .status-bar {
  height: 34px; padding-inline: 8px;
  grid-template-columns: minmax(132px, 1fr) minmax(0, 2fr) minmax(132px, 1fr);
}
.tablet-maximised .notification { top: 38px; }
#maximised-home {
  height: 32px; min-height: 0; padding: 0 8px;
  font-size: .8rem; color: var(--accent); white-space: nowrap;
}
#maximised-swipe {
  flex: 0 0 16px; display: grid; place-items: center; touch-action: none;
}
#maximised-swipe::before {
  content: ''; width: 48px; height: 3px; border-radius: 999px; background: #a6bac5;
}
@media (max-width: 560px) {
  .tablet-maximised .status-bar {
    grid-template-columns: minmax(88px, 1fr) minmax(0, 2fr) minmax(88px, 1fr);
  }
  .tablet-maximised #clock { display: none; }
}
@container tablet-home (max-height: 300px) {
  .app-grid { gap: 4px clamp(6px, 2vw, 36px); padding-block: 4px; }
  .app-icon { min-height: 0; padding-block: 2px; gap: 4px; font-size: .8rem; }
  .app-icon > .icon-art { width: clamp(19px, min(9vw, calc(33.333cqh - 23px)), 68px); }
  .icon-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page-dots { padding: 0; }
  .page-dots button { width: 44px; min-height: 28px; padding: 0; }
}
@media (prefers-reduced-motion: no-preference) {
  .slide-track:not(.instant) { transition: transform var(--slide-duration, 280ms) ease-in-out; }
  .app-icon:hover .icon-art { transform: translateY(-2px); }
  .icon-art { transition: transform .15s ease; }
}
