/* Home presentation stays here;
each game's visual identity stays with that game. */
:root {
  color-scheme: light;
  --home-accent: #596b45;
  --paper: #eceee7;
  --ink: #30372c;
  --muted: #6d7567;
  --glass: rgba(255, 255, 255, 0.58);
  --line: rgba(48, 55, 44, 0.12);
  --wall-1: #dbe1cc;
  --wall-2: #cbd6b8;
  --wall-3: #f9f8f0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  min-width: 320px;
}
button,
input,
a {
  -webkit-tap-highlight-color: transparent;
}
button,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  cursor: default;
  opacity: 0.4;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid var(--home-accent);
  outline-offset: 5px;
}
button svg,
.search-box svg,
.settings-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
[hidden] {
  display: none !important;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 20;
  padding: 15px;
  background: white;
  color: #222;
}
.skip-link:focus {
  top: 10px;
}
.wallpaper {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 90% 10%, var(--wall-3), transparent 58%),
    var(--paper);
  pointer-events: none;
}
.wallpaper i {
  position: absolute;
  width: 90vw;
  height: 90vw;
  min-width: 650px;
  min-height: 650px;
  border-radius: 46% 54% 42% 58%;
  background: linear-gradient(120deg, var(--wall-1), var(--wall-2));
  opacity: 0.48;
  transform: rotate(-35deg);
  bottom: -70vw;
  left: -28vw;
}
.wallpaper i:nth-child(2) {
  bottom: -60vw;
  left: 20vw;
  opacity: 0.28;
  transform: rotate(20deg);
}
.wallpaper i:nth-child(3) {
  width: 50vw;
  height: 50vw;
  min-width: 400px;
  min-height: 400px;
  left: auto;
  right: -34vw;
  top: 14vh;
  opacity: 0.36;
  transform: rotate(40deg);
}
.site-header {
  height: 102px;
  max-width: 1320px;
  padding: 0 56px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  font-size: 21px;
  line-height: 0.97;
  font-weight: 760;
  letter-spacing: -1px;
}
.wordmark > span:last-child > span {
  display: block;
  font-size: 15px;
  letter-spacing: -0.4px;
  font-weight: 500;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 43px;
  height: 43px;
  border: 1.5px solid currentColor;
  border-radius: 14px;
  font-size: 33px;
  letter-spacing: -5px;
  padding: 0 5px 6px 0;
}
.brand-mark span {
  font-size: 19px;
  align-self: flex-start;
  padding-top: 5px;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}
