:root { color-scheme: light; --bg:#f5f6f7; --paper:#fff; --ink:#0e1014; --muted:#69717d; --line:#e0e4e8; --blue:#146ff5; --green:#16865f; --shadow:0 18px 50px rgba(27,34,43,.08); }
* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; min-height: 100vh; overflow-x: hidden; color: var(--ink); background: var(--bg); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; letter-spacing: 0; }
a { color: inherit; }
.market-shell { width: min(1380px, calc(100% - 48px)); margin: 0 auto; padding-bottom: 70px; }
.market-nav { display: flex; min-height: 78px; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: flex; min-width: 0; align-items: center; gap: 11px; text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 6px; object-fit: contain; background: #fff; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.market-nav nav { display: flex; align-items: center; gap: 22px; }
.market-nav nav a { font-size: 11px; font-weight: 720; text-decoration: none; }
.market-hero { max-width: 980px; padding: 100px 0 64px; }
.market-hero.compact { padding: 54px 0 36px; }
.kicker { margin: 0 0 13px; color: var(--blue); font-size: 10px; font-weight: 820; text-transform: uppercase; }
h1, h2, h3, p { letter-spacing: 0; }
h1 { margin: 0; font-size: 76px; font-weight: 610; line-height: .94; }
.market-hero.compact h1 { font-size: 56px; }
.market-hero p:last-child, .detail-copy > p, .empty-market p { max-width: 700px; margin: 24px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.market-trust { display: flex; gap: 12px 34px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; color: var(--muted); font-size: 11px; font-weight: 720; }
.market-trust span::before { display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--green); content: ""; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding-top: 42px; }
.public-product { display: grid; overflow: hidden; min-height: 480px; grid-template-rows: 270px minmax(0, 1fr); border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); text-decoration: none; transition: transform .2s ease, box-shadow .2s ease; }
.public-product:hover { transform: translateY(-3px); box-shadow: 0 26px 70px rgba(27,34,43,.13); }
.product-visual, .detail-visual { position: relative; display: flex; overflow: hidden; align-items: center; justify-content: center; background: #eceeef; }
.product-visual img, .detail-visual img { width: 100%; height: 100%; object-fit: cover; }
.product-visual .fallback-image, .detail-visual .fallback-image { filter: saturate(.68) brightness(1.07); }
.product-visual span, .detail-visual span { position: absolute; right: 18px; bottom: 16px; border-radius: 5px; padding: 8px 10px; color: #fff; background: rgba(10,12,16,.78); font-size: 10px; font-weight: 760; backdrop-filter: blur(10px); }
.product-body { display: flex; flex-direction: column; padding: 22px; }
.product-body p { margin: 0 0 8px; color: var(--muted); font-size: 10px; font-weight: 720; text-transform: uppercase; }
.product-body h2 { margin: 0; font-size: 25px; font-weight: 620; line-height: 1.1; }
.product-body > strong { display: block; margin-top: 20px; font-size: 30px; font-weight: 670; }
.product-body > strong.contact-price { max-width: 270px; font-size: 20px; line-height: 1.2; }
.product-body small { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.product-body em { display: block; margin-top: auto; padding-top: 18px; color: var(--green); font-size: 10px; font-style: normal; font-weight: 760; }
.empty-market { margin-top: 36px; border-top: 1px solid var(--line); padding: 50px 0; }
.empty-market h2 { margin: 0; font-size: 36px; font-weight: 610; }
.empty-market a { display: inline-flex; min-height: 40px; margin-top: 18px; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 0 13px; background: #fff; font-size: 11px; font-weight: 740; text-decoration: none; }
.detail-layout { display: grid; grid-template-columns: minmax(360px, .9fr) minmax(0, 1.1fr); gap: 54px; align-items: start; padding: 62px 0; }
.detail-visual { min-height: 590px; border-radius: 8px; box-shadow: var(--shadow); }
.detail-copy { padding-top: 32px; }
.detail-copy h1 { font-size: 58px; }
.price-panel, .compat-panel { margin-top: 22px; border-top: 1px solid var(--line); padding: 22px 0 0; }
.price-panel span, .compat-panel h2 { display: block; margin: 0; color: var(--muted); font-size: 10px; font-weight: 760; text-transform: uppercase; }
.price-panel strong { display: block; margin-top: 8px; font-size: 42px; }
.price-panel strong.contact-price { max-width: 500px; font-size: 30px; line-height: 1.15; }
.price-panel small, .compat-panel p { display: block; margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

/* Admin market */
.market-admin .market-shell { width: min(1240px, calc(100% - 40px)); }
.market-tabs { display: flex; gap: 7px; overflow-x: auto; border-bottom: 1px solid var(--line); padding: 14px 0; }
.market-tabs a, .soft-button { display: inline-flex; min-height: 38px; flex: 0 0 auto; align-items: center; border: 1px solid var(--line); border-radius: 6px; padding: 0 12px; background: #fff; font-size: 11px; font-weight: 740; text-decoration: none; }
.market-tabs a.active { border-color: var(--ink); color: #fff; background: var(--ink); }
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.metric-row > div, .admin-panel, .admin-row, .edit-row { border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.metric-row > div { min-height: 120px; padding: 16px; }
.metric-row span, .admin-row span { display: block; color: var(--muted); font-size: 10px; font-weight: 720; }
.metric-row strong { display: block; margin-top: 12px; font-size: 34px; }
.admin-panel { margin-top: 16px; padding: 20px; }
.starter-panel { display: flex; margin-top: 16px; align-items: center; justify-content: space-between; gap: 24px; border: 1px solid var(--line); border-radius: 8px; padding: 20px; background: #fff; box-shadow: var(--shadow); }
.starter-panel h2, .starter-panel p { margin: 0; }
.starter-panel p:last-child { max-width: 680px; margin-top: 8px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.starter-panel form { flex: 0 0 280px; }
.market-notice { margin-top: 16px; border-left: 3px solid var(--green); border-radius: 5px; padding: 11px 13px; background: #ecf8f3; font-size: 11px; font-weight: 720; }
.panel-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 17px; }
.panel-head h1, .panel-head h2 { margin: 0; font-size: 24px; }
.admin-list { display: grid; gap: 9px; }
.admin-row { display: grid; grid-template-columns: minmax(210px, 1.4fr) repeat(4, minmax(120px, .65fr)); gap: 13px; align-items: center; padding: 14px; }
.admin-row strong, .admin-row a, .admin-row small { display: block; margin-top: 4px; }
.admin-row small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.market-form, .edit-row form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.edit-row { padding: 14px; }
input, select, textarea, button { width: 100%; min-width: 0; font: inherit; }
input, select, textarea { min-height: 44px; border: 1px solid var(--line); border-radius: 6px; outline: 0; padding: 10px 11px; color: var(--ink); background: #fff; }
textarea { min-height: 88px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(20,111,245,.1); }
button { min-height: 44px; border: 0; border-radius: 6px; color: #fff; background: var(--ink); font-size: 11px; font-weight: 760; cursor: pointer; }
.row-note { margin-top: 10px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.row-note strong, .row-note span { display: block; }
.check-line { display: flex; min-height: 44px; align-items: center; gap: 8px; color: var(--muted); font-size: 11px; font-weight: 720; }
.check-line input { width: auto; min-height: 0; }
@media (max-width: 1080px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-row, .market-form, .edit-row form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.auto-source-panel { display: grid; gap: 18px; }
.auto-job-state { padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.auto-source-metrics { margin: 0; }
.auto-source-metrics .metric-date { font-size: 15px; overflow-wrap: anywhere; }
.auto-source-row { grid-template-columns: minmax(180px, 2fr) repeat(3, minmax(100px, .7fr)) minmax(90px, .6fr); }
@media (max-width: 760px) {
    .auto-source-row { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .market-shell, .market-admin .market-shell { width: calc(100% - 28px); }
    .market-nav { min-height: 68px; align-items: flex-start; flex-direction: column; justify-content: center; padding: 10px 0; }
    .market-nav nav { gap: 14px; }
    .market-hero { padding: 64px 0 40px; }
    h1, .market-hero.compact h1, .detail-copy h1 { font-size: 44px; }
    .market-trust { overflow-x: auto; white-space: nowrap; }
    .product-grid, .detail-layout, .metric-row, .admin-row, .market-form, .edit-row form { grid-template-columns: 1fr; }
    .public-product { min-height: 440px; grid-template-rows: 245px minmax(0,1fr); }
    .detail-layout { gap: 22px; padding-top: 28px; }
    .detail-visual { min-height: 360px; }
    .detail-copy { padding-top: 0; }
    .panel-head { align-items: start; flex-direction: column; }
    .starter-panel { align-items: stretch; flex-direction: column; }
    .starter-panel form { width: 100%; flex: auto; }
}

.market-ask {
    display: inline-flex;
    width: fit-content;
    margin-top: 10px;
    padding: 8px 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}
.review-product { gap: 14px; }
.compact-list { gap: 10px; }
.compact-list .admin-row {
    grid-template-columns: minmax(220px, 2fr) minmax(82px, .55fr) minmax(92px, .65fr) minmax(84px, .55fr) auto auto;
}
.compact-list form { margin: 0; }
.compact-list button { min-height: 38px; white-space: nowrap; }
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 18px 0;
}
.settings-grid label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}
.settings-grid input {
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: var(--surface);
    color: var(--ink);
}
.settings-grid input[type="checkbox"] {
    width: 22px;
    min-height: 22px;
    padding: 0;
}
@media (max-width: 900px) {
    .compact-list .admin-row { grid-template-columns: 1fr; }
}
