@font-face {
  font-family: 'Selecta';
  src: url('/assets/fonts/Selecta-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Selecta';
  src: url('/assets/fonts/Selecta-Medium.otf') format('opentype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f6f5f1;
  --panel: #ffffff;
  --panel-soft: #faf9f5;
  --ink: #111111;
  --ink-soft: #5b5b58;
  --ink-faint: #9c9c97;
  --line: #ece9df;
  --line-strong: #d8d4c7;
  --accent: #111111;
  --accent-ink: #ffffff;
  --bad: #c93b2a;
  --good: #2f8a4a;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-tile: 18px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 0 rgba(17, 17, 17, 0.03), 0 1px 2px rgba(17, 17, 17, 0.04);
  --shadow-md: 0 1px 0 rgba(17, 17, 17, 0.04), 0 8px 24px -10px rgba(17, 17, 17, 0.16);
  --shadow-hero: 0 30px 60px -30px rgba(17, 17, 17, 0.35), 0 12px 24px -16px rgba(17, 17, 17, 0.2);
  --mono: ui-monospace, 'SF Mono', 'JetBrains Mono', Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, 'Inter', 'SF Pro Text', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body {
  display: grid;
  grid-template-columns: 264px 1fr;
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

a { color: inherit; }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
  border-right: 1px solid var(--line);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 12px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: conic-gradient(from 210deg at 50% 50%, #c84d3a, #d8a85b, #4a6a5a, #2c3f4d, #c84d3a);
  box-shadow: var(--shadow-sm), inset 0 0 0 1px rgba(255, 255, 255, 0.4);
}

.brand-name { font-weight: 600; letter-spacing: -0.01em; }
.brand-sub {
  font-size: 11px;
  color: var(--ink-faint);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 8px;
  font-size: 11px;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.app-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.app-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border-radius: 10px;
  text-align: left;
  color: var(--ink-soft);
  width: 100%;
}

.app-row:hover { background: rgba(17, 17, 17, 0.04); color: var(--ink); }
.app-row.is-active { background: var(--ink); color: var(--accent-ink); }
.app-row.is-active .app-row-dot { background: var(--accent-ink); }

.app-row-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
  flex-shrink: 0;
}

.app-row.is-active .app-row-dot { opacity: 1; }

.app-row-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-link {
  display: block;
  width: 100%;
  padding: 7px 8px;
  border-radius: 10px;
  text-align: left;
  color: var(--ink-soft);
  font-weight: 500;
}

.side-link:hover { background: rgba(17, 17, 17, 0.04); color: var(--ink); }

.sidebar-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 4px;
}

.ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ink-faint);
  padding: 6px 4px;
  text-decoration: none;
  border-radius: 6px;
}

.ghost:hover { color: var(--ink); }

#new-app {
  width: 22px;
  height: 22px;
  padding: 0;
  font-size: 14px;
  line-height: 1;
  color: var(--ink-faint);
  border-radius: 6px;
}

#new-app:hover { color: var(--ink); background: rgba(17, 17, 17, 0.05); }

/* ---------- Main canvas ---------- */
.main {
  display: flex;
  flex-direction: column;
  height: 100vh;
  padding: 0;
  min-width: 0; /* allow shrinking inside the body grid track */
}

/* Sticky top bar — view toggle always top-right, regardless of route/view */
.main-top-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.main-top-bar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.main-top-bar-context {
  font-family: 'Selecta', var(--sans);
  font-weight: 500;
  font-size: 16px;
  color: var(--ink);
}

.main-top-bar-theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: var(--radius-pill);
  background: rgba(17, 17, 17, 0.05);
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--mono);
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  border: 0;
}

.main-top-bar-theme:hover {
  background: rgba(17, 17, 17, 0.08);
  color: var(--ink);
}

.main-top-bar-prompt-icon {
  font-size: 11px;
  opacity: 0.7;
}

