.crumbs { padding: 18px 0 8px; }
.crumbs a { color: var(--muted); }
.rug-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 64px); align-items: start; }
.rug-media { position: sticky; top: 88px; display: grid; justify-items: center; gap: 12px; }
.rug-frame { margin: 0; width: 100%; display: grid; place-items: center; position: relative; }
.rug-img { max-height: calc(100vh - 170px); width: auto; max-width: 100%; object-fit: contain; cursor: crosshair; touch-action: pan-y;
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(0,0,0,.2); }
.loupe-read { color: var(--muted); text-align: center; max-width: 52ch; min-height: 3.4em; margin: 0; }

.collection { margin: 0; color: var(--muted); }
.collection a { color: var(--text-2); }
.rug-title { font-size: clamp(1.9rem, 3.6vw, 2.7rem); line-height: 2.05; margin: .1em 0 .3em; }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; margin: 0 0 22px; padding: 16px 0; border-block: 1px solid var(--line); }
.facts dt { font-size: var(--t-xs); color: var(--muted); }
.facts dd { margin: 0; font-weight: 650; }
.price-block { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.price-block .price { font-size: var(--t-xl); font-weight: 750; }
.price-block .sold { color: var(--bad); font-weight: 700; }
.treasury-note { border-inline-start: 3px solid var(--measure); padding: 2px 14px; margin-bottom: 20px; }
.treasury-note p { margin: 4px 0 0; color: var(--text-2); font-size: var(--t-sm); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 30px; }
.actions .btn.primary { flex: 1 1 100%; }
#save[aria-pressed="true"] { color: var(--accent); }
#save[aria-pressed="true"] svg { fill: currentColor; }
.h-sm { font-size: var(--t-md); margin: 0 0 10px; }
.palette { margin-bottom: 26px; }
.palette .bars { display: flex; height: 14px; border-radius: 3px; overflow: hidden; margin-bottom: 12px; }
.palette .chip { min-height: 34px; font-size: var(--t-xs); }
.passport { margin-bottom: 24px; }
.passport dl { margin: 0 0 10px; display: grid; }
.passport dl div { display: grid; grid-template-columns: 11em 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: var(--t-sm); }
.passport dt { color: var(--muted); }
.passport dd { margin: 0; }
.desc { color: var(--text-2); line-height: 1.95; margin-bottom: 18px; max-width: 64ch; }
.credit { line-height: 1.7; }
.done { border: 1px solid var(--ok); border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 16px; font-size: var(--t-sm); }

.block { margin-top: 72px; }
.viewer model-viewer { width: 100%; height: min(70vh, 560px); background: radial-gradient(ellipse at 50% 60%, var(--raised), var(--surface) 70%); border-radius: var(--r-lg); --poster-color: transparent; }
.mv-ar-btn { position: absolute; bottom: 16px; inset-inline-start: 50%; transform: translateX(50%); border: 0; border-radius: var(--r-md); min-height: 48px; padding: 0 20px;
  background: var(--accent); color: var(--on-ronas); font: 700 var(--t-sm)/1 var(--font); cursor: pointer; }

.plan-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.plan-inputs { align-items: end; margin-top: 16px; }
.plan-inputs .field { width: 130px; }
.plan-verdict { margin-top: 16px; min-height: 3.5em; }
.plan-verdict .bad { color: var(--bad); }
.plan { width: 100%; max-height: 480px; }
.plan-room { fill: var(--surface); stroke: var(--text-2); stroke-width: 3; }
.plan-dim { stroke: var(--measure); stroke-width: 1.5; stroke-dasharray: 4 3; }
.plan-num { fill: var(--measure); font: 700 13px var(--font); }

dialog.sheet { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg); color: var(--text); padding: 24px; width: min(480px, 94vw); }
dialog.sheet::backdrop { background: rgba(0,0,0,.6); }
dialog.sheet form { display: grid; gap: 14px; }
dialog.sheet h2 { margin: 0; }
.kind-seg { display: flex; }
.kind-seg button { flex: 1; }
.form-err { color: var(--bad); margin: 0; min-height: 1.4em; font-size: var(--t-sm); }

@media (max-width: 900px) {
  .rug-page, .plan-block { grid-template-columns: 1fr; }
  .rug-media { position: static; }
  .rug-img { max-height: 70vh; }
}

.sizes-block { margin-bottom: 22px; }
.sizes-block ul { list-style: none; margin: 0 0 6px; padding: 0; display: grid; }
.sizes-block li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: var(--t-sm); }
