@font-face { font-family: 'Inter Tight'; font-weight: 400 900; font-display: swap; src: url(InterTight-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter Tight'; font-weight: 400 900; font-display: swap; src: url(InterTight-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+2000-206F; }

:root { --ink: #000; --muted: #707070; --line: #e4e4e4; --pad: clamp(16px, 2.2vw, 32px); --gap: 10px; }
* { box-sizing: border-box; }
body { margin: 0; font: 450 15px/1.5 "Inter Tight", "Helvetica Neue", Arial, sans-serif; color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

.label, .tabs a, .top-right a, .top-right button, .btn, .field label, .chip {
  font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
h1, h2 { margin: 0; font-weight: 800; text-transform: uppercase; letter-spacing: -.055em; line-height: .85; }
h1 { font-size: clamp(56px, 9vw, 150px); margin-left: -.04em; }
h2 { font-size: clamp(32px, 4vw, 64px); margin-left: -.03em; }
.muted { color: var(--muted); }

.login { min-height: 100svh; display: grid; place-items: center; padding: var(--pad); }
.login .box { width: min(440px, 100%); display: grid; gap: 16px; }
.login h1 { margin-bottom: 16px; }

.top { position: sticky; top: 0; z-index: 20; background: #fff; border-bottom: 1px solid var(--ink); display: flex; align-items: center; gap: 24px; padding: 0 var(--pad); min-height: 52px; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 13px; letter-spacing: .02em; text-transform: uppercase; text-decoration: none; }
.tabs { display: flex; gap: 18px; flex-wrap: wrap; flex: 1; }
.tabs a { text-decoration: none; padding: 16px 0; border-bottom: 2px solid transparent; }
.tabs a[aria-current="page"] { border-bottom-color: var(--ink); }
.top-right { display: flex; gap: 16px; align-items: center; }
.top-right a { text-decoration: none; }
.top-right button { background: none; border: 0; cursor: pointer; padding: 12px 0; }

main { padding: var(--pad); max-width: 1600px; }
.head { display: flex; justify-content: space-between; align-items: end; gap: 16px; flex-wrap: wrap; border-bottom: 1px solid var(--ink); padding-bottom: 12px; margin-bottom: 20px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 32px; }
@media (max-width: 800px) { .grid2 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); background: var(--ink); color: #fff; cursor: pointer; text-decoration: none; }
.btn:hover { background: #fff; color: var(--ink); }
.btn.ghost { background: #fff; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: #fff; }
.btn.small { min-height: 32px; padding: 0 10px; }
.btn[disabled] { opacity: .35; pointer-events: none; }
.chip { border: 1px solid var(--line); background: #fff; padding: 0 12px; min-height: 32px; cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

.field { display: grid; gap: 6px; }
.field input, .field textarea, .field select { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--ink); border-radius: 0; font: inherit; font-size: 15px; background: #fff; }
.field textarea { padding: 10px 12px; min-height: 120px; resize: vertical; line-height: 1.5; }
.field small { color: var(--muted); font-size: 12px; }
.err { color: #b3261e; font-size: 13px; min-height: 1.2em; }
.ok { color: var(--ink); }

.drop { border: 1px dashed var(--ink); padding: 28px; text-align: center; cursor: pointer; margin-bottom: 20px; display: grid; gap: 10px; justify-items: center; }
.drop.over { background: #f2f2f2; }
.drop b { font-size: clamp(22px, 2.4vw, 36px); font-weight: 800; letter-spacing: -.04em; text-transform: uppercase; line-height: 1; }
.progress { height: 2px; background: var(--line); margin: -12px 0 20px; }
.progress i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }

.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--gap); }
.ph { position: relative; border: 1px solid var(--line); background: #fff; cursor: grab; user-select: none; }
.ph.drag { opacity: .35; }
.ph.target { outline: 2px solid var(--ink); }
.ph .img { aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; padding: 6px; }
.ph img { max-height: 100%; object-fit: contain; pointer-events: none; }
.ph .bar { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); }
.ph .bar button { background: none; border: 0; min-width: 32px; min-height: 32px; cursor: pointer; font-size: 13px; font-weight: 700; }
.ph .bar button:hover { background: var(--ink); color: #fff; }
.ph .fmt { font-size: 10px !important; letter-spacing: .06em; }
.ph .n { position: absolute; top: 4px; left: 6px; font-size: 10px; color: var(--muted); }

.list { border-top: 1px solid var(--ink); }
.item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.item b { font-weight: 700; }
.item .muted { font-size: 13px; }

.gear-group { margin-bottom: 28px; }
.gear-row { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; margin-top: 8px; }
@media (max-width: 700px) { .gear-row { grid-template-columns: 1fr; } }

.preview { border: 1px solid var(--line); padding: 16px 20px; min-height: 200px; max-height: 70vh; overflow: auto; }
.preview img { margin: 12px 0; }
.cover-prev { width: 160px; aspect-ratio: 4 / 5; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.cover-prev img { width: 100%; height: 100%; object-fit: cover; }
.hero-prev { max-width: 420px; border: 1px solid var(--line); }

.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; }
.toast.on { opacity: 1; }
.ph .n { z-index: 2; background: #fff; padding: 0 3px; }
.field .row input { flex: 1; }
@media (max-width: 800px) {
  .top { display: grid; grid-template-columns: 1fr auto; gap: 0 16px; padding-top: 6px; }
  .tabs { grid-column: 1 / -1; grid-row: 2; flex-wrap: nowrap; overflow-x: auto; gap: 16px; scrollbar-width: none; }
  .tabs a { padding: 12px 0; white-space: nowrap; }
}
.item > .muted { margin-left: auto; margin-right: 16px; }
a.chip { display: inline-flex; align-items: center; text-decoration: none; color: inherit; }