.metaphor-toggle {
  display: inline-flex;
  background: rgba(17, 17, 17, 0.05);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.metaphor-toggle-btn {
  padding: 5px 11px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.12s ease, color 0.12s ease;
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.metaphor-toggle-btn:hover { color: var(--ink); }
.metaphor-toggle-btn.is-active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.main-top-bar-theme-swatch {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #eceae3 center/cover no-repeat;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 32px 32px;
  min-height: 0;
}

/* Sticky bottom theme picker — taller bar, square tiles (30% larger) */
.main-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: var(--panel);
  padding: 24px 0 28px;
}

.main-footer-strip {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  padding: 4px 32px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.main-footer-strip::-webkit-scrollbar { height: 6px; }
.main-footer-strip::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.footer-theme {
  position: relative;
  flex-shrink: 0;
  width: 146px;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: #eceae3 center/cover no-repeat;
  border: 1px solid var(--line);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
}

.footer-theme:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.footer-theme.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.footer-theme-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 8px 10px 10px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  text-align: center;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.95) 40%, transparent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-theme.dark .footer-theme-label {
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
}

.app-header {
  margin-bottom: 28px;
}

.app-title-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 6px;
}

.app-title {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: none;
  border: none;
  padding: 0;
  outline: none;
  color: var(--ink);
  flex: 1;
}

.app-title:focus {
  border-bottom: 1px dashed var(--line-strong);
}

.app-desc {
  font-size: 15px;
  color: var(--ink-soft);
  width: 100%;
  border: none;
  background: none;
  resize: none;
  outline: none;
  padding: 0;
  line-height: 1.5;
  font-family: inherit;
}

.app-desc:focus { border-bottom: 1px dashed var(--line-strong); }

.app-edit-actions {
  display: flex;
  gap: 6px;
}

/* ---------- Hero icon ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 36px 0 28px;
}

.hero-icon-wrap {
  position: relative;
  width: 280px;
  height: 280px;
}

.hero-icon {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #f6e0d6, #e7c8c4 60%, #c9a9a7);
  box-shadow: var(--shadow-hero);
  overflow: hidden;
  position: relative;
}

.hero-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-icon.skeleton::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.45) 45%, rgba(255,255,255,0) 60%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.hero-icon.empty {
  background: linear-gradient(135deg, #f4ece3, #ecd9d3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
  padding: 24px;
  line-height: 1.5;
}

.hero-icon.error {
  background: repeating-linear-gradient(45deg, #fbeae6, #fbeae6 8px, #f5dcd6 8px, #f5dcd6 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bad);
  font-size: 12px;
  padding: 24px;
  text-align: center;
  font-family: var(--mono);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.hero-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

.hero-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* ---------- Theme grid ---------- */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 8px 0 14px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.section-sub {
  font-size: 13px;
  color: var(--ink-faint);
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.theme-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-tile);
  background: #eceae3 center/cover no-repeat;
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.08s ease, box-shadow 0.12s ease;
  display: block;
  width: 100%;
  padding: 0;
}

.theme-tile:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.theme-tile.is-active {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.theme-tile-label {
  position: absolute;
  inset: auto 0 0 0;
  padding: 6px 10px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: linear-gradient(to top, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0));
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.theme-tile.dark .theme-tile-label {
  color: white;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

.theme-tile-add {
  display: flex;
  align-items: center;
  justify-content: center;
  border-style: dashed;
  background: var(--panel-soft);
  color: var(--ink-faint);
  font-size: 13px;
}

.theme-tile-add:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-weight: 500;
  font-size: 13px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.06s ease, background 0.12s ease, border-color 0.12s ease;
  white-space: nowrap;
}

.btn:hover { border-color: var(--ink-soft); }
.btn:active { transform: translateY(1px); }

.btn.primary {
  background: var(--ink);
  color: var(--accent-ink);
  border-color: var(--ink);
}

.btn.primary:hover { background: #000; }
.btn.danger { color: var(--bad); border-color: rgba(201, 59, 42, 0.3); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

.btn.small { padding: 5px 10px; font-size: 12px; }

/* ---------- Page actions row ---------- */
.page-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ---------- Forms ---------- */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input,
.textarea,
.select {
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color 0.12s ease;
}

.input:focus,
.textarea:focus,
.select:focus { border-color: var(--ink); }

.textarea {
  resize: vertical;
  min-height: 80px;
  line-height: 1.5;
}

.textarea.mono {
  font-family: var(--mono);
  font-size: 13px;
}

/* ---------- Dialog ---------- */
.dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 20, 20, 0.25);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 24px;
}

.dialog-backdrop[hidden] { display: none; }

.dialog {
  background: var(--panel);
  border-radius: var(--radius);
  width: min(680px, 100%);
  max-height: 86vh;
  overflow: auto;
  box-shadow: var(--shadow-md);
  padding: 22px;
}

.dialog.wide { width: min(960px, 100%); }

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.dialog-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0;
}

