:root {
  --paper: #fffcf6; --ink: #2a2926; --muted: #766d5c; --line: #cbbfa6; --fill: #f5eddc; --field: #ffffff;
  --sold: #7d1f2c;
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 15px; line-height: 1.5; }
body.locked { overflow: hidden; }
img { max-width: 100%; }

.top { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center; padding: 14px 24px; }
.logo { font-weight: 700; letter-spacing: .1em; color: var(--ink); text-decoration: none; font-size: 15px; }
.top nav { display: flex; gap: 18px; }
.top nav a { color: var(--ink); text-decoration: none; font-size: 14px; padding-bottom: 2px; }
.top nav a.on { border-bottom: 1.5px solid var(--ink); }
.menu-btn { display: none; font: inherit; font-size: 14px; background: transparent; color: var(--ink); border: 1px solid var(--ink); padding: 5px 10px; cursor: pointer; }

.sec { padding: 40px 24px; border-bottom: 1px solid var(--line); }
.wrap { max-width: 920px; margin: 0 auto; }
h1 { font-size: 30px; line-height: 1.15; margin: 0 0 8px; letter-spacing: .02em; }
h2 { font-size: 22px; line-height: 1.2; margin: 0 0 8px; }
h3 { font-size: 17px; margin: 0 0 6px; }
p { margin: 0 0 12px; }
.sub { color: var(--muted); }
.lead { font-size: 16px; }
.center { text-align: center; }
.narrow { max-width: 620px; }
.center .narrow, .narrow.center { margin-left: auto; margin-right: auto; }

.two { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 16px; }
.center .row { justify-content: center; }
.stack > * + * { margin-top: 36px; }

.btn { display: inline-block; font: inherit; font-size: 14px; color: var(--ink); background: transparent;
  border: 1.5px solid var(--ink); border-radius: 0; padding: 9px 16px; text-decoration: none; cursor: pointer; }
.btn.solid { background: var(--ink); color: var(--paper); }
.btn.sm { padding: 5px 12px; font-size: 13px; margin-top: 8px; }
.btn:disabled { opacity: .5; cursor: default; }
.link { color: var(--ink); font-size: 14px; text-underline-offset: 3px; cursor: pointer; }
.tl { font: inherit; font-size: 12px; background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; cursor: pointer; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Empty slot for a photo that Solomiia has not sent yet */
.ph { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; border: 1px solid var(--line);
  background:
    linear-gradient(to top right, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)),
    linear-gradient(to bottom right, transparent calc(50% - .5px), var(--line) calc(50% - .5px), var(--line) calc(50% + .5px), transparent calc(50% + .5px)),
    var(--fill); }
.ph > span { background: var(--fill); color: var(--muted); font-size: 12px; padding: 2px 8px; text-align: center; }
.ph.wide { aspect-ratio: 4 / 3; }
.ph.square { aspect-ratio: 1 / 1; }

/* Photo of Solomiia or a room: fills its box */
.pic { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border: 1px solid var(--line); background: var(--fill); }
.pic.wide { aspect-ratio: 4 / 3; }
.pic.square { aspect-ratio: 1 / 1; }
.pic img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }

/* A painting is never cropped */
.art { aspect-ratio: 4 / 5; }
.art img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; }
.art.big img { object-position: center; }

.card { all: unset; display: block; cursor: pointer; width: 100%; }
.card:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.cap { margin-top: 8px; font-size: 13px; line-height: 1.4; }
.cap b { display: block; font-size: 14px; }
.cap .m { color: var(--muted); display: block; }
.cap .p { display: block; margin-top: 2px; }
.sold { color: var(--sold); white-space: nowrap; }
.sold::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .4em; border-radius: 50%; background: currentColor; vertical-align: .1em; }
.gallery .pic { cursor: zoom-in; }

/* Photo viewer: arrows over the big photo */
.stage { position: relative; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.nav { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; padding: 0;
  font: inherit; font-size: 26px; line-height: 1; color: var(--ink); background: rgba(255, 252, 246, .85);
  border: 1px solid var(--ink); border-radius: 50%; cursor: pointer; }
.nav.prev { left: 8px; }
.nav.next { right: 8px; }
.count { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); font-size: 12px; padding: 1px 8px;
  background: rgba(255, 252, 246, .85); border-radius: 10px; }
