/* Bayou Crowns — "Boutique" look (v2). Light cream and white, plum accent, hairline frames, Cormorant + Jost. */
:root {
  --page: #FCFAF6; --cream: #F6F1E9; --white: #FFFFFF; --blush: #F7ECEE; --blush-d: #EBD5DA;
  --ink: #2E2531; --muted: #85797F; --dim: #B3A9AC; --hair: #E7DED4; --hair-d: #D6CABD;
  --plum: #5E3470; --plum-d: #4A2858; --plum-l: #8A63A0;
  --green: #2F7D5B; --amber: #B7791F; --red: #B4413C; --etsy: #F1641E;
  --serif: 'Cormorant Garamond', Georgia, serif; --sans: 'Jost', 'Helvetica Neue', Arial, sans-serif; --script: 'Libre Baskerville', Georgia, serif;
  --field-h: 36px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { margin: 0; background: var(--page); color: var(--ink); font: 15px/1.6 var(--sans); font-weight: 400; font-variant-numeric: lining-nums; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; margin: 0; white-space: nowrap; letter-spacing: .02em; }

/* Small caps label — the "boutique" voice */
.caps { font: 500 11px/1 var(--sans); letter-spacing: .24em; text-transform: uppercase; white-space: nowrap; }

/* Small square icon buttons — one helper for everything */
.ib { width: 34px; height: 34px; flex: none; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--hair-d); background: var(--white); color: var(--plum); border-radius: 2px; cursor: pointer; text-decoration: none; transition: background .2s, border-color .2s, color .2s; }
.ib svg { width: 15px; height: 15px; }
.ib:hover { border-color: var(--plum); background: var(--blush); }
.ib.on { background: var(--plum); border-color: var(--plum); color: #fff; }
.ib:disabled, .ib.off { opacity: .35; cursor: not-allowed; background: var(--white); border-color: var(--hair-d); }
.ib.sm { width: 28px; height: 28px; } .ib.sm svg { width: 13px; height: 13px; }
.ib.ghost { background: transparent; border-color: transparent; } .ib.ghost:hover { border-color: var(--hair-d); background: var(--white); }
.ib.field { width: var(--field-h); height: var(--field-h); }
.ibs { display: flex; gap: 4px; flex: none; }

/* Tags — slightly rounded rectangles, same size in a set */
.tag { display: inline-flex; align-items: center; justify-content: center; height: 22px; padding: 0 8px; min-width: 96px; border-radius: 2px; font: 500 10px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; border: 1px solid currentColor; background: var(--white); }
.tag.live { color: var(--green); } .tag.draft { color: var(--amber); } .tag.sold { color: var(--red); } .tag.special { color: var(--plum); } .tag.hidden { color: var(--dim); }

/* Framed card: white, square corners, barely-there shadow */
.card { background: var(--white); border: 1px solid var(--hair); box-shadow: 0 1px 2px rgba(46,37,49,.04), 0 10px 30px rgba(46,37,49,.05); }
.card-h { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 8px 10px 8px 18px; border-bottom: 1px solid var(--hair); }
.card-h h3 { font-size: 21px; flex: 1; overflow: hidden; text-overflow: ellipsis; }
.card-h .sub { color: var(--muted); font: italic 15px var(--serif); white-space: nowrap; }
.card-b { padding: 18px; }

/* Folder tabs — dainty: soft top corners, italic serif, touching, sitting on a fine plum line; selected is plum and 3px taller */
.tabs { display: flex; align-items: flex-end; border-bottom: 1px solid var(--plum); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; height: 30px; margin-right: -1px; padding: 0 16px; border: 1px solid var(--hair-d); border-bottom: 0; border-radius: 9px 9px 0 0; background: var(--blush); color: var(--muted); font: italic 500 16.5px/1 var(--serif); letter-spacing: .01em; white-space: nowrap; cursor: pointer; transition: color .2s, background .2s; }
.tab:hover { color: var(--plum); background: #FBF3F5; }
.tab.on { height: 33px; background: var(--plum); border-color: var(--plum); color: #fff; position: relative; z-index: 1; }
.tab .n { margin-left: 5px; font: 500 9.5px/1 var(--sans); letter-spacing: .08em; font-style: normal; vertical-align: 4px; opacity: .75; }
.tab:disabled { opacity: .4; cursor: not-allowed; }

/* Fields */
.lbl { display: block; font: 500 10.5px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); margin-bottom: 7px; white-space: nowrap; }
.in, select.in { width: 100%; height: var(--field-h); padding: 0 10px; background: var(--white); border: 1px solid var(--hair-d); border-radius: 2px; color: var(--ink); font: 14px var(--sans); outline: none; }
.in:focus { border-color: var(--plum); }
select.in { width: auto; min-width: 0; padding-right: 28px; appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235E3470' stroke-width='1.6'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 8px center/13px no-repeat; cursor: pointer; }
textarea.in { height: auto; padding: 8px 10px; resize: none; overflow: hidden; line-height: 1.5; }
.count { font-size: 11px; color: var(--dim); white-space: nowrap; }
.count.warn { color: var(--amber); }

/* ---------- 360° viewer ---------- */
.vw { display: flex; flex-direction: column; min-width: 0; }
.vw-tabs .tab { flex: 1 1 0; padding: 0 6px; }
.vw-stage { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(ellipse at 50% 45%, #E4E2E0, #C3C0BE 95%); cursor: grab; touch-action: pan-y; outline: none; user-select: none; }
.vw-stage:active { cursor: grabbing; }
.vw-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--plum); }
.vw-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transform-origin: 50% 50%; pointer-events: none; }
.vw-img.cover { object-fit: cover; }
.vw-img.sim { -webkit-mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); mask-image: linear-gradient(90deg, transparent, #000 14%, #000 86%, transparent); }
.vw-empty { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(ellipse at 50% 35%, #FFFFFF, var(--cream) 80%); }
.vw-empty-in { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 16px; }
.vw-mq { width: 32%; max-width: 160px; opacity: .8; margin-bottom: 8px; }
.vw-empty b { font: italic 500 22px var(--serif); white-space: nowrap; color: var(--plum); }
.vw-empty span { color: var(--muted); font-size: 13px; white-space: nowrap; }
.vw-hint { position: absolute; left: 50%; bottom: 12px; transform: translateX(-50%); display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 12px; background: rgba(255,255,255,.88); color: var(--plum); border-radius: 2px; font: 500 10px var(--sans); letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; pointer-events: none; transition: opacity .6s; }
.vw-hint svg { width: 13px; height: 13px; }
.vw-hint.gone { opacity: 0; }
.vw-mock { position: absolute; right: 8px; top: 8px; height: 22px; padding: 0 8px; display: flex; align-items: center; background: rgba(94,52,112,.88); color: #fff; border-radius: 2px; font: 500 9.5px var(--sans); letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.vw-angle { position: absolute; left: 8px; top: 8px; height: 22px; padding: 0 8px; display: flex; align-items: center; background: rgba(255,255,255,.88); color: var(--ink); border-radius: 2px; font: 500 10.5px var(--sans); letter-spacing: .06em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vw-bar { display: flex; align-items: center; gap: 4px; height: 58px; padding: 0 10px; background: var(--white); border: 1px solid var(--hair); border-top: 0; }
.vw-dial { position: relative; flex: 1; height: 100%; margin: 0 22px 0 18px; }
.vw-track { position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: var(--hair-d); }
.vw-tick { position: absolute; top: -9.5px; width: 20px; height: 20px; margin-left: -10px; padding: 0; border: 0; background: none; cursor: pointer; color: var(--muted); }
/* Dots sit exactly on the line (Ben: dots, not diamonds) */
.vw-tick i { position: absolute; left: 50%; top: 50%; width: 8px; height: 8px; transform: translate(-50%, -50%); border: 1px solid var(--dim); background: var(--white); border-radius: 50%; }
.vw-tick.has i { background: var(--plum); border-color: var(--plum); }
.vw-tick span { position: absolute; top: 21px; left: 50%; transform: translateX(-50%); font: 500 9.5px var(--sans); letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; }
.vw-tick.wrap span { display: none; }
.vw-tick:hover, .vw-tick:hover span { color: var(--plum); }
.vw-mark { position: absolute; top: 19.5px; width: 12px; height: 12px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--plum); box-shadow: 0 0 0 2px var(--white), 0 1px 4px rgba(46,37,49,.3); pointer-events: none; }
.vw-models { flex: 1; display: flex; align-items: center; justify-content: center; gap: 10px; }
.vw-count { font: 500 10px var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); min-width: 110px; text-align: center; white-space: nowrap; }

/* Modal shell */
.modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px; background: rgba(46,37,49,.42); backdrop-filter: blur(4px); }
.modal[hidden] { display: none; }
.mbox { width: min(1120px, 100%); max-height: calc(100vh - 48px); overflow: auto; background: var(--white); border: 1px solid var(--hair); box-shadow: 0 30px 80px rgba(46,37,49,.25); }
@media (max-width: 700px) {
  .modal { padding: 0; place-items: stretch; }
  .mbox { max-height: 100vh; height: 100%; border: 0; }
  .vw-tabs .tab { font-size: 14.5px; padding: 0 4px; }
}

/* Ken Burns: the photo that just came in drifts slowly closer (360° view and the owner app's preview) */
@keyframes kenburns { from { scale: 1; } to { scale: 1.08; } }
.kb { animation: kenburns 4.5s ease-out forwards; }