.dialog-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.dialog-actions .spacer { flex: 1; }

/* ---------- Dropzone (theme editor) ---------- */
.dropzone {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 18px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 13px;
  transition: border-color 0.12s ease, color 0.12s ease, background 0.12s ease;
}

.dropzone.is-dragover {
  border-color: var(--ink);
  color: var(--ink);
  background: rgba(17, 17, 17, 0.03);
}

.refs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.ref-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  background: #eceae3 center/cover no-repeat;
  border: 1px solid var(--line);
}

.ref-thumb button {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: white;
  font-size: 11px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Compare-models grid ---------- */
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}

.compare-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.compare-img {
  aspect-ratio: 1 / 1;
  background: #eceae3 center/cover no-repeat;
  position: relative;
  border-radius: 50%;
  margin: 12px auto 0;
  width: calc(100% - 24px);
  height: auto;
}

.compare-img.skeleton {
  background: linear-gradient(110deg, #eceae3 8%, #f6f5f1 18%, #eceae3 33%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.compare-img.error {
  background: repeating-linear-gradient(45deg, #fbeae6, #fbeae6 6px, #f5dcd6 6px, #f5dcd6 12px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bad);
  font-size: 11px;
  font-family: var(--mono);
  padding: 12px;
  text-align: center;
}

.compare-meta {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.compare-meta .label { font-weight: 600; font-size: 13px; }
.compare-meta .row {
  display: flex;
  justify-content: space-between;
  color: var(--ink-soft);
  font-family: var(--mono);
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--accent-ink);
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  box-shadow: var(--shadow-md);
  z-index: 60;
}

/* ---------- Utility ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.muted { color: var(--ink-faint); }
.kbd {
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(17, 17, 17, 0.05);
  border-radius: 4px;
  padding: 1px 5px;
  color: var(--ink-soft);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  color: var(--ink-soft);
  background: var(--panel);
}

.empty-state h3 { margin: 0 0 6px; color: var(--ink); font-size: 15px; }

.error-text { color: var(--bad); font-size: 12px; }

/* ---------- Glass overlay (orb_3 from Figma) ----------
   Layered on top of every circular app icon. mix-blend-mode: screen turns
   the asset's black areas transparent and lets the iridescent rim/highlights
   add light to whatever icon image sits below. Hidden in skeleton/empty/error
   states so loading shimmer stays clean.
*/
.hero-icon::after,
.all-apps-icon::after,
.home-icon-inner::after {
  content: '';
  position: absolute;
  /* The PNG has transparent padding around the sphere — to make the orb
     reach the full edge of the icon, expand the layer 11% past each side
     (matches the original Figma component: 122% size, -11% offset). The
     parent's overflow:hidden + border-radius clip the excess to the circle. */
  inset: -11%;
  background: url('/assets/glass-overlay.png') center/100% 100% no-repeat;
  mix-blend-mode: screen;
  pointer-events: none;
  border-radius: inherit;
  z-index: 2;
}

.hero-icon.skeleton::after,
.hero-icon.empty::after,
.hero-icon.error::after,
.all-apps-icon.skeleton::after,
.all-apps-icon.error::after,
.home-icon-inner.skeleton::after,
.home-icon-inner.empty::after,
.home-icon-inner.error::after {
  display: none;
}

/* ---------- Single-app "hologram" presentation ----------
   Ported from /Users/joonasvirtanen/Documents/Projects/hologram/index.html.
   Three radial gradients give the liquid-glass something to refract;
   the white card tilts on mousemove and the orb is lit by a moving point
   light via SVG filters (defined inline in index.html).
*/
.main-content:has(.hologram-stage) {
  position: relative;
  background:
    radial-gradient(60% 50% at 25% 35%, rgba(255, 184, 108, 0.22), transparent 60%),
    radial-gradient(50% 60% at 75% 65%, rgba(120, 160, 255, 0.18), transparent 65%),
    radial-gradient(40% 40% at 50% 100%, rgba(255, 120, 200, 0.12), transparent 60%),
    linear-gradient(135deg, #faf2eb 0%, #ecedf4 100%);
}

.hologram-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.hologram-top-meta {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-family: 'Selecta', var(--sans);
}

.hologram-top-app {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hologram-top-sep {
  color: var(--ink-faint);
}

.hologram-top-theme {
  font-size: 14px;
  color: var(--ink-soft);
  font-family: var(--mono);
}

.hologram-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 0 24px;
  perspective: 900px;
}

.hologram-card {
  /* Matches the hologram prototype's card scale (~2× original) */
  box-sizing: border-box;
  width: 360px;
  max-width: 100%;
  padding: 56px 60px 44px;
  border-radius: 36px;
  background: #fbfaf7;
  box-shadow:
    0 21.65px 21.65px rgba(0, 0, 0, 0.07),
    0 0.75px 0.75px rgba(0, 0, 0, 0.08),
    inset -1px -1px 1px rgba(0, 0, 0, 0.2),
    inset 1px 1px 1px rgba(0, 0, 0, 0.03),
    inset 0 0 4.5px rgba(0, 0, 0, 0.03);
  display: grid;
  gap: 28px;
  place-items: center;
  transform-style: preserve-3d;
  will-change: transform;
}

/* Layered orb — ports `.orb` from hologram/index.html */
.hologram-orb {
  position: relative;
  width: 220px;
  height: 220px;
  max-width: 100%;
  isolation: isolate;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.12));
}

.hologram-orb .orb-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 50%;
}

