/* ============================================================
   FOUND — design system
   White + minimal + premium. The product is the hero.
   ============================================================ */

:root {
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --text: #111111;
  --text2: #707070;
  --line: #EAEAEA;
  --ink: #111111;            /* buttons / fills */
  --ink-text: #FFFFFF;       /* text on ink */
  --shadow: 0 10px 40px rgba(0,0,0,.07);
  --shadow-lift: 0 18px 60px rgba(0,0,0,.12);
  --ease: cubic-bezier(.32,.72,.24,1);
}
[data-theme="dark"] {
  --bg: #0D0D0D;
  --card: #171717;
  --text: #F5F5F5;
  --text2: #929292;
  --line: #292929;
  --ink: #F5F5F5;
  --ink-text: #0D0D0D;
  --shadow: 0 10px 40px rgba(0,0,0,.5);
  --shadow-lift: 0 18px 60px rgba(0,0,0,.65);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  font-family: 'Instrument Sans', -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .35s var(--ease), color .35s var(--ease);
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
img { display: block; }

#phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  height: 100dvh;
  background: var(--bg);
  overflow: hidden;
  transition: background .35s var(--ease);
}
@media (min-width: 520px) {
  #phone {
    height: min(94vh, 900px);
    border: 1px solid var(--line);
    border-radius: 32px;
    box-shadow: var(--shadow);
  }
}

/* ---------- screens ---------- */
.screen {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  opacity: 0; pointer-events: none;
  transform: translateY(10px);
  transition: opacity .4s var(--ease), transform .4s var(--ease);
  background: var(--bg);
}
.screen.active { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- shared ---------- */
.btn {
  width: 100%;
  padding: 16px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .18s var(--ease), opacity .18s, background .3s;
}
.btn:active { transform: scale(.975); }
.btn-primary { background: var(--ink); color: var(--ink-text); }
.btn-primary:disabled { opacity: .3; cursor: default; }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.text-btn { font-size: 14px; font-weight: 500; color: var(--text2); padding: 8px; }
.text-btn.dim { font-size: 13px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; flex: none;
}
.icon-btn svg, .action-btn svg, .nav-item svg, .search-bar svg {
  width: 22px; height: 22px; fill: none;
  stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon-btn.overlay {
  background: rgba(255,255,255,.85); color: #111;
  backdrop-filter: blur(8px);
}

.micro-label {
  font-size: 11px; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text2);
}
.section-title { font-size: 17px; font-weight: 600; letter-spacing: -.01em; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 9px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 13.5px; font-weight: 500;
  transition: all .2s var(--ease);
}
.chip:active { transform: scale(.96); }
.chip.selected { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }

.match-pill {
  display: inline-flex; align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.92);
  color: #111;
  font-size: 12px; font-weight: 600; letter-spacing: .02em;
  backdrop-filter: blur(8px);
}

/* ---------- welcome ---------- */
.welcome-inner {
  flex: 1; display: flex; flex-direction: column;
  padding: 40px 28px calc(36px + env(safe-area-inset-bottom));
}
.welcome-center { flex: 1; display: flex; flex-direction: column; justify-content: center; text-align: center; }
.wordmark {
  font-size: 44px; font-weight: 600;
  letter-spacing: .38em; text-indent: .38em;
  animation: rise .8s var(--ease) both;
}
.tagline {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: 22px;
  margin-top: 14px;
  color: var(--text);
  animation: rise .8s .12s var(--ease) both;
}
.welcome-sub {
  font-size: 15px; line-height: 1.55; color: var(--text2);
  max-width: 280px; margin: 22px auto 0;
  animation: rise .8s .24s var(--ease) both;
}
.welcome-actions { display: flex; flex-direction: column; gap: 10px; animation: rise .8s .36s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- onboarding ---------- */
.ob-header {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px 8px;
}
.ob-progress { flex: 1; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.ob-progress-fill { height: 100%; width: 50%; background: var(--ink); border-radius: 2px; transition: width .45s var(--ease); }
.ob-step { flex: 1; overflow-y: auto; padding: 22px 24px 12px; }
.ob-title { font-size: 27px; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.ob-sub { font-size: 14px; color: var(--text2); margin: 10px 0 24px; line-height: 1.5; }
.ob-footer { padding: 12px 24px calc(24px + env(safe-area-inset-bottom)); }

.goal-list { display: flex; flex-direction: column; gap: 10px; }
.goal-item {
  text-align: left;
  padding: 17px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 15px; font-weight: 500;
  display: flex; justify-content: space-between; align-items: center;
  transition: all .22s var(--ease);
}
.goal-item::after {
  content: '';
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--line);
  transition: all .22s var(--ease);
}
.goal-item.selected { border-color: var(--ink); }
.goal-item.selected::after { background: var(--ink); border-color: var(--ink); box-shadow: inset 0 0 0 3.5px var(--card); }

.style-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.style-grid.compact .style-tile { aspect-ratio: 1 / 1; border-radius: 14px; }
.style-grid.compact .st-label { font-size: 13px; left: 11px; bottom: 10px; }
.ob-none { margin-top: 14px; }
.ob-group { margin: 18px 0 10px; }
.ob-group:first-of-type { margin-top: 4px; }

.color-chip { display: inline-flex; align-items: center; gap: 8px; }
.color-chip .dot {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.14);
}
.color-chip.selected .dot { box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }

.ob-slider { padding: 26px 4px 0; }
.ob-slider input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 2px; border-radius: 2px;
  background: var(--line); outline: none;
}
.ob-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--ink); border: 4px solid var(--bg);
  box-shadow: var(--shadow); cursor: pointer;
}
.ob-slider-labels {
  display: flex; justify-content: space-between;
  margin-top: 14px; font-size: 13px; font-weight: 500; color: var(--text2);
}
.ob-slider-hint {
  margin-top: 22px; text-align: center;
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  font-size: 16px; color: var(--text2);
}

