/* Sunblox store + Music Tools login. ENERGY 2 / RHYTHM 2 / MOTION 1.
   Same lime-on-ink as robux-store. Nav lives outside the blurred header
   so the phone tabbar can stick to the bottom of the viewport. */

:root {
  --ink: #0c0d10;
  --ink-2: #141610;
  --ink-3: #1c2016;
  --paper: #f4f1e8;
  --muted: #c4bfb3;
  --line: rgba(244, 241, 232, 0.14);
  --lime: #d6ff3f;
  --lime-ink: #12130f;
  --lime-dim: rgba(214, 255, 63, 0.14);
  --bad: #ffc7b8;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --tap: 44px;
  --font: 'Plus Jakarta Sans', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  color: var(--paper);
  background: var(--ink);
  font-family: var(--font);
  line-height: 1.45;
}

a, button, summary, select, label[for],
[role="button"], [role="tab"] { cursor: pointer; }
:disabled, [aria-disabled="true"] { cursor: not-allowed; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 80;
  padding: 8px 12px;
  background: var(--lime);
  color: var(--lime-ink);
  font-weight: 800;
  border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; }

.hidden, [hidden] { display: none !important; }

.store-page {
  min-height: 100dvh;
  color: var(--paper);
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse 50% 36% at 85% -8%, rgba(214, 255, 63, 0.16), transparent 58%),
    radial-gradient(ellipse 36% 28% at 0% 100%, rgba(214, 255, 63, 0.07), transparent 62%),
    linear-gradient(rgba(214, 255, 63, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 255, 63, 0.05) 1px, transparent 1px);
  background-size: auto, auto, 32px 32px, 32px 32px;
}

.app-chrome { display: block; }
.app-top {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  gap: 8px;
  padding: 10px 16px;
  background: rgba(12, 13, 16, 0.92);
  border-bottom: 1px solid rgba(214, 255, 63, 0.2);
  backdrop-filter: blur(16px);
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
.dash-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
  flex: none;
  background: var(--lime);
}
.dash-brand-name { font-weight: 800; font-size: 15px; line-height: 1.1; }
.dash-brand-sub { color: var(--muted); font-size: 12px; }

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom));
  background: rgba(12, 13, 16, 0.96);
  border-top: 1px solid rgba(214, 255, 63, 0.22);
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 54px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
}
.tabbar .is-on {
  color: var(--lime-ink);
  background: var(--lime);
}
.nav-ico {
  width: 22px;
  height: 22px;
  display: block;
  color: var(--lime);
}
.tabbar .is-on .nav-ico { color: var(--lime-ink); }