.hologram-orb .orb-base {
  object-fit: cover;
}

.hologram-orb .orb-shade {
  object-fit: cover;
  opacity: 0.45;
  mix-blend-mode: overlay;
}

.hologram-orb .lit-wrap {
  filter: url(#orbHologram);
  mix-blend-mode: overlay;
}

.hologram-orb .lit-wrap.hidden { display: none; }
.hologram-orb .sphere-depth { width: 100%; height: 100%; display: block; }

.hologram-orb .glow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  mix-blend-mode: screen;
  overflow: visible;
}

/* orb_3 glass PNG overlay — same asset the other views use. Sits above the
   base/shade/lit-sphere/glow so the iridescent rim and reflections always
   appear on top. The PNG has transparent padding around the sphere, so we
   need to scale the layer ~22% larger (matching the original Figma component
   spec) so the visible glass orb actually covers the full app icon. */
.hologram-orb::after {
  content: '';
  position: absolute;
  inset: -11%;
  background: url('/assets/glass-overlay.png') center/100% 100% no-repeat;
  mix-blend-mode: screen;
  pointer-events: none;
  border-radius: 50%;
  z-index: 5;
}

.hologram-orb.empty::after,
.hologram-orb.skeleton::after,
.hologram-orb.error::after { display: none; }