.ob-input { margin-top: 4px; }
.ob-inspo-hit {
  margin-top: 14px; font-size: 14px; color: var(--text2);
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  min-height: 20px;
}

.ob-done {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 10px; padding: 34vh 20px 0;
  animation: rise .6s var(--ease) both;
}
.style-tile {
  position: relative;
  border-radius: 16px; overflow: hidden;
  aspect-ratio: 4 / 5;
  border: none; padding: 0;
  transition: transform .22s var(--ease);
}
.style-tile:active { transform: scale(.97); }
.style-tile img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.85); }
.style-tile .st-label {
  position: absolute; left: 12px; bottom: 12px;
  color: #fff; font-size: 14px; font-weight: 600; letter-spacing: .02em;
  text-shadow: 0 1px 12px rgba(0,0,0,.5);
}
.style-tile::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,.45));
  z-index: 1;
}
.style-tile .st-check {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  background: #fff; color: #111;
  display: grid; place-items: center;
  opacity: 0; transform: scale(.6);
  transition: all .25s var(--ease);
}
.style-tile .st-check svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.style-tile.selected { outline: 2px solid var(--ink); outline-offset: 2px; }
.style-tile.selected .st-check { opacity: 1; transform: scale(1); }

/* ---------- app frame ---------- */
#screen-app { display: flex; flex-direction: column; }
.tab-view {
  position: absolute; inset: 0 0 64px 0;
  display: flex; flex-direction: column;
  overflow-y: auto;
  padding: 0 20px;
  animation: tabIn .35s var(--ease);
  scrollbar-width: none;
}
.tab-view::-webkit-scrollbar { display: none; }
@keyframes tabIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  padding: 26px 0 16px; flex: none;
}
.page-header.col { flex-direction: column; align-items: stretch; gap: 16px; }
.page-title { font-size: 26px; font-weight: 600; letter-spacing: -.02em; }
.page-sub { font-size: 14px; color: var(--text2); margin-top: 3px; }

.seg {
  display: flex; background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px;
}
.seg-btn {
  padding: 6px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; color: var(--text2);
  transition: all .25s var(--ease);
}
.seg-btn.active { background: var(--ink); color: var(--ink-text); }

/* ---------- discover: deck ---------- */
.discover-cards { flex: 1; display: flex; flex-direction: column; min-height: 0; padding-bottom: 14px; }
.deck { position: relative; flex: 1; min-height: 0; }
.swipe-card {
  position: absolute; inset: 0;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
  touch-action: none;
  will-change: transform;
}
.swipe-card.behind-1 { transform: scale(.955) translateY(14px); filter: brightness(.985); }
.swipe-card.behind-2 { transform: scale(.91) translateY(28px); opacity: .6; }
.swipe-card.behind-1, .swipe-card.behind-2 { transition: transform .4s var(--ease), opacity .4s; pointer-events: none; }
.swipe-card.flying { transition: transform .45s var(--ease), opacity .4s; }

