/* Окно заказа: тёмная студия, тонкие линии, цифры моноширинным шрифтом, акцент — цвет световой полосы. */
.om-lock, .om-lock body { overflow: hidden; }
.om[hidden] { display: none; }
.om { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: clamp(0px, 2.4vh, 32px) clamp(0px, 3vw, 40px); }
.om-back { position: absolute; inset: 0; background: rgba(4, 3, 3, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transition: opacity .4s var(--ease); }
.om.open .om-back { opacity: 1; }
.om-box {
  position: relative; width: min(1120px, 100%); max-height: 100%; overflow: auto; overscroll-behavior: contain;
  padding: clamp(20px, 2.4vw, 32px) clamp(22px, 3vw, 40px); border-radius: 26px; background: #0e0c0b; border: 1px solid var(--rule);
  box-shadow: 0 60px 160px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .02) inset;
  opacity: 0; transform: translateY(24px) scale(.985); transition: opacity .45s var(--ease), transform .55s var(--ease);
}
.om.open .om-box { opacity: 1; transform: none; }
/* световая линия слева, как полоса на корпусе */
.om-box::before { content: ""; position: absolute; left: 0; top: 28px; bottom: 28px; width: 2px; border-radius: 2px; background: linear-gradient(var(--ember-2), var(--line)); box-shadow: 0 0 14px var(--line); }

.om-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: clamp(14px, 2vh, 24px); }
.om-head h2 { font: 400 clamp(1.6rem, 1.2rem + 1vw, 2.2rem)/1 var(--f-display); letter-spacing: -.02em; }
.om-x { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; cursor: pointer; transition: border-color .3s, transform .4s var(--ease); }
.om-x span { position: absolute; left: 12px; right: 12px; top: 50%; height: 1px; background: var(--paper); transform: rotate(45deg); }
.om-x span + span { transform: rotate(-45deg); }
.om-x:hover { border-color: var(--line); transform: rotate(90deg); }

.om-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(22px, 3vw, 44px); align-items: start; }
.om-grid[hidden] { display: none; }

