

@font-face {
  font-family: 'Archivo';
  src: url('archivo-var.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 100% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Figtree';
  src: url('figtree-var.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('dmmono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'DM Mono';
  src: url('dmmono-500.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

[hidden] { display: none !important; }

:root {
  --accent: #ffd43b;
  --amazon: #ff9900;
  --bg: #12100a;
  --bg-2: #1a1812;
  --fg: #f2f0e8;
  --fg-dim: #b3ae9e;
  --fg-mute: #8b8676;
  --line: rgba(255, 248, 230, 0.12);
  --mono: 'DM Mono', ui-monospace, "SF Mono", Menlo, monospace;
  --sans: 'Figtree', -apple-system, "Segoe UI", system-ui, sans-serif;
  --display: 'Archivo', 'Figtree', system-ui, sans-serif;
}

html, body { height: 100%; }
body {
  background: #0000;
  font-family: var(--sans);
  color: var(--fg);
  -webkit-font-smoothing: antialiased;
}

#app {
  background:
    radial-gradient(320px 180px at 85% -40px, rgba(255, 212, 59, 0.09), transparent 65%),
    var(--bg);
  border-radius: 12px;
  overflow: hidden;

  height: 100vh;
  display: flex;
  flex-direction: column;
}

.riggr-mark {
  width: 34px; height: 34px; border-radius: 9px;
  background: conic-gradient(from 220deg, #ffd43b, #ffb02e, #ffd43b);
  box-shadow: 0 0 24px rgba(255, 212, 59, 0.4);
  position: relative; flex-shrink: 0;
}
.riggr-mark::after {
  content: ''; position: absolute; inset: 6px;
  background: var(--bg); border-radius: 4px;
}
.riggr-mark::before {
  content: ''; position: absolute; inset: 11px;
  background: #ffd43b; border-radius: 1.5px; z-index: 1;
  box-shadow: 0 0 8px #ffd43b;
}
.riggr-mark-sm { width: 22px; height: 22px; border-radius: 6px; }
.riggr-mark-sm::after { inset: 4px; border-radius: 3px; }
.riggr-mark-sm::before { inset: 7px; border-radius: 1px; }
.riggr-mark-xs { width: 15px; height: 15px; border-radius: 4.5px; box-shadow: 0 0 10px rgba(255, 212, 59, 0.35); }
.riggr-mark-xs::after { inset: 3px; border-radius: 2px; }
.riggr-mark-xs::before { inset: 5px; border-radius: 1px; box-shadow: 0 0 5px #ffd43b; }

.loading { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 300px; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 300px; padding: 24px; text-align: center; }
.empty .riggr-mark { margin-bottom: 4px; }
.empty-title { font-weight: 700; font-size: 15px; }
.empty-sub { font-size: 12.5px; color: var(--fg-mute); line-height: 1.5; max-width: 30ch; }
.empty-cta {
  margin-top: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; border-radius: 999px; padding: 10px 16px;
  background: var(--accent); color: #181203;
  font-family: var(--sans); font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em;
  cursor: pointer; box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.8);
  transition: transform 0.15s ease, filter 0.15s ease;
}
.empty-cta:hover { transform: translateY(-1px); filter: brightness(1.06); }
.empty-hint { font-size: 11px; color: var(--fg-mute); line-height: 1.5; max-width: 30ch; margin-top: 4px; }
.empty-hint b { color: var(--fg-dim); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .empty-cta:hover { transform: none; } }

.panel { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.stage { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.setup-tabs {
  display: flex; gap: 6px; padding: 0 10px 9px;
  overflow-x: auto; scrollbar-width: none;
  flex-shrink: 0;
}
.setup-tabs::-webkit-scrollbar { display: none; }
.setup-tab {
  flex-shrink: 0;
  border: 1px solid var(--line); background: rgba(255, 248, 230, 0.03);
  color: var(--fg-dim); border-radius: 999px; padding: 5px 12px;
  font-family: var(--sans); font-size: 12px; font-weight: 600; cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.setup-tab:hover { color: var(--fg); border-color: rgba(255, 248, 230, 0.28); }
.setup-tab.on { background: var(--accent); color: #181203; border-color: var(--accent); }

.bar {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px 8px;
}
.who-name {
  font-family: var(--display); font-stretch: 120%;
  font-size: 19px; font-weight: 800; letter-spacing: -0.015em;
  line-height: 1.1;
  flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tape {
  display: inline-block; flex-shrink: 0;
  font-family: var(--mono); font-size: 10px; font-weight: 500;
  letter-spacing: 0.12em;
  background: var(--accent); color: #181203;
  padding: 3px 8px 2px; border-radius: 3px;
  transform: rotate(-1.6deg);
  box-shadow: 0 2px 6px -2px rgba(0, 0, 0, 0.6);
}

.bar-cta {
  margin-left: auto; flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1.5px solid var(--accent); background: transparent;
  color: var(--accent); cursor: pointer;
  font-family: var(--sans); font-weight: 700; font-size: 12px; letter-spacing: -0.01em;
  padding: 5px 11px; border-radius: 999px;
  transition: background 0.15s ease, color 0.15s ease;
}
.bar-cta svg { width: 12px; height: 12px; }
.bar-cta:hover { background: var(--accent); color: #12100a; }

.photo-wrap {
  position: relative;

  flex: 1 1 auto; min-height: 0;

  display: flex; align-items: flex-start; justify-content: flex-start;
  overflow: hidden;
  background: #0a0906;
}
.stage.mode-list .photo-wrap { flex: 0 0 auto; }
.photo-wrap.is-zoomable { cursor: grab; }
.photo-wrap.is-grabbing { cursor: grabbing; }
.photo-frame {
  position: relative; display: flex;
  transform-origin: 0 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}
.photo-frame.no-anim { transition: none; }
@media (prefers-reduced-motion: reduce) { .photo-frame { transition: none; } }

.zoom-reset {
  position: absolute; z-index: 3; top: 10px; right: 10px;
  display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid rgba(255, 248, 230, 0.16); background: rgba(10, 10, 8, 0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--fg); border-radius: 999px; padding: 5px 10px;
  font-family: var(--mono); font-size: 10px; cursor: pointer;
}
.zoom-reset svg { width: 12px; height: 12px; }
.zoom-reset:hover { border-color: var(--accent); color: var(--accent); }

.zoom-btns {
  position: absolute; z-index: 3; right: 10px; bottom: 10px;
  display: flex; flex-direction: column;
  border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(255, 248, 230, 0.16); background: rgba(10, 10, 8, 0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.7);
}
.zoom-btns button {
  width: 34px; height: 32px; border: 0; background: transparent; color: var(--fg);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.zoom-btns button:hover { background: rgba(255, 248, 230, 0.1); color: var(--accent); }
.zoom-btns button + button { border-top: 1px solid rgba(255, 248, 230, 0.12); }
.zoom-btns svg { width: 15px; height: 15px; }
.photo-frame img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto; height: auto;
}

.stage.mode-list .photo-frame img { max-height: calc(100vh - 50px); }

.hint-over {
  position: absolute; z-index: 2; top: 10px; left: 50%; transform: translateX(-50%);
  pointer-events: none; white-space: nowrap;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.03em; color: var(--fg);
  background: rgba(10, 10, 8, 0.6);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 248, 230, 0.14);
  padding: 5px 11px; border-radius: 999px;
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, 0.7);
  transition: opacity 0.4s ease;
}
.hint-over.is-off { opacity: 0; }

.made-over {
  position: absolute; z-index: 2; bottom: 10px; left: 50%; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(255, 248, 230, 0.14);
  background: rgba(10, 10, 8, 0.42);
  -webkit-backdrop-filter: blur(10px) saturate(1.3); backdrop-filter: blur(10px) saturate(1.3);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
  box-shadow: 0 6px 18px -8px rgba(0, 0, 0, 0.7);
  opacity: 0.9; transition: background 0.15s ease, opacity 0.15s ease;
}
.made-over:hover { opacity: 1; background: rgba(10, 10, 8, 0.62); }
.made-over .made-pre { font-family: var(--mono); font-size: 10px; letter-spacing: 0.03em; color: var(--fg-dim); }
.made-over .made-word { font-family: var(--display); font-stretch: 120%; font-weight: 800; font-size: 12px; letter-spacing: -0.01em; color: var(--fg); }

.gear-strip {
  flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column;
  padding: 8px; gap: 6px;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  border-top: 1px solid var(--line);
}
.gear-strip.is-collapsed { display: none; }
.gear-strip::-webkit-scrollbar { width: 5px; }
.gear-strip::-webkit-scrollbar-thumb { background: rgba(255, 248, 230, 0.16); border-radius: 3px; }
.gear-row {
  flex: 1 0 auto; min-height: 50px; max-height: 68px;
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 11px;
  border: 1px solid var(--line); background: rgba(255, 248, 230, 0.03);
  color: var(--fg); font-family: var(--sans); text-align: left; cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.gear-row:hover { border-color: var(--accent); background: rgba(255, 248, 230, 0.06); }
.gear-row-thumb {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 9px;
  background-size: cover; background-position: center;
  background-color: rgba(255, 248, 230, 0.08);
  border: 1px solid rgba(255, 248, 230, 0.12);
}
.gear-row-thumb.is-empty { background-image: linear-gradient(135deg, rgba(255, 212, 59, 0.2), rgba(255, 248, 230, 0.06)); }

.gear-row-thumb.is-collage { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 2px; padding: 2px; }
.gear-row-thumb.is-collage span { border-radius: 4px; background-size: cover; background-position: center; background-color: rgba(255, 248, 230, 0.08); }
.gear-row-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.3; flex: 1 1 auto; }
.gear-row-brand { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-mute); }
.gear-row-name {
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gear-row-price { flex-shrink: 0; font-family: var(--mono); font-size: 12px; color: var(--accent); }

.gear-section { flex-shrink: 0; padding: 8px 4px 3px; font-family: var(--mono); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--fg-mute); }
.gear-section:first-child { padding-top: 2px; }

.gear-strip.is-detail { justify-content: flex-start; gap: 0; overflow: hidden; }
.gear-detail-bar { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 8px; }
.gear-back { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); background: rgba(255, 248, 230, 0.04); color: var(--fg-dim); border-radius: 999px; padding: 5px 12px 5px 9px; font-family: var(--sans); font-size: 12px; font-weight: 600; cursor: pointer; transition: color 0.15s, border-color 0.15s; }
.gear-back:hover { color: var(--fg); border-color: var(--accent); }
.gear-back svg { width: 14px; height: 14px; }
.gear-detail-pager { display: inline-flex; align-items: center; gap: 5px; }
.gear-detail-body { flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 2px 5px 11px; margin-top: auto; }
.gear-detail-thumb { flex-shrink: 0; width: 66px; height: 66px; border-radius: 12px; background-size: cover; background-position: center; background-color: rgba(255, 248, 230, 0.06); border: 1px solid rgba(255, 248, 230, 0.12); }
.gear-detail-thumb.is-empty { background-image: linear-gradient(135deg, rgba(255, 212, 59, 0.2), rgba(255, 248, 230, 0.06)); }
.gear-detail-thumb.is-collage { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 2px; padding: 2px; }
.gear-detail-thumb.is-collage span { border-radius: 5px; background-size: cover; background-position: center; background-color: rgba(255, 248, 230, 0.08); }
.gear-detail-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gear-detail-brand { font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--fg-mute); }
.gear-detail-name { font-size: 15px; font-weight: 700; line-height: 1.2; }
.gear-detail-price { font-family: var(--mono); font-size: 14px; color: var(--accent); }
.gear-detail-buys { flex-shrink: 0; display: flex; gap: 8px; padding: 0 5px 4px; margin-bottom: auto; }

.pin {
  position: absolute;
  width: 18px; height: 18px;

  transform: translate(-50%, -50%) scale(var(--pin-z, 1));
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  padding: 0; opacity: 0;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--sans); font-weight: 800; font-size: 10px; line-height: 1;
  animation: pin-pop 0.4s ease-out forwards;
}

.pin::before { content: ''; position: absolute; inset: -12px; border-radius: 50%; }

.pin::after {
  content: ''; position: absolute; inset: -5px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0;
  animation: pin-pulse 2.6s ease-out infinite;
  animation-delay: inherit;
}

.pin.has-count::after { animation: none; opacity: 0; }
.pin.active { background: #fff; border-color: var(--accent); color: var(--accent); }

.pin.is-hi { background: #fff; border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 32%, transparent), 0 2px 10px rgba(0, 0, 0, 0.55); z-index: 4; }
@keyframes pin-pop { from { opacity: 0; } to { opacity: 1; } }
@keyframes pin-pulse {
  0% { transform: scale(0.6); opacity: 0.9; }
  55%, 100% { transform: scale(1.7); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .pin { animation-duration: 0.01s; }
  .pin::after { animation: none; }
}

.taglabel {
  position: absolute; z-index: 20;
  width: max-content; min-width: 172px; max-width: 76%;
  padding: 5px;
  border-radius: 12px;
  background: rgba(10, 10, 8, 0.95);
  -webkit-backdrop-filter: blur(22px) saturate(1.6);
  backdrop-filter: blur(22px) saturate(1.6);
  border: 1px solid rgba(255, 248, 230, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 248, 230, 0.18), 0 16px 38px -14px rgba(0, 0, 0, 0.78);
  animation: pop-in 0.15s ease-out;
}

.taglabel .tl-scroll { overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; }
.taglabel .tl-scroll::-webkit-scrollbar { width: 4px; }
.taglabel .tl-scroll::-webkit-scrollbar-thumb { background: rgba(255, 248, 230, 0.18); border-radius: 3px; }
@keyframes pop-in { from { opacity: 0; } }

.taglabel::after {
  content: ''; position: absolute; left: var(--tail-x, 50%); width: 11px; height: 11px;
  margin-left: -5.5px;
  background: rgba(10, 10, 8, 0.95);
  transform: rotate(45deg);
}
.taglabel:not(.is-below)::after { bottom: -6px; border-right: 1px solid rgba(255, 248, 230, 0.16); border-bottom: 1px solid rgba(255, 248, 230, 0.16); }
.taglabel.is-below::after { top: -6px; border-left: 1px solid rgba(255, 248, 230, 0.16); border-top: 1px solid rgba(255, 248, 230, 0.16); }

.taglabel .tagprod-thumb { width: 38px; height: 38px; border-radius: 8px; }
.taglabel .tagprod-name { font-size: 12px; max-width: 150px; }
.taglabel .tagprod-buy { font-size: 11px; padding: 6px 8px; }

.pop-pager { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 3px 7px; }
.pop-nav { display: inline-flex; align-items: center; gap: 5px; }
.pop-btn {
  width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--line);
  background: rgba(255, 248, 230, 0.04); color: var(--fg); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.pop-btn:hover { border-color: var(--accent); color: var(--accent); }
.pop-btn:disabled { opacity: 0.3; cursor: default; }
.pop-btn svg { width: 13px; height: 13px; }
.pop-count { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em; color: var(--fg-mute); }
.pop-close { color: var(--fg-mute); }
.pop-close:hover { color: #fff; border-color: rgba(255, 255, 255, 0.4); }

.tagprod-thumb.is-collage { display: grid; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; gap: 2px; padding: 2px; background-size: auto; }
.tagprod-thumb.is-collage span { border-radius: 4px; background-size: cover; background-position: center; background-color: rgba(255, 248, 230, 0.08); }
.taglabel .tagprod-main { padding: 2px 6px 8px 5px; }
.taglabel .tagprod-buys { padding: 0 3px 2px; }

.tagprod {
  display: flex; align-items: center; gap: 10px;
  padding: 6px; border-radius: 10px;
  color: var(--fg); font-family: var(--sans); text-align: left;
  transition: background 0.15s ease;
}
button.tagprod { border: 0; background: transparent; width: 100%; cursor: pointer; }
.tagprod.is-link:hover { background: rgba(255, 248, 230, 0.08); }
.tagprod.is-link .tagprod-ext { flex-shrink: 0; opacity: 0.5; margin-left: auto; }
.tagprod.is-link:hover .tagprod-ext { opacity: 0.9; color: var(--accent); }
.tagprod.is-multi { flex-direction: column; align-items: stretch; gap: 8px; padding: 8px; }
.tagprod-main { display: flex; align-items: center; gap: 10px; }

.tagprod-thumb {
  flex-shrink: 0; width: 42px; height: 42px; border-radius: 9px;
  background-size: cover; background-position: center;
  background-color: rgba(255, 248, 230, 0.08);
  border: 1px solid rgba(255, 248, 230, 0.12);
}
.tagprod-thumb.is-empty { background-image: linear-gradient(135deg, rgba(255, 212, 59, 0.2), rgba(255, 248, 230, 0.06)); }
.tagprod-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; line-height: 1.25; }
.tagprod-brand {
  font-family: var(--mono); font-size: 9px;
  text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--fg-mute);
}
.tagprod-name {
  font-size: 12.5px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px;
}
.tagprod-price { font-size: 11.5px; color: var(--accent); font-family: var(--mono); }
.tagprod-ext { width: 12px; height: 12px; }

.tagprod-buys { display: flex; gap: 6px; }
.tagprod-buy {
  flex: 1 1 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 7px 10px; border-radius: 9px;
  font-family: var(--sans); font-size: 11.5px; font-weight: 600;
  color: var(--fg); cursor: pointer;
  border: 1px solid rgba(255, 248, 230, 0.22); background: rgba(10, 10, 8, 0.45);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.tagprod-buy span { white-space: nowrap; line-height: 1.3; }
.tagprod-buy svg { width: 12px; height: 12px; flex-shrink: 0; }
.tagprod-buy .tagprod-ext { opacity: 0.55; }
.tagprod-buy:hover { border-color: rgba(255, 212, 59, 0.5); color: var(--accent); background: rgba(255, 212, 59, 0.08); }
.tagprod-buy:hover .tagprod-ext { opacity: 0.9; }
.tagprod-buy.is-amazon { color: var(--amazon); }
.tagprod-buy.is-amazon:hover { border-color: rgba(255, 153, 0, 0.45); color: var(--amazon); background: rgba(255, 153, 0, 0.08); }

