/* Things I Like — blue theme matching the navy logo header. Red (--danger) is kept for deleting and errors. */
:root {
  --ink: #1d1d1f; --muted: #6b6f76; --line: #e3e5e8; --soft: #f1f2f4;
  --accent: #1f5aa6; --accent-dark: #143f7a; --accent-soft: #e7eef9;  /* blue, from the logo's navy */
  --danger: #c8102e; --danger-dark: #9e0c24; --danger-soft: #fbe8eb;
  --own: #1f6b4f; --own-soft: #e1f2ea;
  font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color: var(--ink); background: #fff; font-size: 16px; line-height: 1.5;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }
a, button, input, select, textarea, summary { touch-action: manipulation; }
:is(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
p { margin: 0 0 16px; }
.muted { color: var(--muted); }

/* Header */
/* Height follows the image's own shape so the whole picture shows; very wide or narrow screens crop slightly. */
.hero { height: clamp(210px, 27vw, 430px); background: #14152a url("banner.jpg") 60% 58% / cover no-repeat; position: relative; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8,10,30,.45), rgba(8,10,30,0) 45%); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; max-width: 1092px; height: 100%; margin: auto; padding: clamp(22px, 3.2vw, 56px) 24px 0; display: flex; align-items: flex-start; }
.hero-title { color: #fff; text-decoration: none; text-transform: uppercase; font-weight: 600; font-size: clamp(30px, 3.8vw, 60px); letter-spacing: .24em; line-height: 1; text-shadow: 0 2px 6px rgba(0,0,0,.5), 0 2px 24px rgba(0,0,0,.45); }

main { max-width: 1092px; margin: auto; padding: 0 24px 64px; min-height: 60vh; }
footer { border-top: 1px solid var(--line); padding: 22px; text-align: center; color: var(--muted); font-size: 13px; }
footer a { color: var(--accent); }

/* Tabs and toolbar */
.categories { display: flex; gap: 26px; border-bottom: 1px solid var(--line); overflow-x: auto; margin-top: 12px; }
.categories a { padding: 14px 0 12px; text-decoration: none; white-space: nowrap; border-bottom: 2px solid transparent; font-size: 17px; }
.categories a.active { color: var(--accent); border-color: var(--accent); }
.categories a.manage { margin-left: auto; color: var(--accent); font-size: 14px; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 18px 0 22px; }
.segmented { display: flex; }
.segmented a { padding: 7px 21px; text-decoration: none; border: 1px solid var(--line); margin-left: -1px; font-size: 15px; }
.segmented a:first-child { margin-left: 0; border-radius: 3px 0 0 3px; }
.segmented a:last-child { border-radius: 0 3px 3px 0; }
.segmented a.selected { position: relative; color: var(--accent); background: var(--accent-soft); border-color: var(--accent); }
.button, .button-outline { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 7px 18px; border-radius: 3px; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.button { background: var(--accent); color: #fff; border: 1px solid var(--accent); font-weight: 600; min-height: 44px; }
.button:hover { background: var(--accent-dark); }
.button-outline { color: var(--accent); background: #fff; border: 1px solid var(--accent); }
.button-outline:hover { background: var(--accent-soft); }

.filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; margin-bottom: 22px; }
.filters label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 400; margin: 0; }
.filters select, .filters input { width: auto; min-width: 120px; height: 38px; padding: 6px 10px; font-size: 14px; color: var(--ink); }
.filters input[type=number] { width: 150px; }
.reset { color: var(--accent); font-size: 14px; align-self: center; margin-left: 6px; }
.list-meta { display: flex; justify-content: space-between; gap: 16px; font-size: 13px; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.notice { background: var(--own-soft); color: var(--own); padding: 10px 16px; border-radius: 3px; margin: 16px 0 0; }

/* Ranked list */
.group-title { font-weight: 300; font-size: 26px; margin: 38px 0 0; }
.group-title a { text-decoration: none; }
.group-title a:hover { color: var(--accent); }
.item-list { list-style: none; margin: 0; padding: 0; }
.item-row { display: grid; grid-template-columns: 52px minmax(0, 425px) minmax(0, 1fr); gap: 20px; padding: 26px 0; border-bottom: 1px solid var(--line); background: #fff; scroll-margin-top: 16px; }
.item-row.dragging { opacity: .45; }
.item-row:target { animation: flash 1.6s ease-out; }
@keyframes flash { from { background: var(--accent-soft); } to { background: #fff; } }
.rank-col { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.rank-num { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-size: 54px; line-height: 1; }
.drag-handle { cursor: grab; fill: #8b9098; padding: 4px; }
.drag-handle:active { cursor: grabbing; }
.arrows { display: flex; gap: 4px; }
.arrows form { margin: 0; }
.arrows button { background: none; border: 0; color: #8b9098; font-size: 15px; padding: 2px 4px; cursor: pointer; }
.arrows button:hover { color: var(--accent); }
.arrow-gap { width: 20px; }

.photo { aspect-ratio: 425 / 458; border: 1px solid var(--line); background: #fff; overflow: hidden; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.no-photo { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--muted); }
.no-photo small { font-size: 13px; }
.no-photo a { color: var(--accent); font-size: 13px; }
.photo-source { margin: 8px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .03em; }
.photo-source::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 7px; background: currentColor; vertical-align: 1px; }
.source-self { color: var(--own); } .source-stock { color: #2f5f9e; } .source-ai { color: #7a3fa0; } .source-unknown { color: var(--muted); }

.info { min-width: 0; }
.info-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.info h3 { font-size: 22px; font-weight: 600; line-height: 1.25; margin: 4px 0 6px; overflow-wrap: anywhere; }
.price { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.head-actions { display: flex; align-items: center; gap: 14px; padding-top: 2px; flex-shrink: 0; }
.head-actions a { color: var(--accent); font-size: 13px; }
.pill { padding: 6px 18px; border-radius: 20px; font-size: 15px; font-weight: 600; letter-spacing: .02em; background: var(--accent-soft); color: var(--accent); }
.pill.own { background: var(--own-soft); color: var(--own); }
.details { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; margin: 0 0 16px; }
.details div { min-width: 0; }
.details dt { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.details dd { margin: 0; font-size: 15px; overflow-wrap: anywhere; }
.ratings { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rating-tile { background: var(--soft); padding: 12px 14px 14px; min-height: 92px; display: flex; flex-direction: column; justify-content: space-between; }
.rating-label { font-size: 13px; }
.rating-value { display: flex; align-items: baseline; gap: 8px; }
.rating-value strong { font-size: 46px; font-weight: 600; line-height: 1; }
.out-of { color: var(--muted); font-size: 15px; }
.dash { display: inline-block; width: 50px; height: 3px; background: var(--accent); align-self: center; margin-top: 18px; }
.fine-print { font-size: 11px; color: var(--muted); margin: 6px 0 10px; }
.why { background: var(--soft); border-left: 3px solid var(--accent); padding: 10px 14px; margin-bottom: 12px; }
.why h4 { margin: 0 0 2px; font-size: 14px; font-weight: 600; }
.why p { margin: 0; font-size: 14px; white-space: pre-line; overflow-wrap: anywhere; }
.ai-menu { position: relative; display: inline-block; }
.ai-menu summary { list-style: none; font-size: 13px; min-height: 30px; padding: 4px 12px; }
.ai-menu summary::-webkit-details-marker { display: none; }
.caret { font-size: 11px; margin-left: 4px; }
.ai-menu .menu { position: absolute; z-index: 5; top: calc(100% + 4px); left: 0; min-width: 190px; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px 0; }
.ai-menu .menu a { display: block; padding: 8px 14px; text-decoration: none; font-size: 14px; }
.ai-menu .menu a:hover { background: var(--accent-soft); color: var(--accent); }
.insights { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; }
.insights li { border: 1px solid var(--line); padding: 10px 14px; font-size: 14px; }
.insight-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.insight-score { color: var(--accent); font-weight: 600; }
.insight-head .muted { font-size: 12px; }
.remove-link { margin-left: auto; font-size: 12px; color: var(--muted); }
.insight-text { margin: 0; color: #3a3d42; overflow-wrap: anywhere; }
.insight-text summary { cursor: pointer; list-style: none; }
.insight-text summary::-webkit-details-marker { display: none; }
.insight-text[open] summary { display: none; }
.more { color: var(--accent); white-space: nowrap; }
.item-links { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; font-size: 13px; }
.danger { color: var(--danger) !important; }

.empty { text-align: center; border: 1px dashed #c9ccd1; padding: 55px 24px; margin-top: 26px; }
.empty-icon { display: inline-grid; place-items: center; width: 54px; height: 54px; background: var(--accent-soft); color: var(--accent); border-radius: 50%; font-size: 28px; }
.empty h2 { font-weight: 300; font-size: 28px; margin: 18px 0 10px; }
.empty p { color: var(--muted); max-width: 470px; margin: 0 auto 22px; }
.text-link { color: var(--accent); font-weight: 600; }

/* Forms and secondary pages */
.form-wrap { max-width: 760px; margin: auto; padding-top: 36px; }
.back { display: inline-block; text-decoration: none; margin-bottom: 22px; color: var(--muted); font-size: 14px; }
.back:hover { color: var(--accent); }
.eyebrow { font-size: 12px; letter-spacing: .14em; font-weight: 600; margin: 0 0 8px; color: var(--accent); }
h1 { font-weight: 300; font-size: 40px; line-height: 1.15; margin: 0 0 10px; overflow-wrap: anywhere; }
.item-form { border: 1px solid var(--line); padding: 28px; margin-top: 24px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.item-form > .fields + .fields { margin-top: 20px; }
.field { min-width: 0; }
.wide { grid-column: 1 / -1; }
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.optional { color: var(--muted); font-weight: 400; margin-left: 8px; font-size: 13px; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; border: 1px solid #c4c8ce; border-radius: 3px; padding: 10px; background: #fff; color: var(--ink); }
input[type=file] { font-size: 14px; }
textarea { resize: vertical; }
small { color: var(--muted); font-size: 13px; }
.field > a { overflow-wrap: anywhere; }
.form-actions { display: flex; align-items: center; gap: 22px; margin-top: 26px; }
.form-actions > a { color: var(--muted); }
.push-right { margin-left: auto; }
.danger-button { background: var(--danger); border-color: var(--danger); }
.danger-button:hover { background: var(--danger-dark); }
.errorlist { color: var(--danger); padding-left: 20px; font-size: 14px; margin: 6px 0 0; }
.detail-fields { border: 1px solid var(--line); padding: 16px 20px 20px; margin: 22px 0; min-width: 0; }
.detail-fields[hidden] { display: none; }
.detail-fields legend { font-weight: 600; padding: 0 6px; font-size: 14px; }
.small { font-size: 13px; }
.detail-row { display: flex; gap: 14px; align-items: flex-end; margin-top: 14px; flex-wrap: wrap; }
.detail-row .field { flex: 1 1 150px; }
.detail-row .grow { flex: 2 1 240px; }
.remove { display: flex; align-items: center; gap: 6px; font-weight: 400; padding-bottom: 12px; }
.steps { padding-left: 20px; color: var(--muted); margin: 14px 0 20px; }
.prompt-box { background: var(--soft); border-left: 3px solid var(--accent); padding: 14px 16px; }
.prompt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.prompt-box textarea { background: #fff; font-size: 14px; }
.small-button { min-height: 30px; padding: 3px 12px; font-size: 13px; }

.heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 36px 0 26px; }
.heading p:last-child { margin: 0; }
.category-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.category-list li { display: flex; justify-content: space-between; align-items: center; gap: 20px; border: 1px solid var(--line); padding: 16px 20px; }
.category-list h2 { font-weight: 400; font-size: 22px; margin: 0 0 2px; }
.category-list p { margin: 0; }
.links { display: flex; gap: 16px; flex-wrap: wrap; }
.links a { color: var(--accent); }

/* Tablet and phone */
@media (max-width: 860px) {
  .item-row { grid-template-columns: 44px minmax(0, 1fr); }
  .info { grid-column: 2; }
  .photo { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .hero { height: 200px; background-position: 62% 60%; }
  .hero-inner { padding: 22px 18px 0; }
  .hero-title { font-size: 30px; letter-spacing: .2em; }
  main { padding: 0 16px 40px; }
  .categories { gap: 20px; }
  .categories a { font-size: 16px; }
  .toolbar { flex-wrap: wrap; }
  .filters label { flex: 1 1 140px; }
  .filters select, .filters input, .filters input[type=number] { width: 100%; min-width: 0; }
  .item-row { grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
  .rank-num { font-size: 40px; }
  .rating-value strong { font-size: 36px; }
  h1 { font-size: 32px; }
  .fields { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .item-form { padding: 18px; }
  .heading { flex-direction: column; align-items: flex-start; }
  .category-list li { flex-direction: column; align-items: flex-start; }
}

/* Add a category: AI import */
.ai-import { background: var(--soft); border-left: 3px solid var(--accent); padding: 18px 20px; margin-top: 24px; }
.ai-import h2 { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.ai-import textarea { background: #fff; }
.ai-import .form-actions { margin-top: 12px; }
.ai-import .notice, .ai-import .errorlist { margin: 12px 0 0; }
.ai-import .errorlist { padding: 0; list-style: none; }
.prompt-details { margin-top: 14px; }
.prompt-details summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.prompt-details .prompt-box { padding: 0; border: 0; background: none; }
.or-divider { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 13px; margin: 26px 0 0; }
.or-divider::before, .or-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.item-form.highlight { border-color: var(--accent); }
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px 16px; }
.checkbox-grid label { display: flex; align-items: center; gap: 8px; font-weight: 400; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { background: #fff; padding: 1px 5px; border: 1px solid var(--line); font-size: 13px; }
.import-items { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 8px; }
.import-items li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; border: 1px solid var(--line); padding: 10px 12px; background: #fff; }
.import-check { display: flex; align-items: center; gap: 8px; margin: 0; }
.import-rank { font-family: Georgia, serif; font-style: italic; font-size: 24px; line-height: 1; min-width: 22px; }
.import-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.import-items select { width: auto; padding: 5px 8px; font-size: 14px; }
.organize-actions { flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.model-pick { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 400; color: var(--muted); margin: 0; }
.model-pick select { width: auto; min-width: 280px; max-width: 100%; height: 44px; font-size: 14px; color: var(--ink); }
@media (max-width: 560px) { .model-pick, .model-pick select { width: 100%; min-width: 0; } }

/* ---- Category editor (v2) ---- */
.cat-page h1 { margin-bottom: 6px; }
.ai-import { background: #fff; border: 1px solid var(--line); border-left: 3px solid var(--accent); padding: 0; margin-top: 24px; }
.ai-import > summary { list-style: none; cursor: pointer; display: flex; gap: 14px; align-items: center; padding: 16px 18px; }
.ai-import > summary::-webkit-details-marker { display: none; }
.ai-import > summary > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.ai-import > summary::after { content: "⌄"; margin-left: auto; color: var(--muted); transition: transform .15s; }
.ai-import[open] > summary::after { transform: rotate(180deg); }
.ai-badge { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .05em; }
.ai-import-body { padding: 0 18px 18px; }
.ai-import-body textarea { background: #fff; }
.organize-actions { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-top: 12px; }
.error-note { color: var(--danger-dark); background: var(--danger-soft); padding: 8px 12px; font-size: 14px; margin: 12px 0 0; }

.cat-form { margin-top: 24px; }
.cat-section { border-top: 1px solid var(--line); padding: 22px 0 6px; }
.cat-section:first-child { border-top: 0; padding-top: 4px; }
.section-label { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.section-head p { margin: -4px 0 12px; }
.name-row { display: flex; gap: 10px; }
.name-row input { font-size: 18px; padding: 10px 12px; }
.name-row .button-outline { min-height: 46px; }

.dp-list { display: grid; gap: 8px; margin-top: 8px; }
.dp-row { border: 1px solid var(--line); background: #fff; padding: 10px 12px; }
.dp-row:focus-within { border-color: #b9bdc4; }
.dp-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.dp-main .dp-label { flex: 1 1 180px; width: auto; min-width: 0; font-weight: 600; border-color: transparent; background: var(--soft); }
.dp-main .dp-label:focus { background: #fff; border-color: #c4c8ce; }
.dp-kinds { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.dp-kinds > div { display: contents; }
.seg { position: relative; margin: 0; font-weight: 400; font-size: 13px; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 7px 12px; color: var(--muted); border-left: 1px solid var(--line); }
.seg:first-child span { border-left: 0; }
.seg input:checked + span { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: -2px; }
.dp-filter { display: inline-flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 400; color: var(--muted); cursor: pointer; }
.dp-remove { width: 32px; height: 32px; border: 0; background: none; color: #9aa0a8; font-size: 22px; line-height: 1; cursor: pointer; border-radius: 50%; }
.dp-remove:hover { background: var(--danger-soft); color: var(--danger); }
.dp-delete { display: none; }
.dp-extra { display: none; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding-left: 2px; }
.dp-row.is-list .dp-extra-list, .dp-row.is-number .dp-extra-number { display: flex; }
.dp-extra-label { font-size: 12px; color: var(--muted); font-weight: 600; margin: 0; min-width: 52px; }
.dp-extra .dp-unit { width: 110px; padding: 6px 10px; }
.dp-extra .dp-options { flex: 1; }
.chips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 36px; padding: 4px 6px; border: 1px dashed #c9ccd1; cursor: text; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 14px; padding: 2px 4px 2px 10px; font-size: 13px; }
.chip button { border: 0; background: none; color: var(--muted); font-size: 15px; line-height: 1; cursor: pointer; padding: 0 4px; border-radius: 50%; }
.chip button:hover { color: var(--accent); }
.chip-input { border: 0 !important; padding: 4px !important; width: auto !important; flex: 1 1 160px; min-width: 120px; font-size: 13px; background: transparent !important; }
.chip-input:focus { outline: none; }
.dp-removed-note { display: none; font-size: 13px; color: var(--muted); }
.dp-row.is-removed { background: var(--soft); border-style: dashed; padding: 8px 12px; }
.dp-row.is-removed > :not(.dp-removed-note):not(input) { display: none !important; }
.dp-row.is-removed .dp-removed-note { display: block; }
.dp-undo { border: 0; background: none; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0 4px; }
.add-dp { margin-top: 10px; width: 100%; padding: 11px; border: 1px dashed #c4c8ce; background: #fff; color: var(--accent); font-size: 14px; cursor: pointer; }
.add-dp:hover { background: var(--accent-soft); border-color: var(--accent); }

.dp-price { border-color: var(--line); background: #fff; }
.dp-price .dp-main { gap: 16px; }
.dp-price-name { font-weight: 600; }
.dp-fixed-type { font-size: 13px; color: var(--muted); }
.dp-currency { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.dp-currency select { width: auto; padding: 6px 8px; font-size: 14px; }
.dp-price.is-off .dp-fixed-type, .dp-price.is-off .dp-currency { opacity: .4; }
.switch { display: inline-flex; align-items: center; gap: 10px; margin: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch-ui { width: 36px; height: 20px; border-radius: 10px; background: #c9ccd1; position: relative; transition: background .15s; flex: none; }
.switch-ui::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked + .switch-ui { background: var(--accent); }
.switch input:checked + .switch-ui::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-ui { outline: 2px solid var(--accent); outline-offset: 2px; }

.more-settings { margin: 22px 0 0; border-top: 1px solid var(--line); padding-top: 14px; }
.more-settings summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.more-settings .field { max-width: 200px; margin-top: 12px; }
.cat-form .form-actions { border-top: 1px solid var(--line); padding-top: 22px; }
.cat-form .import-items { margin-top: 4px; }

/* Item form: price + currency, add-new list options */
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 10px; }
.price-row .field label { visibility: visible; }
.new-option-wrap { margin-top: 8px; }
.new-option-wrap[hidden] { display: none; }

@media (max-width: 560px) {
  .name-row { flex-direction: column; }
  .dp-main .dp-label { flex-basis: 100%; }
  .dp-currency { margin-left: 0; }
  .dp-remove { margin-left: auto; }
}
[hidden] { display: none !important; }

/* ---- Import ---- */
.lead { font-size: 17px; }
.import-link { display: flex; align-items: center; gap: 14px; margin-top: 22px; padding: 14px 18px; border: 1px solid var(--line); border-left: 3px solid var(--accent); text-decoration: none; background: #fff; }
.import-link:hover { background: var(--accent-soft); }
.import-link > span:nth-child(2) { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.import-link > span:last-child { color: var(--accent); font-size: 20px; }
.how-to { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 18px; }
.how-to li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
.how-to p { margin: 2px 0 8px; }
.step { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px; }
.import-form { margin-top: 26px; }
.import-form textarea#text { min-height: 220px; }
.import-options { margin-top: 18px; }
.import-form .organize-actions { margin-top: 18px; }
.no-key { margin-top: 18px; }
.tips { margin-top: 34px; border-top: 1px solid var(--line); padding-top: 18px; }
.tips h2 { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.tips ul { padding-left: 18px; color: var(--muted); font-size: 14px; display: grid; gap: 6px; margin: 0; }
.tips strong { color: var(--ink); font-weight: 600; }
.review-items { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; }
.review-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: start; border: 1px solid var(--line); padding: 12px 14px; background: #fff; }
.review-item.is-match { border-left: 3px solid var(--own); }
.review-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; }
.review-body p { margin: 4px 0 0; }
.review-item select { width: auto; padding: 5px 8px; font-size: 14px; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); }
.tag-match { background: var(--own-soft); color: var(--own); text-transform: none; letter-spacing: 0; }
.you-said, .ai-said, .conv-line { font-size: 14px; overflow-wrap: anywhere; }
.you-said span, .ai-said span, .conv-line span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; font-weight: 700; color: var(--muted); margin-bottom: 1px; }
.ai-said { border-left: 2px solid var(--accent); padding-left: 10px; margin-top: 8px !important; }
.ai-said span { color: var(--accent); }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.conversations { margin: 18px 0 4px; border: 1px solid var(--line); background: #fff; padding: 12px 16px; }
.conversations > summary { cursor: pointer; list-style: none; }
.conversations > summary::-webkit-details-marker { display: none; }
.conversations .section-label { display: inline; margin: 0; }
.conversation-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 12px; }
.conversation-list li { border-top: 1px solid var(--line); padding-top: 12px; scroll-margin-top: 16px; }
.conv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.conv-line { margin: 8px 0 0; }
.conv-text { margin-top: 8px; font-size: 13px; }
.conv-text summary { cursor: pointer; color: var(--accent); }
.conv-full { margin-top: 8px; padding: 10px 12px; background: var(--soft); max-height: 360px; overflow: auto; font-size: 13px; color: #3a3d42; }
.insight-rank { font-size: 12px; font-weight: 600; color: var(--ink); background: var(--soft); padding: 0 6px; }
.insight-conv { font-size: 12px; color: var(--muted); }
@media (max-width: 560px) { .review-item { grid-template-columns: auto minmax(0, 1fr); } .review-item select { grid-column: 2; justify-self: start; } .toolbar-actions { justify-content: flex-start; } }
/* Several conversations per import */
.conv-boxes { display: grid; gap: 12px; }
.conv-box { border: 1px solid var(--line); background: #fff; padding: 10px 12px 12px; }
.conv-box-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.conv-num { font-weight: 600; font-size: 14px; }
.conv-from { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 0 auto; font-size: 13px; font-weight: 400; color: var(--muted); }
.conv-from select { width: auto; padding: 5px 8px; font-size: 14px; }
.conv-box textarea { min-height: 150px; }
.conv-add-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.conv-add-row .add-dp { margin: 0; }
.drop-zone { display: grid; place-items: center; text-align: center; padding: 11px; border: 1px dashed #c4c8ce; color: var(--muted); font-size: 13px; }
.drop-zone.is-over { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.conv-review + .conv-review { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px; }
@media (max-width: 560px) { .conv-add-row { grid-template-columns: 1fr; } }
.text-action { align-self: center; color: var(--muted); font-size: 14px; } .text-action:hover { color: var(--accent); }
/* Photos */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.photo-tile { border: 1px solid var(--line); padding: 8px; display: grid; gap: 6px; background: #fff; }
.photo-tile img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.photo-tile select { padding: 5px 6px; font-size: 13px; }
.photo-tile.is-removed img { opacity: .3; }
.main-pick { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 13px; margin: 0; }
.photo-tile .remove { padding: 0; font-size: 13px; }
.new-photos { display: grid; gap: 8px; }
.new-photos label[for=new_photos] { margin: 0; }
.new-photos-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.new-photos-row select { width: auto; }
.thumbs { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.thumb { width: 56px; height: 56px; padding: 0; border: 2px solid transparent; background: none; cursor: pointer; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb.is-active { border-color: var(--accent); }
.link-row { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.dp-builtin .dp-main { gap: 16px; min-height: 30px; padding-left: 46px; }
.ai-tips { padding-left: 18px; margin: 10px 0 0; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.ai-tips strong { color: var(--ink); font-weight: 600; }
.estimate-pick { display: flex; align-items: center; gap: 8px; font-weight: 400; font-size: 14px; margin: 16px 0 0; }
.who-said { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; background: var(--accent-soft); padding: 10px 14px; margin-top: 16px; }
.who-said label { margin: 0; }
.who-said select { width: auto; }

.how-to .ai-tips li { display: list-item; }
.main-pick input { margin: 0; }
/* Rate and write on the card */
.my-rating { margin: 0; }
.my-rating .rating-label { display: flex; justify-content: space-between; align-items: center; }
.clear-rating { border: 0; background: none; color: var(--muted); font-size: 12px; cursor: pointer; padding: 0; text-decoration: underline; }
.stars { position: relative; display: inline-block; font-size: 24px; line-height: 1; letter-spacing: 2px; margin-top: 6px; user-select: none; }
.stars-bg { color: #d3d6db; }
.stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; white-space: nowrap; color: var(--accent); pointer-events: none; transition: width .08s; }
.star-hit { position: absolute; top: 0; width: 10%; height: 100%; border: 0; padding: 0; background: transparent; cursor: pointer; }
.star-hit:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.why-form { display: block; }
.why-form label { display: block; margin: 0 0 4px; font-size: 14px; font-weight: 600; }
.why-form textarea { width: 100%; border: 0 !important; background: transparent !important; padding: 0 !important; font-size: 14px; resize: none; overflow: hidden; min-height: 22px; color: var(--ink); }
.why-form textarea:focus { outline: none; }
.why-form:focus-within { background: #fff; box-shadow: 0 0 0 1px var(--line) inset; }
.why-actions { display: flex; align-items: center; gap: 10px; min-height: 0; }
.why-actions:has(button:not([hidden])), .why-actions:has(.save-state:not(:empty)) { margin-top: 6px; }
.save-state { font-size: 12px; color: var(--own); }
.stars { align-self: flex-start; width: max-content; }
/* Want / Own / Maybe / Nope */
.pill.maybe { background: #fdf1d8; color: #8a5a00; }
.pill.nope { background: #eceef1; color: #5f6672; }
.status-menu { position: relative; }
.status-menu > summary { list-style: none; cursor: pointer; display: inline-block; }
.status-menu > summary::-webkit-details-marker { display: none; }
.status-menu > summary::after { content: " ▾"; font-size: 11px; opacity: .7; }
.status-options { position: absolute; right: 0; top: calc(100% + 6px); z-index: 6; background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 8px; display: grid; gap: 6px; min-width: 130px; }
.status-options .pill { border: 0; cursor: pointer; text-align: left; font-family: inherit; }
.status-options .pill.is-current { outline: 2px solid currentColor; outline-offset: -2px; }
.segmented a.seg-maybe.selected { color: #8a5a00; background: #fdf1d8; border-color: #e3b04b; }
.segmented a.seg-nope.selected { color: #5f6672; background: #eceef1; border-color: #9aa0a8; }
.segmented a.seg-own.selected { color: var(--own); background: var(--own-soft); border-color: var(--own); }
/* Owned items: first, tinted, not ranked */
.owned-head { display: flex; align-items: baseline; gap: 12px; margin-top: 22px; }
.owned-head .section-label { margin: 0; }
.ranked-head { margin-top: 30px; }
.owned-list { list-style: none; }
.item-row.is-owned { background: #f2f8f4; padding-left: 14px; padding-right: 14px; border-bottom-color: #dcebe1; }
.item-row.is-owned + .item-row.is-owned { border-top: 0; }
.item-row.is-owned .rating-tile, .item-row.is-owned .why { background: #e6f1ea; }
@media (max-width: 560px) { .segmented { width: 100%; } .segmented a { flex: 1; text-align: center; padding: 8px 4px; font-size: 14px; } }
/* Login / user */
.hero-inner { justify-content: space-between; }
.user-menu { display: flex; align-items: center; gap: 12px; color: #fff; font-size: 14px; text-shadow: 0 1px 6px rgba(0,0,0,.6); margin: 4px 0 0; }
.user-menu button { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.55); border-radius: 3px; padding: 4px 12px; cursor: pointer; font-size: 13px; }
.user-menu button:hover { background: rgba(255,255,255,.28); }
.login-wrap { max-width: 440px; }
.login-form .field + .field { margin-top: 16px; }
@media (max-width: 560px) { .user-menu span { display: none; } }
.photos-link { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--accent); }
.photos-link + .thumbs { margin-top: 6px; }
.error-note p { margin: 0; }
/* Drag-and-drop photos */
.drop-area { border: 2px dashed #c4c8ce; padding: 22px; text-align: center; display: grid; gap: 8px; justify-items: center; background: #fafbfc; }
.drop-area.is-over { border-color: var(--accent); background: var(--accent-soft); }
.drop-area.is-full { opacity: .5; pointer-events: none; }
.drop-area strong { font-size: 16px; }
.drop-hint { max-width: 460px; }
.pending-grid { margin-top: 14px; }
.pending-grid:empty { display: none; }
.photo-tile.is-new { border-color: var(--accent); }
.file-name { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remove-new { border: 0; background: none; color: var(--danger); font-size: 13px; cursor: pointer; text-align: left; padding: 0; text-decoration: underline; }
select.needs-choice { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft); }
.new-photos:not(.is-enhanced) .drop-area { border-style: solid; }
/* Add photos to this list */
.bulk-page { max-width: 1092px; margin: auto; padding-top: 36px; }
.bulk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 18px 0; }
.bulk-row { border: 1px solid var(--line); background: #fff; padding: 12px 14px; margin-bottom: 10px; transition: background .1s; }
.bulk-row.is-target { background: var(--accent-soft); border-color: var(--accent); }
.bulk-row.is-over-limit { border-color: var(--danger); }
.bulk-row.is-over-limit .bulk-count { color: var(--danger); font-weight: 600; }
.bulk-tray { background: #fafbfc; border-style: dashed; }
.bulk-row-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.small-pill { font-size: 11px; padding: 1px 10px; }
.bulk-cards { display: flex; flex-wrap: wrap; gap: 10px; min-height: 60px; align-items: flex-start; }
.bulk-card { width: 170px; border: 1px solid var(--accent); background: #fff; padding: 6px; display: grid; gap: 5px; cursor: grab; }
.bulk-card.dragging { opacity: .4; }
.bulk-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; pointer-events: none; }
.bulk-card select { padding: 4px 6px; font-size: 12px; }
.bulk-card.is-removed { border-style: dashed; border-color: #c4c8ce; opacity: .55; }
.bulk-card.is-removed select { display: none; }
.ai-match { font-size: 11px; color: var(--muted); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ai-match.ai-high { color: var(--own); }
.ai-match.ai-low { color: #8a5a00; }
.bulk-existing { width: 60px; height: 60px; opacity: .7; }
.bulk-existing img { width: 100%; height: 100%; object-fit: cover; display: block; }
.link-button { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 15px; }
@media (max-width: 560px) { .bulk-card { width: calc(50% - 5px); } }

/* Add from link (list page) and "Fill in from link" (item form) */
.link-add { display: flex; gap: 8px; margin: -8px 0 22px; }
.link-add input { flex: 1; min-width: 0; }
.link-row { display: flex; gap: 8px; }
.link-row input { flex: 1; min-width: 0; }
.link-row .button-outline { min-height: 0; }
.link-status { margin: 8px 0 0; padding: 9px 12px; border-radius: 3px; background: #eef6ee; color: #1f5130; font-size: 14px; }
.link-status.is-error { background: var(--danger-soft); color: var(--danger-dark); }
.link-photo { display: flex; gap: 14px; align-items: center; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 3px; }
.link-photo[hidden] { display: none; }
.link-photo img { width: 96px; height: 96px; object-fit: contain; background: var(--soft); border-radius: 3px; }
.link-photo-text { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.link-photo-text .text-action { align-self: flex-start; margin: 0; min-height: 0; width: auto; text-align: left; padding: 0; background: none; border: 0; color: var(--accent); cursor: pointer; font-size: 14px; }
@keyframes filled-flash { from { background: #fff4c2; } to { background: transparent; } }
.field.is-filled { animation: filled-flash 2.4s ease-out; border-radius: 3px; }
@media (max-width: 560px) { .link-add, .link-row { flex-direction: column; } }

/* "+ Add item" menu and the "Start from a link / photo" panels */
.add-menu { position: relative; display: inline-block; }
.add-menu > summary { list-style: none; font-weight: 700; }
.add-menu > summary::-webkit-details-marker { display: none; }
.add-menu-list { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 6px; }
.add-menu-list a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 3px; text-decoration: none; color: var(--ink); }
.add-menu-list a:hover, .add-menu-list a:focus-visible { background: var(--accent-soft); }
.add-menu-list strong { color: var(--accent); font-size: 15px; }
.add-menu-list span { font-size: 13px; color: var(--muted); }
.empty .add-menu-list { left: 50%; right: auto; transform: translateX(-50%); text-align: left; }
.start-panel { border: 1px solid var(--accent); background: #fffafa; border-radius: 4px; padding: 16px 18px 18px; margin-bottom: 22px; }
.start-panel h2 { margin: 0 0 10px; font-size: 18px; }
.start-panel .fields { margin: 0; }
.start-drop.is-busy { opacity: .6; pointer-events: none; }
.kept-source select { font-size: 14px; padding: 4px 8px; }
@media (max-width: 560px) { .add-menu-list { right: auto; left: 0; width: min(300px, calc(100vw - 32px)); } }
.item-form > .link-photo { margin: 0 0 22px; }

/* Category bar: view switch and "+ Add category" */
.categories { align-items: center; }
.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; padding: 6px 0; flex-shrink: 0; }
.nav-actions .button { padding: 7px 18px; border-bottom: 1px solid var(--accent); font-size: 15px; font-weight: 700; color: #fff; }
.view-switch { display: flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.view-switch a { display: flex; align-items: center; justify-content: center; width: 40px; height: 38px; padding: 0; border: 0; color: var(--muted); }
.view-switch a + a { border-left: 1px solid var(--line); }
.view-switch a svg { fill: currentColor; }
.view-switch a:hover { color: var(--accent); }
.view-switch a.is-on { background: var(--accent-soft); color: var(--accent); }

/* Grid view: first item top left, then left to right */
.item-grid { list-style: none; margin: 18px 0 28px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 22px 18px; }
.grid-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: visible; }
.grid-card.is-owned { background: #f2f8f4; border-color: #dcebe1; }
.grid-card.dragging { opacity: .45; }
.card-photo { position: relative; aspect-ratio: 1; background: var(--soft); border-radius: 4px 4px 0 0; overflow: hidden; }
.card-photo > a { display: block; height: 100%; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo .no-photo { font-size: 15px; }
.card-rank { position: absolute; top: 8px; left: 8px; min-width: 32px; height: 32px; padding: 0 8px; display: flex; align-items: center; justify-content: center; border-radius: 16px; background: rgba(255,255,255,.92); font-family: Georgia, serif; font-style: italic; font-size: 19px; box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.card-drag { position: absolute; top: 8px; right: 8px; width: 28px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 4px; background: rgba(255,255,255,.92); cursor: grab; fill: var(--muted); }
.card-source { position: absolute; left: 8px; bottom: 8px; padding: 3px 9px; border-radius: 12px; background: rgba(255,255,255,.92); font-size: 11px; font-weight: 600; }
.card-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 14px; flex: 1; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.card-head h3 { margin: 0; font-size: 16px; line-height: 1.3; }
.card-head h3 a { color: inherit; text-decoration: none; }
.card-head h3 a:hover { color: var(--accent); }
.card-head .pill { padding: 3px 11px; font-size: 13px; white-space: nowrap; }
.card-head .status-menu { flex-shrink: 0; }
.grid-card .price { margin: 0; font-size: 14px; }
.card-details { margin: 0; display: flex; flex-wrap: wrap; gap: 4px 6px; font-size: 13px; color: var(--muted); }
.card-details span + span::before { content: "·"; margin-right: 6px; }
.card-ratings { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 4px; }
.card-my-rating { display: flex; align-items: center; gap: 8px; }
.card-my-rating .stars { font-size: 19px; margin: 0; }
.card-score { font-size: 14px; }
.card-my-rating .clear-rating { font-size: 12px; }
.card-ai { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--soft); padding: 3px 8px; border-radius: 10px; white-space: nowrap; }
.card-move { display: flex; gap: 6px; }
.card-move form { margin: 0; }
.card-move button { border: 1px solid var(--line); background: #fff; border-radius: 3px; width: 34px; height: 28px; cursor: pointer; color: var(--muted); }
.card-move button:hover { color: var(--accent); border-color: var(--accent); }
@media (max-width: 560px) {
  .item-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .card-body { padding: 10px; }
  .card-head { flex-direction: column; }
  .card-my-rating .stars { font-size: 16px; letter-spacing: 0; }
  .card-ratings { flex-wrap: wrap; }
  .nav-actions .button { padding: 7px 12px; }
  .view-switch a { width: 36px; }
}

/* Grid view uses the whole width of the window, with bigger cards */
.is-wide main, .is-wide .hero-inner { max-width: none; padding-left: clamp(16px, 3vw, 56px); padding-right: clamp(16px, 3vw, 56px); }
.is-wide .item-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 28px 24px; }
.is-wide .card-body { padding: 16px 18px 18px; gap: 8px; }
.is-wide .card-head h3 { font-size: 18px; }
.is-wide .grid-card .price { font-size: 16px; }
.is-wide .card-details { font-size: 14px; }
.is-wide .card-my-rating .stars { font-size: 22px; }
.is-wide .card-rank { min-width: 38px; height: 38px; font-size: 22px; border-radius: 19px; }
@media (max-width: 560px) { .is-wide .item-grid { grid-template-columns: 1fr 1fr; gap: 12px; } .is-wide .card-body { padding: 10px; } .is-wide .card-head h3 { font-size: 15px; } .is-wide .card-my-rating .stars { font-size: 16px; } }

/* Grid cards, round 2: bigger, a bolder rank, labelled ratings, one text style */
.is-wide .item-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 30px 26px; }
.card-rank, .is-wide .card-rank { top: 10px; left: 10px; min-width: 46px; height: 46px; padding: 0 10px; border-radius: 23px; background: var(--accent); color: #fff; font-family: inherit; font-style: normal; font-weight: 800; font-size: 22px; box-shadow: 0 2px 8px rgba(0,0,0,.3); border: 2px solid #fff; }
.grid-card .card-body, .is-wide .card-body { gap: 8px; padding: 16px 18px 18px; color: #3a3d42; font-size: 15px; }
.card-head h3, .is-wide .card-head h3 { font-size: 17px; font-weight: 700; color: var(--ink); }
.grid-card .price, .is-wide .grid-card .price, .card-details, .is-wide .card-details { font-size: 15px; color: #3a3d42; }
.card-ratings { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 8px; border-top: 1px solid var(--line); margin-top: auto; }
.card-rating-row { display: flex; align-items: center; gap: 10px; margin: 0; }
.card-rating-label { width: 92px; flex-shrink: 0; font-size: 15px; color: #3a3d42; }
.card-rating-row .stars, .is-wide .card-rating-row .stars { font-size: 20px; margin: 0; letter-spacing: 1px; }
.card-rating-row:not(form) .stars-fill { color: #6b6f76; }
.card-score { font-size: 15px; font-weight: 700; color: var(--ink); min-width: 26px; }
.card-rating-row .clear-rating { font-size: 13px; margin-left: auto; }
.grid-card.is-owned .card-ratings { border-top-color: #dcebe1; }
@media (max-width: 560px) {
  .card-rank, .is-wide .card-rank { min-width: 34px; height: 34px; font-size: 17px; top: 6px; left: 6px; }
  .grid-card .card-body, .is-wide .card-body { padding: 10px; font-size: 13px; }
  .card-head h3, .is-wide .card-head h3 { font-size: 15px; }
  .grid-card .price, .card-details, .card-rating-label, .card-score { font-size: 13px; }
  .card-rating-row { flex-wrap: wrap; gap: 2px 8px; }
  .card-rating-label { width: 100%; }
  .card-rating-row .stars, .is-wide .card-rating-row .stars { font-size: 16px; }
}
@media (max-width: 560px) { .is-wide .item-grid { grid-template-columns: 1fr 1fr; gap: 12px; } }

/* Logo header: navy bar with the blue logo (default); .is-white = the earlier white bar (HEADER_STYLE=white).
   The photo banner (.hero) stays for HEADER_STYLE=photo. */
:root { --brand-navy: #0d1f3b; }
.site-header { background: var(--brand-navy); border-bottom: 3px solid #c9a24b; }
.site-header.is-white { background: #fff; border-bottom: 1px solid var(--line); }
.site-header-inner { max-width: 1092px; margin: auto; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.site-logo { display: block; line-height: 0; }
.site-logo img { height: clamp(64px, 7vw, 110px); width: auto; display: block;
  /* soften the picture's edges so its navy background melts into the bar */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent), linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent), linear-gradient(to bottom, transparent, #000 8%, #000 92%, transparent); mask-composite: intersect; }
.site-header.is-white .site-logo img { mix-blend-mode: multiply; -webkit-mask-image: none; mask-image: none; }  /* the white logo’s near-white background melts into the bar */
.site-header .user-menu { color: rgba(255,255,255,.8); text-shadow: none; margin: 0; }
.site-header .user-menu button { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); padding: 6px 14px; }
.site-header .user-menu button:hover { background: rgba(255,255,255,.12); border-color: #fff; }
.site-header.is-white .user-menu { color: var(--muted); }
.site-header.is-white .user-menu button { background: #fff; color: var(--ink); border-color: var(--line); }
.site-header.is-white .user-menu button:hover { background: var(--soft); }
.is-wide .site-header-inner { max-width: none; padding-left: clamp(16px, 3vw, 56px); padding-right: clamp(16px, 3vw, 56px); }
@media (max-width: 560px) { .site-header-inner { padding: 10px 16px; } .site-logo img { height: 54px; } }

/* Pros and Cons on the list */
.pros-cons { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.pros-cons .why { margin: 0; }
.pros-cons .why-cons { border-left-color: #6b6f76; }
@media (max-width: 560px) { .pros-cons { grid-template-columns: 1fr; } }
.you-said.is-con { border-left-color: #6b6f76; }

/* Table view: like a spreadsheet; every cell can be edited */
.sheet-wrap { overflow-x: auto; margin: 18px 0 8px; border: 1px solid #c9ccd1; border-radius: 3px; background: #fff; }
.sheet { border-collapse: collapse; width: 100%; font-size: 14px; }
.sheet th, .sheet td { border: 1px solid #dfe1e5; padding: 0; vertical-align: top; position: relative; }
.sheet thead th { background: #f3f4f6; color: #3a3d42; font-weight: 600; font-size: 13px; text-align: left; padding: 8px 10px; white-space: nowrap; position: sticky; top: 0; z-index: 2; border-bottom: 2px solid #c9ccd1; }
.sheet tr > :first-child { border-left: 0; } .sheet tr > :last-child { border-right: 0; }
.sheet tbody tr:hover td { background: #fafbfc; }
.sheet tr.is-owned td { background: #f2f8f4; }
.sheet tbody.sheet-owned tr:last-child td { border-bottom: 2px solid #b9d6c4; }
.sheet input, .sheet select, .sheet textarea { display: block; width: 100%; min-width: 0; height: auto; min-height: 36px; border: 0; border-radius: 0; background: transparent; padding: 8px 10px; font: inherit; color: var(--ink); box-shadow: none; }
.sheet textarea { resize: none; overflow: hidden; line-height: 1.4; }
.sheet select { padding-right: 24px; cursor: pointer; }
.sheet input:focus, .sheet select:focus, .sheet textarea:focus { outline: 2px solid var(--accent); outline-offset: -2px; background: #fff; }
.sheet .col-num, .sheet .col-num input { text-align: right; }
.sheet .col-rank { width: 52px; text-align: center; white-space: nowrap; padding: 8px 4px; }
.sheet td.col-rank { display: table-cell; }
.sheet-rank { font-weight: 800; color: var(--accent); font-size: 15px; }
.sheet .col-rank .drag-handle { display: inline-flex; margin-left: 6px; cursor: grab; fill: var(--muted); vertical-align: middle; }
.sheet-owned-mark { font-size: 11px; font-weight: 700; color: var(--own); text-transform: uppercase; letter-spacing: .05em; }
.sheet .col-name { min-width: 220px; } .sheet td.col-name input { font-weight: 600; }
.sheet td:not(.col-rank):not(.col-name):not(.col-long):not(.col-link):not(.col-photos):not(.col-edit) { min-width: 96px; }
.sheet .col-long { min-width: 220px; }
.sheet .col-link { min-width: 200px; }
.sheet-link { display: flex; align-items: flex-start; }
.sheet-link a { padding: 8px 10px 0 2px; text-decoration: none; color: var(--accent); }
.sheet-link a[hidden] { display: none; }
.sheet .sheet-readonly { padding: 8px 10px; color: var(--muted); background: #fafafa; }
.sheet .col-photos { white-space: nowrap; }
.sheet-photos { display: flex; align-items: center; gap: 4px; padding: 6px 8px; }
.photo-icon { display: inline-flex; padding: 3px; border-radius: 3px; }
.photo-icon:hover { background: var(--soft); }
.photo-add { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 1px dashed #b9bdc4; border-radius: 3px; color: var(--muted); text-decoration: none; font-size: 15px; }
.photo-add:hover { color: var(--accent); border-color: var(--accent); }
.sheet .col-edit { white-space: nowrap; } .sheet td.col-edit a { display: block; padding: 8px 10px; font-size: 13px; color: var(--accent); }
.sheet .is-estimate { color: var(--muted); font-style: italic; }
.sheet td.is-saving { background: #fffbe8 !important; }
@keyframes cell-saved { from { background: #e3f4e8; } to { background: transparent; } }
.sheet td.is-saved { animation: cell-saved 1.4s ease-out; }
.sheet td.is-error { box-shadow: inset 0 0 0 2px var(--danger); }
.cell-error { position: absolute; left: 0; top: 100%; z-index: 5; background: var(--danger); color: #fff; font-size: 12px; padding: 4px 8px; border-radius: 0 0 3px 3px; white-space: nowrap; }
.sheet tr.dragging { opacity: .45; }
.sheet-help { margin-top: 6px; }
/* (the site's form-field style is more specific than ".sheet input", so the cells are targeted this way) */
.sheet td [data-cell] { display: block; width: 100%; min-width: 0; min-height: 38px; border: 0; border-radius: 0; background: transparent; padding: 9px 10px; box-shadow: none; }
.sheet td [data-cell]:focus, .sheet td [data-cell]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; background: #fff; }
.sheet td.col-num [data-cell] { text-align: right; }
.sheet td.col-name [data-cell] { font-weight: 600; }
.sheet td select[data-cell] { padding-right: 22px; }
.sheet td textarea[data-cell] { resize: none; }
.sheet td [data-cell].is-estimate { color: var(--muted); font-style: italic; }

/* Refresh Based on Links */
.refresh-wrap { max-width: 900px; margin: auto; padding-top: 30px; }
.refresh-wrap h1 { margin: 6px 0 8px; }
.refresh-progress { margin: 18px 0; }
.refresh-progress .bar { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.refresh-progress .bar span { display: block; height: 100%; background: var(--accent); transition: width .3s; }
.refresh-progress.is-done .bar span { background: var(--own); }
.refresh-progress p { margin: 8px 0 0; font-size: 14px; }
.refresh-item { border: 1px solid var(--line); border-radius: 4px; padding: 14px 16px; margin-bottom: 12px; background: #fff; }
.refresh-item.is-waiting { opacity: .55; }
.refresh-item.has-changes { border-left: 4px solid var(--accent); }
.refresh-item.is-same { background: #fafbfa; }
.refresh-item.is-error { border-left: 4px solid #b0b4ba; }
.refresh-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.refresh-head h2 { margin: 0; font-size: 17px; }
.refresh-head a { overflow-wrap: anywhere; }
.refresh-body p { margin: 8px 0 0; }
.refresh-error { color: var(--danger-dark); font-size: 14px; }
.refresh-note { font-size: 13px; color: var(--muted); }
.refresh-changes { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.refresh-changes td, .refresh-changes th { padding: 6px 8px; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.refresh-changes th { font-weight: 600; width: 140px; }
.refresh-changes .tick { width: 28px; }
.refresh-changes .tick input { width: 18px; height: 18px; }
.refresh-changes .old { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(0,0,0,.25); }
.refresh-changes .photo-row .old { text-decoration: none; }
.refresh-changes .arrow { width: 24px; color: var(--muted); }
.refresh-changes .new { font-weight: 600; }
.refresh-changes img { width: 72px; height: 72px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); display: block; }
.refresh-actions { position: sticky; bottom: 0; background: #fff; padding: 14px 0; border-top: 1px solid var(--line); align-items: center; }
.refresh-actions .text-action { background: none; border: 0; color: var(--ink); text-decoration: underline; cursor: pointer; }
@media (max-width: 560px) { .refresh-changes th { width: auto; } }
.refresh-changes { table-layout: fixed; }
.refresh-changes .tick { width: 34px; } .refresh-changes th { width: 150px; } .refresh-changes .arrow { width: 30px; }
.refresh-changes .old, .refresh-changes .new { width: auto; overflow-wrap: anywhere; }
@media (max-width: 560px) { .refresh-changes th { width: 90px; } }
.pros-cons .why-notes { grid-column: 1 / -1; border-left-color: #2f5f9e; }

/* Photos open big (lightbox) */
.is-zoomable { cursor: zoom-in; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; display: none; align-items: center; justify-content: center; }
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: rgba(10, 12, 20, .9); }
.lightbox figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: calc(100vw - 140px); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 90px); object-fit: contain; border-radius: 3px; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; }
.lightbox figcaption { color: #fff; font-size: 14px; opacity: .85; }
.lightbox button { position: fixed; border: 0; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; border-radius: 50%; }
.lightbox button:hover { background: rgba(255,255,255,.3); }
.lb-close { top: 18px; right: 18px; width: 44px; height: 44px; font-size: 28px; line-height: 1; }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 34px; line-height: 1; }
.lb-prev { left: 18px; } .lb-next { right: 18px; }
.lightbox button[hidden] { display: none; }
@media (max-width: 560px) { .lightbox figure { max-width: 100vw; } .lb-prev { left: 6px; } .lb-next { right: 6px; } .lb-prev, .lb-next { width: 42px; height: 42px; } }
.item-title { color: inherit; text-decoration: none; } .item-title:hover { color: var(--accent); text-decoration: underline; }
.grid-card .card-body { cursor: pointer; }

/* Item details page */
.detail-wrap { padding-top: 26px; }
.detail-nav { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.detail-steps { display: flex; gap: 18px; } .detail-steps a { color: var(--accent); text-decoration: none; font-size: 15px; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.detail-main { position: relative; display: block; aspect-ratio: 1; background: var(--soft); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.detail-main img { width: 100%; height: 100%; object-fit: contain; background: #fff; display: block; }
.detail-main .card-source { position: absolute; left: 10px; bottom: 10px; }
.detail-empty { display: flex; }
.detail-thumbs { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.detail-thumbs a { width: 72px; height: 72px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.detail-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.detail-photos .text-link { display: inline-block; margin-top: 10px; color: var(--accent); }
.detail-info h1 { margin: 4px 0 12px; font-size: clamp(26px, 3vw, 36px); line-height: 1.15; }
.detail-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.detail-price { font-size: 22px; font-weight: 600; }
.detail-actions { display: flex; gap: 10px; margin: 18px 0; flex-wrap: wrap; }
.detail-ratings { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.detail-ratings > div { background: var(--soft); border-radius: 4px; padding: 12px 14px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 2px 10px; }
.detail-ratings > div > span:first-child { font-size: 14px; color: #3a3d42; }
.detail-ratings strong { font-size: 22px; grid-row: span 2; }
.detail-ratings .stars { font-size: 18px; margin: 0; }
.detail-ratings .stars.ai .stars-fill { color: #6b6f76; }
.detail-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 20px; margin: 0 0 22px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.detail-specs dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.detail-specs dd { margin: 2px 0 0; font-size: 16px; }
.detail-notes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-note { background: var(--soft); border-left: 3px solid var(--accent); padding: 10px 14px; }
.detail-note.note-cons { border-left-color: #6b6f76; } .detail-note.note-notes { grid-column: 1 / -1; border-left-color: #2f5f9e; }
.detail-note h2 { margin: 0 0 4px; font-size: 14px; } .detail-note p { margin: 0; font-size: 15px; }
.detail-insights { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 20px; }
.detail-insights h2 { font-size: 20px; margin: 0 0 12px; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; gap: 22px; } }
@media (max-width: 560px) { .detail-notes, .detail-ratings { grid-template-columns: 1fr; } }
.detail-nav .back { margin-bottom: 0; }

/* Photo sliders (several photos per item): swipe, arrows or dots */
.slider { position: relative; width: 100%; height: 100%; }
.slider-track { display: flex; width: 100%; height: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; overscroll-behavior-x: contain; }
.slider-track::-webkit-scrollbar { display: none; }
.slide { position: relative; flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; display: block; }
.slide img { width: 100%; height: 100%; display: block; }
.photo .slide img, .card-photo .slide img { object-fit: cover; }
.detail-main .slide img { object-fit: contain; background: #fff; }
.slide .card-source { position: absolute; left: 8px; bottom: 8px; }
.slider-prev, .slider-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 36px; height: 36px; border: 0; border-radius: 50%; background: rgba(255,255,255,.9); color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 1px 6px rgba(0,0,0,.25); opacity: 0; transition: opacity .15s; }
.slider-prev { left: 8px; } .slider-next { right: 8px; }
.slider:hover .slider-prev, .slider:hover .slider-next, .slider-prev:focus-visible, .slider-next:focus-visible { opacity: 1; }
@media (hover: none) { .slider-prev, .slider-next { opacity: .85; width: 30px; height: 30px; font-size: 20px; } }
.slider-dots { position: absolute; left: 0; right: 0; bottom: 10px; z-index: 3; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.slider-dots button { pointer-events: auto; width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 0 1px rgba(0,0,0,.25); cursor: pointer; }
.slider-dots button.is-on { background: #fff; transform: scale(1.3); }
.card-photo .slider-dots, .detail-main .slider-dots { bottom: 12px; }
.slide .card-source { bottom: 26px; }
.detail-thumbs .thumb { width: 72px; height: 72px; border-radius: 3px; overflow: hidden; }

/* Topics: the top row of tabs (shared subjects), above the user's collections in that topic */
.topics { display: flex; align-items: center; gap: 30px; border-bottom: 1px solid var(--line); margin-top: 16px; overflow-x: auto; }
.topics a { padding: 12px 0 10px; text-decoration: none; white-space: nowrap; border-bottom: 3px solid transparent; font-size: 19px; font-weight: 700; color: #3a3d42; letter-spacing: .01em; }
.topics a:hover { color: var(--brand-navy, #0d1f3b); }
.topics a.active { color: var(--brand-navy, #0d1f3b); border-color: #c9a24b; }
.topics .nav-actions a { border: 1px solid var(--accent); font-size: 14px; font-weight: 600; padding: 6px 14px; color: var(--accent); }
.topics .nav-actions a.text-action { border: 0; padding: 0; font-weight: 400; color: var(--muted); text-decoration: underline; }
.topics + .categories { margin-top: 0; }
.categories a { font-size: 16px; }
.topic-section .topic-row { display: flex; gap: 10px; flex-wrap: wrap; }
.topic-section select { max-width: 320px; }
.topic-section .new-topic { flex: 1; min-width: 220px; }
.topic-section .new-topic[hidden] { display: none; }
.heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.topic-group { margin-bottom: 30px; }
.topic-group-head { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; margin-bottom: 10px; }
.topic-group-head h2 { margin: 0; font-size: 22px; }
.category-list h3 { font-weight: 400; font-size: 20px; margin: 0 0 2px; }
.row-actions { display: flex; gap: 16px; } .row-actions a { color: var(--accent); }
.link-button { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; text-decoration: underline; }
@media (max-width: 560px) { .topics { gap: 20px; } .topics a { font-size: 17px; } }
.heading-actions { flex-shrink: 0; flex-wrap: nowrap; align-items: center; }
@media (max-width: 560px) {
  .topics { flex-wrap: wrap; overflow: visible; gap: 6px 20px; padding-bottom: 6px; }
  .topics .nav-actions { width: 100%; margin-left: 0; justify-content: flex-start; padding: 2px 0 4px; }
  .heading-actions { flex-wrap: wrap; }
}
/* "+ Add topic" looks exactly like "+ Add collection" (overrides the topic-tab link styles above) */
.topics .nav-actions a.button { padding: 7px 18px; min-height: 44px; border: 1px solid var(--accent); border-bottom-width: 1px; background: var(--accent); color: #fff; font-size: 15px; font-weight: 700; letter-spacing: normal; }
.topics .nav-actions a.button:hover { background: var(--accent-dark); color: #fff; }
.topics .nav-actions a.button, .categories .nav-actions a.button { min-width: 168px; justify-content: center; }
@media (max-width: 560px) { .topics .nav-actions a.button, .categories .nav-actions a.button { min-width: 0; padding: 7px 12px; } }

/* One Rating (and Feedback) per AI instead of a single averaged AI rating */
.ratings { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.rating-tile.is-empty { justify-content: center; }
.ai-feedback { margin: 0 0 12px; display: grid; gap: 8px; }
.ai-feedback-row { background: var(--soft); border-left: 3px solid #6b6f76; padding: 8px 14px; }
.ai-feedback dt { font-size: 14px; font-weight: 600; margin: 0 0 2px; }
.ai-feedback dd { margin: 0; font-size: 14px; overflow-wrap: anywhere; }
.ai-feedback details summary { cursor: pointer; list-style: none; } .ai-feedback details p { margin: 6px 0 0; }
.all-insights { margin-top: 10px; } .all-insights > summary { cursor: pointer; font-size: 14px; color: var(--muted); }
.detail-ratings { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.detail-feedback { display: grid; gap: 12px; margin-top: 22px; }
.detail-note.note-ai { border-left-color: #6b6f76; }
.card-rating-label { width: 128px; }
.rating-tile .stars.ai .stars-fill, .card-rating-row:not(form) .stars-fill { color: #6b6f76; }
.ai-tile .stars { font-size: 18px; margin-top: 4px; }
.detail-insights .all-insights > summary { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; cursor: pointer; }
.detail-insights .all-insights > summary h2 { display: inline; margin: 0; }
.detail-insights .all-insights[open] > summary { margin-bottom: 12px; }
@media (max-width: 560px) { .card-rating-label { width: 100%; } }

/* Table view: # and Name stay put when you scroll sideways (like Excel's freeze panes) */
.sheet .col-rank { position: sticky; left: 0; z-index: 1; width: 56px; min-width: 56px; max-width: 56px; background: #fff; }
.sheet .col-name { position: sticky; left: 56px; z-index: 1; width: 240px; min-width: 240px; max-width: 240px; background: #fff;
  box-shadow: inset -1px 0 0 #c9ccd1, 6px 0 8px -6px rgba(0, 0, 0, .22); }
.sheet thead th.col-rank, .sheet thead th.col-name { z-index: 3; background: #f3f4f6; }  /* the corner stays above everything */
.sheet tbody tr:hover td.col-rank, .sheet tbody tr:hover td.col-name { background: #fafbfc; }
.sheet tr.is-owned td.col-rank, .sheet tr.is-owned td.col-name { background: #f2f8f4; }
.sheet td.col-name [data-cell] { text-overflow: ellipsis; }
.sheet td.col-name [data-cell]:focus { background: #fff; }
@media (max-width: 560px) {
  .sheet .col-rank { width: 44px; min-width: 44px; max-width: 44px; }
  .sheet .col-rank .drag-handle { display: none; }
  .sheet .col-name { left: 44px; width: 132px; min-width: 132px; max-width: 132px; }
  .sheet td.col-name [data-cell] { font-size: 13px; padding: 9px 8px; }
}

/* AI conversation panel (right side, light grey) */
.has-chat:not(.is-wide) main { max-width: 1480px; }
.with-chat { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; align-items: start; }
.main-col { min-width: 0; }
.chat-panel { position: sticky; top: 16px; margin-top: 16px; height: calc(100vh - 32px); display: flex; flex-direction: column; background: #f1f3f6; border: 1px solid #dde1e7; border-radius: 6px; overflow: hidden; }
.chat-panel.is-drop { box-shadow: inset 0 0 0 3px var(--accent); }
.chat-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 14px 16px 8px; }
.chat-head h2 { margin: 0; font-size: 17px; color: var(--brand-navy, #0d1f3b); }
.chat-head p { margin: 2px 0 0; }
.chat-close { display: none; border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.chat-model { display: flex; align-items: center; gap: 8px; padding: 0 16px 10px; font-size: 13px; color: var(--muted); border-bottom: 1px solid #dde1e7; }
.chat-model select { flex: 1; min-width: 0; padding: 6px 8px; font-size: 13px; background: #fff; }
.chat-log { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { color: #3a3d42; font-size: 14px; } .chat-empty p { margin: 0 0 8px; }
.chat-msg { max-width: 92%; padding: 9px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.chat-msg.is-user { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 3px; }
.chat-msg.is-ai { align-self: flex-start; background: #fff; border: 1px solid #e0e3e8; border-bottom-left-radius: 3px; }
.chat-msg.is-off-topic { background: #fff8e6; border-color: #f0dca8; color: #6b4e00; }
.chat-msg.is-thinking .dots::after { content: '…'; animation: chat-dots 1.2s steps(4) infinite; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes chat-dots { from { width: 0; } to { width: 1.2em; } }
.chat-by { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }
.chat-images { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.chat-images img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; display: block; }
.proposal { margin-top: 8px; border: 1px solid #d6dce5; border-left: 3px solid var(--accent); border-radius: 4px; padding: 8px 10px; background: #fbfcfe; color: var(--ink); }
.proposal strong { font-size: 13px; }
.proposal ul { list-style: none; margin: 4px 0 6px; padding: 0; font-size: 13px; }
.proposal li { padding: 2px 0; } .proposal li span { color: var(--muted); margin-right: 6px; }
.proposal li s { color: var(--muted); }
.proposal-actions { display: flex; align-items: center; gap: 12px; }
.proposal-actions .small-button { min-height: 0; padding: 4px 12px; font-size: 13px; }
.proposal-actions .text-action { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 13px; padding: 0; }
.proposal.is-applied { border-left-color: var(--own); } .proposal.is-dismissed { opacity: .6; }
.applied { color: var(--own); font-weight: 600; font-size: 13px; }
.chat-error-inline { color: var(--danger); font-size: 12px; }
.chat-compose { border-top: 1px solid #dde1e7; padding: 10px 12px 10px; background: #f1f3f6; }
.chat-pending { display: flex; gap: 6px; flex-wrap: wrap; }
.chat-pending:not(:empty) { margin-bottom: 8px; }
.pending-photo { position: relative; } .pending-photo img { width: 54px; height: 54px; object-fit: cover; border-radius: 5px; display: block; }
.pending-photo button { position: absolute; top: -6px; right: -6px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; font-size: 13px; line-height: 1; cursor: pointer; }
.chat-input { display: flex; gap: 8px; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; min-height: 44px; max-height: 160px; font-size: 14px; background: #fff; }
.chat-attach { display: flex; align-items: center; justify-content: center; width: 40px; height: 44px; border: 1px solid #c4c8ce; border-radius: 3px; background: #fff; color: var(--muted); cursor: pointer; }
.chat-attach:hover { color: var(--accent); border-color: var(--accent); }
.chat-error { margin: 6px 0 0; color: var(--danger-dark); font-size: 13px; }
.chat-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 6px; }
.chat-foot .text-action { border: 0; background: none; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: 12px; padding: 0; }
.chat-open { display: none; }
@media (max-width: 1100px) {
  .with-chat { grid-template-columns: minmax(0, 1fr); }
  .chat-panel { position: fixed; top: 0; right: 0; bottom: 0; margin: 0; height: auto; width: min(420px, 100vw); z-index: 40; border-radius: 0; transform: translateX(105%); transition: transform .2s ease; box-shadow: -8px 0 24px rgba(0,0,0,.18); }
  .chat-is-open .chat-panel { transform: none; }
  .chat-close { display: block; }
  .chat-open { display: inline-flex; position: fixed; right: 16px; bottom: 16px; z-index: 30; border: 0; border-radius: 22px; padding: 11px 18px; background: var(--brand-navy, #0d1f3b); color: #fff; font-weight: 700; box-shadow: 0 4px 14px rgba(0,0,0,.25); cursor: pointer; }
  .chat-is-open .chat-open { display: none; }
}

/* Background on Collection: optional notes about the list, above the items */
.background-box { margin: 18px 0 4px; border: 1px solid var(--line); background: #fff; padding: 12px 16px; display: grid; gap: 6px; }
.background-box label { font-weight: 700; font-size: 14px; color: var(--accent-dark); }
.background-box textarea { width: 100%; box-sizing: border-box; resize: vertical; min-height: 48px; font: inherit; line-height: 1.45; }
.background-status { min-height: 1em; }

/* List view: breathing room between the rating tiles and My Pros / My Cons */
.item-row .ratings + .pros-cons, .item-row .ratings ~ .pros-cons { margin-top: 24px; }
