.taste-summary {
  font-size: 12px;
  color: #90789f;
  margin-top: 10px;
}
.taste-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 850px;
  margin: auto;
}
.taste-group {
  background: linear-gradient(130deg, #fff, #fcf9ff);
  border: 1px solid #ece3f2;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 5px 24px #66378d05;
}
.taste-group summary {
  cursor: pointer;
  padding: 18px 22px;
  color: #65417e;
  font-weight: 500;
}
.taste-group summary span {
  float: right;
  font-size: 12px;
  color: #a38bb2;
}
.taste-group > ul,
.taste-group > .taste-row-head {
  margin: 0 14px 14px;
}
.taste-list ul,
.taste-search-results {
  list-style: none;
  padding: 0;
}
.taste-row ul {
  padding-left: 18px;
  border-left: 1px solid #e6d7ef;
  margin-left: 12px;
}
.taste-row-head {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 7px 10px;
  border-radius: 12px;
  margin: 4px 0;
  background: #f8f4fc;
  min-height: 42px;
}
.taste-pick {
  text-align: left;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.taste-pick:hover {
  color: #8142b3;
}
.taste-row-head.selected {
  background: linear-gradient(120deg, #9b65d3, #793daf);
  color: white;
}
.taste-row-head.selected .taste-pick:hover {
  color: white;
}
.taste-expand {
  width: 32px;
  min-width: 32px;
  height: 30px;
  font-size: 19px;
  color: inherit;
}
.taste-badge {
  font-size: 10px;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 30px;
  background: #fff9;
  color: #76518e;
}
.taste-row-head.selected .taste-badge {
  color: #69408c;
}
.learned-positive:not(.selected) {
  background: #f0e3fb;
  color: #72399f;
}
.learned-negative:not(.selected) {
  background: #fff5f4;
  color: #9a575d;
  border: 1px dashed #d4acb0;
}
.learned-muted:not(.selected) {
  color: #968ba0;
  background: #f5f3f7;
}
.taste-more {
  font-size: 12px;
  color: #8d58b2;
  padding: 12px 20px;
}
.taste-search-results {
  max-width: 850px;
  margin: auto;
}
.adaptive-map .map-canvas,
.adaptive-map .map-lines {
  width: 2000px;
  height: 2000px;
  overflow: visible;
}
.adaptive-map .node {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 46px;
  padding: 9px 12px;
  font-size: 12px;
}
.adaptive-map .node .expand {
  margin: 0;
  padding: 0 0 0 8px;
  min-width: 25px;
}
.adaptive-map .node .taste-pick {
  white-space: nowrap;
}
.map-signal {
  padding: 4px 7px;
  border-radius: 20px;
  color: inherit;
  font-size: 15px;
}
.map-all {
  position: absolute;
  left: 14px;
  bottom: 18px;
  font-size: 11px;
  color: #8b5ba8;
  background: #fff;
  padding: 10px 14px;
  border-radius: 22px;
  box-shadow: 0 4px 15px #6532840b;
}
.taste-evidence {
  list-style: none;
  padding: 0;
  max-height: 280px;
  overflow: auto;
}
.taste-evidence li {
  font-size: 13px;
  padding: 12px 0;
  border-bottom: 1px solid #eee3f4;
}
.taste-evidence span {
  display: block;
  font-size: 11px;
  color: #997eaa;
  margin-top: 5px;
}
.taste-corrections {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 20px;
}
.taste-corrections button {
  padding: 12px 8px;
  border-radius: 22px;
  background: #f2e8fb;
  color: #8150a4;
  font-size: 12px;
}
.review-clear {
  font-size: 11px;
  color: #9d85ac;
  padding: 0;
  margin-top: -12px;
}
.review-hint-label {
  font-size: 10px !important;
  line-height: 1.6 !important;
  margin-top: 14px;
}
.hint-ignored {
  opacity: 0.5;
  text-decoration: line-through;
}
.pill.learned-negative {
  background: #fff5f4;
  color: #9a575d;
  border: 1px dashed #d4acb0;
}
.taste-group:focus-within {
  border-color: #cab0df;
}
@media (max-width: 650px) {
  .taste-group summary {
    padding: 16px;
  }
  .taste-row-head {
    gap: 4px;
    padding: 6px;
  }
  .taste-row ul {
    padding-left: 8px;
    margin-left: 7px;
  }
  .taste-badge {
    font-size: 9px;
    padding: 4px 6px;
  }
  .taste-pick {
    font-size: 12px;
  }
  .taste-row ul .taste-row ul .taste-row ul {
    margin-left: 0;
    padding-left: 4px;
  }
  .taste-group > ul {
    margin: 0 9px 9px;
  }
}
/* Edge-to-edge spatial canvas; controls float above the web. */
#screen.taste-screen {
  max-width: none;
}
#screen.taste-spatial {
  position: fixed;
  inset: 0;
  padding: 0;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 45%, #f5edff 0%, #fff 68%);
  animation: none;
}
body:has(.taste-spatial) header {
  position: relative;
  z-index: 3;
  background: transparent;
  pointer-events: none;
}
body:has(.taste-spatial) header button {
  pointer-events: auto;
}
.taste-spatial .intro,
.taste-spatial .map-footer {
  display: none;
}
.taste-spatial .map-toolbar {
  position: absolute;
  z-index: 2;
  top: 88px;
  left: 50%;
  transform: translateX(-50%);
  width: min(680px, calc(100% - 40px));
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}
.taste-spatial .search {
  flex: 1;
  min-width: 0;
  width: auto;
  background: #ffffffd9;
  border: 0;
  box-shadow: 0 8px 32px #6d388010;
  backdrop-filter: blur(16px);
  border-radius: 30px;
}
.taste-spatial .view-toggle {
  flex-shrink: 0;
  background: #ffffffd9;
  border: 0;
  box-shadow: 0 8px 32px #6d388010;
  backdrop-filter: blur(16px);
}
.taste-spatial .map-help {
  background: #ffffffd9;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}
.taste-spatial #map-body {
  position: absolute;
  inset: 0;
}
.taste-spatial .map-wrap {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  cursor: grab;
  touch-action: none;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
}
.taste-spatial .map-wrap.is-panning {
  cursor: grabbing;
}
.taste-spatial .map-canvas {
  will-change: transform;
}
.taste-spatial .map-tools {
  bottom: 110px;
  right: 24px;
  border: 0;
  background: #ffffffd9;
  backdrop-filter: blur(16px);
  box-shadow: 0 8px 35px #673d8712;
}
.taste-spatial .map-all {
  bottom: 115px;
  left: 24px;
}
.taste-spatial .node {
  border-color: #e7d9f3;
  box-shadow: 0 8px 30px #69388b12;
  background: #ffffffed;
}
.taste-spatial .node.selected {
  background: linear-gradient(120deg, #ad79df, #7941b5);
  border-color: transparent;
  box-shadow: 0 8px 26px #8d50c52b;
}
.taste-spatial .node.learned-positive:not(.selected) {
  background: #eee1fa;
}
.taste-spatial .node.learned-negative:not(.selected) {
  background: #fff5f4;
}
.taste-spatial .map-lines line {
  stroke: #bda0d4;
  stroke-opacity: 0.6;
}
@media (max-width: 650px) {
  .taste-spatial .map-toolbar {
    top: 72px;
    width: calc(100% - 32px);
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
  }
  .taste-spatial .search {
    flex-basis: calc(100% - 48px);
    order: 0;
  }
  .taste-spatial .map-help {
    order: 1;
  }
  .taste-spatial .view-toggle {
    order: 2;
  }
  .taste-spatial .map-tools {
    bottom: 100px;
    right: 16px;
  }
  .taste-spatial .map-all {
    bottom: 105px;
    left: 16px;
  }
}
.taste-spatial .map-breadcrumb {
  position: absolute;
  top: 155px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: 90%;
  font-size: 11px;
  color: #8e6ca4;
  white-space: nowrap;
}
.map-breadcrumb span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.map-breadcrumb button {
  flex-shrink: 0;
  color: #734896;
}
.map-paging {
  position: absolute;
  left: 20px;
  bottom: 108px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.map-paging button {
  font-size: 11px;
  padding: 9px 14px;
  background: #fffffff0;
  border-radius: 20px;
  color: #82559c;
  box-shadow: 0 4px 20px #7139970b;
}
.taste-spatial .map-tools {
  bottom: 72px;
}
@media (max-width: 650px) {
  .taste-spatial .map-breadcrumb {
    top: 180px;
  }
  .map-paging {
    bottom: 156px;
    left: 16px;
  }
  .taste-spatial .map-tools {
    bottom: 100px;
  }
}

.taste-corrections .taste-never {
  grid-column: 1/-1;
  background: #fbe9f0;
  color: #a3305d;
}
.taste-corrections .taste-never[aria-pressed='true'] {
  background: #f2e8fb;
  color: #8150a4;
}
