/* Contextual editing: useful visual guides and room for real content. */
.anatomy-guide { padding:16px 0; border-block:1px solid var(--nmc-line); }
.anatomy-guide__hint { margin:0 0 14px; color:var(--nmc-muted); font-size:13px; line-height:1.5; }
.anatomy-guide__layout { display:grid; grid-template-columns:minmax(110px,.85fr) minmax(0,1.15fr); align-items:center; gap:12px; }
.anatomy-body { display:block; width:100%; max-height:260px; }
.anatomy-outline { fill:var(--nmc-soft); stroke:#928179; stroke-width:2.5; stroke-linejoin:round; }
.anatomy-region { cursor:pointer; }
.anatomy-region path { stroke:var(--nmc-primary); stroke-width:2; fill:none; }
.anatomy-region circle { fill:#fff; stroke:var(--nmc-primary); stroke-width:1.5; }
.anatomy-region text { fill:var(--nmc-primary); text-anchor:middle; font:700 12px var(--font-body); pointer-events:none; }
.anatomy-region[data-selected] circle { fill:var(--nmc-primary); }
.anatomy-region[data-selected] text { fill:#fff; }
.anatomy-region[data-selected] path { stroke-width:4; }
.anatomy-options { display:grid; gap:4px; min-width:0; }
.anatomy-options button { display:flex; align-items:center; gap:8px; min-height:44px; padding:8px; border:1px solid transparent; border-radius:8px; background:transparent; color:var(--nmc-ink); text-align:left; font:600 13px/1.35 var(--font-body); cursor:pointer; }
.anatomy-options button > b { display:grid; place-items:center; flex:0 0 24px; width:24px; height:24px; border:1px solid var(--nmc-line); border-radius:50%; font-size:12px; background:#fff; color:var(--nmc-primary); }
.anatomy-options button > span { min-width:0; }
.anatomy-options button small { display:block; margin-top:3px; color:var(--nmc-muted); font-size:11px; font-weight:400; }
.anatomy-options button[data-selected] { border-color:var(--nmc-primary); background:var(--nmc-primary-soft); color:var(--nmc-primary); }
.anatomy-options button[data-selected] b { border-color:var(--nmc-primary); background:var(--nmc-primary); color:#fff; }
.anatomy-hand { margin:0; min-width:0; }
.anatomy-hand svg { display:block; width:100%; }
.anatomy-hand .anatomy-region text { font-size:8px; }
.anatomy-hand .anatomy-region circle { stroke-width:1; }
.anatomy-guide[data-hand="RIGHT"] .anatomy-hand__outline { transform:translateX(115px) scaleX(-1); }
.anatomy-hand figcaption { margin-top:4px; text-align:center; font-size:12px; font-weight:600; }
.anatomy-hand figcaption small { display:block; color:var(--nmc-muted); margin-top:3px; font-size:11px; font-weight:400; }
.owner-manage-grid[data-product-view] .owner-product-actions {
  display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end;
  gap:8px; min-width:0; padding-top:12px; border-top:1px solid var(--nmc-line);
}
.owner-manage-grid[data-product-view] .owner-product-actions > .btn {
  flex:0 1 auto; width:auto; min-width:0; max-width:100%; min-height:44px;
  padding:10px 14px; border-radius:10px; font-size:14px; font-weight:600;
  line-height:1.4; white-space:normal; overflow:visible; text-align:center;
  text-decoration:none; box-shadow:none;
}
.owner-product-actions .ph { flex:0 0 auto; font-size:17px; }
.owner-manage-grid[data-product-view] .owner-product-actions > .icon-button {
  width:44px; min-height:44px; border-radius:10px; border-color:var(--nmc-line);
  color:var(--nmc-muted); font-size:18px; text-decoration:none; margin:0;
}
.owner-product-actions .product-online-link::after { content:none; }
.owner-manage-grid[data-product-view="list"] .owner-product-card__meta { display:grid; grid-template-columns:minmax(0,1fr); justify-items:end; min-width:0; gap:4px; }
.owner-manage-grid[data-product-view="list"] .owner-product-card__meta .item-quantity-summary { margin:0; color:var(--nmc-muted); font-size:12px; }
.owner-manage-grid[data-product-view="list"] .owner-product-card__meta .progress { width:100%; min-width:0; height:4px; }
.preference-summary { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 24px; margin:0; }
.preference-summary > div { min-width:0; }
.preference-summary dt { margin-bottom:5px; font-size:12px; color:var(--nmc-muted); font-weight:400; }
.preference-summary dd { margin:0; font-size:15px; color:var(--nmc-ink); font-weight:600; overflow-wrap:anywhere; }
.preference-summary__notes { grid-column:1 / -1; padding-top:16px; border-top:1px solid var(--nmc-line); }
.preference-summary__notes dd { font-weight:400; line-height:1.6; }
.mobile-add-sheet__dialog.preference-editor-dialog[data-mobile-sheet-full-height] {
  display:grid; grid-template-rows:auto minmax(0,1fr) auto; width:min(100%,48rem);
  height:min(88dvh,50rem); max-height:88dvh; padding:0; overflow:hidden; border-radius:18px;
}
.preference-editor-dialog > form { display:contents; }
.preference-editor-dialog .preference-editor-header { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; margin:0; border-bottom:1px solid var(--nmc-line); background:var(--nmc-surface-solid); }
.preference-editor-header h2 { margin:0; font-size:22px; }
.preference-editor-header p { margin:4px 0 0; font-size:14px; font-weight:400; color:var(--nmc-muted); }
.preference-editor-header .icon-button { border:0; color:var(--nmc-muted); }
.preference-editor-dialog .preference-editor-body { min-height:0; overflow:auto; overscroll-behavior:contain; padding:24px; }
.preference-editor-section { margin:0; }
.preference-editor-section + .preference-editor-section { margin-top:28px; padding-top:24px; border-top:1px solid var(--nmc-line); }
.preference-editor-section h3 { display:flex; align-items:center; gap:10px; margin:0 0 20px; font-size:16px; font-weight:700; }
.preference-editor-section h3 .ph { color:var(--nmc-muted); font-size:20px; }
.preference-editor-section .field { min-width:0; margin:0 0 16px; gap:8px; }
.preference-editor-section .field:last-child { margin-bottom:0; }
.preference-editor-section label { font-size:13px; font-weight:600; }
.preference-editor-section textarea { min-height:96px; }
.preference-field-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; }
.preference-field-grid .field { margin:0; }
.preference-colors { min-inline-size:0; margin:0 0 16px; padding:0; border:0; }
.preference-colors legend { margin-bottom:10px; padding:0; font-size:13px; font-weight:600; }
.preference-color-options { display:flex; flex-wrap:wrap; gap:8px; }
.preference-color-options .preference-color-chip { position:relative; display:inline-flex; align-items:center; gap:8px; min-height:44px; padding:8px 12px; border:1px solid var(--nmc-line); border-radius:10px; cursor:pointer; background:var(--nmc-surface-solid); font-size:13px; font-weight:400; }
.preference-color-chip input { position:absolute; width:1px; height:1px; opacity:0; }
.preference-color-chip:has(input:checked) { border-color:var(--nmc-primary); background:var(--nmc-primary-soft); }
.preference-color-chip:has(input:checked)::after { content:'✓'; color:var(--nmc-primary); font-weight:700; }
.preference-color-chip:has(input:focus-visible) { outline:2px solid var(--nmc-primary); outline-offset:3px; }
.preference-color-swatch { flex:0 0 14px; width:14px; height:14px; border-radius:50%; border:1px solid rgba(0,0,0,.15); }
.preference-color-swatch[data-color="blau"] { background:#5686b6; }
.preference-color-swatch[data-color="verd"] { background:#668b68; }
.preference-color-swatch[data-color="vermell"] { background:#ba5750; }
.preference-color-swatch[data-color="rosa"] { background:#dda2b0; }
.preference-color-swatch[data-color="lila"] { background:#9f82bc; }
.preference-color-swatch[data-color="groc"] { background:#e3c65f; }
.preference-color-swatch[data-color="taronja"] { background:#d89051; }
.preference-color-swatch[data-color="negre"] { background:#353535; }
.preference-color-swatch[data-color="blanc"] { background:#fff; }
.preference-color-swatch[data-color="beix"] { background:#c9b596; }
.preference-avoid-colors { margin-top:16px; }
.preference-avoid-colors summary { display:flex; align-items:center; gap:12px; min-height:44px; cursor:pointer; font-size:13px; color:var(--nmc-muted); font-weight:600; list-style:none; }
.preference-avoid-colors summary::-webkit-details-marker { display:none; }
.preference-avoid-colors[open] summary { margin-bottom:12px; }
.preference-avoid-colors[open] summary .ph { transform:rotate(180deg); }
.preference-editor-dialog .preference-editor-footer, .preference-editor-footer { display:flex; align-items:center; justify-content:flex-end; gap:12px; padding:16px 24px; border-top:1px solid var(--nmc-line); background:var(--nmc-surface-solid); }
.preference-editor-footer .btn { min-width:100px; }
.preference-editor-page { max-width:48rem; }
.preference-editor-page > form { padding:24px; border:1px solid var(--nmc-line); border-radius:16px; background:var(--nmc-surface-solid); }
.preference-editor-page .preference-editor-footer { padding:24px 0 0; margin-top:24px; }
@media (min-width:861px) {
  .mobile-add-sheet__dialog[data-mobile-sheet-full-height] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; height:min(86dvh,46rem); padding:0; overflow:hidden; }
  .mobile-add-sheet__dialog[data-mobile-sheet-full-height] > form { display:contents; }
  .mobile-add-sheet__dialog[data-mobile-sheet-full-height] [data-mobile-sheet-header] { margin:0; padding:20px 24px; border-bottom:1px solid var(--nmc-line); }
  .mobile-add-sheet__dialog[data-mobile-sheet-full-height] [data-mobile-sheet-body] { min-height:0; overflow:auto; overscroll-behavior:contain; padding:24px; }
  .mobile-add-sheet__dialog[data-mobile-sheet-full-height] [data-mobile-sheet-footer] { position:static; margin:0; padding:16px 24px; background:var(--nmc-surface-solid); border-top:1px solid var(--nmc-line); }
}
@media (max-width:860px) {
  .mobile-add-sheet__dialog.preference-editor-dialog[data-mobile-sheet-full-height] { height:calc(100dvh - env(safe-area-inset-top)); max-height:calc(100dvh - env(safe-area-inset-top)); border-radius:18px 18px 0 0; }
  .preference-editor-dialog .preference-editor-header { padding:16px 20px; }
  .preference-editor-dialog .preference-editor-body { padding:20px; }
  .preference-editor-dialog .preference-editor-footer { padding:12px 20px calc(12px + env(safe-area-inset-bottom)); }
}
@media (max-width:620px) {
  .owner-manage-grid[data-product-view] .owner-product-actions { justify-content:flex-start; }
  .owner-manage-grid[data-product-view] .owner-product-actions > .btn { flex:1 1 auto; }
  .preference-field-grid { grid-template-columns:1fr; gap:16px; }
  .preference-summary { gap:16px; }
  .preference-editor-footer .btn { flex:1; min-width:0; font-size:14px; }
}