/* Empty / skeleton / error fallbacks */
.hologram-orb.empty,
.hologram-orb.skeleton,
.hologram-orb.error {
  background: linear-gradient(135deg, #f4ece3, #ecd9d3);
  border-radius: 50%;
  overflow: hidden;
}

.hologram-orb.skeleton {
  background: linear-gradient(110deg, #eceae3 8%, #f6f5f1 18%, #eceae3 33%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.hologram-orb.error {
  background: repeating-linear-gradient(45deg, #fbeae6, #fbeae6 8px, #f5dcd6 8px, #f5dcd6 16px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bad);
  font-size: 12px;
  font-family: var(--mono);
  padding: 24px;
  text-align: center;
}

.hologram-orb.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-faint);
  font-size: 13px;
  text-align: center;
  padding: 24px;
}

.hologram-name {
  width: 100%;
  text-align: center;
  font-family: 'Selecta', var(--sans);
  font-weight: 500;
  font-size: 26px;
  line-height: 1.12;
  letter-spacing: -0.4px;
  background: linear-gradient(180deg, var(--name-color, #b56b1f) 0%, rgba(0, 0, 0, 0) 100%),
              linear-gradient(90deg, #191919, #191919);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  word-break: break-word;
}

.hologram-actions {
  display: flex;
  gap: 10px;
  margin-top: 8px;
  z-index: 1; /* sit above the tilting card's perspective space */
}

.hologram-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: center;
}

/* iconHistory filmstrip — small circular thumbnails of past generations,
   click any one to restore it as the current icon. Pushed below the
   regenerate actions so they don't compete with the hero. */
.history-strip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed rgba(17, 17, 17, 0.12);
  width: min(440px, 100%);
}

.history-strip-label {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.history-strip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.history-thumb {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #eceae3 center/cover no-repeat;
  border: 1px solid rgba(17, 17, 17, 0.1);
  cursor: pointer;
  padding: 0;
  transition: transform 0.1s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.history-thumb:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px -6px rgba(0, 0, 0, 0.25);
  border-color: var(--ink);
}

/* ---------- App view: hero mode toggle ---------- */
.mode-toggle {
  display: inline-flex;
  background: rgba(17, 17, 17, 0.05);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.mode-toggle-btn {
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.12s ease, color 0.12s ease;
}

.mode-toggle-btn:hover { color: var(--ink); }
.mode-toggle-btn.is-active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

/* ---------- App view: "all apps" grid (hp-card style from onboarding) ---------- */
.all-apps-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 22px;
  padding: 12px 0 32px;
  align-items: start;
  justify-items: stretch;
}

.all-apps-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 22px 18px 24px;
  width: 100%;
  background: white;
  border-radius: 26px;
  border: 0;
  box-shadow:
    0 1.2px 2.4px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.06),
    inset -1px -1px 1px rgba(0, 0, 0, 0.18),
    inset 1px 1px 1px rgba(0, 0, 0, 0.03);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  cursor: pointer;
  font-family: 'Selecta', var(--sans);
}

.all-apps-tile:hover {
  transform: translateY(-2px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 14px 32px rgba(0, 0, 0, 0.08),
    inset -1px -1px 1px rgba(0, 0, 0, 0.18),
    inset 1px 1px 1px rgba(0, 0, 0, 0.03);
}

.all-apps-icon {
  width: 132px;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4ece3, #ecd9d3) center/cover no-repeat;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.08));
  position: relative;
  overflow: hidden;
}

.all-apps-icon.skeleton {
  background: linear-gradient(110deg, #eceae3 8%, #f6f5f1 18%, #eceae3 33%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.all-apps-icon.error {
  background: repeating-linear-gradient(45deg, #fbeae6, #fbeae6 6px, #f5dcd6 6px, #f5dcd6 12px);
}

.all-apps-name {
  font-family: 'Selecta', var(--sans);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.2px;
  line-height: 1.1;
  color: #191919;
  text-align: center;
  margin: 0 4px;
  word-break: break-word;
  hyphens: auto;
}

/* ---------- Restructured sidebar nav + theme list ---------- */
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.side-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  font-weight: 500;
  color: var(--ink-soft);
  text-align: left;
  width: 100%;
  transition: background 0.12s ease, color 0.12s ease;
}

.side-nav-item:hover { background: rgba(17, 17, 17, 0.04); color: var(--ink); }
.side-nav-item.is-active { background: var(--ink); color: var(--accent-ink); }

.side-nav-icon {
  width: 18px;
  text-align: center;
  font-size: 13px;
  font-family: var(--mono);
  opacity: 0.85;
}

.side-themes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-height: 0; /* allow inner scroll */
}

.side-themes-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  padding: 2px 0 6px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.side-themes-list::-webkit-scrollbar { width: 6px; }
.side-themes-list::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.side-theme-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: left;
  width: 100%;
  transition: background 0.1s ease, color 0.1s ease;
}

.side-theme-row:hover { background: rgba(17, 17, 17, 0.04); color: var(--ink); }
.side-theme-row.is-active {
  background: rgba(17, 17, 17, 0.06);
  color: var(--ink);
  font-weight: 500;
}

.side-theme-swatch {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eceae3 center/cover no-repeat;
  border: 1px solid rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
}

.side-theme-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.005em;
}

/* ---------- Top-right view toggle (Desktop / Mobile / iOS) ---------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.view-toggle {
  display: inline-flex;
  background: rgba(17, 17, 17, 0.05);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}

.view-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
  transition: background 0.12s ease, color 0.12s ease;
}

.view-toggle-btn:hover { color: var(--ink); }
.view-toggle-btn.is-active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.view-toggle-icon {
  font-family: var(--mono);
  font-size: 13px;
  opacity: 0.85;
}

/* In Home / Mobile dark contexts the toggle gets a translucent backdrop */
.home-view-wrap .view-toggle {
  background: rgba(255, 255, 255, 0.06);
}
.home-view-wrap .view-toggle-btn { color: rgba(255, 255, 255, 0.65); }
.home-view-wrap .view-toggle-btn:hover { color: white; }
.home-view-wrap .view-toggle-btn.is-active {
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
}

/* ---------- Home / Mobile header wrap holding the view toggle ---------- */
.home-view-wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.home-view-meta,
.mobile-view-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: none;
}

