:root{color-scheme:light;--ink:#182533;--muted:#50616a;--line:#dce6e6;--teal:#096758;--soft:#e9f6f1;--paper:#fff;--base:#f5f8f8;font:16px/1.5 system-ui,sans-serif;color:var(--ink);background:var(--base)}
*{box-sizing:border-box}
[hidden]{display:none!important}
body{margin:0}
.wrap{width:min(1160px,calc(100% - 2rem));margin-inline:auto}
.mast{background:#142c34;color:#fff}
.mast-inner{display:flex;align-items:center;justify-content:space-between;min-height:66px;gap:12px}
.brand{display:flex;align-items:center;gap:10px;font-weight:750}
.mark,.empty-mark{display:grid;place-items:center;border-radius:10px;background:#b5edce;color:#113e37;width:34px;height:34px;font-size:24px;font-weight:800}
.badge{font-size:.72rem;font-weight:700;border:1px solid #64807d;border-radius:20px;padding:5px 10px;text-align:center}
.intro{padding:30px 0 20px}
.eyebrow{font-size:.72rem;letter-spacing:.14em;font-weight:800;color:var(--teal);margin:0 0 8px}
h1,h2,h3,p{margin:0}
h1{font-size:clamp(2rem,5vw,3.35rem);line-height:1.05;letter-spacing:-.05em}
.intro>p:last-child{color:var(--muted);margin-top:9px}
h2{font-size:1.43rem;letter-spacing:-.025em}
h3{font-size:1.13rem}
.panel{background:var(--paper);border:1px solid var(--line);border-radius:16px}
.capture,.detail,.empty{padding:22px}
.muted{color:var(--muted);font-size:.9rem}
.capture summary{cursor:pointer;font-weight:800;width:fit-content}
.capture-help{margin-top:9px}
.capture-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(165px,250px);gap:12px;align-items:end;margin-top:12px}
.capture-actions,.table-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:12px}
.table-actions{justify-content:flex-end;margin:0 19px 12px}
label{display:grid;gap:4px;font-size:.82rem;font-weight:700;min-width:0}
input,select,button{font:inherit}
input:not([type=checkbox]),select,button{border-radius:8px;min-height:42px}
input:not([type=checkbox]),select{background:white;border:1px solid #adbdc0;padding:8px 10px;width:100%;color:var(--ink)}
button{cursor:pointer;padding:8px 14px;font-weight:750;font-size:.88rem}
button:disabled{opacity:.55;cursor:default}
:focus-visible{outline:3px solid #16806a;outline-offset:3px}
.primary{background:var(--teal);color:white;border:1px solid var(--teal)}
.secondary{background:white;border:1px solid #adbdc0;color:var(--ink);white-space:nowrap}
.link-button{background:none;border:0;padding-inline:0;color:var(--teal);text-decoration:underline;text-underline-offset:3px}
#notice:empty{display:none}
#notice{font-size:.87rem;color:var(--teal);overflow-wrap:anywhere;margin-top:8px}
#notice.error{color:#9f2d29}
#import-fields{margin-top:12px;display:grid;gap:8px}
.import-preview{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:10px;overflow-wrap:anywhere}
.import-preview h2{font-size:1.04rem}
.capture-summary{margin-top:8px}
.price-target{margin-top:10px;padding:10px 14px}
.price-target summary{cursor:pointer;font-weight:750}
.price-target form{align-items:end}
.price-target form+p{margin-top:6px}
.check{display:flex;align-items:center;gap:8px}
.workspace{display:grid;grid-template-columns:minmax(215px,255px) minmax(0,1fr);gap:18px;align-items:start;margin-top:18px}
.dashboard,.empty{min-width:0}
.empty{text-align:center;padding:33px 16px}
.empty-mark{margin:0 auto 10px}
.results-heading{display:flex;justify-content:space-between;align-items:center;gap:15px}
.results-heading>div,.table-heading>div{min-width:0}
#meta{overflow-wrap:anywhere}
.section-nav{display:flex;flex-wrap:wrap;gap:6px;margin-top:9px}
.section-nav a{color:var(--teal);font-weight:700;padding:8px 10px;border-radius:8px}
.section-nav a:hover{background:var(--soft)}
.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:14px 0}
.metric{padding:13px 15px;background:var(--soft);border:1px solid #cfe5dc;border-radius:12px;font-size:.83rem;color:#234e46}
.metric strong{display:block;font-size:1.32rem;color:var(--ink)}
.offers{container-type:inline-size}
.table-heading{display:grid;gap:12px;padding:16px 19px}
.filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,110px),1fr));gap:8px}
.scroll{overflow-x:auto}
table{width:100%;border-collapse:collapse;text-align:left;font-size:.84rem;min-width:760px}
th,td{padding:10px 12px;border-bottom:1px solid var(--line)}
th{background:#edf3f3;white-space:nowrap}
th:first-child,td:first-child{padding-left:19px}
td{overflow-wrap:break-word}
td:nth-child(3),td:nth-child(4),td:nth-child(7){white-space:nowrap}
td small{display:block;color:var(--muted)}
.total{font-weight:800;color:var(--teal);white-space:nowrap}
.table-note{padding:10px 19px;font-size:.81rem;color:var(--muted)}
#offer-action-status:empty{display:none}
.offer-action{min-height:36px;padding:5px 9px}
.offer-action-cell .offer-action{margin:0 3px 3px 0}
.offer-history{margin-top:14px}
#offer-history-list{list-style:none;padding:0;margin:10px 0 0;max-height:360px;overflow:auto}
#offer-history-list li{padding:8px 10px;border-bottom:1px solid var(--line)}
#offer-history-list li.selected{background:var(--soft);border-radius:8px}
#offer-history-list time{font-weight:700;font-size:.85rem}
.compare-toggle{display:flex;align-items:center;gap:4px;min-height:32px}
.compare-toggle input{accent-color:var(--teal)}
.comparison-link{align-self:center;color:var(--teal);font-size:.88rem;font-weight:700}
.offer-comparison{border-top:1px solid var(--line);padding:14px 19px}
.comparison-heading{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}
.comparison-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,190px),1fr));gap:8px}
.comparison-cards:not(:empty){margin-top:10px}
.comparison-card{border:1px solid var(--line);border-radius:10px;padding:10px;overflow-wrap:anywhere}
.comparison-card.best-total{border-color:var(--teal);background:var(--soft)}
.comparison-card h4{margin:0}
.comparison-card dl{display:grid;grid-template-columns:1fr auto;gap:3px 8px;margin:8px 0;font-size:.86rem}
.comparison-card dd{margin:0;text-align:right}
.comparison-best{display:block;color:var(--teal);font-size:.84rem}
.removed-offers{margin:0 19px 12px}
.removed-offers summary{cursor:pointer;font-weight:700}
.removed-offers ul{padding:0;list-style:none}
.removed-offers li{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 0;border-bottom:1px solid var(--line)}
.history-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}
.price-panel{margin-top:14px}
.saved-panel{padding:16px}
.saved-panel h2{font-size:1.16rem}
.product-search{margin-top:10px}
.stale-label{margin-top:8px;min-height:32px}
#search-empty{margin-top:8px}
.saved-list{list-style:none;padding:0;margin:8px 0 0;max-height:315px;overflow:auto}
.saved-list:empty{margin:0}
.saved-product{border:1px solid var(--line);border-radius:10px;padding:4px 9px 9px;overflow-wrap:anywhere;margin-bottom:6px}
.saved-product.selected{background:var(--soft);border-color:var(--teal)}
.saved-snapshot{border-block:1px solid var(--line);margin-top:7px;padding:7px 0}
.saved-price strong,.saved-price span:not(:empty){display:block}
.saved-price strong{color:var(--teal)}
.saved-snapshot .muted{font-size:.78rem}
.freshness{display:block;width:fit-content;border-radius:6px;background:#e9f6f1;color:#095c4d;padding:2px 6px;margin-top:5px;font-size:.74rem;font-weight:750}
.freshness.stale{background:#fff0d1;color:#784700}
.product-button{background:none;border:0;color:var(--teal);font-size:.95rem;padding-inline:0;text-align:left;text-decoration:underline;text-underline-offset:3px;width:100%}
.product-button[aria-current=true]{font-weight:850}
.saved-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:6px}
.saved-actions button{white-space:normal;text-align:left}
.saved-actions button[aria-current=true]{background:var(--soft);border-color:var(--teal)}
.cardmarket-link{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:3px;min-height:42px;padding:8px 14px;font-weight:750;font-size:.88rem;text-decoration:none}
.saved-capture{width:100%;margin-top:8px;color:var(--teal)}
.price-metrics{grid-template-columns:repeat(2,minmax(0,1fr));max-width:560px}
.price-chart{margin:10px 0}
.price-chart svg{display:block;min-width:100%;font-size:12px;color:var(--muted)}
.price-chart text{fill:currentColor}
.chart-grid{stroke:var(--line)}
.chart-point{fill:var(--teal);stroke:white;stroke-width:1}
#price-details summary{cursor:pointer;font-weight:700;font-size:.88rem}
#price-days{max-height:260px;overflow:auto;margin-top:6px}
#price-days p{padding:5px 0;border-bottom:1px solid var(--line)}
.history-grid .muted{margin-bottom:8px}
#history,#changes{max-height:360px;overflow:auto}
.history-item{display:block;width:100%;background:white;border:1px solid var(--line);margin:5px 0;text-align:left;color:var(--ink)}
.history-item[aria-current=true]{background:var(--soft);border-color:#8ac5b3}
.change{padding:8px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}
.change strong{display:block;font-size:.88rem}
footer{color:var(--muted);font-size:.8rem;padding:25px 0}
.backup-panel{margin-top:18px}
.backup-panel summary{cursor:pointer;font-weight:750}
.backup-panel form{align-items:end}
#backup-notice{margin-top:8px}
@media(max-width:780px){
  .capture-grid,.history-grid,.workspace{grid-template-columns:1fr}
  .saved-list{max-height:235px}
}
@container (max-width: 880px){
  .offers table,.offers tbody{display:block;min-width:0}
  .offers thead{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
  .offers tbody{padding:0 12px}
  .offers tbody tr{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));margin-bottom:10px;border:1px solid var(--line);border-radius:10px;background:var(--paper)}
  .offers td,.offers td:first-child{grid-column:span 3;padding:8px 10px;white-space:normal;border:0;overflow-wrap:anywhere}
  .offers td::before{content:attr(data-label);display:block;color:var(--muted);font-size:.72rem;font-weight:700}
  .offers td:first-child,.offers td:nth-child(n+7):nth-child(-n+9){grid-column:span 2}
  .offers td:nth-child(2){grid-column:span 4}
  .offers td:nth-child(n+7):nth-child(-n+9){background:#f5f8f8}
  .offers td.total{background:var(--soft)}
  .offers td.offer-action-cell{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:6px}
  .offers td.offer-action-cell::before{width:100%}
}
@media(max-width:460px){
  .results-heading{align-items:start;flex-direction:column}
  .metrics{gap:5px}
  .metric{padding:8px;font-size:.72rem}
  .metric strong{font-size:1.04rem}
  .capture,.detail{padding:15px}
}

/* Extensión: colección, revisión de ofertas y acciones de guardado. */
:root {
  --ink: #17252d;
  --muted: #506168;
  --line: #dce4e2;
  --teal: #146352;
  --soft: #edf5f1;
  --base: #f4f6f5;
  font-size: 15px;
}
.wrap { width: min(1440px, calc(100% - 48px)); }
.mast { background: var(--paper); color: var(--ink); border-bottom: 1px solid var(--line); }
.mast-inner { min-height: 58px; }
.mark { width: 21px; height: 27px; border-radius: 3px; background: var(--teal); position: relative; }
.mark::after { content: ""; position: absolute; inset: 4px; border: 1px solid #b8d8ca; border-radius: 2px; }
.mast-note { color: var(--muted); font-size: .82rem; }
.intro { padding: 24px 0 14px; }
h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); letter-spacing: -.035em; }
.panel { border-radius: 10px; }
.capture, .detail { padding: 16px; }
#capture-panel { background: transparent; padding: 10px 0; border-width: 0 0 1px; border-radius: 0; }
#capture-panel summary { font-weight: 650; color: var(--muted); }
#shared-capture:not([open]) { padding-block: 10px; }
#shared-capture summary { font-size: 1rem; }
#shared-capture > .muted, #shared-capture > label { margin-top: 10px; }
#shared-refresh-offers { margin-top: 8px; }
#shared-status:not(:empty) { margin-block: 8px; color: var(--muted); font-size: .88rem; }
#shared-review > .capture-actions { align-items: end; margin-bottom: 12px; }
#shared-rows fieldset {
  min-width: 0;
  padding: 6px 10px 10px;
  border-radius: 6px;
  grid-template-columns: minmax(95px, .85fr) minmax(158px, 1.65fr) repeat(6, minmax(76px, 1fr));
  align-items: end;
}
#shared-rows legend { color: var(--muted); font-size: .78rem; padding-inline: 4px; }
#shared-rows fieldset:nth-child(even) { background: #f8faf9; }
#shared-rows fieldset > .check { min-height: 36px; }
#shared-rows input:not([type=checkbox]) { min-height: 36px; padding: 6px 8px; }
.review-footer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.review-footer > .check { margin-inline-end: auto; }
#shared-save-error { flex-basis: 100%; margin: 0; }
#shared-save-error:empty { display: none; }
.workspace { grid-template-columns: minmax(250px, 290px) minmax(0, 1fr); gap: 20px; }
.saved-panel { padding: 16px; }
#saved-summary { margin-top: 4px; }
#update-queue-status:not(:empty) { margin-top: 6px; }
.saved-panel > button:not(.link-button) { margin-top: 6px; }
.saved-filters { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 7px; }
.saved-filters summary { cursor: pointer; color: var(--muted); font-weight: 650; font-size: .87rem; }
.saved-filters[open] { padding-bottom: 8px; }
.saved-list { max-height: min(62vh, 620px); scrollbar-gutter: stable; }
.saved-product { border: 0; border-left: 3px solid transparent; border-radius: 4px; padding: 4px 8px 8px; }
.saved-product + .saved-product { border-top: 1px solid var(--line); }
.saved-product.selected { border-left-color: var(--teal); }
.saved-snapshot { border-block: 0; margin-top: 3px; padding: 3px 0; }
.product-button { text-decoration: none; min-height: 34px; padding-block: 4px; }
.product-button:hover { text-decoration: underline; }
.saved-actions button { min-height: 34px; padding: 5px 8px; font-size: .78rem; }
.section-nav { border-bottom: 1px solid var(--line); gap: 12px; }
.section-nav a { padding: 6px 0; border-radius: 0; text-underline-offset: 4px; }
.metric { background: var(--paper); border-color: var(--line); border-radius: 8px; }
@media (max-width: 1000px) {
  #shared-rows fieldset { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 780px) {
  .wrap { width: calc(100% - 24px); }
  .workspace { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .saved-list { max-height: 320px; }
}
@media (max-width: 540px) {
  #shared-rows fieldset { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #shared-rows fieldset > :nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
  .review-footer > .check { flex-basis: 100%; }
  #shared-apply-latest { white-space: normal; }
}

/* Catálogo de escritorio: barras de sección, filas y controles compactos. */
:root {
  --ink: #202a36;
  --muted: #515e6d;
  --line: #becbd9;
  --teal: #244f79;
  --soft: #e8eff7;
  --paper: #fff;
  --base: #e9edf2;
  font: 14px/1.45 Verdana, Arial, sans-serif;
}
.wrap { width: min(1320px, calc(100% - 36px)); }
.mast { color: #fff; background: #243e5a; border-block: 1px solid #52718d #172c43; }
.mast-inner { min-height: 46px; }
.brand { font-weight: 700; }
.mast-note { color: #dee8f2; }
.mark { width: 17px; height: 22px; background: #dce9f5; border: 1px solid #b7cde3; border-radius: 2px; }
.mark::after { inset: 3px; border-color: #52718d; border-radius: 0; }
.intro { padding-block: 18px 12px; border-bottom: 1px solid var(--line); }
.intro > p:last-child { margin-top: 4px; }
h1 { font: 700 clamp(1.55rem, 3vw, 2rem)/1.15 Arial, sans-serif; letter-spacing: -.02em; }
h2, h3 { letter-spacing: normal; }
.panel, input:not([type=checkbox]), select, button { border-radius: 3px; }
input:not([type=checkbox]), select { border-color: #9daec0; }
input:not([type=checkbox]), select, button { min-height: 36px; }
.primary { background: #28557d; border-color: #244969; }
.primary:not(:disabled):hover { background: #1e4569; }
.secondary { border-color: #a7b7c8; background: #f2f5f9; }
.secondary:not(:disabled):hover { background: #e4ecf6; }
:focus-visible { outline-color: #28649b; }
input[type=checkbox] { accent-color: #28557d; }
#capture-panel { margin-top: 16px; padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: 3px; }
#shared-capture { margin-top: 14px; }
#shared-capture > summary { color: #244969; }
.review-source { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-top: 12px; }
.review-source > label { flex: 1 1 280px; }
#shared-refresh-offers { margin-top: 0; }
.review-tools { margin-block: 10px; padding: 7px 9px; border: 1px solid var(--line); background: #f2f5f9; }
.review-tools > summary { font-size: .85rem; font-weight: 650; }
#shared-rows fieldset { border-radius: 2px; }
#shared-rows fieldset:nth-child(even) { background: #f0f4f8; }
.review-footer { background: #e8eef6; border: 1px solid var(--line); padding: 9px; }
.workspace { grid-template-columns: minmax(238px, 280px) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.saved-panel { padding: 10px; }
.saved-panel .panel-bar { background: #e0e9f3; color: #233f5a; border-bottom: 1px solid var(--line); margin: -10px -10px 8px; padding: 8px 10px; font-size: 1rem; }
.queue-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.queue-actions:not(:has(button:not([hidden]))) { display: none; }
.queue-actions button { min-height: 32px; padding: 5px 8px; }
.saved-list { margin-top: 8px; border-top: 1px solid var(--line); }
.saved-list:empty { border: 0; }
.saved-product { border-radius: 0; margin-bottom: 0; }
.saved-product:nth-child(even):not(.selected) { background: #f4f6fa; }
.saved-product.selected { background: #e4edf8; border-left-color: #315e8a; }
.product-button { color: #234f7b; }
.freshness { background: #e7f0eb; border-radius: 2px; }
#export-saved-products { margin-top: 6px; min-height: 30px; text-align: left; }
.section-nav { gap: 4px; }
.section-nav a { background: #e2eaf4; border: 1px solid var(--line); border-bottom: 0; padding: 5px 10px; text-decoration: none; }
.section-nav a:hover { background: #d1e0f0; text-decoration: underline; }
.metric, .comparison-card, .saved-actions button { border-radius: 3px; }
.offers th { background: #e2eaf4; color: #233f5a; }
.offers tbody tr:nth-child(even) { background: #f5f7fa; }
@media (max-width: 780px) {
  .wrap { width: calc(100% - 20px); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
}

/* Acciones principales y lectura cómoda en pantallas pequeñas. */
:root { font-size: 15px; }
.mast { border-top: 3px solid #7892ac; }
.brand { font: 700 1.15rem/1.2 Verdana, Arial, sans-serif; }
.mast-inner { min-height: 54px; }
.intro > p:last-child { max-width: 64ch; margin-top: 6px; }
.saved-panel .panel-bar { padding-block: 10px; }
.saved-panel > .product-search { margin-block: 12px 8px; }
.saved-filters summary, .review-tools > summary { padding-block: 5px; }
.product-button { min-height: 38px; font-weight: 700; }
.saved-product { padding-block: 5px 10px; }
.queue-actions button { min-height: 40px; }
#update-queue-status:not(:empty) { padding: 6px 8px; background: var(--soft); border-left: 3px solid var(--teal); }
.review-instruction { margin-block: 10px; }
#shared-rows label { font-size: .83rem; }
#shared-rows fieldset { gap: 10px; }
.review-footer { gap: 10px 14px; padding: 11px 12px; }
.review-footer button { min-height: 42px; white-space: normal; }
.review-footer .check { min-height: 36px; cursor: pointer; }
.review-footer .check input { width: 17px; height: 17px; flex: 0 0 auto; }
@media (min-width: 781px) and (min-height: 640px) {
  .review-footer { position: sticky; bottom: 0; z-index: 1; }
  #shared-rows input { scroll-margin-bottom: 110px; }
}
@media (max-width: 540px) {
  .mast-note { display: none; }
  #shared-rows input:not([type=checkbox]), .product-button { min-height: 44px; }
  #shared-rows input:not([type=checkbox]) { font-size: 16px; }
  .review-footer > button { width: 100%; min-height: 44px; }
}

.price-heading { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 18px; margin-bottom: 10px; }
.price-heading h3 { flex: 1 1 170px; }
.price-controls { display: grid; flex: 1 1 320px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 8px; }
@media (max-width: 460px) { .price-controls { grid-template-columns: minmax(0, 1fr); } }

.price-chart { background: #142234; color: #c4d4e7; border: 1px solid #2a3d54; border-radius: 3px; margin-bottom: 0; }
.price-chart svg { display: block; font: 12px/1.3 Verdana, sans-serif; }
.price-chart > p { padding: 12px; color: inherit; }
.chart-plot { fill: #182940; }
.price-chart .chart-grid { stroke: #354b65; }
.chart-minimum { fill: none; stroke: #8cf0c4; stroke-width: 1.5; opacity: .85; }
.chart-crosshair { fill: none; stroke: #b2c8e0; stroke-dasharray: 4 4; pointer-events: none; }
.chart-offer { cursor: pointer; }
.chart-hit { fill: transparent; }
.price-chart .chart-point { fill: #81bfff; stroke: #142234; stroke-width: 1; pointer-events: none; }
.chart-offer:hover .chart-point, .chart-offer:focus-visible .chart-point, .chart-offer[aria-pressed="true"] .chart-point { fill: #fff; stroke: #78c9ff; stroke-width: 2; }
#price-chart-key { color: var(--muted); font-size: .82rem; margin-top: 8px; }
#price-chart-key span { display: inline-block; width: 16px; border-top: 2px solid #387c66; vertical-align: middle; }
.price-point-detail { display: flex; flex-wrap: wrap; gap: 5px 16px; align-items: center; min-height: 41px; background: #e4edf8; padding: 8px 12px; border: 1px solid var(--line); border-top: 0; margin-bottom: 10px; }
.price-point-detail strong { color: #244f79; }
.price-point-detail time { color: var(--muted); }

.saved-delete { color: #922b32; min-height: 30px; }
#deleted-products-list { padding: 0; list-style: none; }
#deleted-products-list li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 5px 0; }

.chart-seller-filter { max-width: 320px; margin-top: 10px; }
.price-trend { margin-block: 8px 12px; }
.price-trend:empty { display: none; }
.series-blue { --series-color: #81bfff; }
.series-mint { --series-color: #8cf0c4; }
.series-gold { --series-color: #ffda78; }
.series-pink { --series-color: #ff9fbf; }
.series-violet { --series-color: #c3b1ff; }
.series-cyan { --series-color: #84e6f4; }
.series-orange { --series-color: #ffab80; }
.series-lime { --series-color: #d0e881; }
.price-chart .chart-offer .chart-point { fill: var(--series-color); }
.price-chart .chart-offer:hover .chart-point,
.price-chart .chart-offer:focus-visible .chart-point,
.price-chart .chart-offer[aria-pressed="true"] .chart-point { fill: #fff; stroke: var(--series-color); }
.chart-seller-line { fill: none; stroke: var(--series-color); stroke-width: 2; opacity: .8; pointer-events: none; }
.chart-same-day { stroke-dasharray: 3 3; opacity: .65; }

.price-chart svg { color: #c4d4e7; }
.chart-has-selection .chart-seller-line:not(.chart-seller-active) { opacity: .20; }
.chart-has-selection .chart-offer:not(.chart-seller-active) .chart-point { opacity: .42; }
.chart-seller-line.chart-seller-active { opacity: 1; stroke-width: 3; }
.chart-price-change { flex-basis: 100%; font-size: .88rem; }
.chart-price-up { color: #8a2538; }
.chart-price-down { color: #17604d; }
.chart-price-flat { color: var(--muted); }

.today-panel { margin: 0 0 16px; }
.today-panel h2 { margin: 0 0 12px; }
.today-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 235px), 1fr)); gap: 12px; }
.today-group { border: 1px solid var(--line); padding: 10px; min-width: 0; }
.today-group h3 { margin: 0 0 8px; }
.today-group p { margin: 4px 0; }
.today-list { list-style: none; padding: 0; margin: 0; max-height: 16rem; overflow-y: auto; }
.today-list li { padding: 8px 2px; overflow-wrap: anywhere; }
.today-list li + li { border-top: 1px solid var(--line); }
.today-list .cardmarket-link { margin-top: 4px; white-space: normal; }

/* Premium híbrido: base visual y repaso diario. */
:root {
  --ink: #182b36;
  --muted: #52636b;
  --line: #d8e1dd;
  --teal: #12624f;
  --soft: #eaf5ef;
  --base: #f5f5f0;
  font: 15px/1.5 system-ui, sans-serif;
}

.mast {
  background: #172e38;
  border: 0;
}
.mast-inner { min-height: 58px; }
.brand { font: 750 1.1rem/1.2 system-ui, sans-serif; }
.mark {
  background: #a9d9c2;
  border: 0;
  border-radius: 5px;
}
.mark::after { border-color: #356656; border-radius: 2px; }
.intro { padding-block: 22px 15px; border-bottom: 0; }
h1 { font: 760 clamp(1.85rem, 4vw, 2.5rem)/1.08 system-ui, sans-serif; letter-spacing: -.035em; }
.panel { border-radius: 14px; }
input:not([type=checkbox]), select, button { border-radius: 8px; }
input:not([type=checkbox]), select { border-color: #899e97; }
:focus-visible { outline-color: var(--teal); }
input[type=checkbox] { accent-color: var(--teal); }

.today-panel { margin: 0; padding: 12px 14px; }
.today-panel h2 { margin: 0 0 8px; font-size: 1.08rem; }
.today-groups { gap: 8px; align-items: start; }
.today-group {
  padding: 8px 10px;
  border-radius: 9px;
  background: #f6f8f5;
}
.today-group:has(.today-list) { background: var(--soft); }
.today-group h3 { margin: 0; font-size: .91rem; }
.today-group > p { margin: 1px 0 0; font-size: .82rem; }
.today-list { margin-top: 4px; }
.today-list li > p:not(.muted) { font-weight: 700; }

/* Colección: acción principal, estado y carta seleccionada. */
.saved-panel { padding: 14px; }
.saved-panel .panel-bar {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 1.12rem;
}
#web-review-start {
  min-height: 42px;
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}
#web-review-start:not(:disabled):hover { background: #0d4d3d; }
#web-review-start:disabled {
  opacity: 1;
  color: #52635c;
  background: #e7ede9;
  border-color: #d0dad4;
}
#web-review-status:not(:empty) {
  margin-top: 6px;
  padding: 6px 8px;
  border-inline-start: 3px solid var(--teal);
  background: var(--soft);
  overflow-wrap: anywhere;
}
#saved-summary { margin-top: 7px; }
.saved-list { padding-inline: 4px; }
.saved-product {
  padding: 5px 8px 9px;
  border-radius: 8px;
}
.saved-product:nth-child(even):not(.selected) { background: #f6f8f6; }
.saved-product.selected {
  background: var(--soft);
  border-inline-start-color: var(--teal);
}
.product-button { color: var(--ink); }
.saved-product.selected .product-button { color: var(--teal); font-weight: 800; }

/* Ofertas: filtros, lectura de importes y tarjetas adaptables. */
.results-heading { align-items: flex-start; }
.results-heading h2 { overflow-wrap: anywhere; }
.section-nav a {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}
.section-nav a:hover { background: var(--soft); }
.metric, .comparison-card { border-radius: 10px; min-width: 0; }
.metric strong, .offers table { font-variant-numeric: tabular-nums; }
.table-heading { gap: 10px; }
.filters select { min-height: 40px; }
.offers th { background: #edf3ef; color: var(--ink); }
.offers tbody tr:nth-child(even) { background: #f7f9f7; }
.offers tbody tr:focus-within { background: #eef5f1; }
.offers td:nth-child(2) { font-weight: 700; }
.offers :is(th, td):nth-child(n+6):nth-child(-n+9) { text-align: end; }
.offers td:nth-child(7) { font-weight: 700; }
.offers td.total { background: var(--soft); color: var(--teal); font-weight: 800; }
.offers .offer-action-cell { overflow-wrap: anywhere; }

@container (max-width: 880px) {
  .offers tbody tr { border-radius: 10px; }
  .offers td:nth-child(2) { font-size: 1rem; }
  .offers td:nth-child(n+7):nth-child(-n+9) {
    text-align: start;
    background: #f0f4f1;
  }
  .offers td:nth-child(9).total { background: var(--soft); }
  .offers td.offer-action-cell { border-top: 1px solid var(--line); }
}

@media (max-width: 780px) {
  .today-groups { grid-template-columns: minmax(0, 1fr); }
  .today-group { padding-block: 6px; }
  #web-review-start { width: 100%; min-height: 44px; }
  .saved-list { max-height: min(42vh, 320px); }
  .product-button, .offers .offer-action, .filters select { min-height: 44px; }
  .offers .offer-action-cell label { min-height: 44px; padding-inline: 4px; }
}

@media (max-width: 460px) {
  .table-heading { padding: 12px; }
  .table-actions { margin-inline: 12px; justify-content: flex-start; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .offers tbody { padding-inline: 8px; }
  .offers td, .offers td:first-child { padding: 7px 8px; }
}


/* Premium híbrido: jerarquía de cabecera, colección y comparación. */
.mast-inner { min-height: 48px; }
.intro { padding-block: 15px 11px; }
.intro > p:last-child { margin-top: 4px; }
.today-panel { padding-block: 10px; }
.results-heading { gap: 8px 16px; }
.results-heading .eyebrow { margin-bottom: 3px; }
.results-heading h2 { font-size: clamp(1.25rem, 3vw, 1.65rem); line-height: 1.15; }
#meta { margin-top: 4px; font-size: .82rem; }
.results-heading .cardmarket-link { min-height: 36px; border-radius: 8px; }
.workspace { grid-template-columns: minmax(275px, 310px) minmax(0, 1fr); }

.saved-list { display: grid; gap: 8px; border-top: 0; padding: 4px; }
.saved-list .saved-product {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-inline-start-width: 3px;
  background: var(--paper);
}
.saved-list .saved-product.selected {
  border-inline-start-color: var(--teal);
  background: var(--soft);
}
.saved-card-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 43%);
  align-items: start;
  gap: 8px;
}
.saved-card-heading .product-button {
  min-height: 32px;
  line-height: 1.2;
  padding: 3px 0;
  font-size: 1rem;
}
.saved-card-heading .saved-price {
  display: grid;
  text-align: end;
  line-height: 1.25;
  gap: 2px;
}
.saved-card-heading .saved-price strong {
  color: var(--teal);
  font-size: .94rem;
  font-variant-numeric: tabular-nums;
}
.saved-card-heading .saved-price .muted,
.saved-card-identity > p { font-size: .74rem; }
.saved-card-heading .saved-price span:empty { display: none; }
.saved-product .saved-snapshot { border-top: 1px solid var(--line); margin-top: 6px; padding-block: 5px 0; }
.saved-product .saved-actions { gap: 4px; }
.saved-product .saved-actions button { border-radius: 6px; }
.saved-card-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.saved-card-links .saved-capture {
  margin: 0;
  padding: 5px 0;
  min-height: 34px;
  border: 0;
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.offers td.offer-action-cell { min-width: 140px; }
.offers td.offer-action-cell .offer-action { margin: 2px 2px 0 0; }
.offer-comparison { background: #f7f9f7; }
.comparison-cards { grid-template-columns: repeat(auto-fit, minmax(min(100%, 245px), 1fr)); }
.comparison-card { background: var(--paper); padding: 12px; }
.comparison-card h4 { font-size: 1rem; line-height: 1.25; }
.comparison-card .comparison-prices {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
.comparison-prices > div { padding: 6px; }
.comparison-prices > div + div { border-inline-start: 1px solid var(--line); }
.comparison-prices dt { color: var(--muted); font-size: .74rem; line-height: 1.2; }
.comparison-prices dd { margin-top: 4px; text-align: start; font-weight: 750; line-height: 1.25; }
.comparison-prices > div:last-child { background: var(--soft); color: var(--teal); }
.comparison-card .comparison-details { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.comparison-best { margin-top: 5px; }
.comparison-card > .link-button { min-height: 38px; }

@container (max-width: 880px) {
  .offers td.offer-action-cell { min-width: 0; }
}
@media (max-width: 780px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .saved-card-heading .product-button { min-height: 44px; }
  .saved-card-links .saved-capture, .saved-card-links .saved-delete,
  .comparison-card > .link-button { min-height: 44px; }
}
@media (max-width: 460px) {
  .offer-comparison { padding-inline: 10px; }
  .comparison-card { padding: 9px; }
}



/* Evolución del precio: superficie clara y controles del gráfico. */
.price-panel {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 8px 12px;
}
.price-panel > * { grid-column: 1 / -1; min-width: 0; }
.price-panel .price-heading { display: contents; }
.price-panel #price-title { grid-column: 1 / -1; font-size: 1.15rem; }
.price-panel .price-controls { grid-column: 1; grid-row: 2; }
.price-panel .chart-seller-filter {
  grid-column: 2;
  grid-row: 2;
  max-width: none;
  margin: 0;
}
.price-panel :is(.price-controls, .chart-seller-filter) select { min-height: 40px; }
.price-panel .price-metrics {
  max-width: none;
  margin: 2px 0 0;
  gap: 8px;
}
.price-panel .price-metrics .metric {
  background: #f6f8f5;
  border-color: var(--line);
  color: var(--muted);
}
.price-panel .price-chart {
  margin: 0;
  background: var(--paper);
  border-color: var(--line);
  border-radius: 10px;
  color: var(--muted);
}
.price-panel .price-chart svg {
  min-width: 0;
  font: 11px/1.3 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
}
.price-panel .chart-plot { fill: #fbfcfa; }
.price-panel .chart-grid { stroke: #e1e8e3; }
.price-panel .chart-crosshair { stroke: #667f76; stroke-dasharray: 3 4; }
.price-panel .series-blue { --series-color: #245d9d; }
.price-panel .series-mint { --series-color: #087357; }
.price-panel .series-gold { --series-color: #946100; }
.price-panel .series-pink { --series-color: #9d3d67; }
.price-panel .series-violet { --series-color: #674c9c; }
.price-panel .series-cyan { --series-color: #08717b; }
.price-panel .series-orange { --series-color: #a34724; }
.price-panel .series-lime { --series-color: #536e22; }
.price-panel .chart-seller-line { stroke-width: 1.6; }
.price-panel .chart-same-day { opacity: .6; }
.price-panel .chart-seller-line.chart-seller-active { stroke-width: 2.4; }
.price-panel .chart-offer .chart-point { stroke: var(--paper); stroke-width: 1.2; }
.price-panel .chart-offer:is(:hover, :focus-visible, [aria-pressed="true"]) .chart-point {
  opacity: 1;
  fill: var(--paper);
  stroke: var(--series-color);
  stroke-width: 2.6;
  r: 5.5px;
}
.price-panel #price-chart-key { margin: 0; }
.price-panel .price-point-detail {
  margin: 0;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}
.price-panel .price-point-detail strong { color: var(--teal); }
.price-panel .price-trend { margin: 0; }

@media (max-width: 560px) {
  .price-panel { grid-template-columns: minmax(0, 1fr); }
  .price-panel .price-controls,
  .price-panel .chart-seller-filter { grid-column: 1; grid-row: auto; }
  .price-panel .price-controls { grid-template-columns: minmax(0, 1fr); }
  .price-panel :is(.price-controls, .chart-seller-filter) select { min-height: 44px; }
}



/* Evolución del precio: leyenda, ayuda y detalle seleccionado. */
.price-chart-help summary {
  width: fit-content;
  padding-block: 3px;
  color: var(--teal);
  font-weight: 700;
  cursor: pointer;
}
.price-chart-help p { margin-top: 4px; }
.price-chart-unit { font-size: .79rem; font-weight: 700; }
.price-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.price-chart-legend:empty { display: none; }
.price-chart-legend li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  font-size: .8rem;
  overflow-wrap: anywhere;
}
.price-chart-legend svg { flex: none; }
.price-chart-legend .chart-point { fill: var(--series-color); stroke: none; }
.price-panel .chart-has-selection .chart-offer:not(.chart-seller-active) { opacity: .65; }
.price-panel .chart-has-selection .chart-seller-line:not(.chart-seller-active) { opacity: .4; }
.price-panel .chart-offer:is(:focus-visible, [aria-pressed="true"]) { opacity: 1; }
.price-panel #price-chart-scroll-note { font-size: .78rem; }
.price-panel .price-chart { overscroll-behavior-x: contain; }
.price-panel .price-point-detail { gap: 4px 12px; }
.chart-point-price {
  font-size: 1.2rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}
.chart-point-identity {
  display: flex;
  flex: 1 1 150px;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  min-width: 0;
}
.chart-point-seller { font-weight: 700; overflow-wrap: anywhere; }
.chart-point-identity time { font-size: .79rem; }
.price-panel .chart-price-change { font-size: .81rem; }