.sc-imgwrap { position: relative; flex: 1; min-height: 0; background: var(--line); }
.sc-imgwrap img { width: 100%; height: 100%; object-fit: cover; }
.sc-imgwrap .match-pill { position: absolute; top: 14px; right: 14px; }
.sc-stamp {
  position: absolute; top: 22px;
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 15px; font-weight: 700; letter-spacing: .18em;
  border: 2.5px solid;
  opacity: 0;
  background: rgba(255,255,255,.9);
  backdrop-filter: blur(6px);
}
.sc-stamp.like { left: 18px; color: #111; border-color: #111; transform: rotate(-9deg); }
.sc-stamp.pass { right: 18px; color: #8a8a8a; border-color: #8a8a8a; transform: rotate(9deg); }

.sc-info { padding: 15px 18px 17px; flex: none; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.sc-brand { font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text2); }
.sc-name {
  font-size: 16.5px; font-weight: 600; letter-spacing: -.01em; margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sc-price { font-size: 15.5px; font-weight: 600; white-space: nowrap; }

.deck-actions {
  display: flex; align-items: center; justify-content: center; gap: 18px;
  padding: 18px 0 4px; flex: none;
}
.action-btn {
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line);
  display: grid; place-items: center;
  box-shadow: var(--shadow);
  transition: transform .18s var(--ease);
}
.action-btn:active { transform: scale(.9); }
.action-btn.small { width: 46px; height: 46px; }
.action-btn.small svg { width: 19px; height: 19px; }
.action-btn.like { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.action-btn.saved-active svg { fill: currentColor; }

.deck-empty {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 30px;
}

/* ---------- discover: feed ---------- */
.discover-feed { flex: 1; padding-bottom: 20px; }
.feed-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 16px;
  animation: rise .5s var(--ease) both;
}
.feed-card .fc-imgwrap { position: relative; aspect-ratio: 4 / 4.4; background: var(--line); }
.feed-card img { width: 100%; height: 100%; object-fit: cover; }
.feed-card .match-pill { position: absolute; top: 12px; right: 12px; }
.fc-body { padding: 14px 16px 16px; }
.fc-why { font-size: 13px; color: var(--text2); margin-top: 8px; line-height: 1.45; font-style: italic; font-family: 'Instrument Serif', Georgia, serif; font-size: 14.5px; }

/* ---------- search ---------- */
.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px 15px;
  transition: border-color .25s;
}
.search-bar:focus-within { border-color: var(--text2); }
.search-bar svg { width: 18px; height: 18px; color: var(--text2); flex: none; }
.search-bar input {
  flex: 1; border: none; outline: none; background: none;
  font: inherit; font-size: 15px; color: var(--text);
}
.search-bar input::placeholder { color: var(--text2); }
.search-suggestions { padding: 6px 0; display: flex; flex-direction: column; gap: 12px; }
.search-results { padding-bottom: 24px; }
.search-results .section-title { margin: 10px 0 14px; }
#search-understood { animation: rise .4s var(--ease); }

.search-note {
  margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--text2);
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  animation: rise .35s var(--ease);
}