.mobile-view-meta-text {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

/* ---------- Costs view ---------- */
.costs-stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.costs-stat {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.costs-stat-value {
  font-family: 'Selecta', var(--sans);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.1;
}

.costs-stat-label {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 4px;
}

.costs-stat-sub {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 2px;
}

.costs-section { margin-bottom: 28px; }

.costs-two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 22px;
  margin-bottom: 28px;
}

.costs-two-col .costs-section { margin-bottom: 0; }

.costs-highlight-card {
  background: var(--ink);
  color: var(--accent-ink);
  border-radius: var(--radius);
  padding: 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.costs-highlight-label {
  font-family: 'Selecta', var(--sans);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.costs-highlight-meta {
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.costs-breakdown {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.costs-breakdown-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.costs-breakdown-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.costs-breakdown-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}

.costs-breakdown-meta {
  display: flex;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.costs-breakdown-bar {
  height: 6px;
  background: rgba(17, 17, 17, 0.06);
  border-radius: 999px;
  overflow: hidden;
}

.costs-breakdown-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ink), #444);
  border-radius: inherit;
  transition: width 0.3s ease;
}

.costs-runs {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr 1fr 0.6fr 0.6fr 0.8fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 13px;
}

.costs-runs-head,
.costs-runs-row {
  display: contents;
}

.costs-runs-head > span {
  padding: 10px 14px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  background: var(--panel-soft);
  border-bottom: 1px solid var(--line);
}

.costs-runs-row > span {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--ink-soft);
}

.costs-runs-row:last-child > span { border-bottom: 0; }

.costs-runs .costs-runs-name { color: var(--ink); font-weight: 500; }
.costs-runs .mono { font-family: var(--mono); font-size: 12px; }

/* ---------- Mobile Wabi view ---------- */
.mobile-view-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 8px;
}

.mobile-view-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  max-width: 420px;
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.mobile-view-meta-label { color: var(--ink-soft); }
.mobile-view-meta-theme strong {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: none;
}

.phone-frame {
  width: 100%;
  max-width: 402px;
  /* Real iPhone-ish aspect (~9:19.5). Fixed so the grid scrolls inside the
     phone instead of stretching the device taller and taller. */
  height: 820px;
  max-height: calc(100vh - 220px);
  background: #fafafa;
  border-radius: 46px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 20px 50px -20px rgba(17, 17, 17, 0.25);
  position: relative;
  overflow: hidden;
  padding: 8px 0 0;
  display: flex;
  flex-direction: column;
}

.phone-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 22px 6px;
  font-family: 'SF Pro Display', -apple-system, sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #090909;
}

.phone-time {
  flex: 1;
  text-align: left;
}

.phone-dynamic-island {
  width: 124px;
  height: 30px;
  background: #050505;
  border-radius: 999px;
}

.phone-status-icons {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 5px;
  font-size: 12px;
}

.phone-status-icon.battery {
  letter-spacing: -1.5px;
}

.phone-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 4px;
}

.phone-logo {
  font-family: 'Selecta', var(--sans);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.5px;
  color: #090909;
}

.phone-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-search {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.04);
  color: #636363;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-profile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, #ffd1a8 0%, #c98c5e 100%);
  border: 2px solid white;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.phone-pills {
  display: flex;
  gap: 10px;
  padding: 8px 20px 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.phone-pills::-webkit-scrollbar { display: none; }

.phone-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.04);
  color: #636363;
  font-family: 'Selecta', var(--sans);
  font-size: 14px;
  font-weight: 400;
  flex-shrink: 0;
  transition: background 0.12s ease, color 0.12s ease;
}

.phone-pill.is-active {
  background: #090909;
  color: #fafafa;
}

.phone-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px 20px 92px; /* extra bottom padding so the tab bar's fade doesn't clip last row */
  /* Scroll the grid inside the fixed phone height, not the whole page */
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
}

.phone-grid::-webkit-scrollbar { width: 4px; }
.phone-grid::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, 0.2); border-radius: 2px; }

.phone-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 22px 18px 22px;
  background: #fafafa;
  border: 0;
  border-radius: 24px;
  box-shadow: inset 0 0 0 1px #ddd;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.12s ease;
}

.phone-tile:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 1px #ddd,
    0 6px 14px -6px rgba(0, 0, 0, 0.15);
}

.phone-tile-icon {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f4ece3, #ecd9d3) center/cover no-repeat;
  position: relative;
  overflow: hidden;
  filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.1));
}

