:root {
  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --side-padding: clamp(16px, 4.6vw, 24px);
  --column-gap: clamp(7px, 1.9vw, 11px);
  --label-size: clamp(10.5px, 3.2vw, 13px);
  --icon-size: clamp(48px, 16.4vw, 68px);
  --slot-gap: clamp(6px, 1.8vw, 8px);
  --slot-height: calc(var(--icon-size) + var(--slot-gap) + 16px);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  background: #171614;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow: hidden;
  background: #171614;
  color: #fff;
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  color: inherit;
  font: inherit;
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
}

[hidden] {
  display: none !important;
}

.home-screen {
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: #3c3427;
  background-image: var(--wallpaper-url, url("wallpaper.jpg"));
  background-position: center 45%;
  background-repeat: no-repeat;
  background-size: cover;
  user-select: none;
  -webkit-user-select: none;
}

.home-screen::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(11, 12, 14, 0.28) 0%, rgba(11, 12, 14, 0.04) 22%, transparent 54%, rgba(11, 12, 14, 0.18) 100%);
  content: "";
  pointer-events: none;
}

.launcher {
  position: relative;
  z-index: 1;
  height: 100%;
  padding-top: calc(env(safe-area-inset-top, 0px) + clamp(52px, 8.8vh, 88px));
  padding-right: max(var(--side-padding), env(safe-area-inset-right, 0px));
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--side-padding), env(safe-area-inset-left, 0px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

.launcher::-webkit-scrollbar {
  display: none;
}

.app-grid {
  position: relative;
  display: grid;
  grid-auto-rows: var(--slot-height);
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  column-gap: var(--column-gap);
  row-gap: clamp(24px, 4.2vh, 38px);
}

.app-grid.is-dragging {
  cursor: grabbing;
}

.grid-slot {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  height: var(--slot-height);
}

.grid-slot::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 1px dashed rgba(255, 255, 255, 0.52);
  border-radius: 18px;
  background: rgba(10, 11, 13, 0.22);
  content: "";
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 150ms ease,
    background 150ms ease,
    border-color 150ms ease;
}

.grid-slot::after {
  position: absolute;
  z-index: 45;
  inset: 0;
  border-radius: 18px;
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.82),
    0 0 26px rgba(255, 255, 255, 0.28);
  content: "";
  opacity: 0;
  pointer-events: none;
}

.app-grid.is-dragging .grid-slot::before {
  opacity: 1;
}

.app-grid.is-dragging .grid-slot.is-empty::before {
  background: rgba(255, 255, 255, 0.1);
}

.app-grid.is-dragging .grid-slot.is-drop-target::before {
  border-color: transparent;
  background: rgba(255, 255, 255, 0.16);
}

.app-grid.is-dragging .grid-slot.is-drop-target::after {
  opacity: 1;
}

.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--slot-gap);
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  outline: 0;
  background: none;
  cursor: pointer;
  text-align: center;
}

.app__icon {
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: min(var(--icon-size), 100%);
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 23.5%;
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.2),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
  transition:
    transform 160ms cubic-bezier(0.2, 0.8, 0.2, 1),
    filter 160ms ease;
}

.app__icon::after {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0) 39%, rgba(0, 0, 0, 0.045));
  box-shadow: inset 0 0 0 0.5px rgba(255, 255, 255, 0.16);
  content: "";
  pointer-events: none;
}

.app__icon > svg {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  transition: opacity 170ms ease;
}

.app__label {
  display: block;
  width: 100%;
  overflow: hidden;
  color: #fff;
  font-size: var(--label-size);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.005em;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 1px 10px rgba(0, 0, 0, 0.62);
  white-space: nowrap;
}

.site-app {
  cursor: pointer;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
}

.home-screen.is-edit-mode .site-app {
  cursor: grab;
  touch-action: none;
}

.site-app:active .app__icon,
.app--add:active .app__icon {
  filter: brightness(0.86);
  transform: scale(0.9);
}

.site-app.is-dragging {
  z-index: 40;
  cursor: grabbing;
  will-change: transform;
}

.site-app.is-dragging .app__icon {
  filter: brightness(1.02);
  transform: scale(1.035);
  box-shadow:
    0 24px 44px rgba(0, 0, 0, 0.4),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
}

.site-app.is-dragging .app__label {
  text-shadow:
    0 2px 5px rgba(0, 0, 0, 0.92),
    0 2px 14px rgba(0, 0, 0, 0.7);
}

