:root {
  --bg: #f7f6f3;
  --surface: #fff;
  --text: #1d1d1b;
  --muted: #6b6b66;
  --border: #dddbd5;
  --accent: #2f5d50;
  --accent-soft: #e4eeea;
  --danger: #a33a2b;
  --radius: 8px;
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

[x-cloak] {
  display: none !important;
}

.layout {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
}

.site-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.reset-all {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  padding: 0.35rem 0.75rem;
  font-size: 0.9rem;
  white-space: nowrap;
}

.reset-all:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.site-header h1 {
  margin: 0;
  font-size: 1.75rem;
}

.tagline {
  margin: 0.25rem 0 1.5rem;
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.panel-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.panel-header h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
}

button {
  font: inherit;
  cursor: pointer;
}

.link-button {
  background: none;
  border: none;
  color: var(--accent);
  padding: 0;
  text-decoration: underline;
}

.search-input {
  width: 100%;
  padding: 0.6rem 0.75rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.search-input:focus {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
}

.checkbox-label {
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.status {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.status.error {
  color: var(--danger);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.35rem 0.2rem 0.7rem;
  font-size: 0.9rem;
}

.chip button {
  background: none;
  border: none;
  color: inherit;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.25rem;
}

.category-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 22rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.category-list li + li {
  border-top: 1px solid var(--border);
}

.category-option {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    'check title count'
    'check handle count';
  column-gap: 0.6rem;
  align-items: center;
  padding: 0.45rem 0.75rem;
  cursor: pointer;
}

.category-option:hover {
  background: var(--bg);
}

.category-option.selected {
  background: var(--accent-soft);
}

.category-option input {
  grid-area: check;
}

.category-title {
  grid-area: title;
}

.category-handle {
  grid-area: handle;
  font-size: 0.75rem;
  color: var(--muted);
}

.category-count {
  grid-area: count;
  font-size: 0.85rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Produktvisning */

.products {
  margin-top: 1.5rem;
}

.product-count {
  margin: 0;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
}

.product-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.product-card:hover,
.product-card:focus-within {
  border-color: var(--accent);
}

.product-card.compared {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent);
}

.product-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.product-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.image-placeholder {
  font-size: 0.85rem;
  color: var(--muted);
}

.sold-out {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--text);
  color: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.6rem 0.75rem 0.75rem;
  border-top: 1px solid var(--border);
  flex: 1;
}

.product-brand {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.product-title {
  font-size: 0.9rem;
  line-height: 1.3;
}

.product-price {
  margin-top: auto;
  padding-top: 0.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: baseline;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.product-price .sale {
  color: var(--danger);
}

.product-price s {
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
}

/* Filtre og sortering */

.products-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-top: 0.5rem;
}

.filters {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.filter-group {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.filter-group .checkbox-label {
  margin-top: 0;
  color: var(--text);
}

.filter-label {
  display: block;
  padding: 0;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
}

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

.filters .search-input {
  padding: 0.45rem 0.6rem;
  background: var(--surface);
}

.price-inputs {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--muted);
}

.price-inputs input {
  min-width: 0;
}

.brand-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 16rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.brand-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.6rem;
  font-size: 0.9rem;
  cursor: pointer;
}

.brand-option:hover {
  background: var(--bg);
}

.brand-name {
  flex: 1;
}

.reset-button {
  align-self: flex-start;
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--accent);
}

.reset-button:disabled {
  color: var(--muted);
  cursor: default;
}

.results {
  min-width: 0;
}

.results .product-grid {
  margin-top: 0;
}

.empty-state {
  margin-top: 0;
  padding: 2rem 1rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.empty-state p {
  margin: 0 0 0.5rem;
}

.products-body.no-filters {
  grid-template-columns: 1fr;
}

/* Kort-handlinger */

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  border-top: 1px solid var(--border);
}

.compare-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.85rem;
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: var(--text);
}

.compare-toggle:hover {
  border-color: var(--border);
}

.compare-toggle .check-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
  border: 1.5px solid var(--muted);
  border-radius: 3px;
  font-size: 0.75rem;
  line-height: 1;
}

.compare-toggle[aria-pressed='true'] {
  color: var(--accent);
  font-weight: 600;
  background: var(--accent-soft);
}

.compare-toggle[aria-pressed='true'] .check-box {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--surface);
}

.compare-toggle[aria-disabled='true'] {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.favorite-toggle {
  background: none;
  border: none;
  padding: 0.1rem 0.3rem;
  font-size: 1.3rem;
  line-height: 1;
  color: var(--muted);
}

.favorite-toggle:hover,
.favorite-toggle[aria-pressed='true'] {
  color: var(--danger);
}

/* Visningsvalg */

.view-tabs {
  display: inline-flex;
  margin-bottom: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-tab {
  padding: 0.4rem 0.9rem;
  border: none;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
}

.view-tab + .view-tab {
  border-left: 1px solid var(--border);
}

.view-tab.active {
  background: var(--accent);
  color: var(--surface);
}

/* Sammenligningslinje */

.has-compare-bar {
  padding-bottom: 7rem;
}

.compare-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 10px rgb(0 0 0 / 0.08);
}

.compare-bar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.6rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.compare-bar-count {
  font-size: 0.95rem;
}

.compare-thumbs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
  overflow-x: auto;
}

