:root {
  --bg: #080709;
  --surface: #151217;
  --surface-raised: #1c1820;
  --surface-soft: #24202a;
  --line: #322b37;
  --text: #f8f5f7;
  --muted: #aaa0ad;
  --dim: #706774;
  --accent: #f4384e;
  --accent-pressed: #ce2038;
  --accent-soft: rgba(244, 56, 78, .18);
  --success: #63d195;
  --warning: #ffbf5b;
  --radius: 20px;
  --safe-bottom: max(14px, env(safe-area-inset-bottom));
}

* { box-sizing: border-box; }

html, body, button, input, select { font-family: Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }

html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }

body { -webkit-font-smoothing: antialiased; overscroll-behavior: none; }

button, input, select { font: inherit; }

button { color: inherit; }

.app-shell { width: 100%; max-width: 760px; min-height: 100dvh; margin: 0 auto; padding: max(16px, env(safe-area-inset-top)) 16px 28px; }

.topbar { display: flex; align-items: center; justify-content: space-between; min-height: 54px; margin-bottom: 22px; }

.eyebrow { margin: 0 0 3px; color: var(--accent); font-size: 10px; font-weight: 800; letter-spacing: .15em; }

h1, h2, p { margin-top: 0; }

h1 { margin-bottom: 0; font-size: 26px; letter-spacing: -.04em; line-height: 1.1; }

h2 { margin-bottom: 0; font-size: 21px; letter-spacing: -.04em; }

.icon-button, .close-button { display: grid; width: 44px; height: 44px; place-items: center; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); cursor: pointer; }

.icon-button svg, .bottom-nav-button svg, .sort-button svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.segment { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 5px; border: 1px solid var(--line); border-radius: 23px; background: var(--surface); }

.segment-button { min-height: 47px; padding: 0 6px; border: 0; border-radius: 18px; background: transparent; color: var(--muted); font-size: 14px; font-weight: 800; cursor: pointer; transition: background .18s ease, color .18s ease; }

.segment-button.active { background: linear-gradient(135deg, #ff5064, #e31f3a); color: #fff; box-shadow: 0 6px 20px rgba(244, 56, 78, .25); }

.filters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 18px; }

.filter-field { position: relative; min-width: 0; min-height: 86px; padding: 12px 15px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-raised); }

.filter-field.full { grid-column: 1 / -1; }

.filter-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 12px; font-weight: 700; }

.filter-field input, .filter-choice { width: 100%; padding: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 16px; font-weight: 800; }

.filter-choice { padding-right: 25px; text-align: left; cursor: pointer; }

.filter-field::after { content: "⌄"; position: absolute; right: 15px; bottom: 13px; color: var(--muted); font-size: 23px; line-height: 1; pointer-events: none; }

.filter-field.search::after, .filter-field.number::after { content: none; }

.filter-field.search { min-height: 58px; display: flex; align-items: center; gap: 11px; padding: 0 16px; }

.filter-field.search svg { flex: 0 0 auto; width: 21px; height: 21px; fill: none; stroke: var(--muted); stroke-width: 2; }

.filter-field.search input { font-size: 15px; font-weight: 600; }

.filter-field.number { min-height: 66px; }

.filter-field.number input { font-variant-numeric: tabular-nums; }

.catalog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 27px 0 15px; }

.sort-button { display: flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 13px; border: 1px solid rgba(244, 56, 78, .46); border-radius: 14px; background: var(--accent-soft); color: #ff8997; font-size: 12px; font-weight: 800; cursor: pointer; white-space: nowrap; }

.sort-button svg { width: 18px; height: 18px; color: var(--accent); }

.status { padding: 22px 16px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; font-size: 14px; line-height: 1.45; }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 12px; }

.card { min-width: 0; cursor: pointer; }

