/* Tsolmon Damba · studio admin
   Fonts: the site's own files (assets/css/fonts.css): Onest 400–600, Spectral 300/400 (+ italic).
   Calm, like the museum: a sage wall for the navigation, cream paper for the work, Spectral for the
   names of things and Onest for the interface. Big touch targets, plain labels, one accent (brass)
   for focus and the red of the seal only for warnings and deletions. */

:root {
  --sage: #4A5D58;
  --sage-deep: #3B4B47;
  --sage-ink: #2F3D39;
  --sage-tint: #E8EDEA;
  --sage-wash: #F0F3F1;
  --cream: #F4F1EA;
  --paper: #FCFBF8;
  --wall: #ECE8DF;
  --ink: #24211D;
  --ink-2: #5B554C;
  --ink-3: #8A8377;
  --line: #E4DFD4;
  --line-2: #CEC7B9;
  --brass: #B89A5A;
  --brass-light: #D8C08A;
  --seal: #B8312A;
  --seal-deep: #962920;
  --seal-soft: #F8E6E3;
  --ok: #3E7B55;
  --ok-soft: #E3EFE7;
  --warn: #8A5D0E;
  --warn-soft: #F6ECD4;
  --on-wall: #EEE8DA;
  --serif: "Spectral", "Iowan Old Style", Georgia, serif;
  --sans: "Onest", "Helvetica Neue", Arial, system-ui, sans-serif;
  --r: 1.333;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(36, 33, 29, .05), 0 8px 24px -12px rgba(36, 33, 29, .16);
  --hang: 0 1px 1px rgba(0, 0, 0, .22), 0 8px 14px -6px rgba(0, 0, 0, .28), 0 24px 40px -22px rgba(0, 0, 0, .45);
  --ring: 0 0 0 3px rgba(184, 154, 90, .6);
  --ease: cubic-bezier(.22, .7, .18, 1);
  --side-w: 264px;
  --tabbar-h: 66px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--cream); }
body {
  margin: 0; min-height: 100vh; background: var(--cream); color: var(--ink);
  font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: .2em; text-decoration-thickness: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
::selection { background: #E7DFC9; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: 12px; z-index: 300; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; transform: translateY(-200%); transition: transform .2s; text-decoration: none; }
.skip:focus { transform: none; }
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.ic .f, .ic--fill { fill: currentColor; stroke: none; }
.ic--sm { width: 16px; height: 16px; }
.muted { color: var(--ink-3); }
.link { color: var(--sage-deep); font-weight: 500; text-decoration: underline; text-decoration-color: rgba(59, 75, 71, .35); display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration-color: currentColor; }
.js .js-hide { display: none !important; }
.only-touch { display: none !important; }
.touch .only-touch { display: inline-flex !important; }
.nojs-confirm { display: flex; gap: 8px; align-items: center; font-size: 14px; margin-bottom: 8px; color: var(--seal-deep); }
.warn-text { color: var(--warn); font-weight: 500; }

/* ------------------------------------------------------------------ frame (as on the site) */
.fr {
  --mould-edge: inset 0 1px 0 rgba(255, 255, 255, .16), inset 0 -1px 0 rgba(0, 0, 0, .5), inset 1px 0 0 rgba(255, 255, 255, .05), inset -1px 0 0 rgba(0, 0, 0, .3);
  position: relative; display: block; padding: var(--pm, 5px); background: var(--mould-bg); box-shadow: var(--mould-edge), var(--hang);
}
.fr--paper { --mould-bg: linear-gradient(180deg, #3b3631 0%, #201d1a 42%, #141211 100%); --mat-bg: #F3EFE6; }
.fr--oil { --mould-bg: linear-gradient(180deg, #6a513e 0%, #45331f 44%, #2c2017 100%); --mat-bg: linear-gradient(135deg, #e1c98f 0%, #ad8f50 38%, #d3b97c 60%, #8d7140 100%); --pp: 5px; }
.fr--object { --mould-bg: linear-gradient(180deg, #ddd4c1 0%, #bfb49d 100%); --mat-bg: #E8E1D1; }
.fr__mat { display: block; padding: var(--pp, 14px); background: var(--mat-bg); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .26); }
.pic { position: relative; display: block; overflow: hidden; background: #E9E5DC; aspect-ratio: var(--r); }
.pic img { width: 100%; height: 100%; object-fit: cover; }
.pic::before { content: ""; position: absolute; inset: -12px; background: var(--lq, none) center / cover no-repeat; filter: blur(12px); }
.pic img { position: relative; }

.status { display: inline-flex; align-items: center; gap: 7px; font: 500 13px/1.3 var(--sans); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; display: inline-block; box-shadow: inset 0 0 0 1.4px currentColor; opacity: .75; }
.status--available .dot, .dot--available { background: var(--ok); box-shadow: none; opacity: 1; }
.status--reserved .dot, .dot--reserved { background: linear-gradient(90deg, var(--seal) 50%, transparent 50%); box-shadow: inset 0 0 0 1.4px var(--seal); opacity: 1; }
.status--sold .dot, .dot--sold { background: var(--seal); box-shadow: none; opacity: 1; }

/* ------------------------------------------------------------------ chrome: sidebar */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side-w); z-index: 30; display: flex; flex-direction: column;
  background: var(--sage) linear-gradient(180deg, rgba(255, 255, 255, .03), rgba(0, 0, 0, .08)); color: var(--on-wall);
  padding: 22px 14px 18px; overflow-y: auto;
}
.side__brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 22px; text-decoration: none; color: inherit; border-bottom: 1px solid rgba(238, 232, 218, .14); margin-bottom: 14px; }
.seal-round { display: block; flex: none; line-height: 0; }
.seal-round img { width: auto; height: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .18)); }
.side__name { display: flex; flex-direction: column; min-width: 0; }
.side__artist { font: 400 19px/1.2 var(--serif); letter-spacing: .01em; }
.side__studio { font: 500 11.5px/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: rgba(238, 232, 218, .62); margin-top: 3px; }
.side__nav ul { display: grid; gap: 2px; }
.side__link {
  position: relative; display: flex; align-items: center; gap: 13px; min-height: 46px; padding: 0 12px; border-radius: 10px;
  color: rgba(238, 232, 218, .86); text-decoration: none; font: 500 15px/1.2 var(--sans); transition: background .2s, color .2s;
}
.side__link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side__link[aria-current] { background: rgba(255, 255, 255, .13); color: #fff; }
.side__link[aria-current]::before { content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass-light); }
.side__link .badge { margin-left: auto; }
.side__foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(238, 232, 218, .14); display: grid; gap: 10px; }
.side__site, .side__out { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: 10px; color: rgba(238, 232, 218, .86); text-decoration: none; background: none; border: 0; width: 100%; font: 500 14.5px/1.2 var(--sans); text-align: left; }
.side__site:hover, .side__out:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side__who { font-size: 12.5px; color: rgba(238, 232, 218, .55); padding: 0 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side :focus-visible { outline-color: var(--brass-light); }
.badge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--seal); color: #fff; font: 600 12px/1 var(--sans); }

.langsw { display: inline-flex; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .16); gap: 2px; }
.langsw__btn { min-width: 46px; min-height: 44px; padding: 0 12px; border-radius: 999px; border: 0; background: none; color: rgba(238, 232, 218, .78); font: 600 12.5px/1 var(--sans); letter-spacing: .06em; }
.langsw__btn[aria-pressed="true"] { background: var(--on-wall); color: var(--sage-ink); }
.langsw__btn:hover { color: #fff; }
.langsw__btn[aria-pressed="true"]:hover { color: var(--sage-ink); }
.langsw--side { margin: 0 8px; justify-self: start; }

/* ------------------------------------------------------------------ chrome: phone */
.top { display: none; }
.tabbar { display: none; }
.sheet { display: none; }

.main { margin-left: var(--side-w); padding: 40px clamp(24px, 4vw, 60px) 120px; outline: none; }
.main > * { max-width: 1200px; }

@media (max-width: 999px) {
  .side { display: none; }
  .top {
    position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; height: 58px; padding: 0 12px 0 14px;
    background: var(--sage); color: var(--on-wall); box-shadow: 0 1px 0 rgba(0, 0, 0, .1);
  }
  .top__brand { display: grid; place-items: center; width: 44px; height: 44px; margin-left: -5px; line-height: 0; border-radius: 50%; }
  .top__title { flex: 1; min-width: 0; font: 400 18px/1.2 var(--serif); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .langsw--top .langsw__btn { min-width: 46px; min-height: 44px; }
  .langsw--top { padding: 2px; }
  .top { height: 60px; }
  .main { margin-left: 0; padding: 22px 16px calc(var(--tabbar-h) + var(--safe-b) + 40px); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, 1fr);
    height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
    background: rgba(252, 251, 248, .97); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px -14px rgba(0, 0, 0, .25);
  }
  @supports (backdrop-filter: blur(8px)) { .tabbar { background: rgba(252, 251, 248, .88); backdrop-filter: saturate(1.4) blur(10px); } }
  .tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: var(--ink-3); text-decoration: none; background: none; border: 0; font: 500 11.5px/1.1 var(--sans); padding: 6px 2px; }
  .tabbar__item[aria-current] { color: var(--sage-deep); }
  .tabbar__item[aria-current] .tabbar__ic { background: var(--sage-tint); }
  .tabbar__ic { position: relative; display: grid; place-items: center; width: 52px; height: 30px; border-radius: 999px; transition: background .2s; }
  .tabbar__ic .ic { width: 22px; height: 22px; }
  .badge--dot { position: absolute; top: -4px; right: 4px; min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; box-shadow: 0 0 0 2px var(--paper); }
  .tabbar__label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .sheet { position: fixed; inset: 0; z-index: 60; display: flex; align-items: flex-end; background: rgba(20, 26, 24, 0); transition: background .22s; }
  .sheet.is-open { background: rgba(20, 26, 24, .45); }
  .sheet__panel { width: 100%; background: var(--paper); border-radius: 20px 20px 0 0; padding: 10px 14px calc(16px + var(--safe-b)); transform: translateY(100%); transition: transform .26s var(--ease); }
  .sheet.is-open .sheet__panel { transform: none; }
  .sheet__panel::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-2); margin: 2px auto 12px; }
  .sheet__list { margin-bottom: 10px; }
  .sheet__link { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 54px; padding: 0 10px; border: 0; background: none; border-radius: 12px; text-decoration: none; font: 500 16px/1.2 var(--sans); color: var(--ink); text-align: left; }
  .sheet__link:hover { background: var(--sage-wash); }
  .sheet__link .ic { color: var(--sage); }
}

