:root {
  --bg-1: #fbfcfe;
  --bg-2: #f2f6ff;
  --bg-3: #f7f3ff;
  --panel-bg: rgba(255, 255, 255, 0.76);
  --panel-border: rgba(148, 163, 184, 0.16);
  --panel-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
  --card-bg: rgba(255, 255, 255, 0.82);
  --card-border: rgba(148, 163, 184, 0.18);
  --card-shadow: 0 2px 2px rgba(15, 23, 42, 0.02), 0 10px 24px rgba(15, 23, 42, 0.04);
  --card-shadow-hover: 0 4px 8px rgba(15, 23, 42, 0.05), 0 18px 32px rgba(15, 23, 42, 0.08);
  --text-main: #0f172a;
  --text-soft: #64748b;
  --text-faint: #94a3b8;
  --accent-orange: #f28c28;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at 8% 22%, rgba(191, 219, 254, 0.34), transparent 24%),
    radial-gradient(circle at 90% 82%, rgba(233, 213, 255, 0.24), transparent 21%),
    linear-gradient(135deg, var(--bg-1) 0%, var(--bg-2) 58%, var(--bg-3) 100%);
}

.hub-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
}

.launcher-shell {
  width: min(860px, 100%);
  padding: 18px;
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  box-shadow: var(--panel-shadow);
}

.launcher-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px 16px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--text-faint);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.launcher-header h1 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  line-height: 1.02;
  letter-spacing: -.045em;
  font-weight: 700;
}

.launcher-note {
  margin: 0 0 2px;
  color: var(--text-soft);
  font-size: 12px;
  white-space: nowrap;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.app-card {
  min-height: 88px;
  padding: 14px;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.app-card:hover,
.app-card:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--card-shadow-hover);
  border-color: rgba(242, 140, 40, 0.24);
  background: rgba(255, 255, 255, 0.96);
  outline: none;
}

.app-icon-wrap {
  width: 54px;
  height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.72), rgba(248,250,252,.42));
  border: 1px solid rgba(148,163,184,.14);
}

.app-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  border: 1px solid rgba(148,163,184,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.72);
  transition: transform 160ms ease, filter 160ms ease;
}

.app-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

.app-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.app-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.app-name {
  min-width: 0;
  font-size: 15px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -.02em;
}

.app-meta {
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-soft);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-arrow {
  margin-left: auto;
  color: #94a3b8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 160ms ease, color 160ms ease;
}

.app-arrow svg {
  width: 17px;
  height: 17px;
}

.app-card:hover .app-arrow,
.app-card:focus-visible .app-arrow {
  transform: translateX(2px);
  color: #f28c28;
}

.app-card:hover .app-icon,
.app-card:focus-visible .app-icon {
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  text-align: center;
  color: var(--text-soft);
  background: rgba(255,255,255,0.82);
  border: 1px solid var(--card-border);
  border-radius: 14px;
}

@media (max-width: 720px) {
  .hub-shell { padding: 22px 14px; }
  .launcher-shell { padding: 14px; border-radius: 18px; }
  .launcher-header {
    display: block;
    padding-bottom: 12px;
  }
  .launcher-note { margin-top: 8px; }
  .app-grid { grid-template-columns: 1fr; }
  .app-card { min-height: 82px; }
}


/* r015 preview mode: true centered canvas inside admin iframe */
html:has(body.preview-mode),
body.preview-mode {
  height: 100%;
}
body.preview-mode {
  overflow: hidden;
}
body.preview-mode .hub-shell {
  width: 100%;
  min-height: 100dvh;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
body.preview-mode .launcher-shell {
  width: min(760px, 100%);
  margin: auto;
  border-radius: 20px;
  padding: 16px;
}
body.preview-mode .launcher-header {
  padding-bottom: 14px;
}
body.preview-mode .launcher-header h1 {
  font-size: clamp(18px, 2.1vw, 24px);
}
body.preview-mode .app-card {
  min-height: 82px;
}
@media (max-width: 900px) {
  body.preview-mode .hub-shell {
    padding: 18px;
  }
}
