/* Studio additions: account bar, couple form, preview views, modals. */
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.side-head .logo { width: 180px; }
.account { display: flex; gap: 12px; font-size: 13px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.account a, .account button.linkish { color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 0; }
.account a:hover, .account button.linkish:hover { color: var(--brand); }
.account .who { color: var(--muted); }
.chart-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 10px 0 8px; }
.chart-actions .hint { margin: 0 0 0 4px; }
.opt { color: var(--muted); font-weight: 400; }

.seg.mode { margin-bottom: 14px; }
fieldset.person { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.person legend { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--brand); padding: 0; margin: 4px 0 10px; }
fieldset.person[data-p="2"] { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 4px; }

/* Stage & views */
main#stage { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; padding: 0; }
.viewbar {
  display: flex; gap: 4px; align-items: center; padding: 12px 20px; position: sticky; top: 0; z-index: 3;
  background: color-mix(in srgb, var(--stage) 88%, transparent); backdrop-filter: blur(6px);
}
.viewbar [role=tab] {
  font: inherit; font-size: 13px; border: 1px solid transparent; background: transparent; color: var(--muted);
  padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.viewbar [role=tab][aria-selected=true] { background: var(--card); color: var(--ink); border-color: var(--line); }
.viewbar .spacer, .modal-bar .spacer { flex: 1; }
.iconbtn { font: inherit; font-size: 13px; background: var(--card); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 6px 12px; cursor: pointer; }
.iconbtn:disabled { opacity: .45; cursor: default; }
.view { flex: 1; display: grid; place-items: center; padding: 10px 32px 40px; }

/* Compare */
.compare-wrap { display: flex; gap: 28px; align-items: flex-start; justify-content: center; width: 100%; }
.cmp { margin: 0; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.cmp figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); text-align: center; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; }
.compare-wrap.on .paper { height: min(72vh, 900px); }
.paper.pinned img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }

/* Wall mock-up */
.room {
  --wall: #efebe4; --sofa: #8c8f88; --sofa-dark: #767971; --sofa-light: #9a9d95;
  position: relative; width: min(100%, 980px); aspect-ratio: 16 / 10; overflow: hidden; border-radius: 12px;
  background: var(--wall); box-shadow: 0 10px 40px rgba(0,0,0,.18);
}
.wall { position: absolute; inset: 0 0 14% 0; background:
  radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.35), transparent 60%),
  linear-gradient(to bottom, rgba(0,0,0,0) 70%, rgba(0,0,0,.06)), var(--wall); }