/* ------------------------------------------------------------------ page headers */
.ph { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.ph__eyebrow { font: 500 13px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.ph__title { font: 400 clamp(28px, 3.2vw, 38px)/1.12 var(--serif); letter-spacing: -.005em; color: var(--ink); }
.ph--hello .ph__title { font-size: clamp(31px, 3.8vw, 46px); }
.ph__sub { margin-top: 8px; color: var(--ink-2); font-size: 15.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ph__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.ph--form, .ph--hello { display: block; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin: -6px 0 4px; font: 500 14px/1.2 var(--sans); color: var(--ink-2); text-decoration: none; padding: 0 12px 0 0; }
.back:hover { color: var(--ink); }

/* ------------------------------------------------------------------ buttons */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px;
  border-radius: 11px; border: 1px solid transparent; font: 500 15px/1.2 var(--sans); text-decoration: none; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, box-shadow .18s, transform .1s; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--sage); color: #F8F4EB; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.btn--primary:hover:not(:disabled) { background: var(--sage-deep); }
.btn--ghost { background: var(--paper); border-color: var(--line-2); color: var(--ink); }
.btn--ghost:hover:not(:disabled) { border-color: var(--ink-3); background: #fff; }
.btn--text { background: none; color: var(--sage-deep); padding: 0 10px; min-height: 40px; }
.btn--text:hover { background: var(--sage-wash); }
.btn--danger { background: var(--seal); color: #fff; }
.btn--danger:hover { background: var(--seal-deep); }
.btn--danger-ghost { background: none; border-color: #E6BEB8; color: var(--seal-deep); }
.btn--danger-ghost:hover { background: var(--seal-soft); border-color: var(--seal); }
.btn--sm { min-height: 40px; padding: 0 13px; font-size: 14px; border-radius: 10px; }
.touch .btn--sm { min-height: 44px; }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 16.5px; border-radius: 12px; }
.btn--block { width: 100%; }
.btn--icon { width: 44px; padding: 0; }
.btn.is-busy { color: transparent !important; pointer-events: none; }
.btn.is-busy .ic { opacity: 0; }
.btn.is-busy::after { content: ""; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; }
.btn--ghost.is-busy::after, .btn--text.is-busy::after { border-color: rgba(0, 0, 0, .15); border-top-color: var(--sage); }
.touch .btn { min-height: 48px; }
.touch .btn--sm { min-height: 44px; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .25); border-top-color: var(--brass-light); animation: spin .9s linear infinite; }

/* ------------------------------------------------------------------ cards, notices */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px clamp(18px, 2.4vw, 30px); box-shadow: var(--shadow); margin-bottom: 20px; }
.card--quiet { background: transparent; box-shadow: none; }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.card__head > .link { min-height: 44px; padding: 0 2px; }
.card__head .card__title { margin: 0; }
.card__title { font: 400 21px/1.3 var(--serif); margin: 0 0 18px; color: var(--ink); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.subhead { font: 600 13px/1.3 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); margin: 22px 0 12px; }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 20px; font-size: 15px; outline: none; }
.notice .ic { margin-top: 2px; }
.notice--error { background: var(--seal-soft); color: var(--seal-deep); border: 1px solid #EDC9C3; }
.notice--info { background: var(--sage-wash); color: var(--sage-ink); border: 1px solid #D9E1DC; }
.notice p { margin: 0; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px; font: 500 12.5px/1.2 var(--sans); background: var(--sage-tint); color: var(--sage-ink); }
.pill--live { background: var(--ok-soft); color: #2C5E3F; }
.pill--muted { background: #ECE8E0; color: var(--ink-2); }
.pill--new { background: var(--seal-soft); color: var(--seal-deep); }
.pill--replied { background: var(--ok-soft); color: #2C5E3F; }
.pill--spam { background: #EFE6E5; color: var(--seal-deep); }
.tag { display: inline-block; font: 500 11px/1 var(--sans); letter-spacing: .02em; color: var(--ink-2); border: 1px dashed #A69F92; border-radius: 3px; padding: 4px 6px 3px; background: rgba(255, 255, 255, .6); }
.kind { display: inline-block; font: 600 11.5px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--sage-deep); }
.kind--exhibition { color: #7A3B2E; }
.kind--event { color: #233A5E; }
.kind--press { color: #6B5A2A; }
.chip { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font: 500 12px/1.3 var(--sans); background: #EEEAE2; color: var(--ink-2); }
.chip--buy { background: var(--ok-soft); color: #2C5E3F; }
.chip--commission { background: #F1E8D6; color: #6B4F14; }
.chip--visit { background: #E4EAF3; color: #233A5E; }
.chip--warn { background: var(--warn-soft); color: var(--warn); }

/* ------------------------------------------------------------------ fields */
.field { margin: 0 0 20px; min-width: 0; }
.label { display: block; font: 500 14.5px/1.35 var(--sans); color: var(--ink); margin: 0 0 8px; }
fieldset.field { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
fieldset.field > legend { padding: 0; }
.req { color: var(--seal); }
.opt { font: 400 13px/1.3 var(--sans); color: var(--ink-3); }
/* One base style for every text-like control in the admin. The :where() selectors weigh nothing, so a
   field written without class="in" (a new template, a JS dialog) still looks like the designed fields,
   and any component class (.ed__slider, .switch, .in--search…) still wins over it. */
.in,
:where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"], [type="hidden"], [type="color"], [type="submit"], [type="button"], [type="reset"], [type="image"]), select, textarea) {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 11px; background-color: #fff;
  font: 400 16px/1.4 var(--sans); color: var(--ink); transition: border-color .18s, box-shadow .18s; -webkit-appearance: none; appearance: none;
}
.in::placeholder, :where(input, textarea)::placeholder { color: #A9A295; opacity: 1; }
.in:hover, :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]), select, textarea):hover { border-color: #B6AE9F; }
.in:focus, :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]), select, textarea):focus { outline: none; border-color: var(--sage); box-shadow: 0 0 0 3px rgba(74, 93, 88, .18); }
.in[aria-invalid="true"], :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]), select, textarea)[aria-invalid="true"] { border-color: var(--seal); background-color: #FFFBFA; }
.in:disabled, :where(input:not([type="checkbox"], [type="radio"], [type="range"], [type="file"]), select, textarea):disabled { background-color: #F4F1EA; color: var(--ink-3); cursor: not-allowed; }
.in[readonly], :where(input, textarea)[readonly] { background-color: #FBFAF7; }
.in--area, :where(textarea) { min-height: 104px; resize: vertical; line-height: 1.6; }
.in--select, :where(select) { padding-right: 42px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235B554C' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center; cursor: pointer; }
:where(select[multiple]) { padding-right: 14px; background-image: none; }
.in--sm { min-height: 42px; padding: 8px 12px; font-size: 15px; border-radius: 10px; }
.in--sm.in--select { padding-right: 36px; background-position: right 11px center; }
input[type="date"].in, :where(input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"]) { min-height: 48px; }
/* WebKit draws date values centred and a little short; keep them like the other fields */
:where(input[type="date"], input[type="time"], input[type="datetime-local"], input[type="month"])::-webkit-date-and-time-value { text-align: left; min-height: 1.4em; }
:where(input[type="number"])::-webkit-inner-spin-button { opacity: .6; }
:where(input[type="search"])::-webkit-search-decoration { -webkit-appearance: none; }
/* checkboxes and radios that are not drawn as switches or segments */
:where(input[type="checkbox"], input[type="radio"]) { width: 20px; height: 20px; margin: 0; flex: none; accent-color: var(--sage); cursor: pointer; vertical-align: middle; }
:where(input[type="file"]) { max-width: 100%; font: 400 15px/1.4 var(--sans); color: var(--ink-2); }
:where(input[type="file"])::file-selector-button { margin-right: 12px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 11px; background: var(--paper); color: var(--ink); font: 500 15px/1.2 var(--sans); cursor: pointer; }
legend.label { padding: 0; }
/* a button or note under a field (Form::text 'after'), e.g. "Make one up for me" */
.field__after { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
/* phones: 16px text in every field, or iOS zooms the page in when one is tapped */
@media (max-width: 720px), (pointer: coarse) {
  .in, .in--sm, :where(input, select, textarea) { font-size: 16px; }
}
.hint { font: 400 13.5px/1.5 var(--sans); color: var(--ink-2); margin: 7px 0 0; }
.hint--top { margin: -8px 0 18px; }
.err { display: flex; gap: 6px; align-items: flex-start; color: var(--seal-deep); font: 500 13.5px/1.4 var(--sans); margin: 7px 0 0; }
.err .ic { margin-top: 1px; }
.counter { display: block; text-align: right; font: 400 12px/1.3 var(--sans); color: var(--ink-3); margin-top: 4px; }
.counter.is-over { color: var(--seal-deep); }
.affix { display: flex; align-items: stretch; }
.affix__txt { display: grid; place-items: center; padding: 0 12px; border: 1px solid var(--line-2); border-right: 0; border-radius: 11px 0 0 11px; background: #F3F0E9; color: var(--ink-2); font-weight: 500; }
.affix .in { border-radius: 0 11px 11px 0; }
.row { display: grid; gap: 0 16px; }
.row--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row--3 { grid-template-columns: 130px minmax(0, 1fr) minmax(0, 1fr); }
.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.pair__one { min-width: 0; }
.lang-tag { display: inline-flex; align-items: center; font: 500 12.5px/1.2 var(--sans); letter-spacing: .01em; color: var(--sage-deep); background: var(--sage-tint); border-radius: 6px; padding: 4px 8px; margin: 0 0 7px; }
.lang-tag abbr { text-decoration: none; }
.field--pair > .label { margin-bottom: 6px; }
details.more { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
details.more > summary { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; cursor: pointer; font: 500 14.5px/1.3 var(--sans); color: var(--sage-deep); padding: 0 8px 0 0; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::after { content: ""; width: 7px; height: 7px; border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); margin-left: 4px; transition: transform .2s; }
details.more[open] > summary::after { transform: rotate(225deg) translate(-2px, -2px); }
details.more[open] > summary { margin-bottom: 12px; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; position: relative; }
.switch input { position: absolute; opacity: 0; width: 46px; height: 28px; margin: 0; cursor: pointer; }
.switch__track { width: 46px; height: 28px; border-radius: 999px; background: #CBC4B6; position: relative; flex: none; transition: background .2s; }
.switch__dot { position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .22s var(--ease); }
.switch input:checked + .switch__track { background: var(--sage); }
.switch input:checked + .switch__track .switch__dot { transform: translateX(18px); }
.switch input:focus-visible + .switch__track { box-shadow: var(--ring); }
.switch__text { font: 500 15.5px/1.35 var(--sans); }
.field--toggle { margin-bottom: 14px; }
.field--toggle .hint { margin: 0 0 0 58px; }

.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg__in { position: absolute; opacity: 0; pointer-events: none; }
.seg__btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1px solid var(--line-2); border-radius: 999px;
  background: #fff; font: 500 14.5px/1.1 var(--sans); cursor: pointer; transition: background .18s, border-color .18s, color .18s; user-select: none;
}
.seg__btn:hover { border-color: var(--ink-3); }
.seg__in:checked + .seg__btn { background: var(--sage); color: #F8F4EB; border-color: var(--sage); }
.seg__in:checked + .seg__btn .dot { box-shadow: 0 0 0 2px rgba(255, 255, 255, .7); }
.seg__in:focus-visible + .seg__btn { box-shadow: var(--ring); }
.touch .seg__btn { min-height: 48px; }

.pw { position: relative; }
.pw .in { padding-right: 52px; }
.pw__toggle { position: absolute; right: 4px; top: 4px; width: 40px; height: 40px; border: 0; background: none; border-radius: 8px; color: var(--ink-2); display: grid; place-items: center; }
.pw__toggle:hover { background: var(--sage-wash); }

/* ------------------------------------------------------------------ edit pages */
.edit { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.edit__main { min-width: 0; }
.edit__side { position: sticky; top: 24px; }
.side-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); margin-bottom: 18px; }
.side-card__title { font: 400 18px/1.3 var(--serif); margin-bottom: 4px; }
.side-card .hint { margin: 0 0 14px; }
.side-card__actions { margin-top: 16px; }
.side-card__more { display: grid; gap: 10px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.savestate { min-height: 1.4em; margin-top: 8px; text-align: center; font-size: 13.5px; color: var(--warn); }
.savebar { display: none; }
.savebar--always { display: flex; position: sticky; bottom: 16px; z-index: 20; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; padding: 12px 12px 12px 20px; background: rgba(252, 251, 248, .96); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .3); max-width: 1200px; }
.savebar__state { font-size: 14px; color: var(--ink-2); }
.is-dirty .savebar__state { color: var(--warn); font-weight: 500; }
.is-dirty .savebar { border-color: #E2CB9A; }

.size { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto; gap: 0 12px; align-items: start; }
.size__x { padding-top: 40px; font: 400 20px/1 var(--serif); color: var(--ink-3); }
.size__unit { margin: 0; }
.size__unit .seg { flex-wrap: nowrap; gap: 0; }
.size__unit .seg__btn { border-radius: 0; margin-left: -1px; padding: 0 14px; }
.size__unit .seg__in:first-child + .seg__btn { border-radius: 999px 0 0 999px; margin-left: 0; }
.size__unit .seg__btn:last-child { border-radius: 0 999px 999px 0; }
[data-status-hint] { margin: -6px 0 18px; min-height: 1.5em; }
.field--tight { margin-bottom: 4px; }
.fillrow { margin: 0 0 16px; }
.fillrow .btn { min-height: 44px; }
.stack-fields { display: grid; gap: 0; }
.convert { font: 400 15px/1.4 var(--serif); color: var(--sage-deep); background: var(--sage-wash); border-radius: 10px; padding: 10px 14px; margin: 4px 0 0; min-height: 44px; }

/* photo field */
.imgfield { margin-bottom: 4px; }
.imgfield__show { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 20px; align-items: center; padding: 18px; background: var(--wall); border-radius: 12px; }
.imgfield__show.is-over, .drop.is-over { outline: 3px dashed var(--sage); outline-offset: -3px; }
.imgfield__frame { display: block; padding: 10px; background: #F3EFE6; box-shadow: var(--hang); justify-self: center; }
.imgfield__frame img { max-height: 280px; width: auto; background-size: cover; }
.imgfield__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.imgfield__show .hint { grid-column: 2; margin: 0; word-break: break-all; }
.imgfield--wide .imgfield__show { grid-template-columns: 1fr; }
.drop { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 34px 20px; border: 2px dashed #C9C1B1; border-radius: 14px; background: repeating-linear-gradient(135deg, rgba(255, 255, 255, .5) 0 14px, rgba(255, 255, 255, 0) 14px 28px), var(--wall); }
.drop--small { padding: 24px 16px; }
.drop__ic { width: 46px; height: 46px; fill: none; stroke: var(--sage); stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 2px; }
.drop__title { font: 400 19px/1.3 var(--serif); }
.drop__text { color: var(--ink-2); font-size: 15px; }
.drop__btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.drop .hint { max-width: 520px; }

.photos { display: grid; gap: 10px; margin-bottom: 14px; }
.photo { display: grid; grid-template-columns: 40px 76px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 8px 10px 8px 6px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.photo__img { width: 76px; height: 60px; object-fit: contain; background: var(--wall) center / cover; border-radius: 4px; }
.photo__btns { display: flex; gap: 6px; }
.photo__drag, .wcard__drag, .rowi__drag, .exi__drag, .para__drag, .trow__drag, .chosen__drag {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none; color: var(--ink-3); border-radius: 8px; cursor: grab; touch-action: none;
}
.photo__drag:hover, .rowi__drag:hover, .exi__drag:hover, .para__drag:hover, .trow__drag:hover, .chosen__drag:hover { background: var(--sage-wash); color: var(--ink); }
.is-dragging, .is-dragging * { cursor: grabbing !important; user-select: none; }
.is-placeholder { opacity: .35; outline: 2px dashed var(--sage); outline-offset: 2px; }
.drag-ghost { position: fixed; z-index: 400; pointer-events: none; margin: 0; opacity: .96; box-shadow: 0 24px 48px -16px rgba(0, 0, 0, .45) !important; transition: none; }
.is-grabbed { outline: 3px solid var(--brass) !important; outline-offset: 2px; }
.is-dropped { animation: dropped .7s var(--ease); }
@keyframes dropped { 0% { background-color: #F4ECD6; } 100% { } }

/* live preview: the painting framed on the wall with its label */
.pv { border-radius: 12px; overflow: hidden; border: 1px solid var(--line); }
.pv__wall { display: grid; place-items: center; padding: 30px 26px 34px; background: var(--sage) linear-gradient(180deg, rgba(255, 236, 205, .1), rgba(0, 0, 0, .1)); min-height: 220px; }
.pv__wall .fr { width: min(100%, 250px); --pm: 4px; --pp: 10px; }
.pv__wall .pic { aspect-ratio: var(--r, 1.333); background: #3a4743; }
.pv__wall .pic img[hidden] + * { display: none; }
.pv__label { background: var(--cream); padding: 14px 16px 16px; font-size: 13.5px; color: var(--ink-2); display: grid; gap: 3px; }
.pv__title { font: 400 17px/1.3 var(--serif); color: var(--ink); }
.pv__title i { font-style: italic; }
.pv__sale { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; margin-top: 6px; }
.pv__price { font-weight: 500; color: var(--ink); }
.pv.is-draft .pv__wall { opacity: .55; }
.pv--mini .pv__wall { min-height: 170px; padding: 22px; }

/* ------------------------------------------------------------------ paintings list */
.filters { display: grid; gap: 12px; margin-bottom: 14px; }
.filters__search { position: relative; }
.filters__search .ic { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.in--search { padding-left: 46px; min-height: 50px; border-radius: 999px; }
.filters__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters__row .in--select { width: auto; min-width: 150px; flex: 0 1 auto; border-radius: 999px; padding-left: 16px; }
.listnote { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin: 0 0 18px; }

.wgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 22px; }
.wcard { position: relative; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s, outline-color .2s; }
.wcard:hover { box-shadow: 0 2px 4px rgba(0, 0, 0, .05), 0 16px 30px -18px rgba(36, 33, 29, .35); }
.wcard__media { position: relative; display: grid; place-items: center; height: 214px; padding: 28px 22px 24px; background: var(--wall) radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 70%); }
.wcard__img { position: absolute; inset: 26px 24px 22px; display: flex; align-items: center; justify-content: center; }
.wcard__img img { max-width: 100%; max-height: 100%; width: auto; height: auto; background: #DDD7CB center / cover no-repeat; box-shadow: var(--hang); }
.wcard__nophoto { display: grid; justify-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; }
.wcard__nophoto .ic { width: 30px; height: 30px; }
.wcard__sel { position: absolute; top: 10px; left: 10px; width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; }
.wcard__sel input { width: 22px; height: 22px; accent-color: var(--sage); cursor: pointer; margin: 0; }
.wcard__drag { position: absolute; top: 9px; right: 9px; background: rgba(252, 251, 248, .9); box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.wcard__drag:hover { background: #fff; color: var(--ink); }
.wcard__flag { position: absolute; left: 12px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px; background: rgba(36, 33, 29, .78); color: #fff; font: 500 12px/1.2 var(--sans); }
.wcard__body { flex: 1; padding: 14px 16px 12px; min-width: 0; }
.wcard__title { font: 400 18px/1.3 var(--serif); color: var(--ink); text-decoration: none; display: block; }
.wcard__title i { font-style: italic; }
.wcard__title:hover { text-decoration: underline; text-decoration-color: rgba(36, 33, 29, .3); }
.wcard__meta { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcard__status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 9px; font-size: 13px; }
.wcard__price { font-weight: 600; color: var(--ink); }
.wcard__photos { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); }
.wcard__toggles { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.tg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 56px; padding: 6px 4px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--ink-3); font: 500 12px/1.15 var(--sans); transition: background .18s, color .18s; }
.tg:last-child { border-right: 0; }
.tg:hover { background: var(--sage-wash); color: var(--ink); }
.tg[aria-pressed="true"] { color: var(--sage-deep); background: var(--sage-tint); }
.tg[data-toggle="featured"][aria-pressed="true"] .ic { fill: var(--brass); stroke: #94793F; }
.tg[data-toggle="forsale"][aria-pressed="true"] { color: #2C5E3F; background: var(--ok-soft); }
.tg:disabled { opacity: .6; }
.wcard.is-hidden .wcard__img img { opacity: .5; filter: saturate(.5); }
.wcard.is-selected { outline: 2px solid var(--sage); outline-offset: -1px; }

.bulkbar {
  position: fixed; z-index: 45; left: calc(var(--side-w) + 50%); transform: translateX(calc(-50% - var(--side-w) / 2)); bottom: 22px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 10px 12px 10px 20px; border-radius: 16px;
  background: var(--sage-ink); color: #F3EEE2; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, .45); max-width: calc(100vw - var(--side-w) - 40px);
}
.bulkbar__count { font-size: 14.5px; }
.bulkbar__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.bulkbar .btn--ghost { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .22); color: #fff; }
.bulkbar .btn--ghost:hover { background: rgba(255, 255, 255, .16); }
.bulkbar .btn--text { color: #E7D8B4; }
.bulkbar .btn--text:hover { background: rgba(255, 255, 255, .08); }

/* ------------------------------------------------------------------ rows: news */
.rows { display: grid; gap: 10px; }
.rowi { display: grid; grid-template-columns: 40px 92px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 14px 10px 6px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.rowi__thumb { display: grid; place-items: center; width: 92px; height: 68px; background: var(--wall); border-radius: 6px; overflow: hidden; color: var(--ink-3); }
.rowi__thumb img { width: 100%; height: 100%; object-fit: cover; background: center / cover; }
.rowi__kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; }
.rowi__title { font: 400 19px/1.3 var(--serif); color: var(--ink); text-decoration: none; }
.rowi__title:hover { text-decoration: underline; text-decoration-color: rgba(36, 33, 29, .3); }
.rowi__meta { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.rowi.is-hidden .rowi__thumb, .rowi.is-hidden .rowi__title { opacity: .6; }

.workpick { display: flex; gap: 12px; align-items: center; }
.workpick__thumb { width: 64px; height: 48px; object-fit: cover; border-radius: 4px; box-shadow: var(--hang); flex: none; }

/* ------------------------------------------------------------------ exhibitions */
/* "Add …" cards that open in place (exhibitions, admins). The card itself has no padding so the summary
   can span it; whatever opens below the summary gets the card's padding back. `.card.exadd` outweighs the
   phone rule for .card, which used to pad these twice (and not at all on wide screens for new forms). */
.card.exadd { padding: 0; }
.exadd > summary { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 16px clamp(18px, 2.4vw, 30px); cursor: pointer; list-style: none; font: 400 17px/1.3 var(--serif); color: var(--sage-deep); border-radius: var(--radius); }
.exadd > summary:hover { background: var(--sage-wash); }
.exadd > summary::-webkit-details-marker { display: none; }
.exadd[open] > summary { border-bottom: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; }
.exadd > :not(summary) { padding: 22px clamp(18px, 2.4vw, 30px) 26px; }
.exform__grid { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 0 16px; }
.exform__btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.exform__del { margin-left: auto; }
.yeargroup { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; margin-bottom: 18px; }
.yeargroup__year { font: 400 30px/1 var(--serif); color: var(--sage); padding-top: 14px; text-align: right; position: sticky; top: 16px; align-self: start; }
.exlist { display: grid; gap: 8px; }
.exi { display: flex; align-items: flex-start; gap: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 4px; box-shadow: var(--shadow); }
.exi__drag { flex: none; margin-top: 6px; }
.exi__drag--none { width: 44px; flex: none; }
.exi__d { flex: 1; min-width: 0; }
.exi__sum { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "line edit" "title edit" "where edit"; gap: 2px 12px; padding: 10px 12px 10px 4px; cursor: pointer; list-style: none; border-radius: 8px; }
.exi__sum::-webkit-details-marker { display: none; }
.exi__sum:hover .exi__edit { color: var(--sage-deep); background: var(--sage-wash); }
.exi__line { grid-area: line; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.exi__label { font-weight: 600; color: var(--ink); }
.exi__title { grid-area: title; font: 400 18px/1.35 var(--serif); }
.exi__where { grid-area: where; font-size: 14px; color: var(--ink-2); }
.exi__edit { grid-area: edit; align-self: center; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 9px; font: 500 14px/1 var(--sans); color: var(--ink-3); }
.exi__d[open] .exi__edit { visibility: hidden; }
.exi__d[open] > .exi__sum { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.exform--inline { padding: 18px 12px 12px 4px; }
.exi.is-hidden .exi__title { opacity: .6; }

/* ------------------------------------------------------------------ settings */
.tabs { display: flex; gap: 4px; margin: -6px 0 24px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__tab { position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 16px; white-space: nowrap; color: var(--ink-2); text-decoration: none; font: 500 15px/1.2 var(--sans); border-radius: 10px 10px 0 0; }
.tabs__tab:hover { color: var(--ink); background: rgba(255, 255, 255, .5); }
.tabs__tab[aria-current] { color: var(--sage-ink); }
.tabs__tab[aria-current]::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--sage); }
.tabs__n { display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: #E6E1D7; color: var(--ink-2); font: 600 11.5px/1 var(--sans); }
.tabs__n--new { background: var(--seal); color: #fff; }

.bio-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.bio-col__title { display: flex; align-items: center; gap: 10px; font: 500 15px/1.3 var(--sans); margin-bottom: 10px; }
.bio-col__title .lang-tag { margin: 0; }
.paras { display: grid; gap: 10px; margin-bottom: 12px; counter-reset: p; }
.para { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px; align-items: start; }
.para__drag { width: 44px; margin-top: 6px; }
.para__rm { margin-top: 4px; }
.trows { display: grid; gap: 10px; margin-bottom: 12px; }
.trow { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 12px 10px 4px 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.trow__fields { display: grid; grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr); gap: 10px 12px; }
.trow--path .trow__fields { grid-template-columns: 120px 120px minmax(0, 1fr) minmax(0, 1fr); }
.trow__f { display: block; margin-bottom: 8px; min-width: 0; }
.trow__f .label { font-size: 13px; margin-bottom: 5px; display: flex; gap: 6px; align-items: center; }
.trow__f .lang-tag { margin: 0; padding: 3px 5px; }
.trow__f .in--area { min-height: 72px; }
.trow__drag { margin-top: 26px; }
.trow__rm { margin-top: 22px; }

.chosen { display: grid; gap: 8px; margin-bottom: 6px; }
.chosen__item { display: grid; grid-template-columns: 44px 72px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 6px 8px 6px 4px; border: 1px solid var(--line); border-radius: 12px; background: #fff; counter-increment: hero; }
.chosen__item img { width: 72px; height: 50px; object-fit: cover; border-radius: 3px; box-shadow: var(--hang); }
.chosen__title { font: italic 400 16.5px/1.3 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chosen { counter-reset: hero; }
.chosen__title::before { content: counter(hero) ". "; font-style: normal; color: var(--ink-3); font-family: var(--sans); font-size: 13px; }
.pickgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.pick { position: relative; display: grid; gap: 8px; padding: 8px 8px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .18s, box-shadow .18s; }
.pick input { position: absolute; top: 12px; left: 12px; width: 22px; height: 22px; accent-color: var(--sage); z-index: 1; }
.pick:has(input:checked) { border-color: var(--sage); box-shadow: 0 0 0 2px var(--sage); }
.pick__img { display: block; aspect-ratio: 4 / 3; background: var(--wall); border-radius: 6px; overflow: hidden; }
.pick__img img { width: 100%; height: 100%; object-fit: cover; background: center / cover; }
.pick__title { font: 400 14.5px/1.3 var(--serif); font-style: italic; }
.pick__fav { position: absolute; top: 12px; right: 12px; color: var(--brass); background: rgba(255, 255, 255, .9); border-radius: 50%; width: 26px; height: 26px; display: grid; place-items: center; }
.pick__fav .ic { fill: var(--brass); stroke: #94793F; }
.pick__note { font-size: 11.5px; color: var(--ink-3); }
.pick.is-off { opacity: .45; cursor: not-allowed; }
.sharecard { display: grid; grid-template-columns: minmax(0, 1fr); max-width: 520px; border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; background: #fff; margin-bottom: 14px; }
.sharecard__img { aspect-ratio: 1200 / 630; background: var(--wall); }
.sharecard__img img { width: 100%; height: 100%; object-fit: cover; }
.sharecard__text { display: grid; gap: 2px; padding: 12px 14px; font-size: 13.5px; color: var(--ink-2); }
.sharecard__site { text-transform: uppercase; font-size: 11.5px; letter-spacing: .04em; color: var(--ink-3); }
.sharecard__text b { color: var(--ink); font-weight: 600; font-size: 15px; }

/* ------------------------------------------------------------------ dashboard */
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.quick__tile {
  position: relative; display: grid; align-content: start; gap: 6px; min-height: 150px; padding: 20px; border-radius: 16px; text-decoration: none; color: var(--ink);
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s;
}
.quick__tile:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(0, 0, 0, .05), 0 18px 32px -18px rgba(36, 33, 29, .4); }
.quick__ic { position: relative; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--sage-tint); color: var(--sage-deep); margin-bottom: 10px; }
.quick__ic .ic { width: 23px; height: 23px; }
.quick__ic .badge { position: absolute; top: -7px; right: -9px; box-shadow: 0 0 0 3px var(--paper); }
.quick__label { font: 400 18.5px/1.25 var(--serif); }
.quick__hint { font-size: 13.5px; color: var(--ink-2); }
.quick__tile--main { background: var(--sage) linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(0, 0, 0, .08)); color: var(--on-wall); border-color: var(--sage-deep); }
.quick__tile--main .quick__ic { background: rgba(255, 255, 255, .14); color: #fff; }
.quick__tile--main .quick__hint { color: rgba(238, 232, 218, .75); }
.quick__tile--alert { border-color: #E9C7C1; background: #FFF9F7; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat { display: grid; gap: 2px; padding: 18px 20px; border-radius: 14px; text-decoration: none; color: var(--ink); background: rgba(255, 255, 255, .55); border: 1px solid var(--line); }
.stat:hover { background: var(--paper); }
.stat__n { font: 400 36px/1.05 var(--serif); color: var(--sage-ink); }
.stat__label { font: 500 14.5px/1.3 var(--sans); }
.stat__more { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dash-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dash-cols .card { margin-bottom: 20px; }
.todo { display: grid; gap: 8px; }
.todo__item a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; background: var(--warn-soft); color: #5E410B; text-decoration: none; font-size: 15px; }
.todo__item--soft a { background: var(--sage-wash); color: var(--sage-ink); }
.todo__item a:hover { filter: brightness(.98); }
.todo__go { margin-left: auto; }
.allgood { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 12px; background: var(--ok-soft); color: #2C5E3F; font-size: 15px; }
.mini-msgs { display: grid; gap: 8px; }
.mini-msg { display: grid; gap: 3px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); text-decoration: none; color: var(--ink); background: #fff; }
.mini-msg:hover { border-color: var(--line-2); }
.mini-msg__top { display: flex; align-items: center; gap: 8px; }
.mini-msg__top time { margin-left: auto; font-size: 12.5px; color: var(--ink-3); }
.mini-msg__work { font: italic 400 14px/1.3 var(--serif); color: var(--sage-deep); }
.mini-msg__text { font-size: 14px; color: var(--ink-2); }
.mini-msg.is-new b { font-weight: 600; }
.newdot { width: 9px; height: 9px; border-radius: 50%; background: var(--seal); flex: none; display: inline-block; }
.log { display: grid; }
.log li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.log li:last-child { border-bottom: 0; }
.log__what b { font-weight: 500; }
.log__when { color: var(--ink-3); font-size: 13px; }

/* ------------------------------------------------------------------ messages */
.inbox { display: grid; gap: 10px; }
.mail { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px 12px 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: border-color .18s; }
.mail:hover { border-color: var(--line-2); }
.mail.is-new { background: #fff; border-left: 4px solid var(--seal); }
.mail__thumb { width: 60px; height: 60px; border-radius: 10px; overflow: hidden; background: var(--wall); display: grid; place-items: center; }
.mail__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mail__initial { font: 400 26px/1 var(--serif); color: var(--sage); }
.mail__body { display: grid; gap: 4px; min-width: 0; }
.mail__top { display: flex; align-items: center; gap: 8px; }
.mail__name { font-weight: 500; font-size: 16px; }
.mail.is-new .mail__name { font-weight: 700; }
.mail__time { margin-left: auto; font-size: 13px; color: var(--ink-3); white-space: nowrap; }
.mail__chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.mail__work { font: italic 400 14.5px/1.3 var(--serif); color: var(--sage-deep); }
.mail__text { font-size: 14.5px; color: var(--ink-2); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.mail__go { color: var(--ink-3); }
.msgview { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.letter__meta { display: grid; gap: 8px; padding-bottom: 18px; margin-bottom: 20px; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.letter__meta div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; }
.letter__meta dt { color: var(--ink-3); }
.letter__meta dd { overflow-wrap: anywhere; }
.letter__text { font: 400 18px/1.7 var(--serif); color: var(--ink); white-space: normal; overflow-wrap: anywhere; }
.letter__reply { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.letter__reply .hint { margin-top: 10px; }
.msgwork { display: grid; gap: 10px; text-decoration: none; color: var(--ink); margin-bottom: 10px; }
.msgwork__img { display: block; padding: 18px; background: var(--wall); border-radius: 10px; }
.msgwork__img img { margin: 0 auto; max-height: 180px; width: auto; box-shadow: var(--hang); background: center / cover; }
.msgwork__title { font: 400 17px/1.3 var(--serif); }
.stack { display: grid; gap: 8px; }
.stack .btn { width: 100%; justify-content: flex-start; }

/* ------------------------------------------------------------------ account */
.acc-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.admins { display: grid; gap: 4px; margin-bottom: 8px; }
.admin { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.admin__avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--sage); color: var(--on-wall); font: 400 19px/1 var(--serif); }
.admin__who { display: grid; gap: 2px; min-width: 0; }
.admin__name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin__who .muted { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }

.admin__remove { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: flex-end; }
.admin__remove .in { width: 170px; }
.inline-confirm { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.inline-confirm .in { width: auto; flex: 0 1 260px; }

/* ------------------------------------------------------------------ empty states */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 60px 20px; max-width: 560px; margin: 20px auto; }
.empty--small { padding: 36px 20px; }
.empty__ic { width: 64px; height: 64px; padding: 16px; border-radius: 50%; background: var(--sage-tint); fill: none; stroke: var(--sage); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.empty__title { font: 400 25px/1.25 var(--serif); }
.empty__text { color: var(--ink-2); margin-bottom: 8px; }

/* ------------------------------------------------------------------ toasts, dialogs */
.toasts { position: fixed; z-index: 500; right: 22px; bottom: 22px; display: grid; gap: 10px; justify-items: end; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; max-width: min(440px, calc(100vw - 32px)); padding: 13px 16px; border-radius: 13px;
  background: #2B2824; color: #F6F1E6; box-shadow: 0 16px 36px -12px rgba(0, 0, 0, .45); font: 500 15px/1.4 var(--sans);
  pointer-events: auto; cursor: pointer; opacity: 0; transform: translateY(12px); transition: opacity .25s, transform .3s var(--ease);
}
.toast.is-in { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translateY(6px); }
.toast--ok .ic { color: #9FD0AE; }
.toast--error { background: #8E241C; }
.toast--warn { background: #6B4B0E; }
.toast__act { margin-left: 6px; border: 0; background: rgba(255, 255, 255, .16); color: #fff; border-radius: 8px; padding: 7px 10px; font: 600 13.5px/1 var(--sans); }
.modal { position: fixed; inset: 0; z-index: 600; display: grid; place-items: center; padding: 16px; background: rgba(22, 28, 26, 0); transition: background .2s; }
.modal.is-in { background: rgba(22, 28, 26, .5); }
.modal__box { width: min(460px, 100%); background: var(--paper); border-radius: 18px; padding: 26px 24px 20px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); transform: translateY(10px) scale(.98); opacity: 0; transition: transform .25s var(--ease), opacity .2s; }
.modal.is-in .modal__box { transform: none; opacity: 1; }
.modal__title { font: 400 23px/1.25 var(--serif); margin-bottom: 10px; }
.modal__text { color: var(--ink-2); margin-bottom: 22px; }
.modal__btns { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 10px; }
.modal__btns .btn { height: auto; min-height: 46px; padding-top: 8px; padding-bottom: 8px; white-space: normal; text-align: center; line-height: 1.25; }
.modal__box .field { margin-bottom: 14px; }
.modal__check { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: -4px 0 12px; font-size: 15px; cursor: pointer; }
.modal__check input { width: 20px; height: 20px; accent-color: var(--sage); }
.modal__err { margin: -4px 0 14px; padding: 10px 12px; border-radius: 10px; background: #F6E9E7; color: var(--seal-deep); font-size: 14.5px; }
.modal__box .hint { margin-top: 6px; }
.has-modal body, .has-editor body { overflow: hidden; }
/* Cropper.js 1.7 measures every picture with a full-size invisible <img> appended to <body>. On Android
   that briefly makes the page wider than the screen, the browser zooms out, and Cropper measures a huge
   stage. Fixed positioning keeps the helper out of the page width; the root is clipped while editing. */
.adm > img { position: fixed !important; pointer-events: none; }
html.has-editor { overflow: hidden; }
@supports (overflow: clip) { html.has-editor { overflow: clip; } }
.has-editor .toasts { top: calc(72px + env(safe-area-inset-top, 0px)); bottom: auto; }

/* ------------------------------------------------------------------ sign in */
.is-login { background: var(--cream); }
.login { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, 1fr); min-height: 100vh; }
.login__wall { position: relative; display: grid; place-items: center; padding: 60px 7vw; background: var(--sage); overflow: hidden; isolation: isolate; }
.login__wall::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 60% at 50% 38%, rgba(255, 238, 205, .16), rgba(255, 238, 205, 0) 70%), linear-gradient(180deg, rgba(0, 0, 0, .12), rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, .18)); }
.login__art { width: min(100%, 720px); display: grid; gap: 16px; }
.login__art .fr { --pm: 6px; --pp: clamp(14px, 2vw, 26px); }
.login__cap { font: 400 16px/1.4 var(--serif); color: var(--on-wall); opacity: .85; }
.login__panel { position: relative; display: grid; place-items: center; padding: 48px clamp(24px, 5vw, 72px); }
.langsw--login { position: absolute; top: 22px; right: 22px; background: rgba(74, 93, 88, .1); }
.langsw--login .langsw__btn { color: var(--ink-2); }
.langsw--login .langsw__btn[aria-pressed="true"] { background: var(--sage); color: #F8F4EB; }
.login__box { width: min(100%, 400px); }
.login__seal { margin-bottom: 22px; }
.login__seal img { width: 72px; height: 72px; }
.login__title { font: 400 clamp(29px, 3vw, 36px)/1.15 var(--serif); margin-bottom: 8px; }
.login__sub { color: var(--ink-2); margin-bottom: 26px; }
.login__form .btn { margin-top: 10px; }
.login__help { margin-top: 22px; font-size: 13.5px; color: var(--ink-3); }

/* ------------------------------------------------------------------ the photo editor */
.ed { position: fixed; inset: 0; z-index: 200; display: flex; flex-direction: column; background: #1C2321; color: var(--on-wall); opacity: 0; transition: opacity .2s; }
.ed.is-in { opacity: 1; }
.ed__bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: #232C29; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.ed__title { flex: 1; min-width: 0; text-align: center; font: 400 19px/1.2 var(--serif); overflow-wrap: anywhere; transition: color .2s; }
.ed__title.is-note { color: var(--brass-light); font-family: var(--sans); font-size: 15px; font-weight: 600; }
.ed__cancel { background: transparent; border-color: rgba(255, 255, 255, .22); color: var(--on-wall); }
.ed__cancel:hover:not(:disabled) { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .35); }
.ed__save { background: var(--brass); color: #1D1A14; }
.ed__save:hover:not(:disabled) { background: var(--brass-light); }
.ed__up { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: #263330; font-size: 13.5px; }
.ed__upbar { flex: 1; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; max-width: 420px; }
.ed__upbar i { display: block; height: 100%; width: 0; background: var(--brass-light); border-radius: 3px; transition: width .3s; }
.ed__up.is-done .ed__upbar i { background: #9FD0AE; }
.ed__uptext { color: rgba(238, 232, 218, .85); white-space: nowrap; }
.ed__main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 340px; min-height: 0; }
.ed__stage { position: relative; min-height: 0; overflow: hidden; background: #151B19 radial-gradient(60% 50% at 50% 45%, rgba(255, 255, 255, .04), rgba(0, 0, 0, 0)); outline: none; }
.ed__stage:focus-visible { box-shadow: inset 0 0 0 3px var(--brass); }
.ed__crop { position: absolute; inset: 18px; }
.ed__crop img { display: block; max-width: 100%; }
.ed__wait { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: rgba(21, 27, 25, .82); font-size: 15px; z-index: 5; }
.ed__panel { position: relative; z-index: 3; overflow-y: auto; overscroll-behavior: contain; background: #202825; border-left: 1px solid rgba(255, 255, 255, .06); padding: 6px 18px 30px; }
.ed__panel.is-off { pointer-events: none; opacity: .35; }
.ed__grp { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.ed__grp:last-child { border-bottom: 0; }
.ed__h3 { display: flex; align-items: center; justify-content: space-between; gap: 10px; font: 600 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: rgba(238, 232, 218, .62); margin-bottom: 12px; }
.ed__deg { font: 500 15px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--brass-light); font-variant-numeric: tabular-nums; }
.ed__label { font: 500 13px/1.3 var(--sans); color: rgba(238, 232, 218, .75); margin-bottom: 6px; padding: 0; }
.ed__panel .hint { color: rgba(238, 232, 218, .6); font-size: 13px; }
.ed__tools { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ed__tools:has(.tool:nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; min-height: 62px; padding: 8px 4px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 11px; background: rgba(255, 255, 255, .04); color: var(--on-wall); font: 500 12px/1.15 var(--sans); text-align: center; }
.tool:hover { background: rgba(255, 255, 255, .1); }
.tool .ic { width: 22px; height: 22px; }
.tool--sm { min-height: 44px; width: 44px; font-size: 20px; flex: none; }
.ed__slider { display: flex; align-items: center; gap: 10px; }
.ed__slider input[type="range"] { flex: 1; accent-color: var(--brass); height: 44px; min-width: 0; }
.ed__corners { border: 0; padding: 0; margin: 14px 0 0; display: grid; gap: 4px; }
.ed__radio { display: flex; align-items: center; gap: 10px; min-height: 38px; font-size: 14.5px; cursor: pointer; }
.ed__radio input { accent-color: var(--brass); width: 18px; height: 18px; }
.swatch { width: 18px; height: 18px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35); }
.ed__aspects { display: flex; flex-wrap: wrap; gap: 6px; }
.chipbtn { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .04); color: var(--on-wall); font: 500 13.5px/1 var(--sans); }
.chipbtn:hover { background: rgba(255, 255, 255, .1); }
.chipbtn[aria-checked="true"] { background: var(--on-wall); color: var(--sage-ink); border-color: var(--on-wall); }
.ed .btn--ghost { background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .2); color: var(--on-wall); }
.ed .btn--ghost:hover:not(:disabled) { background: rgba(255, 255, 255, .1); }
.ed .btn--text { color: var(--brass-light); }
.ed .btn--text:hover { background: rgba(255, 255, 255, .06); }
.ed :focus-visible { outline-color: var(--brass-light); }
.ed__pvgrp .pv { border-color: rgba(255, 255, 255, .08); }
.ed__pvgrp .pv__wall .fr { width: min(100%, 230px); }
.ed__pvgrp .pic { background: #3a4743; }
.ed__persp { position: absolute; inset: 0; z-index: 4; background: #151B19; touch-action: none; }
.ed__pcanvas { position: absolute; }
.ed__quad { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ed__quad polygon { fill: rgba(216, 192, 138, .14); stroke: var(--brass-light); stroke-width: 2; stroke-dasharray: 6 5; }
.ed__hd { position: absolute; width: 48px; height: 48px; margin: -24px 0 0 -24px; border: 0; background: none; touch-action: none; cursor: grab; z-index: 2; }
.ed__hd span { position: absolute; inset: 12px; border-radius: 50%; background: var(--brass-light); box-shadow: 0 0 0 3px rgba(28, 35, 33, .7), 0 2px 8px rgba(0, 0, 0, .5); transition: transform .15s; }
.ed__hd:hover span, .ed__hd.is-active span, .ed__hd:focus-visible span { transform: scale(1.25); }
.ed__hd:focus-visible { outline: none; }
.ed__loupe { position: absolute; z-index: 3; width: 132px; height: 132px; border-radius: 50%; box-shadow: 0 0 0 3px var(--brass-light), 0 10px 30px rgba(0, 0, 0, .6); pointer-events: none; }
.ed__pbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 16px calc(12px + var(--safe-b)); background: #232C29; border-top: 1px solid rgba(255, 255, 255, .06); }
.ed__ptext { flex: 1 1 260px; font-size: 14.5px; }
.ed__real { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.ed__real input { width: 18px; height: 18px; accent-color: var(--brass); }
.ed__pbtns { display: flex; flex-wrap: wrap; gap: 8px; }
/* Cropper.js, in the studio's colours, with bigger handles for fingers */
.ed .cropper-view-box { outline: 2px solid rgba(255, 255, 255, .92); outline-color: rgba(255, 255, 255, .92); }
.ed .cropper-line { background-color: #fff; }
.ed .cropper-point { background-color: var(--brass-light); width: 10px; height: 10px; opacity: 1; border-radius: 50%; }
.ed .cropper-point.point-se { width: 12px; height: 12px; }
.ed .cropper-modal { background-color: #0C100F; opacity: .62; }
.ed .cropper-dashed { border-color: rgba(255, 255, 255, .55); }
.touch .ed .cropper-point { width: 22px; height: 22px; }
.touch .ed .cropper-point.point-nw { left: -11px; top: -11px; }
.touch .ed .cropper-point.point-ne { right: -11px; top: -11px; }
.touch .ed .cropper-point.point-sw { left: -11px; bottom: -11px; }
.touch .ed .cropper-point.point-se { right: -11px; bottom: -11px; width: 22px; height: 22px; }
.touch .ed .cropper-point.point-n, .touch .ed .cropper-point.point-s { margin-left: -11px; }
.touch .ed .cropper-point.point-e, .touch .ed .cropper-point.point-w { margin-top: -11px; }
.touch .ed .cropper-point.point-n { top: -11px; } .touch .ed .cropper-point.point-s { bottom: -11px; }
.touch .ed .cropper-point.point-e { right: -11px; } .touch .ed .cropper-point.point-w { left: -11px; }

/* ------------------------------------------------------------------ narrower screens */
@media (max-width: 1180px) {
  .edit { grid-template-columns: minmax(0, 1fr); }
  .edit__side { position: static; order: 1; }
  .edit__side .side-card__actions { display: none; }
  .edit__side .side-card__more { margin-top: 0; padding-top: 0; border-top: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edit__side .side-card { display: grid; grid-template-columns: minmax(0, 1fr); }
  .savebar { display: flex; position: sticky; bottom: 16px; z-index: 20; align-items: center; justify-content: space-between; gap: 14px; margin-top: 4px; padding: 10px 10px 10px 18px; background: rgba(252, 251, 248, .96); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .3); }
  .msgview { grid-template-columns: minmax(0, 1fr); }
  .quick, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) and (min-width: 700px) {
  .edit__side .side-card { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 22px; align-items: start; }
  .edit__side .side-card__title, .edit__side .side-card > .hint { grid-column: 1; }
  .edit__side .pv { grid-column: 1; }
  .edit__side .side-card__more { grid-column: 2; grid-row: 1 / span 3; grid-template-columns: 1fr; align-content: start; }
}
@media (max-width: 999px) {
  .bulkbar { left: 12px; right: 12px; transform: none; bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); max-width: none; padding: 10px 12px; }
  .savebar, .savebar--always { bottom: calc(var(--tabbar-h) + var(--safe-b) + 10px); }
  .toasts { left: 12px; right: 12px; bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); justify-items: stretch; }
  .has-bulkbar .toasts { bottom: calc(var(--tabbar-h) + var(--safe-b) + 140px); }
  .toast { max-width: none; }
  .dash-cols, .acc-cols { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .login { grid-template-columns: minmax(0, 1fr); }
  .login__wall { padding: 64px 24px 34px; min-height: 0; }
  .login__art { width: min(100%, 520px); }
  .login__cap { display: none; }
  .login__panel { padding: 34px 20px 48px; place-items: start center; }
  .langsw--login { top: 14px; right: 14px; background: rgba(0, 0, 0, .16); z-index: 2; position: fixed; }
  .langsw--login .langsw__btn { color: rgba(238, 232, 218, .85); }
  .langsw--login .langsw__btn[aria-pressed="true"] { background: var(--on-wall); color: var(--sage-ink); }
  .ed__main { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 56%) minmax(0, 44%); }
  .ed__panel { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .06); padding: 0 14px calc(20px + var(--safe-b)); }
  .ed__crop { inset: 10px; }
  .ed__pvgrp { display: none; }
}
@media (max-width: 720px) {
  .row--2, .row--3, .pair, .bio-cols, .exform__grid { grid-template-columns: minmax(0, 1fr); }
  .pair { gap: 4px; }
  .pair__one + .pair__one { margin-top: 8px; }
  .size { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .size__unit { grid-column: 1 / -1; }
  .imgfield__show { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; }
  .imgfield__show .hint { grid-column: 1; }
  .imgfield__actions { justify-content: center; }
  .imgfield__frame img { max-height: 240px; }
  .photo { grid-template-columns: 36px 64px minmax(0, 1fr); grid-template-areas: "drag img cap" "drag img btns"; row-gap: 6px; }
  .photo__drag { grid-area: drag; width: 44px; }
  .photo__img { grid-area: img; width: 64px; height: 56px; }
  .photo__cap { grid-area: cap; }
  .photo__btns { grid-area: btns; justify-content: flex-end; }
  .trow__fields, .trow--path .trow__fields { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .trow__drag { margin-top: 8px; }
  .trow__rm { margin-top: 4px; }
  .yeargroup { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .yeargroup__year { text-align: left; position: static; padding: 6px 0 0 4px; font-size: 26px; }
  .exi__sum { grid-template-columns: minmax(0, 1fr); grid-template-areas: "line" "title" "where"; }
  .exi__edit { display: none; }
  .rowi { grid-template-columns: 34px 72px minmax(0, 1fr); padding: 10px 12px 10px 2px; gap: 10px; }
  .rowi__drag { width: 44px; }
  .rowi__thumb { width: 72px; height: 58px; }
  .rowi__edit { display: none; }
  .rowi__title { font-size: 17px; }
  .letter__meta div { grid-template-columns: 1fr; gap: 0; }
  .mail { grid-template-columns: 48px minmax(0, 1fr); padding: 12px; gap: 12px; }
  .mail__thumb { width: 48px; height: 48px; }
  .mail__go { display: none; }
  .admin { grid-template-columns: 40px minmax(0, 1fr); }
  .admin > form { grid-column: 2; }
  .quick { gap: 10px; }
  .quick__tile { min-height: 0; padding: 16px; }
  .quick__ic { width: 40px; height: 40px; margin-bottom: 6px; }
  .quick__label { font-size: 16.5px; }
  .quick__hint { display: none; }
  .stats { gap: 10px; }
  .stat { padding: 14px 16px; }
  .stat__n { font-size: 30px; }
  .card { padding: 20px 16px; border-radius: 14px; }
  .ph { margin-bottom: 22px; }
  .ph__actions { width: 100%; }
  .ph__actions .btn { flex: 1; }
  .tabs { margin: -6px -16px 20px; padding: 0 12px; }
  .filters__row .in--select { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .field--toggle .hint { margin-left: 0; margin-top: 4px; }
  .modal__btns { flex-direction: column-reverse; align-items: stretch; }
  .modal__btns .btn { flex: none; width: 100%; }
  .ed__tools { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .ed__bar .btn { padding: 0 14px; }
  .ed__title { font-size: 16px; line-height: 1.15; }
  .ed__bar { gap: 8px; }
  .ed__pbar { padding: 10px 12px calc(10px + var(--safe-b)); }
  .ed__pbtns { width: 100%; }
  .ed__pbtns .btn { flex: 1; padding: 0 10px; }
}
@media (max-width: 559px) {
  .wgrid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .wcard { display: grid; grid-template-columns: 124px minmax(0, 1fr); grid-template-areas: "media body" "sale sale" "tog tog"; }
  .wcard__sale { grid-area: sale; padding: 0 12px 12px; margin-top: 0; flex-wrap: nowrap; }
  .wcard__sale .salebtn { flex: 1 1 0; min-width: 0; padding: 0 10px; }
  .wcard__media { grid-area: media; height: auto; min-height: 136px; padding: 0; }
  .wcard__img { inset: 14px 12px 16px; }
  .wcard__body { grid-area: body; padding: 12px 12px 10px 14px; }
  .wcard__toggles { grid-area: tog; }
  .wcard__sel { top: 2px; left: 2px; }
  .wcard__drag { top: auto; bottom: 4px; right: 4px; width: 44px; height: 44px; }
  .wcard__flag { left: 6px; bottom: 6px; font-size: 11px; padding: 3px 7px; }
  .wcard__title { font-size: 17px; }
  .wcard__meta { white-space: normal; }
  .tg { flex-direction: row; gap: 6px; min-height: 48px; font-size: 13px; }
  .pickgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chosen__item { grid-template-columns: 44px 60px minmax(0, 1fr) auto; }
  .chosen__item img { width: 60px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ usability round 1 */

/* typing on a phone: the tab bar steps aside so the keyboard and the field have the room */
@media (max-width: 999px) {
  .is-typing .tabbar { display: none; }
  .is-typing .savebar, .is-typing .savebar--always { bottom: calc(var(--safe-b) + 8px); }
  .is-typing .main { padding-bottom: calc(var(--safe-b) + 90px); }
}

/* "restore your unsaved changes?" */
.draftbar { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: 10px 12px; margin-bottom: 16px; }
.draftbar p { margin: 0; }
.draftbar__btns { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px; }
.draftbar__btns .btn { min-height: 44px; }
@media (min-width: 700px) { .draftbar { grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; } .draftbar__btns { grid-column: auto; } }

/* one tap: Sold / Reserved / For sale again */
.wcard__sale { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 14px; margin-top: -4px; }
.wcard__sale .salebtn { flex: 1 1 auto; justify-content: center; }
.wcard__sale[data-status="sold"], .wcard__sale[data-status="collection"] { display: none; }
.wcard__sale[data-status="available"] .salebtn--available, .wcard__sale[data-status="reserved"] .salebtn--reserved { display: none; }
.salebtn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: 999px; background: #fff; color: var(--ink); font: 500 13.5px/1.1 var(--sans); cursor: pointer; transition: background .15s, border-color .15s; }
.salebtn:hover { background: var(--sage-wash); border-color: var(--sage); }
.salebtn:disabled { opacity: .55; }
.salebtn .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-3); }
.salebtn--sold .dot { background: var(--seal); }
.salebtn--reserved .dot { background: var(--brass); }
.salebtn--available .dot { background: #3F8A5C; }

/* home page picks are buttons now (starred = pressed) */
button.pick { width: 100%; text-align: left; font: inherit; color: inherit; }
.pick[aria-pressed="true"] { border-color: var(--sage); box-shadow: 0 0 0 2px var(--sage); }
.pick .pick__fav { opacity: 0; transform: scale(.7); transition: opacity .15s, transform .15s; }
.pick[aria-pressed="true"] .pick__fav { opacity: 1; transform: none; }
.pick:disabled { opacity: .6; cursor: progress; }

/* messages: "Sent your reply?" */
.letter__done { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--sage-wash); }
.letter__done p { margin: 0; font-weight: 500; }

/* segmented control that may not be changed (own role, last owner) */
.field--seg[disabled] { opacity: .6; }
.field--seg[disabled] .seg__btn { cursor: not-allowed; }

/* admins */
.pill--owner { background: var(--sage); color: var(--on-wall); }
.pill--editor { background: var(--sage-tint); color: var(--sage-ink); }
.pill--state-invited { background: #F3EBD8; color: #6B5523; }
.pill--state-temporary { background: #F3EBD8; color: #6B5523; }
.pill--state-off { background: #ECE8E0; color: var(--ink-2); }
.admins--full .admin { grid-template-columns: 44px minmax(0, 1fr); align-items: start; padding: 14px 0; }
.admins--full .admin__who .muted { white-space: normal; }
.admin.is-off .admin__avatar { background: #B9B4AA; }
.admin__manage { grid-column: 1 / -1; }
.admin__manage > summary { list-style: none; width: max-content; min-height: 44px; }
.admin__manage > summary::-webkit-details-marker { display: none; }
.admin__manage[open] > summary { margin-bottom: 12px; background: var(--sage-wash); }
.admin__panel { display: grid; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.admin__acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.admin__acts form { display: contents; }
.admin__acts .hint { margin: 0; }
@media (min-width: 900px) {
  .admins--full .admin { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .admin__manage { grid-column: 2 / -1; }
}
.linkcard { border: 2px solid var(--sage); }
.linkcard:focus { outline: none; }
.linkcard .card__title { display: flex; align-items: center; gap: 8px; }
.copyrow { display: flex; gap: 10px; margin: 4px 0 10px; }
.copyrow .in { flex: 1; min-width: 0; font: 500 14px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; }
.copyrow .btn { flex: none; }
@media (max-width: 559px) { .copyrow { flex-direction: column; } }
@media (max-width: 720px), (pointer: coarse) { .copyrow .in { font-size: 16px; } }
.how { border: 0; padding: 0; margin: 4px 0 18px; display: grid; gap: 10px; }
.how__opt { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.how__opt:has(input:checked) { border-color: var(--sage); box-shadow: 0 0 0 1px var(--sage); }
.how__opt input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--sage); }
.how__opt > span { display: grid; gap: 2px; }
.how__opt .hint { margin: 0; }
.how__more { padding: 0 0 4px 14px; }
.how__more > .field:last-child { margin-bottom: 6px; }
.nojs-pw { display: inline-flex; }
.js .nojs-pw[hidden] { display: none; }

/* pages without navigation: set or reset a password */
.login--solo { grid-template-columns: minmax(0, 1fr); background: radial-gradient(90% 70% at 50% 0%, var(--sage-wash), transparent 70%), var(--paper); }
.login--solo .login__panel { min-height: 100vh; place-items: center; }
@media (max-width: 999px) { .login--solo .login__panel { place-items: start center; padding-top: max(48px, 8vh); } }
.login__help .link, .login__help .btn { min-height: 44px; }
form.login__help { display: block; }