.card-image { position: relative; display: grid; min-height: 172px; place-items: center; overflow: hidden; border: 1px solid rgba(255, 255, 255, .08); border-radius: 22px; background: linear-gradient(145deg, #6c1a2c, #28111c 67%, #141015); }

.card-image::before { content: "✦"; position: absolute; color: rgba(255,255,255,.09); font-size: 118px; transform: rotate(-18deg); }

.card-image img { position: absolute; width: 100%; height: 100%; object-fit: cover; }

.card-visual { position: relative; z-index: 1; width: 72px; height: 72px; border: 5px solid rgba(255,255,255,.75); border-radius: 50% 50% 45% 45%; background: radial-gradient(circle at 35% 28%, #fff 0 6%, #ffa9b4 7% 20%, #f13850 22% 56%, #8e1428 57%); box-shadow: inset -9px -8px 0 rgba(0,0,0,.19), 0 13px 18px rgba(0,0,0,.26); }

.lottie-preview { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 172px; }

.lottie-preview:empty::after { content: "✦"; position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,.38); font-size: 52px; }

.card-number, .card-duration { position: absolute; z-index: 2; padding: 7px 10px; border-radius: 12px; background: rgba(10, 8, 10, .76); color: #fff; font-size: 11px; font-weight: 800; backdrop-filter: blur(10px); }

.card-number { top: 9px; left: 9px; }

.card-duration { right: 9px; bottom: 9px; color: #ffd0d6; }

.card-new { position: absolute; z-index: 2; top: 9px; right: 9px; padding: 6px 8px; border-radius: 10px; background: rgba(51, 29, 12, .77); color: var(--warning); font-size: 10px; font-weight: 800; }

.card-title { overflow: hidden; margin: 10px 2px 9px; font-size: 14px; font-weight: 800; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }

.price { display: flex; align-items: baseline; justify-content: center; gap: 4px; min-height: 43px; padding: 8px; border: 0; border-radius: 14px; background: linear-gradient(135deg, #ff5064, #e31f3a); color: #fff; font-size: 16px; font-weight: 800; }

.price small { font-size: 10px; font-weight: 700; opacity: .8; }

.card-rent { display: grid; min-height: 38px; margin-top: 8px; place-items: center; border: 1px solid rgba(244,56,78,.72); border-radius: 13px; background: var(--accent-soft); color: #ff9ba6; font-size: 12px; font-weight: 800; text-decoration: none; }

.sheet-backdrop { position: fixed; z-index: 20; inset: 0; background: rgba(0,0,0,.68); backdrop-filter: blur(3px); }

.sheet-backdrop[hidden], .sheet[hidden] { display: none !important; }

.sheet { position: fixed; z-index: 21; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; width: 100%; max-width: 760px; max-height: 86dvh; margin: auto; padding: 9px 16px calc(16px + var(--safe-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 28px 28px 0 0; background: #100d12; box-shadow: 0 -20px 50px rgba(0,0,0,.42); }

.sheet-handle { width: 40px; height: 4px; margin: 0 auto 17px; border-radius: 5px; background: #4a414c; }

.sheet-title-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 17px; }

.close-button { width: 36px; height: 36px; border: 0; background: var(--surface-soft); color: var(--muted); font-size: 29px; font-weight: 400; line-height: 1; }

.sort-options { display: grid; gap: 10px; overflow-y: auto; overscroll-behavior: contain; padding-right: 2px; }

.sort-option { display: flex; align-items: center; gap: 13px; min-height: 58px; padding: 0 15px; border: 1px solid transparent; border-radius: 16px; background: transparent; color: var(--text); font-size: 15px; font-weight: 700; cursor: pointer; text-align: left; }

.sort-option.active { border-color: var(--accent); background: var(--accent-soft); }

.radio { display: grid; width: 22px; height: 22px; place-items: center; border: 2px solid var(--dim); border-radius: 50%; }

.sort-option.active .radio { border-color: var(--accent); }

.sort-option.active .radio::after { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); content: ""; }

.apply-button { width: 100%; min-height: 56px; margin-top: 18px; border: 0; border-radius: 18px; background: #fff; color: #150d12; font-size: 16px; font-weight: 800; cursor: pointer; }

.details-sheet { max-height: min(78dvh, 650px); overflow: auto; }

.details-meta { display: grid; gap: 10px; margin-bottom: 18px; }

.details-meta div { display: flex; justify-content: space-between; gap: 14px; color: var(--muted); font-size: 13px; }

.details-meta strong { color: var(--text); text-align: right; }

.details-price { margin: 20px 0 12px; font-size: 22px; font-weight: 800; }

.rent-button { display: grid; width: 100%; min-height: 54px; place-items: center; border: 0; border-radius: 17px; background: linear-gradient(135deg, #ff5064, #e31f3a); color: #fff; font-size: 16px; font-weight: 800; cursor: pointer; text-decoration: none; }

.skeleton { overflow: hidden; min-height: 172px; border-radius: 22px; background: linear-gradient(105deg, var(--surface) 25%, var(--surface-soft) 42%, var(--surface) 58%); background-size: 220% 100%; animation: shimmer 1.4s infinite; }

@keyframes shimmer { to { background-position: -220% 0; } }

@media (max-width: 360px) {
  .app-shell { padding-right: 12px; padding-left: 12px; }
  .segment-button { font-size: 12px; }
  .card-image { min-height: 150px; }
  .catalog-head h2 { font-size: 19px; }
  .sort-button { padding: 0 9px; font-size: 10px; }
}