.floor { position: absolute; left: 0; right: 0; bottom: 0; height: 14%; background: linear-gradient(#b89b7a, #9c7f60); }
.sofa { position: absolute; left: 50%; bottom: 9%; transform: translateX(-50%); width: 62%; height: auto; filter: drop-shadow(0 10px 12px rgba(0,0,0,.2)); }
.frame { position: absolute; left: 50%; transform: translateX(-50%); box-shadow: 0 14px 28px rgba(0,0,0,.28), 0 2px 4px rgba(0,0,0,.2); }
.frame.black { background: #1b1b1b; } .frame.white { background: #f7f7f5; } .frame.none { background: transparent; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.frame.oak { background: linear-gradient(135deg, #b98a57, #8f6436 40%, #c49565 60%, #8a5f33); }
.frame.gold { background: linear-gradient(135deg, #e4c77b, #a8832f 35%, #f3dc95 55%, #9d7a2b); }
.mat { position: absolute; background: #fbfaf7; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.art { position: absolute; background-size: contain; background-repeat: no-repeat; background-position: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.wall-controls { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; justify-content: center; margin-top: 16px; font-size: 13px; }
.wall-controls label { display: flex; gap: 6px; align-items: center; margin: 0; font-weight: 400; }
.wall-controls select { width: auto; min-height: 34px; padding: 4px 8px; }

/* At a glance */
.glance { place-items: start center; }
#glance { width: min(100%, 860px); }
.people { display: grid; gap: 28px; }
.people.two { grid-template-columns: 1fr 1fr; }
.gl-name { font-size: 20px; font-weight: 600; margin: 0 0 12px; }
.big3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.big3 > div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.big3 .k { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.big3 .v { font-size: 18px; font-weight: 600; }
.big3 .d { font-size: 12px; color: var(--muted); }
.bars { margin: 16px 0; display: grid; gap: 6px; font-size: 13px; }
.bar { display: grid; grid-template-columns: 70px 1fr 26px; gap: 8px; align-items: center; }
.bar i { display: block; height: 8px; border-radius: 4px; background: var(--brand); }
.bar .track { background: var(--line); border-radius: 4px; overflow: hidden; }
.ptable { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ptable th, .ptable td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--line); }
.ptable th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.ptable tr:last-child td { border-bottom: 0; }
.gl-note { font-size: 12px; color: var(--muted); margin-top: 10px; }

/* Modals */
.modal { position: fixed; inset: 0; z-index: 30; background: rgba(15, 10, 20, .72); display: flex; flex-direction: column; }
.modal-bar { display: flex; gap: 8px; align-items: center; padding: 10px 16px; background: var(--card); color: var(--muted); font-size: 13px; }
.zoom-area { flex: 1; overflow: hidden; position: relative; cursor: grab; touch-action: none; }
.zoom-area.dragging { cursor: grabbing; }
.zoom-area img { position: absolute; left: 0; top: 0; transform-origin: 0 0; user-select: none; max-width: none; }
.sheet { margin: auto; width: min(560px, calc(100% - 32px)); max-height: 80vh; overflow: auto; background: var(--card); border-radius: 14px; padding: 20px; }
.sheet-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sheet-head h2 { margin: 0; font-size: 18px; }
.clist { list-style: none; margin: 0; padding: 0; }
.clist li { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.clist li .t { flex: 1; min-width: 0; }
.clist li .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clist li .t small { color: var(--muted); }

@media (max-width: 900px) {
  .view { padding: 10px 16px 24px; }
  .compare-wrap { gap: 12px; }
  .compare-wrap.on .paper { height: 38vh; }
  .people.two { grid-template-columns: 1fr; }
  .big3 { grid-template-columns: 1fr 1fr 1fr; }
  .side-head .logo { width: 150px; }
}
@media (max-width: 900px) {
  .side-head { flex-wrap: wrap; }
  .account { justify-content: flex-start; }
  .cmp { max-width: 100%; }
  .cmp .paper { max-width: calc(100vw - 32px); height: auto; width: min(calc(100vw - 32px), 46vh); }
  .compare-wrap.on .cmp .paper { width: calc(50vw - 24px); }
  .viewbar { padding: 10px 16px; }
}

/* round 4 */
.seg.product { margin: 6px 0 4px; }
.seg.product button { padding: 10px 4px; font-weight: 500; }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.checks .check { margin: 3px 0; }
.btn.secondary { background: var(--card); color: var(--brand-ink); border: 1px solid var(--brand); margin-top: 8px; }
.btn.secondary:hover { background: var(--brand-soft); }
details.batch { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 8px; }
details.batch input[type=file] { font-size: 13px; max-width: 100%; }
.proof-toggle { margin: 0 8px 0 0; font-size: 13px; }
#gamutNote { max-width: 420px; text-align: left; }
.reading { margin-top: 22px; }
.reading h3 { font-size: 15px; margin: 18px 0 8px; color: var(--brand-ink); }
.reading .item { margin-bottom: 10px; }
.reading .item b { display: block; font-size: 14px; }
.reading .item p { margin: 2px 0 0; font-size: 14px; color: var(--ink); }
.clist li .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.progress { position: relative; height: 26px; margin-top: 8px; border-radius: 8px; background: var(--brand-soft); overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; width: 3%; background: var(--brand); opacity: .35; transition: width .4s ease; }
.progress span { position: relative; display: block; text-align: center; font-size: 12px; line-height: 26px; color: var(--ink); }
.offers { display: grid; gap: 8px; margin-bottom: 10px; }
.offer { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 400; }
.offer:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.offer input { margin-top: 4px; accent-color: var(--brand); }
.offer em { font-style: normal; color: var(--brand-ink); font-weight: 600; margin-left: 4px; }
.offer small { display: block; color: var(--muted); font-size: 12px; }
.side-head .brand-col { display: flex; flex-direction: column; align-items: flex-start; }
.side-head .brand-col .edition-badge { margin: 2px 0 6px; }

/* ---------------------------------------------------------------- phones */
.mobile-head { display: none; }
@media (max-width: 900px) {
  .mobile-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px 4px; }
  .mobile-head img { height: 30px; width: auto; display: block; }
  .mobile-head .edition-badge { margin: 0; }
  .mobile-head .mh-jump { margin-left: auto; font-size: 13px; color: var(--brand); text-decoration: none; white-space: nowrap; }
  .side-head .brand-col { display: none; }          /* the logo is in the slim header at the top */
  .viewbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 4px; }
  .viewbar::-webkit-scrollbar { display: none; }
  .viewbar > * { flex: none; white-space: nowrap; }
  .viewbar .spacer { display: none; }
}
@media (max-width: 480px) {
  .row:has(select) { grid-template-columns: 1fr; }   /* font and print menus: full width so names fit */
  .mobile-head .mh-jump { display: none; }
}
@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .layout > main, .layout > aside { min-width: 0; max-width: 100vw; }
}