.local-note {
  font-size: 12px;
  margin-right: 15px;
  color: var(--muted);
}
.local-note i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--home-accent);
  border-radius: 50%;
  margin-right: 7px;
}
.profile-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--glass);
}
.profile-button > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}
.settings-button {
  display: flex;
  gap: 7px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: 12px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 50px;
  background: var(--glass);
}
.home-shell {
  max-width: 1024px;
  margin: 0 auto;
  padding: 35px 38px 162px;
}
.welcome-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 33px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 2px;
  margin: 0 0 13px;
  color: var(--muted);
}
h1 {
  font-size: clamp(29px, 3.4vw, 44px);
  line-height: 1.13;
  letter-spacing: -1.9px;
  font-weight: 550;
  margin: 0;
  overflow-wrap: anywhere;
}
.home-subtitle {
  font-size: 14px;
  color: var(--muted);
  margin: 13px 0 0;
}
.pill-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: var(--glass);
  padding: 0 17px;
  min-height: 44px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 550;
  transition:
    background 0.2s,
    transform 0.2s;
}
.pill-button:hover {
  background: #fff8;
  transform: translateY(-2px);
}
.widgets {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 18px;
  margin-bottom: 37px;
}
.widgets article {
  border-radius: 26px;
  min-height: 209px;
  overflow: hidden;
  position: relative;
  border: 1px solid #fff5;
}
.play-widget {
  display: flex;
  align-items: center;
  background: #dfe7ca;
  color: #354427;
  padding: 27px 30px;
}
.widget-kicker {
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 1.9px;
}
.widget-copy {
  position: relative;
  z-index: 1;
  max-width: 70%;
}
.widget-copy h2 {
  font-weight: 550;
  letter-spacing: -0.8px;
  font-size: 27px;
  line-height: 1.12;
  margin: 17px 0 9px;
  max-width: 245px;
}
.widget-copy p {
  font-size: 11px;
  color: #62734f;
  margin: 0 0 14px;
  line-height: 1.5;
}
.play-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  font-size: 11px;
  font-weight: 650;
  min-height: 44px;
}
.play-link > span {
  display: grid;
  place-items: center;
  background: #f8faeb88;
  border-radius: 50%;
  height: 29px;
  width: 29px;
  font-size: 18px;
  font-weight: 400;
}
.play-widget > img {
  position: absolute;
  right: 27px;
  bottom: 23px;
  width: 123px;
  height: 123px;
  border-radius: 28%;
  transform: rotate(11deg);
  box-shadow: 0 13px 20px #3e512b1a;
}
.clock-widget {
  background: var(--glass);
  padding: 26px 28px;
}
.clock-widget time {
  font-size: 61px;
  line-height: 1.15;
  letter-spacing: -3px;
  font-weight: 250;
  display: block;
  margin: 10px 0 14px;
  font-variant-numeric: tabular-nums;
}
.clock-bottom {
  display: flex;
  align-items: center;
  font-size: 10px;
  line-height: 1.55;
  color: var(--muted);
}
.library-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 28px;
}
.view-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--glass);
  padding: 4px;
  border-radius: 14px;
  border: 1px solid #fff3;
}
.view-tabs button {
  border: 0;
  background: transparent;
  border-radius: 10px;
  min-height: 44px;
  padding: 0 17px;
  font-size: 12px;
  color: var(--muted);
}
.view-tabs button.is-active {
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 2px 4px #0001;
}
.view-tabs button span {
  font-size: 9px;
  margin-left: 5px;
  opacity: 0.7;
}
.library-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.text-button {
  border: 0;
  min-height: 44px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.text-button[aria-pressed="true"] {
  color: var(--home-accent);
  font-weight: 700;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
}
.search-box svg {
  width: 16px;
  height: 16px;
}
.search-box input {
  border: 0;
  outline-offset: 0;
  background: transparent;
  width: 133px;
  min-height: 44px;
  min-width: 0;
  color: var(--ink);
  font-size: 12px;
}
.search-box input::placeholder {
  color: var(--muted);
}
.library-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 24px;
}
.library-caption h2 {
  font-size: 12px;
  font-weight: 550;
  margin: 0;
}
.library-caption > span {
  font-size: 10px;
  color: var(--muted);
}
.game-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px 40px;
  padding: 0 24px;
}
.game-card {
  position: relative;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.game-launch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  min-width: 44px;
  width: 100%;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  border-radius: 24px;
}
.app-icon {
  position: relative;
  display: block;
  width: 112px;
  aspect-ratio: 1;
  border-radius: 25%;
  box-shadow:
    0 7px 14px #26332212,
    0 1px 2px #26332217;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  overflow: hidden;
  background: var(--home-accent);
}
.app-icon::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px #fff2;
  pointer-events: none;
}
.app-icon img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.game-launch:hover .app-icon {
  transform: translateY(-5px) rotate(-2deg);
  box-shadow: 0 11px 18px #26332220;
}
.game-name {
  margin: 0;
  font-size: 12px;
  font-weight: 550;
  line-height: 1.3;
  text-align: center;
}
.game-genre {
  font-size: 9px;
  color: var(--muted);
  margin-top: -7px;
  text-align: center;
}
.home-hint {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 10px;
  color: var(--muted);
  margin: 36px 0 0;
}
.home-hint span {
  font-size: 17px;
  opacity: 0.6;
}
.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 10px;
  color: var(--muted);
}
.site-footer a {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.empty-state {
  text-align: center;
  padding: 40px 15px;
  color: var(--muted);
  font-size: 14px;
}
.favorites-dock {
  position: fixed;
  z-index: 3;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 13px 18px 10px;
  border-radius: 27px;
  background: color-mix(in srgb, var(--paper) 74%, transparent);
  border: 1px solid #fff8;
  box-shadow:
    0 8px 40px #303b2b12,
    0 1px 2px #303b2b17;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.dock-caption {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 0;
  width: 100%;
  text-align: center;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--muted);
  pointer-events: none;
}
.favorites-dock #dock-games {
  display: flex;
  gap: 19px;
}
.dock-game,
#dock-edit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 49px;
  border: 0;
  padding: 0;
  background: transparent;
}
.dock-game img,
.dock-add {
  width: 48px;
  height: 48px;
  border-radius: 25%;
  box-shadow: 0 3px 6px #0001;
  transition: transform 0.2s;
}
.dock-game:hover img {
  transform: translateY(-4px);
}
.dock-label {
  font-size: 8px;
  white-space: nowrap;
  color: var(--ink);
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dock-divider {
  height: 40px;
  width: 1px;
  background: var(--line);
  margin: 0 1px;
}
.dock-add {
  display: grid;
  place-items: center;
  background: var(--glass);
  font-size: 26px;
  font-weight: 250;
  border: 1px dashed var(--line);
  box-shadow: none;
}
/* The customization sheet uses a native modal for focus containment and Escape. */
dialog {
  width: min(480px, calc(100% - 24px));
  max-height: min(850px, calc(100dvh - 32px));
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--paper);
  color: var(--ink);
  padding: 0;
  box-shadow: 0 30px 100px #0003;
  overflow: hidden;
}
dialog[open] {
  display: flex;
  flex-direction: column;
}
dialog::backdrop {
  background: #18201555;
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
}
.sheet-header {
  padding: 25px 25px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.sheet-header .eyebrow {
  font-size: 8px;
  margin-bottom: 8px;
}
.sheet-header h2 {
  font-size: 28px;
  font-weight: 550;
  letter-spacing: -1px;
  margin: 0;
}
.close-button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--glass);
  font-size: 25px;
  font-weight: 300;
}
.sheet-content {
  overflow: auto;
  overscroll-behavior: contain;
  padding: 22px 25px;
}
.title-field {
  display: block;
  font-size: 12px;
  font-weight: 550;
}
.title-field input {
  display: block;
  width: 100%;
  margin-top: 10px;
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  min-height: 44px;
  color: var(--ink);
  font-size: 14px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 25px 0 0;
}
legend {
  font-size: 12px;
  font-weight: 550;
  margin-bottom: 13px;
}
legend span {
  display: block;
  font-size: 10px;
  font-weight: 400;
  margin-top: 5px;
  color: var(--muted);
}
#wallpaper-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 10px;
}
.wallpaper-option {
  padding: 0;
  border: 0;
  background: none;
  text-align: center;
  font-size: 10px;
  min-height: 72px;
}
.wallpaper-option i {
  display: block;
  height: 52px;
  border-radius: 12px;
  margin-bottom: 7px;
  background: var(--swatch);
  border: 3px solid transparent;
  box-shadow: inset 0 0 0 1px #0001;
}
.wallpaper-option[aria-pressed="true"] i {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.custom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 65px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
.custom-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 4px;
}
.custom-row input[type="color"] {
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass);
  width: 48px;
  height: 44px;
}
.segmented {
  display: flex;
  background: var(--glass);
  padding: 3px;
  border-radius: 10px;
}
.segmented button {
  min-height: 44px;
  border: 0;
  background: none;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 10px;
}
.segmented button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}
.switch {
  appearance: none;
  -webkit-appearance: none;
  width: 48px;
  height: 44px;
  border: 0;
  border-radius: 24px;
  margin: 0;
  position: relative;
  cursor: pointer;
  background: transparent;
}
.switch::before {
  content: "";
  position: absolute;
  width: 44px;
  height: 27px;
  top: 9px;
  left: 2px;
  border-radius: 20px;
  background: #9b9e9670;
  transition: background 0.2s;
}
.switch::after {
  content: "";
  position: absolute;
  width: 21px;
  height: 21px;
  top: 12px;
  left: 5px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 4px #0002;
  transition: transform 0.2s;
}
.switch:checked::before {
  background: var(--home-accent);
}
.switch:checked::after {
  transform: translateX(17px);
}
.custom-game {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.custom-game img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.custom-game > span {
  flex: 1;
  font-size: 11px;
}
.custom-game button {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--line);
  background: var(--glass);
  border-radius: 11px;
  font-size: 11px;
}
.custom-game button[aria-pressed="true"] {
  color: var(--home-accent);
  font-weight: 700;
}
.custom-game .favorite-toggle {
  font-size: 19px;
}
.sheet-footer {
  padding: 16px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--paper);
  font-size: 10px;
  color: var(--muted);
}
.primary-button {
  min-height: 44px;
  background: var(--ink);
  color: var(--paper);
  border: 0;
  border-radius: 13px;
  padding: 0 15px;
  font-size: 12px;
}
.primary-button span {
  margin-left: 8px;
}
.move-controls {
  display: none;
  gap: 5px;
  margin-top: 8px;
}
.move-controls button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--glass);
  font-size: 17px;
}
.is-arranging .move-controls {
  display: flex;
}
.is-arranging .game-launch {
  touch-action: none;
  cursor: grab;
}
.is-arranging .app-icon {
  outline: 1px dashed var(--muted);
  outline-offset: 5px;
}
.game-card.dragging {
  opacity: 0.3;
}
.drag-preview {
  position: fixed;
  z-index: 15;
  pointer-events: none;
  opacity: 0.9;
  filter: drop-shadow(0 12px 12px #0003);
}
.drag-preview .move-controls {
  display: none;
}
.is-dragging {
  user-select: none;
}
:root[data-home-theme="midnight"] {
  color-scheme: dark;
  --paper: #202932;
  --ink: #f1f0e7;
  --muted: #acb6bf;
  --glass: #ffffff0d;
  --line: #ffffff20;
  --wall-1: #40555c;
  --wall-2: #253848;
  --wall-3: #303b44;
}
:root[data-home-theme="electric"] {
  --paper: #e9ecfa;
  --ink: #2b3155;
  --muted: #687094;
  --wall-1: #bac3f5;
  --wall-2: #bcb0e8;
  --wall-3: #f1eefa;
}
:root[data-home-theme="sunset"] {
  --paper: #f4e5db;
  --ink: #663f38;
  --muted: #976f66;
  --wall-1: #efbca0;
  --wall-2: #d99692;
  --wall-3: #fff2d8;
}
:root[data-home-theme="ocean"] {
  --paper: #deedf0;
  --ink: #245368;
  --muted: #628590;
  --wall-1: #98cbd2;
  --wall-2: #a5c0d7;
  --wall-3: #edf6eb;
}
:root[data-home-theme="candy"] {
  --paper: #f5e4ef;
  --ink: #623f63;
  --muted: #916b91;
  --wall-1: #e4bce0;
  --wall-2: #cdbfe8;
  --wall-3: #fdebe8;
}
:root[data-home-theme="forest"] {
  color-scheme: dark;
  --paper: #223c32;
  --ink: #e9edda;
  --muted: #b0c2ad;
  --glass: #ffffff0d;
  --line: #ffffff20;
  --wall-1: #406548;
  --wall-2: #294739;
  --wall-3: #334c38;
}
:root[data-home-theme="retro"] {
  --paper: #f2e9cf;
  --ink: #604c33;
  --muted: #98805b;
  --wall-1: #d7bd81;
  --wall-2: #c7b887;
  --wall-3: #fbefd5;
}
:root[data-icon-style="tinted"] .app-icon img {
  filter: grayscale(1);
  mix-blend-mode: luminosity;
  opacity: 0.85;
}
:root[data-icon-style="tinted"] .dock-game img {
  filter: grayscale(1);
}
:root[data-show-labels="false"] .game-name,
:root[data-show-labels="false"] .game-genre,
:root[data-show-labels="false"] .dock-label {
  display: none;
}
:root[data-show-widgets="false"] .widgets {
  display: none;
}
:root[data-home-density="compact"] .game-grid {
  gap: 24px;
}
:root[data-home-density="compact"] .app-icon {
  width: 88px;
}
:root[data-text-size="large"] .game-name,
:root[data-text-size="large"] .home-subtitle {
  font-size: 16px;
}
:root[data-text-size="large"] .game-genre,
:root[data-text-size="large"] .library-caption h2,
:root[data-text-size="large"] .custom-row,
:root[data-text-size="large"] .custom-game > span {
  font-size: 13px;
}
:root[data-contrast="high"] {
  --muted: var(--ink);
  --line: color-mix(in srgb, var(--ink) 50%, transparent);
}
@media (min-width: 1450px) {
  .wallpaper i {
    bottom: -77vw;
  }
  .home-shell {
    padding-top: 53px;
  }
}
@media (max-width: 760px) {
  .site-header {
    height: 82px;
    padding: 0 25px;
  }
  .local-note {
    display: none;
  }
  .home-shell {
    padding: 25px 25px 158px;
  }
  .welcome-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 19px;
    margin-bottom: 24px;
  }
  h1 {
    font-size: 35px;
    letter-spacing: -1.5px;
  }
  .welcome-heading .pill-button {
    font-size: 11px;
  }
  .widgets {
    gap: 12px;
    margin-bottom: 25px;
    grid-template-columns: 1.45fr 1fr;
  }
  .widgets article {
    min-height: 188px;
    border-radius: 23px;
  }
  .play-widget {
    padding: 21px;
  }
  .widget-copy {
    max-width: 100%;
  }
  .widget-copy h2 {
    font-size: 23px;
    max-width: 150px;
  }
  .widget-copy p {
    max-width: 120px;
    font-size: 10px;
  }
  .play-widget > img {
    width: 70px;
    height: 70px;
    right: 16px;
    bottom: 23px;
    opacity: 0.4;
  }
  .widget-kicker {
    font-size: 8px;
    letter-spacing: 1.3px;
  }
  .clock-widget {
    padding: 21px 18px;
  }
  .clock-widget time {
    font-size: 43px;
    letter-spacing: -2px;
    margin-top: 18px;
  }
  .clock-bottom {
    font-size: 9px;
    gap: 8px;
  }
  .library-toolbar {
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 20px;
  }
  .view-tabs button {
    padding: 0 12px;
  }
  .library-tools {
    gap: 1px;
  }
  .search-box input {
    width: 98px;
  }
  .library-caption {
    align-items: start;
  }
  .library-caption > span {
    max-width: 130px;
    line-height: 1.5;
    text-align: right;
    font-size: 9px;
  }
  .game-grid {
    padding: 0;
    gap: 25px 12px;
  }
  .app-icon {
    width: 82px;
  }
  .game-name {
    font-size: 10px;
  }
  .game-genre {
    font-size: 8px;
    max-width: 85px;
  }
  .home-hint {
    font-size: 9px;
  }
  .site-footer {
    margin-top: 22px;
    font-size: 9px;
  }
}
@media (max-width: 430px) {
  .site-header {
    padding: 0 21px;
  }
  .header-actions {
    gap: 9px;
  }
  .settings-button {
    width: 44px;
    padding: 0;
  }
  .settings-button > span {
    display: none;
  }
  .home-shell {
    padding: 21px 21px 160px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1.7px;
  }
  h1 {
    font-size: 32px;
  }
  .home-subtitle {
    font-size: 12px;
  }
  .widgets {
    grid-template-columns: 1.25fr 1fr;
  }
  .play-widget {
    padding: 18px;
  }
  .widget-copy h2 {
    font-size: 21px;
    max-width: 138px;
    margin-top: 14px;
  }
  .widget-copy p {
    display: none;
  }
  .play-widget > img {
    width: 61px;
    height: 61px;
    right: 10px;
    bottom: 26px;
    opacity: 0.25;
  }
  .clock-widget {
    padding: 20px 14px;
  }
  .clock-widget time {
    font-size: 39px;
  }
  .clock-bottom {
    font-size: 8px;
  }
  .widgets article {
    min-height: 176px;
  }
  .widget-kicker {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .library-tools {
    width: 100%;
    justify-content: space-between;
    flex-direction: row-reverse;
  }
  .search-box input {
    width: 145px;
  }
  .library-caption {
    margin-bottom: 21px;
  }
  .library-caption h2 {
    font-size: 11px;
  }
  .library-caption > span {
    max-width: 120px;
  }
  .game-grid {
    gap: 25px 9px;
  }
  .app-icon {
    width: min(17vw, 74px);
  }
  .game-name {
    font-size: 9px;
    letter-spacing: -0.15px;
  }
  .game-genre {
    display: none;
  }
  .game-launch {
    gap: 10px;
  }
  :root[data-home-density="compact"] .app-icon {
    width: 56px;
  }
  .favorites-dock {
    gap: 10px;
    padding: 12px 12px 10px;
    border-radius: 25px;
    max-width: calc(100% - 20px);
  }
  .favorites-dock #dock-games {
    gap: 12px;
  }
  .dock-game img,
  .dock-add {
    width: 44px;
    height: 44px;
  }
  .dock-game,
  #dock-edit {
    min-width: 44px;
  }
  .dock-label {
    max-width: 48px;
    font-size: 7px;
  }
  .home-hint {
    font-size: 8px;
  }
  .sheet-header {
    padding: 22px 20px 17px;
  }
  .sheet-content {
    padding: 18px 20px;
  }
  .sheet-footer {
    padding: 14px 20px;
  }
  dialog {
    margin: auto auto max(10px, env(safe-area-inset-bottom));
  }
  .site-footer {
    font-size: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
}
:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after {
  scroll-behavior: auto !important;
  animation: none !important;
  transition: none !important;
}
@media (max-width: 760px) {
  input[type="text"],
  input[type="search"] {
    font-size: 16px;
  }
}
/* Keep the complete app grid within reach on a phone, above the dock. */
@media (max-width: 430px) {
  .welcome-heading { position: relative; display: block; margin-bottom: 27px; }
  .welcome-heading .pill-button { position: absolute; right: 0; bottom: -10px; width: 44px; padding: 0; font-size: 0; }
  .welcome-heading .pill-button svg { width: 18px; height: 18px; }
  .home-subtitle { padding-right: 45px; }
  .library-toolbar { position: relative; flex-wrap: nowrap; gap: 10px; }
  .library-tools { width: auto; flex-direction: row; }
  .search-box input { width: 100px; font-size: 16px; }
  #arrange-button { position: absolute; right: 0; top: 61px; }
  .library-caption { min-height: 22px; align-items: center; }
  .library-caption > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}
@media (max-width: 360px) {
  .view-tabs button { padding: 0 9px; font-size: 11px; }
  .search-box input { width: 69px; }
  h1 { font-size: 29px; }
}
@media (max-width: 430px) {
  .dock-caption { display: none; }
}
