/* The owner screen. Every group shares the layout; each has its own colours, type and a few touches,
   so a car lot's screen feels like a car lot's and a potter's like a potter's. */
@font-face { font-family: "Big Shoulders"; src: url("../demos/fonts/big-shoulders-display-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../demos/fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("../demos/fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../demos/fonts/fraunces-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../demos/fonts/fraunces-latin-wght-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; }
:root {
  --bg: #f4ede2; --panel: #fffaf2; --ink: #2a2420; --mute: #6d6156; --line: rgba(42, 36, 32, .16);
  --acc: #a1471f; --acc-ink: #fff; --ok: #2f6b3a; --bad: #9c2a14; --warn-bg: #fbe9e4;
  --head: "Fraunces", Georgia, serif; --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 10px; --case: none; --track: 0;
  color-scheme: light;
}
body[data-group="lot"] {
  --bg: #121417; --panel: #1c1f24; --ink: #eef0f2; --mute: #a3a9b1; --line: rgba(238, 240, 242, .14);
  --acc: #ff6a1a; --acc-ink: #121417; --ok: #6fd28a; --bad: #ff8a75; --warn-bg: #3a1d16;
  --head: "Big Shoulders", "Arial Narrow", sans-serif; --radius: 4px; --case: uppercase; --track: .04em;
  color-scheme: dark;
}
body[data-group="homes"] {
  --bg: #f7f6f2; --panel: #fff; --ink: #1d2b4a; --mute: #5d6678; --line: rgba(29, 43, 74, .14);
  --acc: #1d2b4a; --acc-ink: #fff; --head: "Cormorant", Georgia, serif; --radius: 2px;
}
body[data-group="menu"] {
  --bg: #1f2a22; --panel: #283429; --ink: #f3ead8; --mute: #b9b39f; --line: rgba(243, 234, 216, .15);
  --acc: #e0b04f; --acc-ink: #1f2a22; --ok: #9ad19a; --bad: #ff9b85; --warn-bg: #45261e; --head: "Fraunces", Georgia, serif;
  color-scheme: dark;
}
body[data-group="work"] {
  --bg: #eceef0; --panel: #fff; --ink: #20262d; --mute: #5c6670; --line: rgba(32, 38, 45, .15);
  --acc: #f2c230; --acc-ink: #20262d; --acc-text: #6e5200; --head: "Arial Narrow", "Helvetica Neue", Arial, sans-serif; --radius: 3px; --case: uppercase; --track: .03em;
}

* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; background: var(--bg); color: var(--ink); font: 400 1rem/1.5 var(--body); }
main { width: min(100% - 2rem, 62rem); margin: 0 auto; padding: 1.5rem 0 4rem; }
h1, h2 { font-family: var(--head); font-weight: 600; line-height: 1.1; text-transform: var(--case); letter-spacing: var(--track); }
h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
h1 em { display: block; font-style: normal; color: var(--acc-text, var(--acc)); font-size: .55em; margin-top: .3rem; }
body[data-group="homes"] h1 em, body[data-group="shop"] h1 em { font-style: italic; }
h2 { font-size: 1.35rem; }
h2 small { font: 400 .9rem var(--body); color: var(--mute); text-transform: none; letter-spacing: 0; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.kicker { font-size: .75rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--mute); margin-bottom: .4rem; }
.hint { color: var(--mute); font-size: .92rem; margin-top: .3rem; }
.note { min-height: 1.4em; font-size: .93rem; color: var(--ok); margin-top: .6rem; }
.note.bad { color: var(--bad); }
.warn { padding: .75rem 1rem; border-radius: var(--radius); background: var(--warn-bg); color: var(--bad); margin-top: 1rem; }