/* søkefiltre */
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 14px 0 4px; }
.filter-toggle {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  padding: 9px 15px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--card); font-size: 13.5px; font-weight: 600;
  transition: all .2s var(--ease);
}
.filter-toggle svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.filter-toggle.open { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }
.active-filters { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.active-filter { background: var(--ink); color: var(--ink-text); border-color: var(--ink); font-size: 12.5px; padding: 7px 12px; }
.active-filter .x { opacity: .6; margin-left: 3px; }
.filter-panel {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 4px 16px 16px; margin: 10px 0 4px;
  animation: rise .3s var(--ease);
}
.filter-panel .chip { font-size: 12.5px; padding: 8px 13px; }

.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.result-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px; overflow: hidden;
  text-align: left; padding: 0;
  animation: rise .5s var(--ease) both;
  transition: transform .2s var(--ease);
}
.result-card:active { transform: scale(.97); }
.result-card .rc-imgwrap { position: relative; aspect-ratio: 3 / 3.6; background: var(--line); }
.result-card img { width: 100%; height: 100%; object-fit: cover; }
.result-card .match-pill { position: absolute; top: 9px; right: 9px; padding: 4px 9px; font-size: 11px; }
.rc-body { padding: 11px 13px 13px; }
.rc-brand { font-size: 10px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text2); }
.rc-name {
  font-size: 13.5px; font-weight: 600; margin-top: 3px; letter-spacing: -.01em; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.rc-price { font-size: 13px; font-weight: 600; margin-top: 5px; }

/* ---------- antrekk ---------- */
#outfit-list { padding-bottom: 24px; }
.outfit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  overflow: hidden; margin-bottom: 18px;
  animation: rise .5s var(--ease) both;
}
.outfit-head { padding: 16px 18px 12px; }
.outfit-navn { font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.outfit-sub {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  font-size: 14.5px; color: var(--text2); margin-top: 3px;
}
.outfit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.outfit-grid.deler-3 .outfit-item:first-child { grid-column: 1 / -1; aspect-ratio: 2 / 1.4; }
.outfit-item {
  position: relative; padding: 0; border: none; overflow: hidden;
  aspect-ratio: 1 / 1.15; background: var(--line); cursor: pointer;
}
.outfit-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.outfit-item:active img { transform: scale(1.04); }
.oi-label {
  position: absolute; left: 8px; bottom: 8px;
  background: rgba(255,255,255,.92); color: #111;
  padding: 4px 9px; border-radius: 99px;
  font-size: 10.5px; font-weight: 600;
  max-width: calc(100% - 16px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.outfit-foot {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 13px 16px;
}
.outfit-foot span { font-size: 13px; color: var(--text2); }
.outfit-foot b { font-size: 15px; font-weight: 600; }

/* søkehistorikk */
.chip.historikk .x { opacity: .5; margin-left: 4px; padding: 2px 4px; }
#sok-historikk { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }

/* ---------- saved ---------- */
#saved-sections { padding-bottom: 24px; }
#saved-sections .section-title { margin: 8px 0 12px; }
#saved-sections .result-grid { margin-bottom: 20px; }

/* ---------- profile ---------- */
.card-block {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 22px;
}
#tab-profile .section-title { margin-bottom: 12px; }
.style-bar-row { display: grid; grid-template-columns: 96px 1fr 38px; align-items: center; gap: 12px; padding: 8px 0; }
.style-bar-row span { font-size: 14px; font-weight: 500; }
.style-bar-row b { font-size: 13px; font-weight: 600; text-align: right; color: var(--text2); }
.bar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); border-radius: 4px; transition: width .9s var(--ease); }

.learn-state b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.learn-state p { font-size: 13.5px; color: var(--text2); margin: 8px 0 14px; line-height: 1.55; }
.learn-bar { height: 6px; }

.pref-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.pref-row:last-child { border-bottom: none; }
.pref-row span { font-size: 14px; color: var(--text2); flex: none; }
.pref-row b { font-size: 14px; font-weight: 500; text-align: right; line-height: 1.45; }

.profile-actions { display: flex; flex-direction: column; gap: 16px; }
.theme-row { display: flex; justify-content: space-between; align-items: center; font-size: 14.5px; font-weight: 500; padding: 2px 4px; }
.profile-foot {
  text-align: center; padding: 30px 0 24px;
  font-size: 12px; letter-spacing: .1em; color: var(--text2);
}

/* ---------- bottom nav ---------- */
.bottomnav {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(64px + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.nav-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text2);
  transition: color .25s;
}
.nav-item svg { width: 21px; height: 21px; }
.nav-item span { font-size: 10px; font-weight: 600; letter-spacing: .04em; }
.nav-item.active { color: var(--text); }

/* ---------- sheets ---------- */
.sheet {
  position: absolute; inset: 0; z-index: 20;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.sheet::before {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,.35);
  opacity: 0; transition: opacity .35s;
}
.sheet.open::before { opacity: 1; }

.detail-sheet { justify-content: stretch; }
.detail-scroll {
  position: relative;
  background: var(--bg);
  height: 100%;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .45s var(--ease);
  scrollbar-width: none;
}
.detail-scroll::-webkit-scrollbar { display: none; }
.sheet.open .detail-scroll { transform: none; }

.detail-hero { position: relative; aspect-ratio: 4 / 4.6; background: var(--line); }
.detail-hero img { width: 100%; height: 100%; object-fit: cover; }
.detail-hero .icon-btn { position: absolute; top: 16px; right: 16px; }
.detail-body { padding: 22px 24px calc(30px + env(safe-area-inset-bottom)); }
.d-brand { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text2); }
.d-name { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-top: 5px; }
.d-price { font-size: 18px; font-weight: 600; margin-top: 8px; }

.d-attrs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.d-attr {
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px;
  font-size: 12.5px; color: var(--text2);
}
.d-attr b { color: var(--text); font-weight: 600; margin-left: 4px; }

.d-sizes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.size-chip {
  min-width: 44px; padding: 10px 8px; text-align: center;
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--card);
  font-size: 13px; font-weight: 600;
  transition: all .2s var(--ease);
}
.size-chip.selected { background: var(--ink); color: var(--ink-text); border-color: var(--ink); }

.match-block {
  margin-top: 26px; padding: 18px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
}
.match-head { display: flex; justify-content: space-between; align-items: center; }
.match-big { font-size: 30px; font-weight: 600; letter-spacing: -.02em; }
.match-why {
  margin-top: 10px; font-size: 15px; line-height: 1.5; color: var(--text2);
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
}