.compare-thumb {
  position: relative;
  flex: none;
  width: 3.25rem;
  height: 3.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.compare-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.compare-thumb .image-placeholder {
  font-size: 0.6rem;
  text-align: center;
  overflow: hidden;
}

.thumb-remove {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 1.2rem;
  height: 1.2rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--text);
  color: var(--surface);
  font-size: 0.85rem;
  line-height: 1;
}

.compare-bar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.primary-button {
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--surface);
  font-weight: 600;
}

.primary-button:disabled {
  background: var(--border);
  border-color: var(--border);
  color: var(--muted);
  cursor: not-allowed;
}

/* Sammenligningsvisning */

.compare-dialog {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  background: var(--bg);
  color: var(--text);
}

.compare-dialog[open] {
  display: flex;
  flex-direction: column;
}

.compare-dialog::backdrop {
  background: rgb(0 0 0 / 0.4);
}

.compare-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.compare-dialog-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.close-button {
  padding: 0.4rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

.compare-scroll {
  flex: 1;
  overflow: auto;
  padding: 1rem 1.5rem;
}

.compare-table {
  border-collapse: separate;
  border-spacing: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.compare-table th,
.compare-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  width: 14rem;
  min-width: 11rem;
}

.compare-table tr:last-child > * {
  border-bottom: none;
}

.compare-table .row-label {
  position: sticky;
  left: 0;
  z-index: 1;
  width: 8rem;
  min-width: 7rem;
  background: var(--bg);
  border-right: 1px solid var(--border);
  font-weight: 600;
}

.compare-col-head {
  text-align: right !important;
  font-weight: 400;
}

.compare-image img {
  width: 100%;
  max-width: 12rem;
  aspect-ratio: 1 / 1;
  object-fit: contain;
}

.compare-table a {
  color: var(--accent);
}

.compare-price {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.compare-price .sale {
  color: var(--danger);
}

.compare-price s {
  margin-left: 0.4rem;
  font-weight: 400;
  color: var(--muted);
}

.compare-price.lowest {
  background: var(--accent-soft);
}

.lowest-badge {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
}

.in-stock {
  color: var(--accent);
}

.out-of-stock {
  color: var(--danger);
}

.compare-description {
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Forkastede produkter i gridet */

.product-card.rejected .product-image img {
  opacity: 0.45;
}

.rejected-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: var(--danger);
  color: var(--surface);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}

.rejected-actions {
  padding: 0.35rem 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.restore-all {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  text-align: left;
}

/* Sveipemodus: startknapp */

.view-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.view-bar .view-tabs {
  margin-bottom: 0;
}

.swipe-launch-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
}

/* Sveipemodus: dialog */

.swipe-dialog {
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: none;
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
}

.swipe-dialog[open] {
  display: flex;
  flex-direction: column;
}

.swipe-dialog::backdrop {
  background: rgb(0 0 0 / 0.4);
}

.swipe-dialog .compare-dialog-header {
  gap: 1rem;
}

.swipe-dialog .compare-dialog-header h2 {
  margin: 0;
  font-size: 1.2rem;
}

.swipe-progress-text {
  margin-left: auto;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}

.swipe-progress-bar {
  height: 4px;
  background: var(--border);
}

.swipe-progress-bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 200ms ease-out;
}

.swipe-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem 1rem 0.75rem;
  gap: 0.75rem;
}

.swipe-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.swipe-card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(28rem, 100%);
  max-height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.1);
  overflow: hidden;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
  will-change: transform;
}

.swipe-card:active {
  cursor: grabbing;
}

.swipe-image {
  position: relative;
  flex: none;
  height: min(28rem, 48vh);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swipe-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.swipe-dots {
  display: flex;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.2rem 0;
}

.swipe-dot {
  width: 1.5rem;
  height: 1.25rem;
  padding: 0;
  border: none;
  background: none;
  position: relative;
}

.swipe-dot::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 0.5rem;
  height: 0.5rem;
  margin: -0.25rem 0 0 -0.25rem;
  border-radius: 50%;
  background: var(--border);
}

.swipe-dot.active::after {
  background: var(--accent);
}

.swipe-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.6rem 1rem 1rem;
  border-top: 1px solid var(--border);
  overflow-y: auto;
  min-height: 0;
}

.swipe-title {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.3;
}

.swipe-info .product-price {
  margin-top: 0;
  font-size: 1.05rem;
}

.swipe-description {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
}

.swipe-link {
  align-self: flex-start;
  margin-top: 0.35rem;
  color: var(--accent);
  font-size: 0.9rem;
}