.app:focus-visible .app__icon {
  outline: 2px solid rgba(255, 255, 255, 0.95);
  outline-offset: 3px;
}

.app:focus-visible .app__label {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

@media (hover: hover) {
  .site-app:hover .app__icon,
  .app--add:hover .app__icon {
    transform: translateY(-2px) scale(1.015);
  }

  .site-app:active .app__icon,
  .app--add:active .app__icon {
    filter: brightness(0.86);
    transform: scale(0.9);
  }
}

/* Original app artwork */
.icon-favorites {
  background: linear-gradient(155deg, #57595c 0%, #46484b 48%, #3a3c3e 100%);
}

.icon-istoreos {
  background: radial-gradient(120% 120% at 25% 10%, #a75eb6 0%, #914aa4 42%, #713886 100%);
}

.icon-probe {
  background: linear-gradient(150deg, #4c4b4b 0%, #414040 51%, #393838 100%);
}

.icon-notes {
  background: linear-gradient(155deg, #1a7b48 0%, #136c3d 49%, #0e5d34 100%);
}

.icon-assets {
  background: linear-gradient(155deg, #79731d 0%, #6d6817 50%, #5c5712 100%);
}

.icon-navigate {
  background: linear-gradient(150deg, #121315 0%, #050506 58%, #0b0b0d 100%);
}

.icon-nodeseek {
  background: radial-gradient(125% 125% at 34% 18%, #58585a 0%, #464648 55%, #353537 100%);
}

.icon-narwhal {
  background: radial-gradient(108% 100% at 45% 35%, #fff 0%, #f8fcff 60%, #e3f3fe 100%);
}

.icon-add {
  background: linear-gradient(155deg, rgba(83, 84, 86, 0.94), rgba(54, 55, 57, 0.93));
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.icon-generated {
  display: grid;
  background: linear-gradient(150deg, var(--site-from, #4a90e2), var(--site-to, #1f4f92));
  color: #fff;
  place-items: center;
}

.generated-initial {
  position: relative;
  z-index: 1;
  font-size: calc(var(--icon-size) * 0.41);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.04em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
}

.online-favicon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 62%;
  height: 62%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.14));
  transform: translate(-50%, -50%) scale(0.9);
  transition:
    opacity 170ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  -webkit-user-drag: none;
}

.app__icon.has-online-favicon {
  background: linear-gradient(145deg, #fdfcf8 0%, #f4f1e8 52%, #e8e3d7 100%);
  box-shadow:
    0 9px 20px rgba(0, 0, 0, 0.22),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.95),
    inset 0 0 0 0.5px rgba(62, 52, 35, 0.1);
}

.app__icon.has-online-favicon > svg,
.app__icon.has-online-favicon > .generated-initial {
  opacity: 0;
}

.app__icon.has-online-favicon > .online-favicon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Add / edit sheet */
.sheet-overlay {
  position: absolute;
  z-index: 40;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 8px;
  padding-bottom: max(8px, env(safe-area-inset-bottom, 0px));
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  background: rgba(8, 8, 10, 0.45);
  cursor: default;
  opacity: 0;
  transition: opacity 280ms ease;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}

.app-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  max-height: calc(100% - 20px);
  padding: 9px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 30px;
  background: linear-gradient(180deg, rgba(48, 48, 51, 0.95), rgba(30, 30, 33, 0.97));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.48),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.08);
  color: #fff;
  overscroll-behavior: contain;
  transform: translateY(calc(100% + 20px));
  transition: transform 360ms cubic-bezier(0.22, 0.8, 0.24, 1);
  -webkit-backdrop-filter: blur(32px) saturate(1.35);
  backdrop-filter: blur(32px) saturate(1.35);
  scrollbar-width: thin;
}

.sheet-overlay.is-open .sheet-scrim {
  opacity: 1;
}

.sheet-overlay.is-open .app-sheet {
  transform: translateY(0);
}

.app-sheet__handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.app-sheet__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.editor-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.editor-icon {
  display: flex;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
}

.editor-icon .app__icon {
  width: 44px;
  height: 44px;
  border-radius: 22%;
  box-shadow:
    0 5px 12px rgba(0, 0, 0, 0.24),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
}

.editor-icon .generated-initial {
  font-size: 18px;
}

.app-sheet__header h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.app-sheet__header p {
  margin: 4px 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
  line-height: 1.4;
}

.sheet-close {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  place-items: center;
  transition: background 160ms ease;
}

.sheet-close:hover {
  background: rgba(255, 255, 255, 0.16);
}

.sheet-close:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.sheet-close svg {
  width: 18px;
  height: 18px;
  color: rgba(255, 255, 255, 0.72);
}

.editor-form {
  display: grid;
  gap: 15px;
  margin-top: 22px;
}

.field {
  display: grid;
  gap: 7px;
}

.field__label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.25;
}

.field__input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 0.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 13px;
  outline: 0;
  background: rgba(255, 255, 255, 0.075);
  color: #fff;
  font-size: 16px;
  line-height: 1.2;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.field__input::placeholder {
  color: rgba(255, 255, 255, 0.32);
}

.field__input:focus {
  border-color: rgba(109, 179, 255, 0.8);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px rgba(73, 144, 232, 0.18);
}

.field__input[aria-invalid="true"] {
  border-color: rgba(255, 120, 120, 0.8);
  box-shadow: 0 0 0 3px rgba(255, 91, 91, 0.12);
}

.field__hint {
  margin: 0;
  color: rgba(255, 255, 255, 0.38);
  font-size: 10.5px;
  line-height: 1.4;
}

.form-error {
  margin: -3px 0 0;
  color: #ffb0b0;
  font-size: 12px;
  line-height: 1.45;
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 3px;
}

.delete-button,
.primary-button {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  transition:
    transform 150ms ease,
    background 150ms ease,
    color 150ms ease;
}

.delete-button {
  margin-right: auto;
  padding-right: 9px;
  padding-left: 9px;
  background: transparent;
  color: rgba(255, 142, 142, 0.9);
}

.delete-button:hover {
  color: #ffb4b4;
}

.delete-button.is-confirming {
  padding-right: 16px;
  padding-left: 16px;
  background: rgba(255, 81, 81, 0.92);
  color: #fff;
}

.primary-button {
  margin-left: auto;
  min-width: 96px;
  background: #f3f3f1;
  color: #171719;
}

.primary-button:hover {
  background: #fff;
}

.delete-button:active,
.primary-button:active {
  transform: scale(0.96);
}

.delete-button:focus-visible,
.primary-button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.toast {
  position: absolute;
  z-index: 50;
  bottom: calc(28px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 9px 16px 10px;
  overflow: hidden;
  border: 0.5px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.82);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
  font-size: 12px;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  text-overflow: ellipsis;
  transform: translate(-50%, 10px);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  backdrop-filter: blur(20px) saturate(1.3);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* Top-left corner triple tap trigger */
.top-left-trigger {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 70;
  width: 90px;
  height: 80px;
  cursor: default;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.corner-tap-ripple {
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.42) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.3);
  animation: cornerRipple 320ms ease-out forwards;
}

@keyframes cornerRipple {
  0% {
    opacity: 0.9;
    transform: translate(-50%, -50%) scale(0.4);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2.2);
  }
}

/* Edit mode toolbar */
.edit-toolbar {
  position: absolute;
  top: calc(env(safe-area-inset-top, 0px) + clamp(10px, 2.2vh, 18px));
  left: max(var(--side-padding), env(safe-area-inset-left, 0px));
  right: max(var(--side-padding), env(safe-area-inset-right, 0px));
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 460px;
  margin: 0 auto;
  padding: 8px 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  background: rgba(26, 26, 29, 0.85);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.45),
    inset 0 0.5px 0 rgba(255, 255, 255, 0.16);
  animation: toolbarSlideIn 240ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
  -webkit-backdrop-filter: blur(24px) saturate(1.4);
  backdrop-filter: blur(24px) saturate(1.4);
}

@keyframes toolbarSlideIn {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.edit-toolbar__info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.edit-toolbar__badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 173, 73, 0.22);
  border: 0.5px solid rgba(255, 173, 73, 0.55);
  color: #ffc47f;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.edit-toolbar__tip {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.edit-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.edit-toolbar__btn {
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  transition: background 150ms ease, transform 150ms ease;
}

.edit-toolbar__btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.edit-toolbar__btn:active {
  transform: scale(0.96);
}

.edit-toolbar__btn--done {
  background: #f4f4f4;
  color: #161617;
  border-color: transparent;
}

.edit-toolbar__btn--done:hover {
  background: #ffffff;
}

/* Edit mode indicator on icon */
.edit-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(45, 45, 48, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  color: #ffcd70;
  font-size: 10px;
  pointer-events: none;
}

.edit-badge svg {
  width: 10px;
  height: 10px;
}

/* Gentle subtle wiggle in edit mode */
@keyframes iconJiggle {
  0% { transform: rotate(-0.75deg); }
  50% { transform: rotate(0.75deg); }
  100% { transform: rotate(-0.75deg); }
}

.home-screen.is-edit-mode .site-app:not(.is-dragging) .app__icon {
  animation: iconJiggle 0.32s ease-in-out infinite alternate;
}

.home-screen.is-edit-mode .site-app:nth-child(2n):not(.is-dragging) .app__icon {
  animation-duration: 0.28s;
  animation-direction: alternate-reverse;
}

/* Exporter Modal styles */
.exporter-sheet {
  max-width: 440px;
}

.exporter-icon {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, #3d5168, #253342);
  color: #8dc9ff;
}

.exporter-icon svg {
  width: 22px;
  height: 22px;
}

.exporter-body {
  display: grid;
  gap: 15px;
  margin-top: 18px;
}

.field__textarea {
  width: 100%;
  height: 160px;
  padding: 12px;
  border: 0.5px solid rgba(255, 255, 255, 0.16);
  border-radius: 13px;
  background: rgba(14, 15, 17, 0.85);
  color: #e4e4e7;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11.5px;
  line-height: 1.5;
  resize: vertical;
  tab-size: 2;
  white-space: pre;
}

.field__textarea:focus {
  outline: none;
  border-color: rgba(109, 179, 255, 0.8);
  box-shadow: 0 0 0 3px rgba(73, 144, 232, 0.18);
}

.exporter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  margin-top: 4px;
}

.exporter-button {
  min-height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 150ms ease, background 150ms ease;
}

.exporter-button:active {
  transform: scale(0.96);
}

.exporter-button--reset {
  margin-right: auto;
  background: transparent;
  border: 0.5px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
}

.exporter-button--reset:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.exporter-button--copy {
  background: rgba(255, 255, 255, 0.12);
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  color: #fff;
}

.exporter-button--copy:hover {
  background: rgba(255, 255, 255, 0.2);
}

.exporter-button--download {
  background: #f4f4f4;
  border: 0;
  color: #171719;
}

.exporter-button--download:hover {
  background: #fff;
}

@media (min-width: 600px) {
  html {
    background: #0d0d0c;
  }

  body {
    display: grid;
    min-height: 100svh;
    overflow: hidden;
    padding: 24px;
    isolation: isolate;
    place-items: center;
  }

  body::before {
    position: fixed;
    z-index: -2;
    inset: -64px;
    background: var(--wallpaper-url, url("wallpaper.jpg")) center / cover no-repeat;
    content: "";
    filter: blur(36px) brightness(0.31) saturate(0.82);
    transform: scale(1.08);
  }

  body::after {
    position: fixed;
    z-index: -1;
    inset: 0;
    background: radial-gradient(circle at 50% 38%, transparent 0%, rgba(0, 0, 0, 0.3) 58%, rgba(0, 0, 0, 0.7) 100%);
    content: "";
  }

  .home-screen {
    width: min(430px, calc(100vw - 48px));
    height: min(880px, calc(100svh - 48px));
    border-radius: 42px;
    box-shadow:
      0 44px 100px rgba(0, 0, 0, 0.62),
      0 0 0 1px rgba(255, 255, 255, 0.13),
      inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  }

  .sheet-overlay {
    padding: 10px;
  }

  .app-sheet {
    max-width: 410px;
    border-radius: 28px;
  }
}

@media (max-height: 640px) {
  .launcher {
    padding-top: calc(env(safe-area-inset-top, 0px) + 28px);
  }

  .app-grid {
    row-gap: 20px;
  }
}

@media (max-width: 350px) {
  :root {
    --side-padding: 14px;
    --column-gap: 6px;
    --icon-size: clamp(46px, 16.1vw, 56px);
  }

  .app__icon {
    border-radius: 22.5%;
  }

  .app-sheet {
    padding-right: 16px;
    padding-left: 16px;
  }

  .editor-heading {
    gap: 10px;
  }

  .editor-icon,
  .editor-icon .app__icon {
    width: 40px;
    height: 40px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
