:root {
  --bg: #0b0d12;
  --bg2: #12151d;
  --card: #171b26;
  --card-hover: #1d2330;
  --line: #2a3142;
  --text: #eef1f7;
  --muted: #9aa3b5;
  --accent: #6ee7ff;
  --accent2: #8b5cf6;
  --good: #34d399;
  --warn: #fbbf24;
  --bad: #f87171;
  --primary: linear-gradient(135deg, #6ee7ff 0%, #8b5cf6 100%);
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --radius: 16px;
  --sticky-h: 78px;
  --font: "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; color-scheme: dark; scroll-padding-bottom: 120px; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(110, 231, 255, .12), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(139, 92, 246, .14), transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  padding-bottom: calc(var(--sticky-h) + 28px);
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
.muted { color: var(--muted); }
.eyebrow {
  display: inline-block;
  margin: 0 0 .6rem;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: rgba(110, 231, 255, .12);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.hero {
  display: grid;
  grid-template-columns: 1.35fr .9fr;
  gap: 1.5rem;
  padding: 2.2rem 0 1.2rem;
}
.hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}
.hero-note { color: var(--muted); margin: 0 0 1rem; max-width: 58ch; }
.hero-bullets { margin: 0 0 1.1rem; padding-left: 1.1rem; color: #d5dbe8; }
.hero-bullets li { margin: .35rem 0; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: .95rem; }

.warranty-banner {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .85rem;
  border-radius: 12px;
  background: rgba(52, 211, 153, .12);
  border: 1px solid rgba(52, 211, 153, .4);
  color: #b7f7df;
  font-weight: 800;
  letter-spacing: .01em;
}

.hero-price-card {
  align-self: start;
  background: linear-gradient(160deg, rgba(110, 231, 255, .1), rgba(139, 92, 246, .12)), var(--card);
  border: 1px solid rgba(110, 231, 255, .25);
  border-radius: 22px;
  padding: 1.4rem 1.5rem 1.35rem;
  box-shadow: var(--shadow);
}
.price-label { color: var(--muted); font-size: .85rem; }
.price-big {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 900;
  letter-spacing: -.03em;
  margin: .2rem 0 .35rem;
  background: var(--primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.price-delta { font-weight: 600; margin-bottom: .35rem; }
.price-delta.up { color: var(--warn); }
.price-delta.down { color: var(--good); }
.price-delta.flat { color: var(--muted); }
.price-save { font-size: .88rem; color: var(--good); font-weight: 700; margin-bottom: .85rem; }
.price-save.has-used { color: var(--warn); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border: 0;
  border-radius: 999px;
  padding: .72rem 1.2rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: transform .15s ease, filter .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--primary);
  color: #0b0d12;
  box-shadow: 0 10px 30px rgba(110, 231, 255, .22);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}
.btn-ghost:hover { background: rgba(255, 255, 255, .04); }
.btn-discord {
  background: #5865f2;
  color: #fff;
  box-shadow: 0 10px 26px rgba(88, 101, 242, .35);
}
.btn-discord:hover { filter: brightness(1.08); }
.btn-wa {
  background: #25d366;
  color: #06210f;
  box-shadow: 0 10px 26px rgba(37, 211, 102, .28);
}
.btn-wa:hover { filter: brightness(1.05); }
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 1rem;
}
.icon-btn:hover { background: rgba(255, 255, 255, .05); }


.section-head { margin: 1.5rem 0 1rem; }
.section-head h2 { margin: 0 0 .25rem; font-size: 1.45rem; }
.section-head--with-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem 1.1rem;
}
.section-head-copy { flex: 1 1 16rem; min-width: 0; }
.section-head-copy h2 { margin: 0 0 .25rem; }
.section-head-copy .muted { margin: 0; }
.section-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  justify-content: flex-end;
}
.section-head-actions .btn { padding: .55rem .95rem; font-size: .88rem; }
.btn-icon-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  box-sizing: border-box;
}
.section-head-actions .btn-icon-download,
.sticky-actions .btn-icon-download {
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}
.btn-icon-download svg { display: block; width: 16px; height: 16px; }
.legend-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .7rem 0 0; }
.legend-new, .legend-used {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: .2rem .65rem;
  font-size: .78rem;
  font-weight: 800;
}
.legend-new { background: rgba(52, 211, 153, .12); color: #6ee7b7; }
.legend-used { background: #f59e0b; color: #1c1406; }

.compat {
  margin: 0 0 1rem;
  border: 1px solid rgba(239, 68, 68, .5);
  background: rgba(239, 68, 68, .1);
  color: #fecaca;
  border-radius: 14px;
  padding: .8rem 1rem;
}
.compat[hidden] { display: none; }
.compat strong { display: block; margin-bottom: .2rem; color: #f87171; }
.compat ul { margin: .25rem 0 0; padding-left: 1.1rem; }
.compat li { margin: .2rem 0; }

.slots { display: flex; flex-direction: column; gap: .85rem; }
.slot {
  position: relative;
  scroll-margin-bottom: 130px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(148px, 220px) 1fr;
  min-height: 148px;
  overflow: hidden;
  transition: border-color .15s ease, background .15s ease;
}
.slot:hover { background: var(--card-hover); border-color: #3a445c; }
.slot.is-empty { border-style: dashed; }
.slot.is-used {
  background: linear-gradient(100deg, rgba(245, 158, 11, .38), rgba(146, 64, 14, .55) 42%, #2a2116);
  border: 2px solid #f59e0b;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, .22);
}
.slot.is-used:hover {
  background: linear-gradient(100deg, rgba(245, 158, 11, .46), rgba(146, 64, 14, .62) 42%, #322616);
  border-color: #fbbf24;
}
.slot.just-changed { animation: flash .7s ease; }
@keyframes flash {
  from { outline: 2px solid rgba(110, 231, 255, .85); outline-offset: 2px; }
  to { outline-color: transparent; }
}
.used-flag {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  background: #f59e0b;
  color: #1c1406;
  font-weight: 900;
  font-size: .78rem;
  letter-spacing: .08em;
  padding: .22rem .55rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .35);
}
.slot-media {
  position: relative;
  background:
    radial-gradient(circle at 30% 20%, rgba(110, 231, 255, .12), transparent 55%),
    #0e121a;
  display: grid;
  place-items: center;
  min-height: 148px;
  border-right: 1px solid var(--line);
}
.slot.is-used .slot-media {
  background:
    radial-gradient(circle at 30% 20%, rgba(245, 158, 11, .28), transparent 55%),
    #3b2a12;
  border-right-color: rgba(245, 158, 11, .45);
}
.slot-media img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  padding: .85rem;
  display: block;
}
.slot-media-fallback {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.add-ssd2-btn {
  position: absolute;
  left: 50%;
  bottom: .4rem;
  transform: translateX(-50%);
  z-index: 2;
  padding: .28rem .5rem;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(11, 13, 18, .88);
  border-color: rgba(110, 231, 255, .4);
}
.add-ssd2-btn:hover { border-color: var(--accent); color: var(--accent); }
.slot.has-store-foot > .slot-media { grid-column: 1; grid-row: 1; }
.slot.has-store-foot > .slot-main {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  align-self: start;
}
.slot.has-store-foot .slot-body { padding: .95rem 1.05rem .45rem; }
.slot.has-store-foot .slot-foot { padding: 0 1.05rem 1rem; }
.slot.has-store-foot .slot-lead,
.slot.has-store-foot .build-note,
.slot.has-store-foot .used-note { padding: 0 1.05rem .7rem; }

.slot-body {
  padding: .95rem 1.05rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 0;
}
.slot-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .4rem; }
.slot-label {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
}
.slot.is-used .slot-label { color: #fbbf24; }
.slot-badges { display: flex; flex-wrap: wrap; gap: .35rem; justify-content: flex-end; }
.slot-spec-badges { display: contents; }
.slot-badge {
  font-size: .72rem;
  font-weight: 700;
  padding: .18rem .5rem;
  border-radius: 999px;
  background: rgba(139, 92, 246, .15);
  color: #c4b5fd;
}
.badge-new { background: rgba(52, 211, 153, .15); color: #6ee7b7; }
.badge-used { background: #f59e0b; color: #1c1406; }
.badge-incompat { background: #ef4444; color: #fff; }
.badge-build { background: rgba(248, 113, 113, .16); color: #fda4af; }

.slot.is-incompat {
  background: linear-gradient(100deg, rgba(239, 68, 68, .28), rgba(127, 29, 29, .46) 42%, #2a1212);
  border: 2px solid #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, .25);
}
.slot.is-incompat:hover {
  background: linear-gradient(100deg, rgba(239, 68, 68, .36), rgba(127, 29, 29, .54) 42%, #341616);
  border-color: #f87171;
}
.slot.is-incompat .slot-label { color: #fca5a5; }
.slot.is-incompat .slot-name { color: #fecaca; }
.slot.is-incompat .slot-price { color: #f87171; }
.slot.is-incompat .slot-media {
  background:
    radial-gradient(circle at 30% 20%, rgba(239, 68, 68, .28), transparent 55%),
    #3b1616;
  border-right-color: rgba(239, 68, 68, .55);
}
.slot.is-incompat .btn-ghost { border-color: rgba(248, 113, 113, .55); }
.slot.is-incompat .meta-box { background: rgba(0, 0, 0, .18); border-color: rgba(239, 68, 68, .35); }
.slot.is-incompat .meta-price-value { color: #f87171; }
.slot.is-empty.is-incompat { border-style: solid; }
.badge-linke { background: rgba(110, 231, 255, .16); color: #9aefff; }
.offer-row { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin-top: .35rem; }
.offer-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  border-radius: 999px;
  padding: .28rem .6rem;
  font: inherit;
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
}
.offer-btn:hover { border-color: rgba(110, 231, 255, .45); color: var(--accent); }
.badge-edit { background: rgba(110, 231, 255, .12); color: var(--accent); }
.slot-name {
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.slot.is-used .slot-name { color: #ffe7b0; }
.slot-price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: .55rem .8rem; }
.slot-price { font-size: 1.28rem; font-weight: 900; letter-spacing: -.02em; }
.slot.is-used .slot-price { color: #fbbf24; }
.was { color: var(--muted); font-size: .78rem; text-decoration: line-through; font-weight: 600; }
.slot-meta { display: flex; flex-wrap: wrap; gap: .45rem; font-size: .82rem; }
.meta-box {
  background: rgba(255, 255, 255, .03);
  border: 1px solid rgba(42, 49, 66, .8);
  border-radius: 10px;
  padding: .4rem .65rem;
  min-width: 5.5rem;
}
.slot.is-used .meta-box { background: rgba(0, 0, 0, .18); border-color: rgba(245, 158, 11, .35); }
.meta-box span { display: block; color: var(--muted); font-size: .72rem; }
.meta-box strong { font-size: .92rem; }
.meta-box-store {
  min-width: 0;
  flex: 0 1 auto;
  max-width: 26rem;
  padding: .45rem .75rem .5rem;
}
.meta-price {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  justify-content: start;
  align-items: baseline;
  column-gap: .15rem;
  row-gap: .06rem;
}
.meta-shop-stack { display: contents; }
.meta-shop-over { grid-column: 1; grid-row: 1; }
.meta-box-store .meta-shop,
.meta-box-store .meta-price-value,
.meta-box-store strong.meta-price-value,
.meta-price .was,
.meta-price .delta-pos,
.meta-price .delta-neg,
.meta-price .delta-zero { grid-row: 2; align-self: baseline; }
.meta-box-store .meta-shop { grid-column: 1; line-height: 1; }
.meta-box-store .meta-price-value,
.meta-box-store strong.meta-price-value { grid-column: 2; }
.meta-price .was,
.meta-price .delta-pos,
.meta-price .delta-neg,
.meta-price .delta-zero { grid-column: 3; }
.meta-shop-over {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .1rem .22rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
  line-height: 1.1;
}
.meta-box-store .meta-price-value, .meta-box-store strong.meta-price-value { font-size: 2.07rem; font-weight: 900; letter-spacing: -.04em; line-height: 1; }
.slot.is-used .meta-price-value { color: #fbbf24; }
.meta-price .was { display: inline; }
.meta-price .delta-pos,
.meta-price .delta-neg,
.meta-price .delta-zero { font-size: .75rem; font-weight: 700; }
.meta-store-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .15rem .28rem;
  margin: 0 0 .12rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 600;
}
.meta-box-store .meta-shop {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
}
.meta-sep { color: var(--muted); font-weight: 500; }
.slot-price-row { display: none; }
.meta-box-store a { color: var(--accent); text-decoration: none; font-weight: 700; }
.meta-box-store a:hover { text-decoration: underline; }
.meta-box-store a.meta-shop { color: var(--accent); }
.meta-box-store a.meta-shop:hover { text-decoration: underline; }
.store-pick {
  display: inline-block;
  width: auto;
  max-width: 10.5rem;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  border-radius: 6px;
  padding: .12rem .4rem;
  font: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
}
.store-pick:focus {
  outline: 2px solid rgba(110, 231, 255, .45);
  outline-offset: 1px;
}
.meta-box-store { position: relative; }
.meta-box-store.has-shop-pick { cursor: pointer; padding-right: 1.15rem; }
.meta-box-store.has-shop-pick:hover { border-color: #4a5670; background: rgba(255, 255, 255, .05); }
.meta-box-store.has-shop-pick:focus-within {
  outline: 2px solid rgba(110, 231, 255, .45);
  outline-offset: 2px;
}
.meta-box-store.has-shop-pick .store-pick {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 1;
  font-size: 1rem;
}
.meta-box-store.has-shop-pick .meta-shop-over a,
.meta-box-store.has-shop-pick a.meta-shop {
  position: relative;
  z-index: 2;
}
.meta-box-store .meta-shop-caret {
  display: block;
  position: absolute;
  top: .42rem;
  right: .5rem;
  width: 0;
  height: 0;
  margin: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid currentColor;
  flex: 0 0 auto;
  opacity: .75;
  z-index: 2;
  pointer-events: none;
}

.delta-pos { color: var(--warn); }
.delta-neg { color: var(--good); }
.delta-zero { color: var(--muted); }
.slot.is-used .delta-neg { color: #bbf7d0; }
.slot-store, .slot-water, .slot-lead {
  font-size: .78rem;
  color: var(--muted);
}
.slot-water, .slot-lead { color: #c4b5fd; font-weight: 600; }
.store-pick { max-width: 10.5rem; }
.used-note {
  display: inline-flex;
  align-items: center;
  background: #f59e0b;
  color: #1c1406;
  font-weight: 900;
  border-radius: 10px;
  padding: .38rem .7rem;
  letter-spacing: .01em;
}
.build-note { font-size: .78rem; color: #fda4af; font-weight: 700; }
.slot-stack { display: flex; flex-direction: column; gap: 0; }
.slot-stack > .slot:first-child {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
}
.slot-stack > .slot:first-child .slot-media { border-bottom: 0; }
.slot-rec {
  background: transparent;
  border-color: transparent;
  min-height: 0;
  overflow: visible;
  box-shadow: none;
}
.slot-rec:hover {
  background: transparent;
  border-color: transparent;
}
.slot-rec-gutter {
  min-height: 0;
  background: transparent;
  border: 0;
}
.slot-stack > .slot-rec {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-top: 0;
}
.slot-rec .slot-body {
  padding: .55rem 1.05rem .7rem;
  background: var(--card);
  border: 1px solid rgba(110, 231, 255, .28);
  border-top: 1px solid rgba(110, 231, 255, .22);
  border-radius: 0 0 var(--radius) var(--radius);
}
.slot-rec:hover .slot-body { background: var(--card-hover); }
.slot-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: .5rem .75rem;
}
.slot-foot .slot-meta { flex: 0 1 auto; min-width: 0; }
.slot-foot .meta-box-store { flex: 0 1 auto; max-width: 22rem; }
.slot-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.slot-body > .slot-actions { margin-top: auto; padding-top: .25rem; }
.slot-foot .slot-actions {
  margin: 0 0 0 auto;
  padding: 0;
  flex: 0 1 auto;
}
.slot-actions .btn { flex: 0 1 auto; padding: .55rem .95rem; font-size: .88rem; }
.slot-actions .btn-icon {
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  flex: 0 0 auto;
}
.slot-actions .btn-icon svg { display: block; }
.btn-edit svg { display: none; }
.slot-foot .slot-actions .btn-edit { order: 1; }
.slot-foot .slot-actions .btn-rec { order: 2; }
.slot-foot .slot-actions .btn-swap { order: 3; }
.slot-foot .slot-actions .btn-clear { order: 4; }
.slot.is-used .btn-ghost { border-color: rgba(245, 158, 11, .55); }

.suggest {
  margin-top: .25rem;
  padding-top: .65rem;
  border-top: 1px dashed rgba(154, 163, 181, .35);
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.suggest-label { font-size: .75rem; font-weight: 800; letter-spacing: .04em; color: var(--muted); }
.suggest-list { display: grid; grid-template-columns: 1fr 1fr; gap: .45rem; }
.suggest-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .28rem;
  text-align: left;
  width: 100%;
  min-width: 0;
  background: rgba(8, 10, 16, .35);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .55rem .65rem .6rem;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.suggest-card:hover { border-color: rgba(110, 231, 255, .5); background: rgba(110, 231, 255, .06); }
.suggest-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.suggest-head .btn { padding: .35rem .75rem; font-size: .8rem; }
.rec-card { cursor: default; }
.rec-note, .rec-price {
  display: flex;
  align-items: center;
  gap: .35rem;
  width: 100%;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
}
.rec-note input, .rec-price input {
  flex: 1;
  min-width: 0;
  background: #0e121a;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 8px;
  padding: .28rem .45rem;
  font: inherit;
  font-weight: 700;
}
.rec-price { width: auto; }
.rec-price input { width: 6.2rem; flex: 0 0 auto; }
.rec-remove { padding: .32rem .7rem; font-size: .78rem; }
.suggest-tag {
  font-size: .72rem;
  font-weight: 800;
  border-radius: 999px;
  padding: .12rem .48rem;
}
.tag-value { background: rgba(52, 211, 153, .16); color: #6ee7b7; }
.tag-better { background: rgba(110, 231, 255, .14); color: var(--accent); }
.suggest-name {
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.suggest-foot {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .55rem;
  align-items: baseline;
  width: 100%;
}
.suggest-delta { font-weight: 900; font-size: .92rem; }
.suggest-abs { color: var(--muted); font-size: .75rem; font-weight: 650; }

.labor-field {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  color: var(--text);
}
.labor-prefix { color: var(--muted); font-size: .85rem; }
.labor-field input {
  width: 8.2rem;
  background: #0e121a;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: .55rem .7rem;
  font: inherit;
  font-weight: 800;
  font-size: 1.1rem;
}
.slot-labor { display: none; margin-top: .85rem; }

.sticky-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: rgba(12, 14, 20, .92);
  backdrop-filter: blur(16px);
  border-top: 1px solid rgba(110, 231, 255, .22);
  box-shadow: 0 -12px 40px rgba(0, 0, 0, .35);
}
.sticky-inner {
  min-height: var(--sticky-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sticky-label { display: block; font-size: .75rem; color: var(--muted); }
.sticky-total { font-size: 1.45rem; letter-spacing: -.02em; }
.sticky-delta {
  display: inline-block;
  margin-left: .15rem;
  font-size: .82rem;
  font-weight: 650;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-family: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}
.sticky-actions { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; justify-content: flex-end; }
.sticky-actions .btn { padding: .62rem 1rem; font-size: .88rem; }
.section-head-actions .btn.btn-icon-download,
.sticky-actions .btn.btn-icon-download {
  width: 2.25rem;
  min-width: 2.25rem;
  height: 2.25rem;
  padding: 0;
}

.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: end center;
}
.modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); }
.modal-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(88vh, 860px);
  background: #12151d;
  border: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: slideUp .22s ease;
}
body.modal-open .sticky-bar { visibility: hidden; }
@keyframes slideUp {
  from { transform: translateY(18px); }
  to { transform: none; }
}
.modal-head, .modal-foot, .modal-tools {
  padding: .95rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.modal-head h3 { margin: 0; font-size: 1.15rem; }
.modal-head p { margin: .2rem 0 0; }
.modal-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.modal-tools { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; }
.modal-tools input[type="search"] {
  flex: 1 1 180px;
  min-width: 140px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: .55rem .75rem;
  font: inherit;
}
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; width: 100%; }
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: .28rem .7rem;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
}
.chip.active {
  background: rgba(110, 231, 255, .14);
  border-color: rgba(110, 231, 255, .45);
  color: var(--accent);
}
.chip.is-incompat {
  position: relative;
  /* keep normal chip colors; mark incompatibility with a mid-line only */
}
.chip.is-incompat::after {
  content: "";
  position: absolute;
  left: .45rem;
  right: .45rem;
  top: 50%;
  height: 1.5px;
  background: rgba(226, 232, 240, .72);
  transform: translateY(-50%);
  pointer-events: none;
  border-radius: 99px;
}
.chip.is-incompat.active::after {
  background: rgba(154, 239, 255, .7);
}
.custom-add {
  flex: 1 1 100%;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: .55rem .75rem .7rem;
  background: rgba(255, 255, 255, .02);
}
.custom-add summary { cursor: pointer; font-weight: 800; color: var(--accent); }
.custom-add p { margin: .35rem 0 .5rem; font-size: .8rem; }
.custom-grid {
  display: grid;
  grid-template-columns: 1.4fr .7fr auto;
  gap: .5rem;
  align-items: end;
}
.custom-grid label, .edit-form label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--muted);
}
.custom-grid input, .edit-form input[type="text"], .edit-form input[type="number"] {
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 10px;
  padding: .6rem .75rem;
  font: inherit;
  font-weight: 700;
}
.modal-list { overflow: auto; padding: .5rem; flex: 1; background: #12151d; min-height: 180px; }
.list-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  padding: .35rem .7rem .35rem;
  font-size: .78rem;
}
.show-incompat-btn {
  border: 1px solid rgba(248, 113, 113, .7);
  background: transparent;
  color: #fca5a5;
  border-radius: 999px;
  padding: .22rem .7rem;
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.show-incompat-btn:hover { background: rgba(239, 68, 68, .16); border-color: #f87171; }
.show-incompat-btn.active {
  background: rgba(239, 68, 68, .28);
  border-color: #ef4444;
  color: #fecaca;
}
.opt {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  border-radius: 12px;
  padding: .75rem .8rem;
  cursor: pointer;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .2rem .8rem;
  font: inherit;
}
.opt:hover { background: rgba(255, 255, 255, .04); border-color: var(--line); }
.opt.selected { background: rgba(110, 231, 255, .08); border-color: rgba(110, 231, 255, .4); }
.opt.is-incompat {
  background: rgba(239, 68, 68, .12);
  border-color: rgba(248, 113, 113, .7);
}
.opt.is-incompat:hover { background: rgba(239, 68, 68, .18); border-color: #f87171; }
.opt.is-incompat.selected {
  background: rgba(239, 68, 68, .16);
  border-color: #ef4444;
}
.opt-incompat {
  display: inline-block;
  margin-left: .4rem;
  font-size: .72rem;
  font-weight: 800;
  color: #fff;
  background: #ef4444;
  border-radius: 999px;
  padding: .08rem .4rem;
  vertical-align: middle;
}
.opt-name {
  grid-column: 1;
  grid-row: 1;
  font-weight: 700;
  min-width: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.opt-price {
  grid-column: 2;
  grid-row: 1 / span 2;
  font-weight: 800;
  align-self: center;
  text-align: right;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .1rem;
}
.opt-delta { font-size: .78rem; font-weight: 800; }
.opt-meta { grid-column: 1; grid-row: 2; font-size: .78rem; color: var(--muted); min-width: 0; }
.more-btn {
  width: calc(100% - 8px);
  margin: .4rem 4px .8rem;
  border: 1px dashed var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: .7rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.more-btn:hover { color: var(--text); border-color: #4a556d; }
.empty { text-align: center; color: var(--muted); padding: 2rem 1rem; }

.edit-form { display: flex; flex-direction: column; gap: .75rem; padding: 1rem 1.1rem 1.15rem; }
.check-used {
  flex-direction: row;
  align-items: center;
  gap: .6rem;
  color: #1c1406 !important;
  background: #f59e0b;
  border-radius: 12px;
  padding: .7rem .8rem;
  font-size: .95rem !important;
}
.check-used input { width: 1.15rem; height: 1.15rem; accent-color: #9a3412; }
.used-preview {
  margin: 0;
  background: rgba(245, 158, 11, .14);
  border: 1px solid rgba(245, 158, 11, .45);
  color: #fde68a;
  border-radius: 10px;
  padding: .55rem .7rem;
  font-size: .85rem;
}
.used-preview[hidden] { display: none; }
.modal-actions { display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }

.toast[hidden] { display: none; }
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--sticky-h) + 16px);
  transform: translateX(-50%);
  background: #1f2937;
  color: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .55rem 1rem;
  font-size: .88rem;
  z-index: 90;
  box-shadow: var(--shadow);
  max-width: min(92vw, 520px);
}

.site-footer {
  margin-top: 2.5rem;
  padding: 1.5rem 0 2rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
}
.footer-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .85rem 0 .9rem; }
.site-footer p { margin: .35rem 0; }

.print-sheet { display: none; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 1.4rem; }
  .suggest-list { grid-template-columns: 1fr; }
  .sticky-inner { padding-block: .65rem; }
  .sticky-total { font-size: 1.25rem; }
  .modal { place-items: end stretch; }
  .modal-panel { border-radius: 18px 18px 0 0; width: 100%; }
  .section-head-actions { width: 100%; justify-content: flex-start; }
  .custom-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .slot:not(.slot-rec) .slot-spec-badges { display: none; }
  .slot:not(.slot-rec) .slot-body > .slot-top .slot-label,
  .slot.has-store-foot .slot-body > .slot-top .slot-label,
  .slot.is-empty > .slot-body > .slot-top .slot-label {
    position: absolute;
    top: .3rem;
    left: .3rem;
    z-index: 3;
    max-width: 5.4rem;
    padding: .12rem .38rem;
    border-radius: 6px;
    background: rgba(11, 13, 18, .82);
    color: var(--accent);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1.2;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .35);
  }
  .slot.is-used:not(.slot-rec) .slot-body > .slot-top .slot-label { color: #fbbf24; }
  .slot.is-incompat:not(.slot-rec) .slot-body > .slot-top .slot-label { color: #fca5a5; }
  .slot.is-used .used-flag {
    top: 1.85rem;
    left: .3rem;
    font-size: .68rem;
    padding: .12rem .4rem;
  }
  .slot:not(.slot-rec) .slot-body > .slot-top {
    justify-content: flex-end;
    min-height: 0;
  }
  .slot:not(.slot-rec):not(.slot-labor) .slot-body > .slot-top:not(:has(.badge-used, .badge-build, .badge-incompat, .badge-edit, :scope > .slot-badge)) {
    height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    gap: 0;
  }
  .hero { display: none; }
  .slot-labor { display: grid; }
  .builder { padding-top: .35rem; }
  .slot {
    grid-template-columns: 96px 1fr;
    min-height: 0;
  }
  .slot-media {
    border-right: 1px solid var(--line);
    border-bottom: 0;
    min-height: 0;
  }
  .slot.is-used .slot-media { border-bottom: 0; border-right-color: rgba(245, 158, 11, .45); }
  .slot.is-incompat .slot-media { border-bottom: 0; border-right-color: rgba(239, 68, 68, .55); }
  .slot-media img { height: 96px; padding: .35rem .35rem 1.55rem; }
  .add-ssd2-btn { bottom: .28rem; padding: .22rem .4rem; font-size: .68rem; }
  .slot-body { padding: .55rem .6rem .6rem; gap: .3rem; }
  .slot-name { font-size: .92rem; -webkit-line-clamp: 2; }
  .meta-box-store .meta-price-value, .meta-box-store strong.meta-price-value { font-size: .92rem; font-weight: 800; letter-spacing: 0; line-height: 1; }
  .meta-box-store .meta-shop { font-size: .92rem; line-height: 1; }
  .slot.has-store-foot > .slot-media { grid-column: 1; grid-row: 1; }
  .slot.has-store-foot > .slot-main { grid-column: 2; grid-row: 1; }
  .slot.has-store-foot .slot-body { padding: .55rem .6rem .2rem; }
  .slot.has-store-foot .slot-foot {
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .3rem;
    margin: 0;
    padding: 0 .3rem .55rem;
  }
  .slot.has-store-foot .slot-lead,
  .slot.has-store-foot .build-note,
  .slot.has-store-foot .used-note {
    padding: 0 .6rem .5rem;
  }
  .slot.has-store-foot .slot-foot .slot-meta,
  .slot.has-store-foot .slot-foot .meta-box-store {
    flex: 0 1 auto;
    width: max-content;
    max-width: 100%;
    min-width: 0;
  }
  .store-pick { max-width: none; }
  .meta-shop, .store-pick { white-space: nowrap; }
  .slot.has-store-foot .slot-body {
    padding: .55rem 2.2rem .2rem .6rem;
  }
  .slot.has-store-foot .btn-edit .btn-edit-label { display: none; }
  .slot.has-store-foot .btn-edit svg { display: block; }
  .slot.has-store-foot .btn-swap {
    position: absolute;
    top: .3rem;
    right: .3rem;
    z-index: 4;
    margin: 0;
    background: rgba(11, 13, 18, .82);
    border-color: rgba(110, 231, 255, .4);
  }
  .slot.has-store-foot .btn-rec {
    position: absolute;
    left: .25rem;
    bottom: .25rem;
    z-index: 3;
    margin: 0;
    padding: .16rem .4rem;
    font-size: .62rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    background: rgba(11, 13, 18, .88);
    border-color: rgba(110, 231, 255, .4);
  }
  .slot:has(.btn-rec) .add-ssd2-btn {
    left: auto;
    right: .25rem;
    transform: none;
  }
  .slot.has-store-foot .slot-foot .slot-actions {
    margin: 0 0 0 auto;
    flex: 0 0 auto;
    display: flex;
    flex-wrap: nowrap;
    gap: .28rem;
    align-self: center;
  }
  .slot.has-store-foot .slot-foot .slot-actions .btn-edit,
  .slot.has-store-foot .slot-foot .slot-actions .btn-clear { order: 0; }
  .slot-foot .slot-actions .btn,
  .slot-actions .btn { padding: .28rem .38rem; font-size: .68rem; }
  .slot.has-store-foot .btn-edit,
  .slot.has-store-foot .btn-swap,
  .slot.has-store-foot .btn-clear,
  .slot-foot .slot-actions .btn-icon,
  .slot-actions .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.85rem;
    min-width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    box-sizing: border-box;
  }
  .slot.has-store-foot .btn-edit svg,
  .slot.has-store-foot .btn-swap svg,
  .slot.has-store-foot .btn-clear svg,
  .slot-actions .btn-icon svg {
    width: 14px;
    height: 14px;
    display: block;
  }
  .slot-rec-gutter { display: block; }
  .slot-rec .slot-body { padding: .45rem .6rem .55rem; }
  body { padding-bottom: 148px; }
  .sticky-actions #btn-share-sticky,
  .sticky-actions #btn-copy-link-sticky,
  .sticky-actions #btn-pdf-sticky { display: none; }
  .modal-foot .muted { display: none; }
}

@media print {
  @page { margin: 12mm; size: A4; }
  html, body {
    background: #fff !important;
    color: #111 !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  main, .sticky-bar, .modal, .toast, .site-footer { display: none !important; }
  .print-sheet {
    display: block !important;
    color: #111;
    font-family: "Noto Sans TC", "PingFang HK", "Microsoft JhengHei", sans-serif;
  }
  .print-head {
    display: flex;
    justify-content: flex-end;
    align-items: baseline;
    border-bottom: 2px solid #111;
    padding-bottom: .4rem;
    margin-bottom: .7rem;
    font-size: 12pt;
  }
  .print-sheet h1 { margin: 0 0 .25rem; font-size: 16pt; }
  .print-warranty { margin: 0 0 .35rem; font-weight: 800; font-size: 11pt; }
  .print-meta { margin: 0 0 .8rem; color: #333; font-size: 10pt; }
  .print-table { width: 100%; border-collapse: collapse; font-size: 9.5pt; }
  .print-table th, .print-table td {
    border-bottom: 1px solid #ccc;
    padding: .42rem .3rem;
    text-align: left;
    vertical-align: top;
  }
  .print-table th:nth-child(3),
  .print-table td:nth-child(3) { text-align: right; white-space: nowrap; }
  .print-used td {
    background: #ffe0b8 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  .print-sub { display: block; color: #444; font-size: 8.5pt; margin-top: .15rem; }
  .print-foot { margin-top: 1rem; font-size: 10.5pt; }
  .print-total { margin-top: .35rem; font-size: 14pt; }
  .print-stamp { margin-top: .8rem; color: #333; font-size: 9pt; line-height: 1.45; }
}
