:root {
  --cream: #f5faf9;
  --paper: #ffffff;
  --ink: #0c1a19;
  --muted: #5f746e;
  --teal: #007782;
  --teal-ink: #005a63;
  --teal-deep: #00434a;
  --mint: #e2f2f0;
  --line: #dfeae7;
  --fill: #fbfdfc;
  --rust: #b23c2a;
  --gold: #8a6216;
  --radius: 20px;
  --shadow-sm: 0 1px 2px rgba(12, 26, 25, 0.05), 0 8px 20px -18px rgba(0, 67, 74, 0.5);
  --shadow-md: 0 18px 40px -28px rgba(0, 67, 74, 0.55);
  --ring: 0 0 0 3px rgba(0, 119, 130, 0.16);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  background:
    radial-gradient(1050px 520px at 10% -10%, #dff2ef 0%, rgba(223, 242, 239, 0) 60%),
    radial-gradient(860px 440px at 95% -4%, #eaf6f4 0%, rgba(234, 246, 244, 0) 55%),
    var(--cream);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }
button { font: inherit; }

.shell {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 22px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── header ─────────────────────────────────────────────── */

.site-head {
  border-bottom: 1px solid rgba(0, 119, 130, 0.12);
  background: rgba(245, 250, 249, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #00a3b0 0%, #007782 55%, #00545c 100%);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 22px -14px rgba(0, 84, 92, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.brand h1 { font-size: 20px; font-weight: 700; letter-spacing: -0.03em; }

.brand p {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 1px;
}

.currency { display: flex; align-items: center; gap: 8px; }
.currency span {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.currency select {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 9px;
  padding: 7px 9px;
  font-size: 13px;
  color: var(--ink);
}

/* ── tabs ───────────────────────────────────────────────── */

.tabs {
  display: flex;
  gap: 8px;
  padding-top: 20px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }

.tab {
  border: 1px solid rgba(0, 119, 130, 0.14);
  background: rgba(255, 255, 255, 0.75);
  color: var(--ink);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  backdrop-filter: blur(6px);
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}
.tab:hover { border-color: rgba(0, 119, 130, 0.32); transform: translateY(-1px); }
.tab.is-active {
  background: linear-gradient(180deg, #008c98 0%, #007782 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 14px 26px -18px rgba(0, 84, 92, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.tab:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* ── panels ─────────────────────────────────────────────── */

.panel { display: none; padding: 26px 0 10px; }
.panel.is-active { display: block; }

.intro { max-width: 640px; margin-bottom: 22px; }
.intro h2 { font-size: 31px; line-height: 1.2; letter-spacing: -0.035em; }
.intro p { color: var(--muted); font-size: 15.5px; line-height: 1.6; margin-top: 10px; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr);
  gap: 20px;
  align-items: start;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

/* ── forms ──────────────────────────────────────────────── */

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }

.field label {
  font-size: 12.5px;
  font-weight: 600;
  color: #33433f;
}

.hint { font-weight: 400; color: var(--muted); }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  font-size: 14.5px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea { resize: vertical; line-height: 1.5; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: var(--ring);
}

input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.input-wrap { position: relative; }
.input-wrap input { padding-left: 12px; padding-right: 12px; }
.input-wrap:has(.affix:first-child) input { padding-left: 28px; }
.input-wrap:has(.affix.right) input { padding-right: 26px; }

.affix {
  position: absolute;
  top: 50%;
  left: 11px;
  transform: translateY(-50%);
  font-size: 13.5px;
  color: var(--muted);
  pointer-events: none;
}
.affix.right { left: auto; right: 11px; }

.form-note {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--muted);
}

/* ── calculator results ─────────────────────────────────── */

.results { position: sticky; top: 92px; }

.result-label {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.result-number {
  font-size: 54px;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.05;
  background: linear-gradient(135deg, #00909c 0%, #00646e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}
.result-number.is-loss {
  background: linear-gradient(135deg, #c4503a 0%, #8f2e1e 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

.result-meta { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.result-meta span { color: var(--ink); font-weight: 600; }

.verdict {
  display: inline-block;
  margin-top: 12px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  background: var(--mint);
  color: var(--teal-ink);
}
.verdict.is-thin { background: #fdf2dd; color: var(--gold); }
.verdict.is-lossy { background: #fbeae5; color: var(--rust); }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 18px 0 6px;
}

.breakdown { margin: 0; }
.breakdown div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
}
.breakdown dt { font-size: 13.5px; color: var(--muted); }
.breakdown dd {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.breakdown .highlight {
  margin-top: 8px;
  padding: 11px 13px;
  border-radius: 12px;
  background: linear-gradient(180deg, #eaf7f5 0%, #e2f2f0 100%);
}
.breakdown .highlight dt { color: var(--teal-ink); font-weight: 600; }
.breakdown .highlight dd { color: var(--teal-ink); }

.result-hint {
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

/* ── listing output ─────────────────────────────────────── */

.out-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.out-head h3 { font-size: 16px; }

.out-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin: 14px 0 7px;
}

.count { letter-spacing: 0; text-transform: none; font-weight: 400; }

.out-box {
  position: relative;
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 62px 14px 14px;
  min-height: 52px;
}

.out-box p, .out-box pre {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: inherit;
}

.out-box.tall { padding-top: 16px; padding-bottom: 16px; }
.out-box.tall pre { max-height: 420px; overflow: auto; }

.copy {
  position: absolute;
  top: 9px;
  right: 9px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--teal-ink);
  border-radius: 8px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.copy:hover { border-color: var(--teal); background: var(--mint); }

.out-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; min-height: 18px; }

/* ── buttons ────────────────────────────────────────────── */

.btn {
  border: 0;
  background: linear-gradient(180deg, #008c98 0%, #007782 100%);
  color: #fff;
  border-radius: 12px;
  padding: 11px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 12px 22px -16px rgba(0, 84, 92, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.btn:hover {
  background: linear-gradient(180deg, #00949f 0%, #006b74 100%);
  transform: translateY(-1px);
}
.btn:focus-visible { outline: 2px solid var(--teal-ink); outline-offset: 2px; }
.btn-small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }

.link-btn {
  border: 0;
  background: none;
  padding: 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.link-btn:hover { color: var(--teal-ink); }

/* ── tracker ────────────────────────────────────────────── */

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 17px 18px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-label {
  display: block;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.stat strong {
  display: block;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 3px 0 1px;
}
.stat small { font-size: 12px; color: var(--muted); }

.stat.accent {
  background: linear-gradient(150deg, #008e9a 0%, #006a75 55%, #004b53 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 20px 36px -24px rgba(0, 60, 66, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.stat.accent .stat-label { color: rgba(255, 255, 255, 0.72); }
.stat.accent small { color: rgba(255, 255, 255, 0.72); }

.add-form {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) 0.75fr 0.75fr 0.85fr auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}
.add-form .field { margin-bottom: 0; }
.add-form .btn { padding: 10px 18px; }

.table-card { padding: 18px 20px 8px; }

.table-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.table-head h3 { font-size: 15px; }

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

table { width: 100%; border-collapse: collapse; }

th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

td {
  padding: 12px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--fill); }

td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.num { font-weight: 600; }
td.profit.is-good { color: var(--teal); }
td.profit.is-loss { color: var(--rust); }

.pill {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--mint);
  color: var(--teal-ink);
  white-space: nowrap;
}
.pill.listed { background: #eaf0f8; color: #2c4f7c; }
.pill.sold { background: #f1efe9; color: #6c6355; }

.remove {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 7px;
  cursor: pointer;
}
.remove:hover { background: #fbeae5; color: var(--rust); }

.empty {
  border: 1px dashed rgba(0, 119, 130, 0.28);
  border-radius: 14px;
  padding: 26px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  margin: 10px 0 14px;
  background: linear-gradient(180deg, #f2faf8 0%, #ffffff 100%);
}

/* ── footer ─────────────────────────────────────────────── */

.site-foot {
  padding-top: 22px;
  padding-bottom: 40px;
  margin-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12.5px;
  max-width: 1120px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px 24px;
}
.foot-domain {
  font-weight: 700;
  color: var(--teal-ink);
  letter-spacing: 0.01em;
}
.site-foot p { max-width: 70ch; }

/* ── responsive ─────────────────────────────────────────── */

@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; }
  .results { position: static; }
  .stats { grid-template-columns: 1fr 1fr; }
  .add-form { grid-template-columns: 1fr 1fr; }
  .add-form .field.grow { grid-column: 1 / -1; }
  .add-form .btn { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .shell { padding: 0 16px; }
  .intro h2 { font-size: 22px; }
  .result-number { font-size: 38px; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row .field { margin-bottom: 14px; }
  .card { padding: 18px; }
  .currency span { display: none; }
  .brand p { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ── per-item detail: photo checklist & pricing ─────────── */

.item-detail {
  margin-top: 18px;
  scroll-margin-top: 96px;
}

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

.detail-kicker {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.detail-head h3 { font-size: 19px; margin-top: 2px; }

.icon-btn {
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--muted);
  border-radius: 9px;
  width: 30px;
  height: 30px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
}
.icon-btn:hover { color: var(--ink); border-color: #cfc3b4; }
.icon-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

.detail-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-top: 18px;
}

.detail-block { min-width: 0; }

.detail-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.detail-title h4 { font-size: 14px; margin: 0; }
.progress-label { font-size: 11.5px; color: var(--muted); }

.shot-type {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.shot-type label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.shot-type select {
  width: auto;
  flex: 1 1 230px;
  min-width: 0;
  font-size: 13px;
  padding: 6px 9px;
}

.progress {
  height: 6px;
  border-radius: 999px;
  background: #f0ece5;
  overflow: hidden;
  margin-bottom: 12px;
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #00a3b0 0%, #007782 100%);
  transition: width 0.25s ease;
}

.shots { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.shots li { margin: 0; }

.shot {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 13.5px;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.shot:hover { border-color: rgba(0, 119, 130, 0.32); box-shadow: 0 10px 20px -18px rgba(0, 67, 74, 0.8); }
.shot input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  flex: 0 0 auto;
  accent-color: var(--teal);
}
.shot:has(input:checked) { background: var(--mint); border-color: #b9dad6; }
.shot:has(input:checked) span { color: var(--teal-ink); }

.detail-note {
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  margin-top: 10px;
}

.price-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}
.price-facts div {
  background: var(--fill);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  min-width: 0;
}
.price-facts span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.price-facts strong { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.price-facts strong.is-good { color: var(--teal); }
.price-facts strong.is-loss { color: var(--rust); }

.floor {
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  margin: -4px 0 16px;
}

.offers-label {
  display: block;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 7px 0 18px;
}

.offer {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 10px;
  background: var(--paper);
}
.offer-pct { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.offer strong {
  display: block;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  margin: 1px 0 2px;
}
.offer small { font-size: 11px; color: var(--teal-ink); }
.offer.is-short { background: #fbeae5; border-color: #f0d3ca; }
.offer.is-short small { color: var(--rust); }

.comps-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}
.comps-label .count { font-size: 11.5px; }

.comps-add {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  gap: 8px;
}
.comps-add input { font-size: 13.5px; padding: 8px 12px; }
.comps-add .input-wrap input { padding-left: 26px; }
.comps-add .btn { padding: 8px 13px; }

.comp-list {
  list-style: none;
  margin: 10px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.comp-list:empty { display: none; }

.comp-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 7px 11px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--fill);
  font-size: 13px;
}

.comp-price {
  flex: 0 0 auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.comp-meta {
  flex: 1 1 auto;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.comp-remove {
  flex: 0 0 auto;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 15px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 6px;
  cursor: pointer;
}
.comp-remove:hover { background: #fbeae5; color: var(--rust); }

.comps-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.comps-foot .detail-note { margin: 0; flex: 1 1 160px; }

.row-open {
  display: block;
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.row-open:hover { color: var(--teal); }
.row-open:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.row-open .chev { margin-left: 6px; color: var(--muted); font-size: 15px; }
.row-open[aria-expanded="true"] .chev { color: var(--teal); }

.row-shots { display: block; font-size: 11px; color: var(--muted); margin-top: 2px; }

tbody tr.is-selected,
tbody tr.is-selected:hover { background: var(--mint); }

@media (max-width: 900px) {
  .detail-split { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 560px) {
  .price-facts, .offer-grid { grid-template-columns: 1fr 1fr; }
  .comps-add { grid-template-columns: 1fr; }
}

/* Narrow screens: each piece becomes its own little card instead of
   squeezing six columns into a phone. */
@media (max-width: 620px) {
  .table-scroll { overflow-x: visible; }

  #items-table, #items-table tbody { display: block; width: 100%; }
  #items-table thead { display: none; }

  #items-table tr {
    display: block;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--fill);
    padding: 12px 14px;
    margin-bottom: 10px;
  }
  #items-table tr:last-child { margin-bottom: 4px; }

  #items-table td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 14px;
    border: 0;
    padding: 3px 0;
    font-size: 13.5px;
  }

  #items-table td:first-child {
    display: block;
    padding-bottom: 8px;
    margin-bottom: 5px;
    border-bottom: 1px dashed var(--line);
  }

  #items-table td:not(:first-child):not(:last-child)::before {
    content: attr(data-label);
    color: var(--muted);
    font-weight: 400;
    font-size: 12px;
    flex: 0 0 auto;
  }

  #items-table td:last-child { justify-content: flex-end; padding-top: 4px; }
  #items-table tr.is-selected { background: var(--mint); }
  #items-table tr.is-selected:hover { background: var(--mint); }
}

/* ── language switcher ──────────────────────────────────── */

.head-inner { flex-wrap: wrap; row-gap: 10px; }

.head-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang-btn {
  border: 0;
  background: none;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { background: var(--teal); color: #fff; }
.lang-btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }

/* Currencies written after the amount (Kč, zł) put the symbol on the right. */
html[data-currency-mode="suffix"] .input-wrap:has(.affix) input {
  padding-left: 12px;
  padding-right: 38px;
}
html[data-currency-mode="suffix"] .affix:not(.right) {
  left: auto;
  right: 11px;
}

/* ── searchable wardrobe sections ─────────────────────── */
.picker { position: relative; }

.picker input[type="text"] { padding-right: 40px; }

.picker-toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.picker-toggle:hover { background: var(--fill); color: var(--teal); }

.picker-list {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 264px;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
}

.picker-group {
  padding: 8px 10px 4px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.picker-option {
  padding: 8px 10px;
  border-radius: 9px;
  font-size: 13.5px;
  color: var(--ink);
  cursor: pointer;
}
.picker-option:hover,
.picker-option.is-active { background: var(--fill); }
.picker-option[aria-selected="true"] { background: var(--mint); color: var(--teal-ink); font-weight: 600; }

.picker-empty { padding: 10px; font-size: 13px; color: var(--muted); }

/* ── cross-listing and tracking ─────────────────────────── */

.out-head { flex-wrap: wrap; }

.detail-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.detail-status .field { margin-bottom: 0; }

.tracking-row { display: flex; gap: 8px; align-items: center; }
.tracking-row input { flex: 1 1 auto; min-width: 0; }
.tracking-row .btn { flex: 0 0 auto; white-space: nowrap; }

@media (max-width: 620px) {
  .detail-status { grid-template-columns: 1fr; }
}

/* ── profit by month ───────────────────────────────────── */

.chart-card {
  margin-bottom: 18px;
  padding: 18px 20px 14px;
}

.chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.chart-head h3 { font-size: 15px; }

.chart {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.chart-col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  text-align: center;
}

.chart-value {
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-track { height: 108px; display: flex; align-items: flex-end; }

.chart-bar {
  width: 100%;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #00a3b0 0%, #007782 100%);
}
.chart-bar.is-empty { background: var(--line); }
.chart-bar.is-loss { background: linear-gradient(180deg, #c8553f 0%, var(--rust) 100%); }

.chart-month {
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.chart-empty { font-size: 13px; color: var(--muted); padding: 6px 0 10px; }

/* ── preset management ────────────────────────────────── */

/* Author display rules would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

.preset-rename-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

@media (max-width: 620px) {
  .preset-rename-row { grid-template-columns: 1fr auto; }
  .preset-rename-row #preset-rename-cancel { grid-column: 1 / -1; justify-self: start; }
}

/* ── saved presets list ───────────────────────────────── */

.preset-panel { margin-bottom: 18px; }

.preset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.preset-head h3 {
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
}

.preset-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  max-height: 198px;
  overflow-y: auto;
}

.preset-item {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 3px 6px 3px 3px;
}

.preset-load {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 1px;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 6px 9px;
  border-radius: 9px;
  cursor: pointer;
}
.preset-load:hover { background: var(--fill); }

.preset-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-meta {
  font-size: 11.5px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-icon {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.preset-icon:hover { background: var(--fill); color: var(--teal); }
.preset-icon[data-delete]:hover { color: var(--rust); }

.preset-empty { font-size: 12.5px; color: var(--muted); }

/* ── packaging tip ────────────────────────────────────── */

.tip-box {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: -4px 0 16px;
  padding: 11px 13px;
  border: 1px solid #b9e3e5;
  border-radius: 12px;
  background: linear-gradient(180deg, #f3fbfb 0%, #e4f6f7 100%);
  color: var(--teal-ink);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease,
    background 0.16s ease, border-color 0.16s ease;
}

.tip-box:hover {
  transform: translateY(-1px);
  background: #d9f2f4;
  border-color: #97d3d8;
  box-shadow: 0 8px 18px rgba(0, 119, 130, 0.13);
}

.tip-box:active { transform: translateY(0); }

.tip-box:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

.tip-icon {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1.35;
}

.tip-text { min-width: 0; }

@media (max-width: 560px) {
  .tip-box {
    padding: 10px 12px;
    font-size: 12.5px;
    line-height: 1.5;
  }
}