.phone-tile-icon.skeleton {
  background: linear-gradient(110deg, #eceae3 8%, #f6f5f1 18%, #eceae3 33%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.phone-tile-icon.error {
  background: repeating-linear-gradient(45deg, #fbeae6, #fbeae6 6px, #f5dcd6 6px, #f5dcd6 12px);
}

/* Glass overlay (same shared rule extends here) — defined below */
.phone-tile-icon::after {
  content: '';
  position: absolute;
  inset: -11%;
  background: url('/assets/glass-overlay.png') center/100% 100% no-repeat;
  mix-blend-mode: screen;
  pointer-events: none;
  border-radius: inherit;
  z-index: 2;
}
.phone-tile-icon.skeleton::after,
.phone-tile-icon.error::after { display: none; }

/* Two-tone gradient name (first words colored, lower words dark) — bg-clip-text
   trick from the Figma. The fixed 36px height ensures up to two lines. */
.phone-tile-name {
  width: 100%;
  height: 36px;
  text-align: center;
  font-family: 'Selecta', var(--sans);
  font-weight: 500;
  font-size: 16px;
  line-height: 18px;
  overflow: hidden;
  word-break: break-word;
  background: linear-gradient(180deg, var(--name-color, #3991d0) 0%, rgba(0, 0, 0, 0) 100%),
              linear-gradient(90deg, #191919, #191919);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.phone-tabbar {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 14px 20px 26px;
  margin-top: auto;
  background: linear-gradient(to top, white 30%, rgba(250, 250, 250, 0) 100%);
  position: sticky;
  bottom: 0;
}

.phone-tab {
  width: 56px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  color: #b3b3b3;
  font-size: 22px;
  transition: color 0.12s ease;
}

.phone-tab.is-active { color: #090909; }

/* ---------- iOS Home screen view ---------- */
.home-view-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 8px;
}

.home-canvas {
  width: 100%;
  max-width: 402px;
  background: #050505;
  border-radius: 46px;
  padding: 24px 22px 28px;
  min-height: 720px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.04),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 24px 60px -24px rgba(17, 17, 17, 0.35);
}

.home-status-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.7);
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  padding: 0 4px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px 14px;
  margin: 8px auto 0;
  width: 100%;
  max-width: 540px;
}

.home-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
}

.home-icon-frame {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 22%;
  background: #ffffff;
  box-shadow:
    0 10px 24px -10px rgba(0, 0, 0, 0.55),
    0 2px 6px -2px rgba(0, 0, 0, 0.4),
    inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.home-icon-frame .home-icon-inner {
  width: 84%;
  height: 84%;
  border-radius: 50%;
  background: #eceae3 center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.home-icon-frame .home-icon-inner.skeleton {
  background: linear-gradient(110deg, #ddd9cf 8%, #eceae3 18%, #ddd9cf 33%);
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}

.home-icon-frame .home-icon-inner.empty {
  background: linear-gradient(135deg, #f4ece3, #ecd9d3);
}

.home-icon-frame .home-icon-inner.error {
  background: repeating-linear-gradient(45deg, #fbeae6, #fbeae6 4px, #f5dcd6 4px, #f5dcd6 8px);
}

.home-tile-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: white;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: center;
}

.home-tile-name::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dot, #6ec0ff);
  flex-shrink: 0;
}

.home-page-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 8px 0 4px;
}

.home-page-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
}

.home-page-dots .dot.is-on { background: rgba(255, 255, 255, 0.9); }

.home-theme-bar {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: auto;
}

.home-theme-bar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.home-theme-bar-head .current {
  color: white;
  font-family: var(--sans);
  font-weight: 500;
  text-transform: none;
  letter-spacing: -0.01em;
}

.home-theme-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.25) transparent;
}

.home-theme-strip::-webkit-scrollbar { height: 6px; }
.home-theme-strip::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
}

.home-theme-strip .theme-mini {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: #2a2a2a center/cover no-repeat;
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  padding: 0;
  transition: transform 0.08s ease;
}

.home-theme-strip .theme-mini:hover { transform: translateY(-1px); }
.home-theme-strip .theme-mini.is-active {
  outline: 2px solid white;
  outline-offset: 2px;
}

.home-theme-strip .theme-mini-label {
  position: absolute;
  inset: auto 0 -22px 0;
  text-align: center;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.home-theme-strip .theme-mini.is-active .theme-mini-label { color: white; }