.swipe-stamp {
  position: absolute;
  top: 1.25rem;
  z-index: 2;
  padding: 0.2rem 0.7rem;
  border: 3px solid currentColor;
  border-radius: var(--radius);
  background: rgb(255 255 255 / 0.85);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.swipe-stamp.yes {
  left: 1.25rem;
  color: var(--accent);
  transform: rotate(-12deg);
  opacity: var(--yes-opacity, 0);
}

.swipe-stamp.no {
  right: 1.25rem;
  color: var(--danger);
  transform: rotate(12deg);
  opacity: var(--no-opacity, 0);
}

.swipe-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
}

.swipe-button {
  min-width: 7rem;
  padding: 0.7rem 1.4rem;
  border: 2px solid currentColor;
  border-radius: 999px;
  background: var(--surface);
  font-size: 1.05rem;
  font-weight: 700;
}

.swipe-button.no {
  color: var(--danger);
}

.swipe-button.yes {
  color: var(--accent);
}

.swipe-button.no:hover {
  color: var(--surface);
  background: var(--danger);
}

.swipe-button.yes:hover {
  color: var(--surface);
  background: var(--accent);
}

.swipe-undo {
  padding: 0.45rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
}

.swipe-undo:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.swipe-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.swipe-summary {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1rem;
  text-align: center;
}

.swipe-summary h3 {
  margin: 0;
  font-size: 1.5rem;
}

.swipe-summary-counts {
  margin: 0 0 1rem;
  font-size: 1.2rem;
  font-variant-numeric: tabular-nums;
}

.swipe-summary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  .swipe-progress-bar span {
    transition: none;
  }
}

@media (max-width: 760px) {
  .products-body {
    grid-template-columns: 1fr;
  }

  .compare-bar-inner,
  .compare-dialog-header,
  .compare-scroll {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .swipe-image {
    height: min(22rem, 42vh);
  }

  .swipe-button {
    min-width: 5.5rem;
    padding: 0.6rem 1rem;
  }
}

/* Duellmodus */

.view-bar {
  justify-content: flex-start;
}

.view-bar .view-tabs {
  margin-right: auto;
}

.duel-dialog:focus {
  outline: none;
}

.push-right {
  margin-left: auto;
}

.duel-abort {
  color: var(--danger);
}

.duel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 1rem 1rem 0.75rem;
  gap: 0.75rem;
}

.duel-stage {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 26rem));
  justify-content: center;
  gap: 1.25rem;
}

.duel-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: calc(var(--radius) * 2);
  box-shadow: 0 6px 24px rgb(0 0 0 / 0.1);
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 220ms ease-out,
    opacity 220ms ease-out,
    border-color 150ms;
}

.duel-card:hover {
  border-color: var(--accent);
}

.duel-card.fx-winner {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft), 0 8px 28px rgb(0 0 0 / 0.15);
  transform: scale(1.03);
}

.duel-card.fx-loser {
  opacity: 0.25;
  transform: scale(0.95);
}

.duel-card.fx-skipped {
  opacity: 0.5;
  transform: translateY(0.75rem);
}

.duel-image {
  position: relative;
  flex: 1 1 auto;
  min-height: 8rem;
  max-height: 26rem;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.duel-image.browsable {
  cursor: ew-resize;
}

.duel-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.duel-info {
  flex: none;
  overflow: visible;
}

.duel-info .swipe-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.duel-pick {
  margin: 0 1rem 1rem;
  min-width: 0;
}

.duel-actions .swipe-undo {
  min-width: 6.5rem;
}

.duel-both-out:not(:disabled) {
  color: var(--danger);
}

.duel-result {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  width: 100%;
  max-width: 50rem;
  margin: 0 auto;
}

.duel-result-kicker {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.duel-result-hero {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: calc(var(--radius) * 2);
}

.duel-result-hero img {
  width: 10rem;
  height: 10rem;
  object-fit: contain;
  flex: none;
}

.duel-result-hero > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.duel-result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin: 1.25rem 0;
}

.duel-ranking h3 {
  margin: 1rem 0 0.5rem;
  font-size: 1.1rem;
}

.duel-rank-group + .duel-rank-group {
  margin-top: 0.75rem;
}

.duel-rank-label {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 600;
}

.duel-rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.duel-rank-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.6rem;
  font-size: 0.9rem;
}

.duel-rank-item + .duel-rank-item {
  border-top: 1px solid var(--border);
}

.duel-rank-item img {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex: none;
}

.duel-rank-item a {
  flex: 1;
  color: var(--accent);
}

.duel-rank-item .product-price {
  margin: 0;
  padding: 0;
}

@media (prefers-reduced-motion: reduce) {
  .duel-card {
    transition: none;
  }
}

@media (max-width: 760px) {
  .duel-body {
    overflow-y: auto;
  }

  .duel-stage {
    grid-template-columns: minmax(0, 1fr);
    flex: none;
  }

  .duel-image {
    flex: none;
    height: min(16rem, 26vh);
  }

  .duel-actions {
    position: sticky;
    bottom: 0;
    z-index: 1;
    padding: 0.5rem 0;
    background: var(--bg);
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .duel-dialog .compare-dialog-header {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .duel-result-hero {
    flex-direction: column;
    align-items: flex-start;
  }
}
