@font-face { font-family: Onest; src: url("/fonts/onest-2.woff2") format("woff2"); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0400-045F, U+0490-0491,U+04B0-04B1,U+2116; }
@font-face { font-family: Onest; src: url("/fonts/onest-7.woff2") format("woff2"); font-style: normal; font-weight: 400 700; font-display: swap; unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
:root {
  color-scheme: light;
  --paper: #f5f4ef;
  --card: #fffefa;
  --ink: #1d221d;
  --muted: #5d665e;
  --line: #dddcd0;
  --green: #264a39;
  --green-deep: #18372a;
  --green-light: #e5ede3;
  --danger: #9c352b;
  --danger-light: #f9e8e4;
  --amber: #574729;
  --amber-light: #f4edda;
  --red: #b62b26;
  --white: #fff;
  --radius: 14px;
  --shadow: 0 8px 28px #2730250a;
  --max: 1264px;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.5 Onest, system-ui, sans-serif; -webkit-text-size-adjust: 100%; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .57; }
a { color: var(--green); }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #286345; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; transform: translateY(-150%); background: var(--card); padding: 12px; }
.skip-link:focus { transform: none; }
.wrap { width: min(calc(100% - 64px), var(--max)); margin-inline: auto; }
.splash { min-height: 100svh; display: grid; place-content: center; color: var(--muted); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(29px, 4.6vw, 57px); letter-spacing: -.05em; font-weight: 660; line-height: 1.04; }
h2 { font-size: 23px; line-height: 1.2; font-weight: 650; letter-spacing: -.025em; }
h3 { font-size: 17px; font-weight: 640; letter-spacing: -.012em; line-height: 1.26; }
.num { font-variant-numeric: tabular-nums; }
.subtle { color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.action-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.logo { display: inline-flex; align-items: baseline; font-size: 33px; line-height: 1; font-weight: 720; white-space: nowrap; color: var(--ink); letter-spacing: -.082em; text-decoration: none; }
.logo span { color: var(--red); }
.btn { min-height: 46px; border-radius: 9px; border: 1px solid transparent; padding: 10px 16px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; color: var(--white); background: var(--green); font-weight: 630; line-height: 1.18; text-align: center; text-decoration: none; touch-action: manipulation; }
.btn:hover:not(:disabled) { background: var(--green-deep); }
.btn.secondary { color: var(--green-deep); background: var(--card); border-color: var(--line); }
.btn.secondary:hover:not(:disabled) { background: var(--green-light); border-color: #cddbcf; }
.btn.danger { color: var(--danger); background: var(--danger-light); border-color: #edd1cb; }
.btn.danger:hover:not(:disabled) { background: #f5ded8; }
.btn.small { min-height: 42px; padding: 8px 13px; font-size: 14px; }
.btn.full { width: 100%; }
.text-button { text-decoration: underline; text-underline-offset: .22em; min-height: 44px; color: var(--green-deep); background: none; border: 0; padding: 5px 0; font-weight: 620; }
.field { display: grid; gap: 6px; min-width: 0; font-size: 14px; font-weight: 600; }
.field small { color: var(--muted); font-weight: 400; }
.field input, .field select, .control {
  min-height: 47px; width: 100%; min-width: 0; padding: 10px 12px; border: 1px solid #c9cdc0;
  background: var(--white); border-radius: 8px; color: var(--ink); font-size: 16px; line-height: 1.3;
}
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field input::placeholder { color: #677166; opacity: 1; }
.form { display: grid; gap: 15px; }
.form-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.form-error { color: var(--danger); background: var(--danger-light); padding: 11px 13px; border-radius: 8px; font-size: 14px; overflow-wrap: anywhere; }
.notice { background: var(--amber-light); color: var(--amber); font-size: 14px; padding: 14px 16px; border: 1px solid #e6dcc4; border-radius: 9px; }
.auth-shell { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { display: flex; flex-direction: column; min-width: 0; padding: max(30px, 4vw); }
.auth-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-header > span { font-size: 14px; font-weight: 560; color: var(--muted); }
.auth-content { width: min(100%, 410px); margin: auto; padding: 52px 0; }
.auth-content h1 { font-size: clamp(31px, 3.7vw, 50px); }
.auth-content > p { margin: 14px 0 26px; color: var(--muted); }
.auth-visual { position: relative; min-height: 100%; background: #b58c5d url("https://idenpol.ru/assets/img/tiles/urman-arman-800.webp") center/cover; }
.auth-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, #201a0f99); }
.texture-caption { position: absolute; z-index: 1; bottom: 28px; left: 30px; color: white; font-size: 14px; font-weight: 560; }
.shell-header { position: sticky; z-index: 10; top: 0; background: #fffefa; border-bottom: 1px solid var(--line); }
.topbar { min-height: 72px; display: flex; align-items: center; gap: clamp(15px, 3vw, 43px); }
.brand { display: inline-flex; align-items: center; gap: 11px; white-space: nowrap; }
.brand-label { font-size: 13px; font-weight: 610; padding: 3px 0 3px 10px; border-left: 1px solid var(--line); color: var(--muted); }
.nav { display: flex; gap: clamp(10px, 2.3vw, 32px); align-items: stretch; align-self: stretch; }
.nav a { position: relative; display: flex; align-items: center; padding: 9px 3px; color: var(--muted); text-decoration: none; white-space: nowrap; font-weight: 590; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--green-deep); }
.nav a[aria-current="page"]::after { position: absolute; content: ""; inset: auto 0 0; height: 2px; background: var(--green); border-radius: 3px 3px 0 0; }
.header-actions { margin-left: auto; display: flex; flex-shrink: 0; align-items: center; gap: 10px; }
.cart-trigger { min-height: 42px; background: var(--green-light); color: var(--green-deep); padding: 8px 11px; }
.cart-trigger:hover:not(:disabled) { background: #dce9db; }
.cart-count { background: var(--green); color: white; width: 21px; height: 21px; display: inline-grid; place-content: center; border-radius: 50%; font-size: 11px; font-weight: 640; }
.main { padding: 42px 0 72px; min-height: calc(100svh - 72px); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; padding-bottom: 25px; }
.page-heading p { color: var(--muted); margin-top: 10px; }
.warehouse { min-width: 146px; flex-shrink: 0; }
.warehouse select { background: var(--card); }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(285px, 1fr); align-items: start; gap: 20px; }
.catalog-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search { display: flex; gap: 8px; align-items: center; padding: 0 12px; border: 1px solid #cfd2c6; border-radius: 8px; background: var(--card); flex: 1 1 250px; min-width: 0; }
.search:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
.search-icon { position: relative; flex: 0 0 15px; width: 15px; height: 15px; border: 1.6px solid #526556; border-radius: 50%; margin-right: 3px; }
.search-icon::after { content: ""; position: absolute; width: 7px; height: 1.6px; background: #526556; right: -5px; bottom: -3px; transform: rotate(45deg); border-radius: 3px; }
.search input { width: 100%; min-height: 47px; background: transparent; border: 0; outline: none; padding: 8px; font-size: 16px; color: var(--ink); }
.chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 44px; padding: 6px 12px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: var(--card); font-size: 14px; white-space: nowrap; }
.chip:hover { border-color: #8fa28f; }
.chip[aria-pressed="true"] { color: var(--green-deep); background: var(--green-light); border-color: #aac1ad; font-weight: 630; }
.available-check { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 5px 0; white-space: nowrap; font-weight: 570; }
.available-check input { accent-color: var(--green); width: 17px; height: 17px; margin: 0; }
.catalog-head { margin: 9px 0; color: var(--muted); font-size: 13px; }
.catalog-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.product { overflow: hidden; min-width: 0; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.product-media, .photo-fallback { aspect-ratio: 4/2.65; background: #eae6dc; }
.product-media { overflow: hidden; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.photo-fallback { display: grid; place-content: center; color: #665a44; padding: 7px; text-align: center; font-size: 12px; }
.product-body { padding: 14px; display: flex; flex: 1 1 auto; flex-direction: column; }
.product-label { color: var(--muted); font-size: 12px; line-height: 1.25; margin-bottom: 5px; overflow-wrap: anywhere; }
.product h2 { font-size: 21px; overflow-wrap: anywhere; }
.product-detail { margin: 5px 0 10px; min-height: 23px; color: var(--green-deep); font-size: 12px; }
.product-detail.out { color: var(--muted); }
.product-cost { margin-top: auto; font-size: 20px; font-weight: 680; letter-spacing: -.025em; }
.product-cost span { color: var(--muted); font-size: 12px; font-weight: 540; letter-spacing: 0; }
.product .btn { margin-top: 11px; min-width: 0; }
.card, .empty { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.card { padding: 20px; }
.card + .card { margin-top: 12px; }
.card-heading { margin-bottom: 13px; }
.empty { padding: clamp(22px, 4vw, 40px); display: grid; align-items: start; justify-items: start; gap: 9px; }
.card-list { max-width: 950px; display: grid; gap: 13px; }
.card-list .card + .card { margin: 0; }
.project-card { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.project-card p { margin-top: 4px; }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--green-deep); background: var(--green-light); border-radius: 999px; white-space: nowrap; padding: 4px 9px; font-size: 12.5px; font-weight: 610; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.neutral { color: #535a53; background: #eaece6; }
.status.waiting { color: var(--amber); background: var(--amber-light); }
.status.expired { color: var(--danger); background: var(--danger-light); }
.order-card .order-body { margin-top: 9px; color: var(--muted); font-size: 14px; }
.order-card .order-total { font-size: 21px; font-weight: 680; }
.order-card .order-actions { margin-top: 12px; }
.details { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
.details summary { min-height: 37px; cursor: pointer; padding: 5px 0; color: var(--green-deep); font-weight: 620; }
.lines { list-style: none; margin: 0; padding: 0; }
.lines li + li { border-top: 1px solid var(--line); }
.order-item { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; }
.order-item p { overflow-wrap: anywhere; }
.order-item small { color: var(--muted); }
.order-item strong { white-space: nowrap; }
.cart-line { display: grid; grid-template-columns: 54px minmax(0, 1fr) max-content; align-items: center; gap: 12px; padding: 12px 0; }
.cart-line:first-child { padding-top: 0; }
.cart-line:last-child { padding-bottom: 0; }
.cart-thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #eae6dc; }
.cart-item-meta { min-width: 0; }
.cart-item-meta p { overflow-wrap: anywhere; }
.cart-item-name { font-weight: 640; font-size: 16px; }
.item-cost { text-align: right; font-weight: 660; white-space: nowrap; }
.item-controls { margin-top: 7px; display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.stepper button { width: 38px; min-height: 38px; background: none; border: 0; color: var(--green-deep); font-size: 19px; font-weight: 600; }
.stepper output { min-width: 29px; text-align: center; font-weight: 650; }
.remove-item { min-height: 40px; color: var(--danger); border: 0; background: none; padding: 4px 7px; font-size: 13px; }
.payment { display: block; cursor: pointer; }
.payment + .payment { margin-top: 8px; }
.payment-inner { display: grid; grid-template-columns: 18px 1fr; gap: 9px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.payment input { width: 16px; height: 16px; margin: 3px 0 0; accent-color: var(--green); }
.payment small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.payment:has(input:checked) .payment-inner { background: #eef4eb; border-color: #9cb29f; }
.cart-summary { position: sticky; top: 90px; }
.cart-summary .btn { margin-top: 12px; }
.cart-summary .field { margin-top: 13px; }
.cart-total { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
.cart-total strong { font-size: 24px; letter-spacing: -.035em; }
.cart-summary .notice { margin-top: 12px; }
.cart-summary .form-error { margin-top: 10px; }
.profile { display: grid; gap: 15px; max-width: 680px; }
.profile .card { padding: 22px; }
.profile-data { display: grid; gap: 9px; margin: 12px 0 0; }
.profile-data div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 14px; }
.profile-data dd { margin: 0; font-weight: 620; overflow-wrap: anywhere; }
.profile-data dt { color: var(--muted); }
dialog { max-width: min(calc(100% - 28px), 540px); width: 100%; max-height: min(90svh, 770px); color: var(--ink); margin: auto; padding: 0; border: 1px solid var(--line); border-radius: 17px; background: var(--card); box-shadow: 0 20px 70px #15241938; }
dialog::backdrop { background: #20282188; }
.dialog-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 19px 21px 10px; }
.dialog-top h2 { margin-top: 6px; }
.dialog-close { flex: 0 0 40px; display: grid; place-content: center; width: 40px; min-height: 40px; border: 0; border-radius: 50%; background: var(--paper); color: var(--ink); font-size: 24px; }
.dialog-body { padding: 0 21px 21px; }
.dialog-media { width: 100%; max-height: 172px; aspect-ratio: 3/1; object-fit: cover; border-radius: 10px; margin-bottom: 14px; }
.product-summary { border-radius: 9px; background: var(--green-light); color: var(--green-deep); padding: 10px 12px; font-size: 14px; }
.dialog-result { display: block; background: #f1f1e9; border-radius: 8px; padding: 10px 12px; }
.toast { position: fixed; z-index: 24; right: 23px; bottom: 20px; max-width: min(78vw, 470px); padding: 11px 15px; border-radius: 8px; background: var(--green-deep); color: var(--white); box-shadow: var(--shadow); overflow-wrap: anywhere; pointer-events: none; }
.noscript { padding: 15px; }
@media (max-width: 1050px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .brand-label { display: none; }
}
@media (max-width: 760px) {
  .wrap { width: min(calc(100% - 34px), var(--max)); }
  .main { padding: 24px 0 calc(84px + env(safe-area-inset-bottom)); min-height: calc(100svh - 57px); }
  .topbar { min-height: 57px; gap: 11px; }
  .logo { font-size: 30px; }
  .brand-label { display: inline; font-size: 12px; }
  .nav { background: var(--card); border-top: 1px solid var(--line); position: fixed; inset: auto 0 0; z-index: 20; padding: 3px 10px env(safe-area-inset-bottom); gap: 0; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); box-shadow: 0 -5px 21px #27302509; }
  .nav a { min-height: 49px; display: flex; justify-content: center; padding: 9px 3px; font-size: 13px; }
  .nav a[aria-current="page"]::after { inset: 0 17% auto; height: 2px; }
  .page-heading { align-items: flex-start; padding-bottom: 17px; gap: 12px; flex-wrap: wrap; }
  .page-heading h1 { font-size: clamp(29px, 7vw, 44px); }
  .page-heading p { margin-top: 6px; font-size: 13px; }
  .warehouse { min-width: 94px; }
  .warehouse .control { min-height: 43px; padding: 7px 8px; }
  .catalog-tools { gap: 6px 10px; margin-bottom: 10px; }
  .catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
  .product-body { padding: 11px; }
  .product h2 { font-size: 17px; }
  .product-detail { font-size: 11.5px; margin: 5px 0 6px; min-height: 34px; }
  .product-cost { font-size: 18px; }
  .product .btn.small { padding: 6px 5px; font-size: 13px; }
  .checkout-grid { grid-template-columns: minmax(0,1fr); gap: 12px; }
  .cart-summary { position: static; }
  .card { padding: 15px; }
  .toast { top: 67px; bottom: auto; right: 12px; }
  .auth-shell { grid-template-columns: minmax(0,1fr); }
  .auth-side { padding: 18px; min-height: 100svh; }
  .auth-visual { display: none; }
  .auth-content { padding: 34px 0 60px; }
}
@media (max-width: 390px) {
  .wrap { width: calc(100% - 24px); }
  .brand { gap: 7px; }
  .brand-label { padding-left: 7px; }
  .catalog-tools .search { flex-basis: 100%; }
  .cart-line { grid-template-columns: 43px minmax(0,1fr) max-content; gap: 8px; }
  .cart-thumb { width: 43px; height: 43px; }
  .project-card { align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}

.payment-choices { margin-top: 15px; }
