:root {
  color-scheme: dark;
  --bg: #0c1016;
  --panel: #161c24;
  --panel-2: #1d2631;
  --text: #f6f1e8;
  --muted: #a7b4c4;
  --accent: #5fd39b;
  --accent-2: #2a7d62;
  --accent-3: #23483b;
  --border: rgba(255, 255, 255, 0.08);
  --shadow: 0 20px 45px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  background:
    radial-gradient(circle at top right, rgba(95, 211, 155, 0.12), transparent 28%),
    linear-gradient(180deg, #0a0f14 0%, #0f1319 100%);
  color: var(--text);
}

.shell {
  width: min(100%, 920px);
  margin: 0 auto;
  padding: 14px 14px 44px;
}

.hero {
  padding: 6px 4px 0;
}

.hero-banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.tab-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 12px;
}

.tab-button {
  min-height: 46px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}

.tab-button.active {
  border-color: rgba(95, 211, 155, 0.34);
  background: linear-gradient(180deg, rgba(95, 211, 155, 0.18), rgba(42, 125, 98, 0.16));
  color: var(--text);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel[hidden] {
  display: none !important;
}

[hidden] {
  display: none !important;
}

.eyebrow,
.section-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 7vw, 3.4rem);
  line-height: 0.95;
  margin-bottom: 12px;
}

h2 {
  font-size: 1.22rem;
}

h3 {
  font-size: 1rem;
  line-height: 1.3;
}

.lede,
.helper,
p,
li,
.install-status,
figcaption,
.result-subtle {
  color: var(--muted);
  line-height: 1.5;
}

.card {
  margin-top: 14px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  border: 1px solid var(--border);
  border-radius: 20px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow);
}

.section-card {
  display: grid;
  gap: 14px;
}

.section-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.status-pill,
.price-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.84rem;
  white-space: nowrap;
}

.status-pill {
  border: 1px solid rgba(95, 211, 155, 0.28);
  background: rgba(95, 211, 155, 0.08);
  color: #c1f5df;
}

.status-pill.muted {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
}

.capture-actions,
.actions,
.barcode-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.barcode-actions {
  align-items: center;
}

.barcode-button {
  min-height: 42px;
  padding: 0 14px;
}

.capture-button,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 13px;
  border: 1px solid rgba(95, 211, 155, 0.3);
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  color: #08110d;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.secondary {
  background: linear-gradient(180deg, rgba(37, 49, 63, 0.88), rgba(27, 36, 46, 0.88));
  color: var(--text);
}

.secondary.ghost {
  border-color: var(--border);
}

button:disabled,
.capture-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

input[type="file"] {
  position: absolute;
  left: -9999px;
}

.search-label {
  font-size: 0.92rem;
  color: var(--muted);
}

.search-input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1rem;
}

.search-input:focus {
  outline: 2px solid rgba(95, 211, 155, 0.3);
  border-color: rgba(95, 211, 155, 0.6);
}

.widescreen-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.94rem;
  user-select: none;
}

.widescreen-toggle input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.preview-empty,
.result-empty {
  padding: 24px;
  border: 1px dashed var(--border);
  border-radius: 14px;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.results-table-wrap {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
}

.results-table-scroll {
  overflow-x: auto;
}

.results-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.results-table th,
.results-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.results-table th {
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.03);
}

.sort-button,
.description-link,
.portrait-result-button {
  font: inherit;
  color: inherit;
  background: transparent;
  border: none;
}

.sort-button {
  width: 100%;
  padding: 0;
  text-align: left;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.sort-button.active {
  color: var(--text);
}

.description-link {
  padding: 0;
  text-align: left;
  line-height: 1.35;
  cursor: pointer;
}

.description-link:hover,
.description-link:focus-visible,
.portrait-result-button:hover .portrait-description,
.portrait-result-button:focus-visible .portrait-description {
  color: var(--accent);
}

.results-table td:last-child,
.results-table th:last-child {
  text-align: right;
  white-space: nowrap;
}

.results-table tr:last-child td {
  border-bottom: none;
}

.portrait-results {
  display: grid;
  gap: 10px;
}

.portrait-result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
}

.portrait-result-main,
.portrait-result-side {
  display: grid;
  gap: 4px;
}

.portrait-result-button {
  display: grid;
  gap: 4px;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.portrait-result-side {
  text-align: right;
  white-space: nowrap;
}

.portrait-store,
.portrait-date {
  color: var(--muted);
  font-size: 0.86rem;
}

.portrait-description {
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.portrait-price {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
}

.preview-frame {
  margin: 0;
}

.preview-frame img {
  width: 100%;
  border-radius: 14px;
  display: block;
  border: 1px solid var(--border);
}

.results-list {
  display: grid;
  gap: 12px;
}

.price-chip {
  background: linear-gradient(180deg, var(--accent), var(--accent-3));
  color: #08110d;
  font-weight: 700;
}

.hidden {
  display: none;
}

.help-copy {
  display: grid;
  gap: 2px;
}