.go, .ghost, .linkish { cursor: pointer; border-radius: var(--radius); }
.go { padding: .7rem 1.2rem; border: 0; background: var(--acc); color: var(--acc-ink); font-weight: 600; text-transform: var(--case); letter-spacing: var(--track); }
.go:hover { filter: brightness(1.08); }
.ghost { display: inline-flex; align-items: center; padding: .55rem 1rem; border: 1px solid var(--line); background: none; text-decoration: none; }
.ghost:hover { border-color: var(--acc); color: var(--acc-text, var(--acc)); }
.linkish { border: 0; background: none; padding: .55rem .4rem; text-decoration: underline; color: var(--mute); }
.linkish[data-sure] { color: var(--bad); font-weight: 600; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }

label { display: grid; gap: .3rem; font-size: .92rem; font-weight: 500; }
label small { font-weight: 400; color: var(--mute); }
input, select, textarea { width: 100%; padding: .65rem .75rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
textarea { resize: vertical; }
input[type="checkbox"] { width: 1.2rem; height: 1.2rem; accent-color: var(--acc); }
.switch { display: flex; align-items: center; gap: .6rem; }

.demo-strip { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding: .6rem 1rem; background: #0b0c0b; color: #ece9e1; font: 400 .88rem/1.35 system-ui, sans-serif; }
.demo-strip span:first-child { flex: 1 1 18rem; }
.demo-kinds { display: flex; flex-wrap: wrap; gap: .35rem; }
.demo-kinds a { padding: .25rem .7rem; border-radius: 99px; border: 1px solid rgba(236, 233, 225, .3); color: #ece9e1; text-decoration: none; }
.demo-kinds a[aria-current] { background: #c8f23c; border-color: #c8f23c; color: #0b0c0b; font-weight: 600; }
.demo-strip button { padding: .3rem .8rem; border-radius: 99px; border: 1px solid rgba(236, 233, 225, .4); background: none; color: #ece9e1; cursor: pointer; }

.login { max-width: 24rem; margin: 12vh auto 0; display: grid; gap: 1rem; padding: 1.8rem; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }

.top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 1rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.top-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
body[data-group="lot"] .top { border-bottom: 3px solid var(--acc); }
body[data-group="homes"] .top { border-bottom: 1px solid var(--ink); }
body[data-group="homes"] h1, body[data-group="homes"] h2 { font-weight: 500; }
body[data-group="lot"] h1, body[data-group="lot"] h2 { font-weight: 800; }

.panel { margin-top: 1.2rem; padding: clamp(1rem, 3vw, 1.5rem); border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.guide { border-style: dashed; }
.guide ol { padding-left: 1.2rem; display: grid; gap: .35rem; margin-top: .5rem; }
.list-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .8rem; }
.tools { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem 1rem; margin: 1rem 0 .4rem; }
.chips { display: flex; flex-wrap: wrap; gap: .35rem; }
.chips button { padding: .35rem .8rem; border-radius: 99px; border: 1px solid var(--line); background: none; cursor: pointer; font-size: .9rem; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.search { flex: 0 1 14rem; }

.items { list-style: none; padding: 0; display: grid; gap: .6rem; margin-top: .6rem; }
.item { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .6rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); }
.item .pic { width: 5.5rem; aspect-ratio: 4 / 3; border-radius: calc(var(--radius) - 2px); overflow: hidden; background: var(--line); display: grid; place-items: center; }
.item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nopic { font-size: .75rem; color: var(--mute); }
.what { display: grid; gap: .1rem; min-width: 0; }
.what b { font-weight: 600; overflow-wrap: anywhere; }
.what span { color: var(--mute); font-size: .9rem; }
.what .price { color: var(--ink); font-weight: 600; font-size: 1rem; }
body[data-group="lot"] .what .price { color: var(--acc); font-family: var(--head); font-size: 1.15rem; }
.acts { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: .4rem; }
.acts select { width: auto; padding: .45rem .5rem; }
.item.is-sold .pic img, .item.is-hidden .pic img, .item.is-out .pic img { opacity: .5; }
.item.is-hidden .what b { color: var(--mute); }
.empty { padding: 1.2rem; text-align: center; color: var(--mute); border: 1px dashed var(--line); border-radius: var(--radius); }
@media (max-width: 640px) {
  .item { grid-template-columns: 4.5rem minmax(0, 1fr); }
  .item .pic { width: 4.5rem; }
  .acts { grid-column: 1 / -1; justify-content: start; }
}

.notice { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; margin-top: 1rem; }
.notice .switch, .notice .note { grid-column: 1 / -1; }
.notice .go { justify-self: start; }
@media (max-width: 640px) { .notice { grid-template-columns: minmax(0, 1fr); } }

dialog { margin: auto; width: min(100% - 1.5rem, 44rem); max-height: calc(100vh - 2rem); padding: 0; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); }
dialog::backdrop { background: rgba(0, 0, 0, .55); }
dialog form { display: grid; gap: 1rem; padding: clamp(1rem, 3vw, 1.6rem); }
.ed-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.x { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line); background: none; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.label { font-size: .92rem; font-weight: 500; }
.label small { font-weight: 400; color: var(--mute); }
.thumbs { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0; }
.thumbs li { width: 7rem; display: grid; gap: .25rem; }
.thumbs img { width: 7rem; aspect-ratio: 4 / 3; object-fit: cover; border-radius: calc(var(--radius) - 2px); display: block; }
.thumbs li:first-child img { outline: 2px solid var(--acc); outline-offset: 2px; }
.thumb-acts { display: flex; gap: .25rem; }
.thumb-acts button { flex: 1; padding: .2rem; border: 1px solid var(--line); border-radius: 6px; background: none; cursor: pointer; }
.thumb-acts button:disabled { opacity: .35; cursor: default; }
.add-photo { position: relative; display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1.1rem; border: 1px dashed var(--mute); border-radius: var(--radius); cursor: pointer; width: max-content; font-weight: 600; }
.add-photo::before { content: "+"; font-size: 1.2rem; line-height: 1; color: var(--acc-text, var(--acc)); }
.add-photo:hover { border-color: var(--acc); }
.add-photo:focus-within { outline: 2px solid var(--acc); outline-offset: 2px; }
.add-photo input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.add-photo:has(input:disabled) { opacity: .45; cursor: default; }
.ed-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; align-items: end; }
.ed-fields .wide { grid-column: 1 / -1; }
.ed-fields .hint { font-weight: 400; }
.ed-foot { display: flex; gap: .6rem; }
@media (max-width: 560px) { .ed-fields { grid-template-columns: minmax(0, 1fr); } }

/* Class dates */
.classes { list-style: none; padding: 0; display: grid; gap: .6rem; margin-top: 1rem; }
.classes .empty { color: var(--mute); }
.class { padding: .7rem .8rem; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg); }
.class.past { opacity: .65; }
.class-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; }
.class .what { display: grid; gap: .1rem; }
.class .what span { color: var(--mute); font-size: .92rem; }
.class .what .booked { color: inherit; font-weight: 600; }
.class .acts { display: flex; align-items: center; gap: .4rem; }
.class .step { min-width: 2.4rem; justify-content: center; padding-inline: .6rem; }
.class .step:disabled { opacity: .4; cursor: default; }
.who { list-style: none; padding: .5rem 0 0; margin-top: .6rem; border-top: 1px dashed var(--line); display: grid; gap: .3rem; font-size: .93rem; }
.who li { display: flex; flex-wrap: wrap; align-items: center; gap: .2rem 1rem; }
.who a { color: var(--mute); }
.who .linkish { padding-block: .2rem; }
.who li.gone span { text-decoration: line-through; color: var(--mute); }
.who small { color: var(--bad); }
.class-add { display: grid; grid-template-columns: 2fr 1.3fr 1fr .7fr 1fr; gap: .8rem; margin-top: 1.2rem; align-items: end; }
.class-add .go { justify-self: start; }
.class-add .note { grid-column: 1 / -1; margin-top: 0; }
@media (max-width: 760px) { .class-add { grid-template-columns: repeat(2, minmax(0, 1fr)); } .class-add label:first-child { grid-column: 1 / -1; } }