.app-body {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 16px 16px calc(120px + env(safe-area-inset-bottom));
}
.dash-hello { margin: 0; color: var(--muted); font-size: 13px; font-weight: 700; }
.store-hero-title {
  margin: 4px 0 0;
  font-size: clamp(1.55rem, 6vw, 2rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.app-intro p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.app-layout { display: grid; gap: 12px; margin-top: 14px; }

.store-main,
.widget-card {
  background: var(--ink-2);
  border: 1px solid rgba(214, 255, 63, 0.2);
  border-radius: var(--radius-lg);
  padding: 16px;
}
.store-card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.store-card-sub,
.widget-card p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.widget-kicker {
  margin: 0;
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.cat-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.cat-btn {
  min-height: var(--tap);
  padding: 8px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  border: 1px solid rgba(214, 255, 63, 0.22);
  color: var(--paper);
  background: transparent;
}
.cat-btn.is-on {
  background: var(--lime);
  color: var(--lime-ink);
  border-color: var(--lime);
}

.product-grid { display: grid; gap: 12px; }
.product-card {
  display: block;
  width: 100%;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  border-radius: 18px;
  overflow: hidden;
  background: rgba(7, 12, 10, 0.45);
  border: 1px solid rgba(214, 255, 63, 0.14);
}
.product-card:hover { border-color: var(--lime); }
.product-media { position: relative; }
.product-card img,
.product-card .ph {
  width: 100%;
  height: 190px;
  object-fit: cover;
  display: block;
  background: var(--ink-3);
}
.product-price {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 13px;
  font-weight: 800;
}
.product-body { padding: 14px; }
.product-body h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.product-body p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.grid-msg {
  padding: 36px 12px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.lime-btn,
.ghost-btn,
.go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border-radius: 16px;
  border: 0;
  font: inherit;
  font-weight: 800;
  text-decoration: none;
}
.lime-btn, .go { background: var(--lime); color: var(--lime-ink); }
.lime-btn:hover, .go:hover { background: #eaff8a; }
.ghost-btn {
  border: 1px solid rgba(214, 255, 63, 0.35);
  color: var(--paper);
  background: transparent;
}
.ghost-btn:hover { border-color: var(--lime); }

.step-line {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  color: var(--paper);
  font-weight: 700;
  font-size: 14px;
}
.step-line b {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--lime);
  color: var(--lime-ink);
  font-size: 12px;
  flex: none;
}

.app-foot {
  margin-top: 16px;
  color: var(--muted);
  font-size: 13px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.app-foot a { color: inherit; text-decoration: none; }
.app-foot a:hover { color: var(--lime); }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  background: rgba(0, 0, 0, 0.72);
}
.modal-sheet {
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  background: var(--ink-2);
  border: 1px solid rgba(214, 255, 63, 0.22);
  border-radius: 22px 22px 0 0;
}
.modal-media { position: relative; background: var(--ink-3); }
.modal-media img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.modal-media iframe {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 12px;
  background: rgba(12, 13, 16, 0.82);
  color: var(--paper);
  font-size: 22px;
  line-height: 1;
}
.modal-body { padding: 18px 16px 24px; }
.modal-head {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.modal-cat {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--lime-dim);
  color: var(--lime);
  font-size: 12px;
  font-weight: 800;
}
.modal-head h2 {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.price { color: var(--lime); font-weight: 800; font-size: 1.35rem; }
.modal-block { margin-bottom: 18px; }
.modal-block h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.modal-block p { margin: 0; color: var(--paper); }
.feature-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.feature-list li {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 14px;
}
.feature-list svg { flex: none; width: 16px; height: 16px; color: var(--lime); margin-top: 3px; }
.shot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.shot-grid img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  border-radius: 12px;
  background: var(--ink-3);
}
.order-row { display: grid; gap: 10px; }

.login-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background-color: var(--ink);
  background-image:
    radial-gradient(ellipse 50% 36% at 85% -8%, rgba(214, 255, 63, 0.16), transparent 58%),
    linear-gradient(rgba(214, 255, 63, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(214, 255, 63, 0.05) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
}
.login-card {
  width: min(420px, 100%);
  padding: 22px 18px;
  background: var(--ink-2);
  border: 1px solid rgba(214, 255, 63, 0.2);
  border-radius: var(--radius-lg);
}
.login-brand { text-align: center; margin-bottom: 18px; }
.login-brand img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  object-fit: cover;
}
.login-brand h1 { margin: 12px 0 0; font-size: 1.5rem; }
.login-brand p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(7, 12, 10, 0.55);
}
.login-tabs button {
  min-height: var(--tap);
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
}
.login-tabs button.is-on {
  background: var(--lime);
  color: var(--lime-ink);
}
.login-card label {
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.login-card .field { margin-bottom: 14px; }
.input-field {
  width: 100%;
  min-height: var(--tap);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(7, 12, 10, 0.55);
  color: var(--paper);
  font: inherit;
  font-weight: 600;
}
.input-field::placeholder { color: #9a968c; font-weight: 500; }
.input-field:focus,
.input-field:focus-visible {
  outline: none;
  border-color: var(--lime);
  box-shadow: 0 0 0 3px rgba(214, 255, 63, 0.18);
}
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: var(--tap);
  border: 0;
  border-radius: var(--radius-md);
  background: var(--lime);
  color: var(--lime-ink);
  font: inherit;
  font-weight: 800;
}
.btn-primary:hover { background: #eaff8a; }
.form-error { margin: 0 0 12px; color: var(--bad); font-size: 14px; }
.pw-list {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}
.pw-list li { margin-top: 4px; }
.pw-list .ok { color: var(--lime); }
.login-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }
.login-back {
  display: block;
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  text-decoration: none;
}
.login-back:hover { color: var(--lime); }

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 24px;
  }
  .modal-sheet {
    max-width: 720px;
    max-height: 90dvh;
    border-radius: 22px;
  }
  .modal-media img { height: 280px; }
  .modal-body { padding: 22px; }
  .modal-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .shot-grid { grid-template-columns: repeat(3, 1fr); }
  .order-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 960px) {
  .app-chrome {
    width: min(1120px, calc(100% - 40px));
    margin: 16px auto 0;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(214, 255, 63, 0.22);
    border-radius: 22px;
    background: rgba(18, 20, 16, 0.92);
  }
  .app-top {
    position: static;
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
    padding: 0;
    background: none;
    border: 0;
    backdrop-filter: none;
  }
  .tabbar {
    position: static;
    display: flex;
    width: auto;
    margin-left: auto;
    padding: 0;
    background: none;
    border: 0;
  }
  .tabbar a {
    flex-direction: row;
    min-height: 42px;
    padding: 0 12px;
    font-size: 14px;
    gap: 8px;
  }
  .app-body { padding: 18px 0 48px; width: min(1120px, calc(100% - 40px)); }
  .app-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
  }
  .store-main { padding: 22px; }
  .dash-widgets { position: sticky; top: 96px; display: grid; gap: 12px; }
  .product-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