/* поля */
.om fieldset { border: 0; margin: 0 0 clamp(14px, 2.4vh, 24px); padding: 0; min-width: 0; }
.om legend { padding: 0; margin-bottom: 6px; color: var(--line); }
.om-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 22px; }
.om-f { display: block; margin-bottom: 10px; }
.om-f > span { display: block; font-size: .78rem; color: var(--mute); margin-bottom: 2px; }
.om-f > span i { font-style: normal; color: var(--dim); }
.om input, .om select {
  width: 100%; height: 40px; padding: 0 2px; border: 0; border-bottom: 1px solid rgba(239, 233, 224, .2); border-radius: 0;
  background: transparent; color: var(--paper); font: 400 1rem/1 var(--f-text); outline: none; transition: border-color .3s;
  -webkit-appearance: none; appearance: none;
}
.om input::placeholder { color: rgba(239, 233, 224, .28); }
.om input:focus, .om select:focus { border-bottom-color: var(--line); }
.om select { cursor: pointer; padding-right: 22px; background: linear-gradient(45deg, transparent 50%, var(--mute) 50%) right 6px center / 6px 6px no-repeat, linear-gradient(-45deg, transparent 50%, var(--mute) 50%) right 1px center / 6px 6px no-repeat; background-size: 5px 5px, 5px 5px; background-position: right 7px center, right 2px center; }
.om select option { background: #141110; color: var(--paper); }
.om-ph { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.om-ph select { text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.om-ph select { font-family: var(--f-mono); font-stretch: 75%; }
.om-f.bad input { border-bottom-color: #ff3b3b; }
.om-f.bad > span { color: #ff7a6b; }

.om-pay { display: grid; gap: 6px; }
.om-opt { position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 16px; border: 1px solid var(--rule); cursor: pointer; transition: border-color .3s, background .3s; }
.om-opt input { position: absolute; opacity: 0; pointer-events: none; }
.om-opt i { flex: none; width: 16px; height: 16px; border-radius: 50%; border: 1px solid rgba(239, 233, 224, .4); transition: border-color .3s, box-shadow .3s; }
.om-opt span { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; }
.om-opt b { font-weight: 500; font-size: .94rem; line-height: 1.3; }
.om-opt small { font-size: .78rem; line-height: 1.3; color: var(--mute); }
.om-opt:has(input:checked) { border-color: var(--line); background: rgba(var(--hz), .08); }
.om-opt input:checked + i { border-color: var(--line); box-shadow: inset 0 0 0 3px #0e0c0b, inset 0 0 0 9px var(--line); }
.om-opt input:focus-visible + i { outline: 2px solid var(--line); outline-offset: 3px; }

/* корзина */
.om-cart { padding: clamp(16px, 1.8vw, 22px); border-radius: 22px; background: rgba(239, 233, 224, .035); border: 1px solid var(--rule); position: sticky; top: 0; }
.om-hint { margin: 10px 0 18px; font-size: .86rem; line-height: 1.55; color: var(--mute); }
.om kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 4px; border-radius: 6px; font: 400 .75rem/1 var(--f-mono); background: rgba(239, 233, 224, .08); border: 1px solid rgba(239, 233, 224, .18); }
.om-items { display: grid; gap: 6px; margin-top: 12px; }
.om-items li { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 16px; border: 1px solid transparent; background: rgba(239, 233, 224, .03); transition: border-color .3s, background .3s, opacity .3s; opacity: .62; }
.om-items li.on { opacity: 1; border-color: rgba(239, 233, 224, .16); background: rgba(239, 233, 224, .06); }
.om-th { display: grid; place-items: center; width: 40px; height: 50px; border-radius: 10px; background: #e8e6e2; overflow: hidden; }
.om-th img { height: 42px; width: auto; }
.om-it b { display: block; font-weight: 500; font-size: .94rem; }
.om-it b em { color: inherit; font-style: normal; }
.om-it small { display: none; }
.om-pr { display: block; margin-top: 4px; font: 400 .85rem/1 var(--f-mono); font-stretch: 75%; }
.om-q { display: flex; align-items: center; gap: 4px; }
.om-q button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(239, 233, 224, .3); background: transparent; color: var(--paper); font: 400 1rem/1 var(--f-mono); cursor: pointer; transition: border-color .3s, background .3s; }
.om-q button:hover:not(:disabled) { border-color: var(--line); background: rgba(var(--hz), .14); }
.om-q button:disabled { opacity: .3; cursor: default; }
.om-q output { min-width: 24px; text-align: center; font: 400 .95rem/1 var(--f-mono); }

.om-sum { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.om-line { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .85rem; color: var(--mute); }
.om-line b { color: var(--paper); font-weight: 500; }
.om-total { display: flex; justify-content: space-between; align-items: baseline; margin: 10px 0 14px; }
.om-total span { color: var(--mute); }
.om-total output { font: 300 clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem)/1 var(--f-mono); font-stretch: 75%; letter-spacing: -.03em; }
.om-go { width: 100%; justify-content: center; padding-block: 1em; font-size: .98rem; }
.om-go:disabled { opacity: .45; cursor: default; transform: none; }
.om-go.busy { opacity: .7; pointer-events: none; }
.om-err { margin-top: 12px; font-size: .88rem; color: #ff7a6b; }
.om-legal { margin-top: 10px; font-size: .78rem; line-height: 1.5; color: var(--dim); }
.om-legal a { color: var(--mute); text-decoration: underline; text-underline-offset: 2px; }

/* заказ принят */
.om-done { text-align: center; padding: clamp(30px, 8vh, 80px) 0; display: grid; justify-items: center; gap: 16px; }
.om-done[hidden] { display: none; }
.om-done h3 { font: 300 clamp(1.8rem, 1.2rem + 2vw, 3rem)/1.1 var(--f-accent); letter-spacing: -.02em; }
.om-done p:not(.label) { color: var(--mute); max-width: 40ch; }
.om-done .btn { margin-top: 12px; }
.om-done-line { width: 3px; height: 90px; border-radius: 3px; background: linear-gradient(var(--ember-2), var(--line)); box-shadow: 0 0 20px var(--line); transform-origin: bottom; animation: om-fill 1.4s var(--ease) both; }
@keyframes om-fill { from { transform: scaleY(0); } }

/* телефон: окно на весь экран, корзина сверху, итог и кнопка — внизу формы */
@media (max-width: 860px) {
  .om { padding: 0; place-items: stretch; }
  .om-box { border-radius: 0; border: 0; height: 100%; padding: 18px 16px 28px; transform: translateY(30px); }
  .om-box::before { display: none; }
  .om-head { position: sticky; top: -18px; z-index: 2; margin: -18px -16px 18px; padding: 16px; background: rgba(14, 12, 11, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--rule); }
  .om-grid { grid-template-columns: 1fr; gap: 26px; }
  .om-cart { position: static; padding: 14px; }
  .om-row { grid-template-columns: 1fr; }
  .om-pay { grid-template-columns: 1fr; }
  .om-items li { grid-template-columns: 44px 1fr auto; gap: 10px; padding: 10px; }
  .om-th { width: 44px; height: 56px; }
  .om-th img { height: 46px; }
  .om input, .om select { font-size: 16px; }
}
