@font-face {
  font-family: Geist;
  src: url("./assets/Geist-Variable.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f8f7ef;
  --paper: #fffef9;
  --paper-warm: #efebdb;
  --ink: #26322c;
  --muted: #535d54;
  --forest: #283d34;
  --forest-deep: #1e3028;
  --accent: #f5cc70;
  --line: #dedfce;
  --danger: #922e2a;
  --sans: Geist, "Segoe UI", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
  font: 16px/1.55 var(--sans);
  color: var(--ink);
  background: var(--background);
}

*, *::after, *::before { box-sizing: border-box; }
body, h1, h2, h3, p { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #b66719; outline-offset: 3px; }
.skip, .sr-only, .file-input { position: absolute; width: 1px; height: 1px; margin: -1px; clip: rect(0 0 0 0); overflow: hidden; white-space: nowrap; }
.skip:focus { clip: auto; width: auto; height: auto; z-index: 8; padding: .5rem .7rem; margin: .6rem; background: var(--paper); }

.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.masthead-inner { max-width: 1172px; min-height: 75px; margin: auto; padding: 0 28px; display: grid; align-items: center; grid-template-columns: 1fr auto 1fr; gap: 24px; }
.brand { width: max-content; display: flex; align-items: center; gap: 10px; font-size: 1.23rem; letter-spacing: -.055em; }
.brand-icon, .login-mark { height: 36px; width: 36px; display: grid; place-items: center; border-radius: 10px; color: var(--forest-deep); background: var(--accent); }
.brand strong { font-weight: 725; color: var(--forest-deep); }
.brand strong span { color: #5d6a53; }
.tag-mark { position: relative; width: 14px; height: 11px; border: 1.7px solid currentColor; transform: rotate(-37deg); border-radius: 3px 6px 6px 3px; }
.tag-mark::before { content: ""; position: absolute; left: 2px; top: 2px; width: 3px; height: 3px; background: currentColor; border-radius: 50%; }
.views { display: flex; padding: 4px; gap: 3px; background: #eeefe5; border-radius: 9px; }
.views a { min-height: 40px; display: flex; align-items: center; gap: 9px; padding: 0 14px; border-radius: 7px; color: #4e5c51; font-size: .9rem; font-weight: 580; white-space: nowrap; }
.views a[aria-current="page"] { background: var(--paper); color: var(--forest-deep); box-shadow: 0 1px 3px #1a352826; }
.views a:hover { color: var(--forest-deep); }
#logout { justify-self: end; }
.text-action { display: inline-block; border: 0; background: none; color: var(--forest); font-size: .88rem; font-weight: 650; padding: 9px 0; }
.text-action:hover { text-decoration: underline; }

main { max-width: 1172px; margin: 0 auto; padding: 28px 28px 70px; }
main:focus { outline: none; }
h1 { font: 500 clamp(2.3rem, 5.1vw, 4.3rem)/1.05 var(--serif); letter-spacing: -.05em; }
h1 span { color: #a76a21; }
h2, h3 { color: var(--forest-deep); font-weight: 690; letter-spacing: -.04em; line-height: 1.25; }
h2 { font-size: clamp(1.2rem,2.7vw,1.7rem); }
h3 { font-size: 1.2rem; }
.catalog-hero { position: relative; isolation: isolate; overflow: hidden; min-height: 271px; display: flex; align-items: center; padding: 32px 42px; border-radius: 23px; color: var(--paper); background: radial-gradient(ellipse at 96% 45%,#4d5b3e 0,transparent 57%),linear-gradient(115deg,#233c32,#334736); }
.hero-copy { position: relative; z-index: 1; max-width: 72%; }
.hero-copy h1 span { color: var(--accent); }
.hero-copy p { color: #f1efe0; max-width: 43ch; margin: 13px 0 23px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.hero-actions .button-accent { min-height: 49px; }
.button-on-dark { color: #f9f5e9; border-color: #d8d9bc58; background: #26372d65; }
.button-on-dark:hover { background: #51624b; }
.file-label.is-disabled { opacity: .55; cursor: default; }
.hero-art { position: absolute; inset: 0 0 0 61%; z-index: 0; color: #5c4d2e; }
.orbit { position: absolute; left: 49%; top: 52%; width: 94%; aspect-ratio: 1; border: 1px solid #f9e4a744; border-radius: 50%; transform: translate(-50%,-50%) rotate(-24deg) scaleY(.62); }
.orbit-b { transform: translate(-50%,-50%) rotate(23deg) scaleY(.68); }
.paper-tag { position: absolute; width: 46%; max-width: 165px; aspect-ratio: 1.45; border-radius: 14px 21px 21px 14px; border: 1px solid #74542e29; filter: drop-shadow(0 18px 18px #0b271b45); }
.paper-tag::before { content: ""; position: absolute; left: 11%; top: 43%; width: 9%; aspect-ratio: 1; border-radius: 50%; border: 2px solid #654e44aa; background: #5b6850; }
.paper-tag::after { content: ""; position: absolute; inset: 12% 7%; border: 1px dashed #8b5d3d7a; border-radius: 8px 16px 16px 8px; }
.paper-tag-back { left: 19%; top: 42%; transform: rotate(13deg); background: #dcd7b5; }
.paper-tag-front { left: 42%; top: 28%; transform: rotate(-19deg); background: linear-gradient(126deg,#f9d78c,#e8b758); display: grid; place-items: center; }
.tag-currency { font: 1em/1 var(--serif); font-size: clamp(2.2rem,6vw,4.8rem); margin-left: 10%; transform: translateY(-2%); color: #58492c; }

.button { min-height: 43px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 8px; padding: 0 16px; font-weight: 650; font-size: .92rem; line-height: 1.3; text-align: center; white-space: nowrap; }
.button-primary { color: white; background: var(--forest); }
.button-primary:hover { background: var(--forest-deep); }
.button-accent { color: var(--forest-deep); background: var(--accent); }
.button-accent:hover { background: #ffdc8b; }
.button-outline { color: var(--forest); background: var(--paper); border-color: var(--line); }
.button-outline:hover { border-color: #758369; background: #f1f2e9; }
.button-small { min-height: 37px; padding: 0 11px; font-size: .84rem; }
.button-danger { color: white; background: var(--danger); }
.button-danger:hover { background: #762422; }
.danger-action { color: var(--danger); }

.icon { position: relative; width: 16px; height: 16px; display: inline-block; flex: 0 0 16px; color: currentColor; }
.icon-plus::before, .icon-plus::after { content: ""; position: absolute; background: currentColor; border-radius: 1px; }
.icon-plus::before { width: 12px; height: 1.6px; top: 7px; left: 2px; }
.icon-plus::after { width: 1.6px; height: 12px; top: 2px; left: 7px; }
.icon-grid { width: 14px; height: 14px; flex-basis: 14px; border: 1.6px solid currentColor; border-radius: 3px; }
.icon-grid::before, .icon-grid::after { content: ""; position: absolute; background: currentColor; }
.icon-grid::before { width: 1px; height: 100%; left: 45%; }
.icon-grid::after { width: 100%; height: 1px; top: 45%; }
.icon-search::before { content: ""; width: 12px; height: 12px; position: absolute; top: 0; left: 0; border: 1.6px solid currentColor; border-radius: 50%; }
.icon-search::after { content: ""; width: 7px; height: 1.6px; position: absolute; top: 12px; left: 9px; background: currentColor; border-radius: 1px; transform: rotate(44deg); }
.icon-camera { border: 1.5px solid currentColor; border-radius: 3px; height: 12px; }
.icon-camera::before { content: ""; display: block; margin: 2px auto 0; width: 5px; height: 5px; border: 1px solid currentColor; border-radius: 50%; }
.icon-camera::after { content: ""; position: absolute; top: -4px; left: 4px; width: 6px; height: 3px; border: 1px solid currentColor; border-radius: 2px 2px 0 0; }
.icon-picture { border: 1.5px solid currentColor; border-radius: 3px; height: 13px; overflow: hidden; }
.icon-picture::before { content: ""; position: absolute; top: 2px; right: 2px; width: 3px; height: 3px; border-radius: 50%; background: currentColor; }
.icon-picture::after { content: ""; position: absolute; left: 2px; top: 6px; width: 7px; height: 7px; border: 1px solid currentColor; transform: rotate(42deg); }

.catalog-tools { display: flex; gap: 18px; align-items: flex-end; justify-content: space-between; margin: 30px 0 13px; }
.check-panel { margin-top: 17px; border: 1px solid var(--line); border-radius: 15px; padding: 18px; background: var(--paper); }
.check-heading { display: flex; gap: 9px; justify-content: space-between; align-items: baseline; }
.check-heading p, .check-hint { color: var(--muted); font-size: .86rem; }
.check-hint { margin: 4px 0 11px; }
.check-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.check-thumb { position: relative; width: min(calc((100% - 24px) / 4),116px); aspect-ratio: 1; border-radius: 8px; background: #e6eadd; margin: 0; overflow: hidden; }
.check-thumb img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.remove-check-photo { display: grid; place-items: center; position: absolute; top: 3px; right: 3px; height: 28px; width: 28px; border-radius: 50%; border: 1px solid #f1efe0; color: white; background: #29362dda; font-size: 1.16rem; }
.check-panel .form-feedback { margin-top: 9px; }
.check-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; margin-top: 11px; }
.check-actions .button-primary { margin-left: auto; }
.check-result { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 16px; }
.check-result h3 { margin-bottom: 3px; }
.check-result .match-text { color: var(--muted); margin-bottom: 9px; }
.check-result .products { margin-top: 11px; }
.check-result .product-crop { aspect-ratio: 2.15; }
.check-result > .button { margin-top: 4px; }
.catalog-heading { min-width: 0; }
.catalog-heading p { color: var(--muted); margin-top: 4px; font-size: .9rem; }
.search { display: flex; gap: 11px; align-items: center; min-width: min(350px, 47%); border: 1px solid #d1d7c6; background: var(--paper); border-radius: 9px; padding: 0 12px; color: var(--muted); }
.search:focus-within { border-color: #748468; box-shadow: 0 0 0 3px #dbe5d5; }
.search input { flex: 1; border: 0; background: transparent; min-height: 45px; min-width: 0; color: var(--ink); outline: none; }
.products { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; align-items: stretch; }
.product-card { background: var(--paper); border: 1px solid var(--line); border-radius: 15px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.product-crop { position: relative; width: 100%; aspect-ratio: 2.25; overflow: hidden; background: #ebeede; display: grid; place-items: center; color: var(--muted); }
.product-crop img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; min-height: 0; object-position: center 55%; }
.product-content { display: flex; flex-direction: column; flex: 1; padding: 15px 17px 12px; }
.product-content h3 { overflow-wrap: anywhere; }
.product-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 15px; flex-wrap: wrap; }
.product-price { color: #1f4937; font-size: clamp(1.18rem,3.4vw,1.62rem); font-weight: 740; font-variant-numeric: tabular-nums; line-height: 1.3; }
.product-price.no-price { font-size: .92rem; font-weight: 620; color: #665c48; }
.colors { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.swatch { width: 11px; height: 11px; border: 1px solid #1d241e26; border-radius: 50%; background: var(--swatch,#c5cebd); flex: 0 0 11px; }
.color-button { min-height: 34px; padding: 4px 9px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid #e0e2d4; border-radius: 6px; color: var(--ink); background: var(--paper); font-size: .82rem; overflow-wrap: anywhere; text-align: left; }
.color-button[aria-pressed="true"] { border-color: #758369; background: #eaf0e4; }
.product-actions { padding-top: 8px; margin-top: auto; display: flex; gap: 17px; }
.product-actions .text-action { min-height: 40px; }
.no-results { grid-column: 1/-1; text-align: center; background: var(--paper); border: 1px dashed #c4cdbb; padding: 35px 16px; border-radius: 12px; }
.no-results p { color: var(--muted); margin: 5px 0 13px; }

.editor-heading { margin: 5px 0 23px; }
.editor-heading h1 { margin-top: 4px; }
.editor-grid { display: grid; grid-template-columns: minmax(0, .75fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.form-panel, .login-card { padding: 21px; border: 1px solid var(--line); border-radius: 14px; background: var(--paper); min-width: 0; }
.form-panel h2 { font-size: 1.26rem; margin: 0 0 13px; }
.details-column { display: grid; gap: 16px; }
label:not(.file-label) { display: block; font-size: .9rem; font-weight: 625; color: var(--forest-deep); margin-bottom: 5px; }
.input { display: block; width: 100%; min-height: 45px; padding: 8px 11px; border: 1px solid #cbd4c4; border-radius: 8px; color: var(--ink); background: #fcfcf7; }
.input:focus { border-color: #6e866b; }
.variant-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 13px; }
.variant-panel-top h2 { margin: 0; }
.variant-row { padding: 12px 0 6px; margin-top: 11px; border-top: 1px solid var(--line); }
.variant-row:first-child { margin-top: 0; }
.variant-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.variant-fields > div { min-width: 0; }
.price-input { display: flex; position: relative; }
.price-input input { padding-right: 33px; }
.price-input > span { position: absolute; align-self: center; right: 12px; color: var(--muted); pointer-events: none; }
.photo-picker { display: grid; gap: 7px; margin-top: 10px; min-width: 0; }
.photo-preview { min-height: 146px; height: clamp(146px,32vw,205px); display: grid; place-items: center; border: 1px dashed #c2cdb8; border-radius: 9px; overflow: hidden; color: var(--muted); background: #eef1e7; }
.photo-preview img { height: 100%; width: 100%; object-fit: contain; }
.photo-empty { display: flex; align-items: center; gap: 8px; justify-content: center; text-align: center; padding: 8px; font-size: .9rem; }
.photo-buttons { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.file-label { cursor: pointer; }
.file-label:focus-within { outline: 3px solid #b66719; outline-offset: 3px; }
.photo-buttons .text-action { padding: 7px 4px; }
.variant-row .photo-preview { min-height: 69px; height: 93px; }
.variant-row .photo-picker { grid-template-columns: 110px minmax(0,1fr); align-items: start; }
.variant-row .photo-empty { font-size: .76rem; flex-direction: column; gap: 4px; line-height: 1.27; }
.variant-row > .text-action { margin-top: 3px; }
.photo-picker .form-feedback { grid-column: 1/-1; }
.editor-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; margin-top: 16px; }
.editor-actions .form-feedback { flex: 0 0 100%; text-align: right; }
.form-feedback { color: var(--danger); font-size: .88rem; word-break: break-word; }
.standalone-feedback { margin-bottom: 13px; }
.login-card { width: min(100%,420px); margin: 42px auto 0; padding: 27px; }
.login-mark { width: 44px; height: 44px; margin-bottom: 12px; }
.login-card h1 { font-size: 2.45rem; }
.login-card > p { color: var(--muted); margin: 8px 0 18px; }
.login-card form { display: grid; gap: 7px; }
.login-card label { margin: 0; }
.login-card .button { margin-top: 5px; }
.boot { color: var(--muted); text-align: center; padding: 27px; }

.modal-backdrop { position: fixed; inset: 0; background: #182a2278; z-index: 7; display: grid; place-items: center; padding: 12px; }
.modal-card { width: min(100%,405px); max-height: calc(100% - 24px); overflow: auto; background: var(--paper); border-radius: 13px; padding: 21px; box-shadow: 0 10px 40px #0f1f2270; }
.modal-card p { margin: 10px 0 14px; overflow-wrap: anywhere; }
.modal-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 7px; }
.toast { position: fixed; left: 50%; bottom: max(17px,env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 22px); width: max-content; z-index: 6; background: var(--forest-deep); color: white; border-radius: 8px; padding: 9px 14px; font-size: .88rem; box-shadow: 0 5px 20px #0e221e3d; }

@media (max-width: 780px) {
  .masthead-inner, main { padding-left: 16px; padding-right: 16px; }
  .catalog-hero { padding: 25px; min-height: 245px; }
  .paper-tag { width: 57%; }
  .paper-tag-front { left: 37%; }
  .paper-tag-back { left: 12%; }
  .editor-grid { grid-template-columns: minmax(0,.78fr) minmax(0,1fr); }
  .form-panel { padding: 15px; }
}
@media (max-width: 620px) {
  .masthead-inner { min-height: 0; grid-template-columns: 1fr auto; gap: 0 10px; padding-top: 8px; padding-bottom: 8px; }
  .brand { min-height: 42px; }
  .views { grid-column: 1/-1; grid-row: 2; margin-top: 7px; }
  .views a { flex: 1; justify-content: center; min-height: 40px; }
  #logout { grid-column: 2; grid-row: 1; min-height: 42px; }
  main { padding-top: 12px; padding-bottom: max(36px,env(safe-area-inset-bottom)); }
  .catalog-hero { min-height: 211px; padding: 20px; border-radius: 16px; }
  .catalog-hero h1 { font-size: clamp(2.15rem, 8.5vw, 3.25rem); }
  .hero-copy { max-width: 79%; }
  .hero-copy p { font-size: .9rem; margin: 9px 0 15px; }
  .hero-art { inset: 0 -7% 0 65%; opacity: .74; }
  .hero-actions .button { min-height: 42px; padding: 0 10px; font-size: .83rem; }
  .paper-tag { width: 62%; border-radius: 8px 10px 10px 8px; }
  .paper-tag::after { border-radius: 5px 8px 8px 5px; }
  .paper-tag-front { top: 45%; }
  .paper-tag-back { top: 54%; }
  .catalog-tools { flex-direction: column; align-items: stretch; gap: 9px; margin-top: 20px; margin-bottom: 9px; }
  .catalog-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
  .catalog-heading p { font-size: .82rem; text-align: right; }
  .products { gap: 10px; }
  .product-crop { aspect-ratio: 1.35; }
  .product-content { padding: 11px 10px 7px; }
  .product-meta { display: block; }
  .product-meta h3 { font-size: 1.02rem; margin-bottom: 4px; }
  .product-actions { gap: 13px; padding-top: 4px; }
  .product-actions button { min-height: 41px; }
  .check-panel { padding: 12px; }
  .check-actions .button { padding-inline: 9px; font-size: .84rem; }
  .check-actions .button-primary { margin-left: 0; }
  .editor-grid { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .editor-heading { margin-bottom: 14px; }
  .details-column { display: contents; }
  .information-panel { grid-row: 1; }
  .editor-actions { margin-top: 11px; }
  .editor-actions .button { flex: 1; }
  .login-card { margin-top: 22px; }
}
@media (max-width: 365px) {
  .views a { padding: 0 6px; font-size: .84rem; }
  .products { grid-template-columns: 1fr; }
  .product-crop { aspect-ratio: 1.72; }
  .hero-copy { max-width: 86%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