.lb-card.photo { grid-template-columns: 1fr; max-width: 900px; padding-top: 44px; }
.lb-card.photo .art { aspect-ratio: auto; height: min(72vh, 760px); }

.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { all: unset; cursor: pointer; width: 56px; height: 70px; border: 1px solid var(--line); overflow: hidden; }
.thumb.on { outline: 1.5px solid var(--ink); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Only Solomiia sees these, after she logs in */
body:not(.editing) .owner-only { display: none !important; }
body.editing .guest-only { display: none !important; }

.form label { display: block; font-size: 13px; margin: 0 0 12px; }
.form input, .form select, .form textarea { display: block; width: 100%; margin-top: 4px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--field); border: 1px solid var(--line); border-radius: 0; padding: 9px 10px; }
.form input[type="checkbox"] { display: inline-block; width: auto; margin: 0; padding: 0; }
.form label.chk { display: flex; gap: 8px; align-items: center; }
.form textarea { min-height: 110px; resize: vertical; }
.form .bad { border-color: #a33a2a; }
.form .hp { position: absolute; left: -9999px; }
.err { display: block; color: #a33a2a; font-size: 12px; margin-top: 3px; }
.box { border: 1px solid var(--line); padding: 16px; background: var(--field); }
.fail { border: 1px solid #a33a2a; color: #a33a2a; padding: 10px 12px; font-size: 13px; margin-bottom: 12px; }
.fail a { color: inherit; }
.info p { margin-bottom: 6px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: end; }

/* Painting editor */
.ed-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 4px 0 6px; }
.ed-ph { width: 88px; font-size: 12px; line-height: 1.5; }
.ed-ph .m { display: block; color: var(--muted); }
.ed-img { height: 110px; border: 1px solid var(--line); background: var(--fill); display: grid; place-items: center; color: var(--muted); }
.ed-img img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ed-add { width: 88px; height: 110px; border: 1.5px dashed var(--ink); border-radius: 0; background: transparent; color: var(--ink); font: inherit; font-size: 13px; cursor: pointer; }
.ed-foot { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin-top: 6px; }
.ed-foot .push { margin-left: auto; }

.foot { padding: 28px 24px; font-size: 13px; color: var(--muted); }
.foot .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.foot a { color: var(--ink); text-decoration: none; display: block; margin-bottom: 4px; }
.foot .copy { margin-top: 18px; padding-top: 12px; border-top: 1px solid var(--line); }

/* Big view of one painting, or the editor */
.lightbox { position: fixed; inset: 0; z-index: 10; background: rgba(42, 41, 38, .6); display: grid; place-items: center; padding: 16px; }
.lb-card { position: relative; width: 100%; max-width: 760px; max-height: 100%; overflow: auto; background: var(--paper);
  border: 1px solid var(--ink); padding: 18px; display: grid; grid-template-columns: 1.15fr 1fr; gap: 18px; align-items: start; }
.lb-card.single { grid-template-columns: 1fr; max-width: 520px; }
.lb-close { position: absolute; top: 8px; right: 8px; font: inherit; font-size: 13px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-radius: 0; padding: 3px 9px; cursor: pointer; z-index: 1; }
.lb-info { padding-top: 28px; }
.lb-info .btn { margin-top: 8px; }

@media (max-width: 620px) {
  .top { padding: 12px 16px; }
  .menu-btn { display: block; }
  .top nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); }
  .top.open nav { display: flex; }
  .top nav a { padding: 12px 16px; border-top: 1px solid var(--line); }
  .top nav a.on { border-bottom: 0; font-weight: 700; }
  .sec { padding: 28px 16px; }
  h1 { font-size: 26px; }
  .two { grid-template-columns: 1fr; gap: 18px; }
  .two .first-on-phone { order: -1; }
  .two .ph.first-on-phone { aspect-ratio: 5 / 4; }
  .two .pic.first-on-phone { aspect-ratio: 1 / 1; }
  .grid3 { grid-template-columns: 1fr; }
  .grid3.keep2 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .foot { padding: 24px 16px; }
  .foot .cols { grid-template-columns: 1fr; }
  .lb-card { grid-template-columns: 1fr; }
  .lb-info { padding-top: 0; }
}