.insights { margin-top: 26px; }
.insight-row { display: grid; grid-template-columns: 92px 1fr 52px; align-items: center; gap: 14px; padding: 9px 0; }
.insight-row span { font-size: 13.5px; color: var(--text2); }
.insight-row b { font-size: 13px; font-weight: 600; text-align: right; }
.insights .micro-label { margin-bottom: 8px; }

.detail-cta { display: flex; gap: 10px; margin-top: 28px; }
.detail-cta .btn-primary { flex: 2.2; }
.detail-cta .btn-ghost { flex: 1; }

/* feedback bottom sheet */
.feedback-inner {
  position: relative;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  padding: 12px 22px calc(24px + env(safe-area-inset-bottom));
  transform: translateY(100%);
  transition: transform .4s var(--ease);
  border-top: 1px solid var(--line);
}
.sheet.open .feedback-inner { transform: none; }
.grabber { width: 36px; height: 4px; border-radius: 4px; background: var(--line); margin: 0 auto 16px; }
.fb-title { font-size: 18px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 14px; }
.feedback-inner .text-btn { display: block; margin: 14px auto 0; }

/* ---------- misc ---------- */
.empty-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; gap: 8px; padding: 40px 30px 90px;
}
.empty-title {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic;
  font-size: 22px;
}
.empty-sub { font-size: 14px; color: var(--text2); line-height: 1.5; max-width: 240px; }

#toast {
  position: absolute; left: 50%; bottom: 92px; z-index: 40;
  transform: translateX(-50%) translateY(8px);
  background: var(--ink); color: var(--ink-text);
  padding: 11px 20px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  white-space: nowrap;
  opacity: 0; pointer-events: none;
  transition: opacity .3s, transform .3s var(--ease);
  box-shadow: var(--shadow-lift);
}
#toast.show { opacity: 1; transform: translateX(-50%); }

.img-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  background: linear-gradient(160deg, var(--line), var(--card));
  color: var(--text2);
  font-family: 'Instrument Serif', Georgia, serif;
  font-size: 42px; font-style: italic;
}

.ai-note {
  margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--text2);
}

/* fjern-kryss på lagrede kort */
.rc-remove {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--card) 88%, transparent);
  backdrop-filter: blur(6px); cursor: pointer;
  border: 1px solid var(--line);
  transition: transform .15s var(--ease);
}
.rc-remove:hover { transform: scale(1.08); }
.rc-remove svg {
  width: 13px; height: 13px; fill: none;
  stroke: var(--text); stroke-width: 2; stroke-linecap: round;
}

/* gjestebanner — diskret stripe øverst, i appens tone */
#gjest-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; font-size: 12.5px;
  background: var(--card); border-bottom: 1px solid var(--line);
  color: var(--text2);
}
#gjest-banner span { flex: 1; }
#gjest-banner .text-btn { font-size: 12.5px; }
#gjest-banner #gjest-lag { color: var(--text); font-weight: 600; }

/* merke over sveipebunken når man sveiper et søk */
#sok-sveip-merke {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 10px; padding: 8px 14px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  font-size: 12.5px; color: var(--text2);
}
#sok-sveip-merke .text-btn { font-weight: 600; color: var(--text); }

/* bla i kategori-fliser */
#bla-kategorier { margin-bottom: 18px; }

/* duell — parvis smakslæring */
#duell-valg { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.duell-kort {
  display: flex; flex-direction: column; gap: 6px;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 10px; cursor: pointer; text-align: left;
  transition: transform .18s var(--ease), border-color .18s;
}
.duell-kort:hover { transform: translateY(-2px); border-color: var(--text2); }
.duell-kort img, .duell-kort .img-fallback {
  width: 100%; aspect-ratio: 3/4; object-fit: cover; border-radius: 10px;
}
.dk-navn { font-size: 12.5px; font-weight: 600; }
.dk-pris { font-size: 12px; color: var(--text2); }

/* overrask meg-knappen i utforsk */
#btn-overrask svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }

/* det PICKED har lært — kontrollpanel */
#laert-panel { margin: 18px 0; }
#laert-panel .pref-gruppe { font-size: 12px; color: var(--text2); margin: 12px 0 6px; }
#laert-panel .chip i { font-style: normal; color: var(--text2); font-size: 11px; }
#laert-panel .chip .x { margin-left: 5px; color: var(--text2); }
.chip.laert-pos { border-color: var(--text); }
.chip.laert-neg { opacity: .65; text-decoration: line-through; }
