:root { --bg: #F3F3F1; --card: #fff; --line: #DDDDD8; --field: #C9C9C3; --ink: #16181B; --muted: #5B6068; --gold: #E8B84A; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; }
h1, h2, p { margin: 0; }
button { font-family: inherit; cursor: pointer; }

.top { background: var(--ink); color: #ECECEA; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 48px; }
.brand { font-size: 15px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.link { background: none; border: 0; color: #A3A8AE; font-size: 14px; font-weight: 600; min-height: 44px; }
.link:hover { color: #fff; }

.wrap { padding: 40px 48px 64px; display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.col { min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.main { flex: 999 1 640px; }
.side { flex: 1 1 360px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.card h2 { font-size: 22px; font-weight: 800; }
.card h3 { margin: 0; font-size: 20px; font-weight: 800; word-break: break-word; }
.sub { font-size: 14px; line-height: 1.5; color: var(--muted); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.grow { flex: 1 1 260px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-size: 14px; font-weight: 700; }
input[type=text], input[type=email], input[type=password] { height: 48px; padding: 0 16px; border-radius: 10px; border: 1.5px solid var(--field); background: #fff; color: var(--ink); font-family: inherit; font-size: 15px; width: 100%; }
input[readonly] { background: var(--bg); }
input:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid #2D6BE0; outline-offset: 2px; }

.btn { height: 48px; padding: 0 22px; border-radius: 10px; border: 1.5px solid var(--ink); background: transparent; color: var(--ink); font-size: 15px; font-weight: 700; white-space: nowrap; }
.btn.dark { background: var(--ink); color: #ECECEA; }
.btn.gold { background: var(--gold); border-color: var(--gold); font-weight: 800; }
.btn.danger { border-color: #B3261E; color: #B3261E; }
.btn.small { height: 44px; padding: 0 16px; font-size: 14px; }
.btn:disabled { opacity: .5; cursor: default; }

.err { color: #B3261E; font-size: 14px; font-weight: 600; }
.ok { color: #1E5B2E; font-size: 14px; font-weight: 600; }
.warn { background: #FFF3D6; border: 1px solid #E8C979; color: #5A4300; border-radius: 10px; padding: 12px 14px; font-size: 14px; line-height: 1.5; }

.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.narrow { width: 100%; max-width: 380px; }
.narrow h1 { font-size: 24px; font-weight: 800; }

.ghead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.meta { font-size: 14px; color: var(--muted); }
.drop { border: 2px dashed #B8B8B1; border-radius: 12px; padding: 32px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; background: #FAFAF8; text-align: center; }
.drop.over { border-color: var(--ink); background: #F0F0EC; }
.drop strong { font-size: 17px; }
.drop span { font-size: 14px; color: var(--muted); }
.prog { display: flex; flex-direction: column; gap: 10px; }
.prog .line { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 600; }
.prog .line span:last-child { color: var(--muted); }
.bar { height: 10px; border-radius: 999px; background: #E4E4DF; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.failed { font-size: 13px; color: #B3261E; line-height: 1.5; max-height: 120px; overflow: auto; }
.linkrow { display: flex; flex-wrap: wrap; gap: 10px; }
.linkrow input { flex: 1 1 240px; width: auto; }

.subs { display: flex; flex-direction: column; }
.sub-item { border-top: 1px solid var(--line); padding: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.sub-item:first-child { border-top: 0; padding-top: 0; }
.sub-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: center; font-size: 14px; }
.sub-head b { font-weight: 700; }
.tag { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.tag.good { background: #E3F1E6; color: #1E5B2E; }
.tag.bad { background: #FBE4E1; color: #8A1C14; }
details summary { cursor: pointer; font-size: 14px; font-weight: 600; min-height: 32px; display: flex; align-items: center; }
details textarea { width: 100%; min-height: 160px; margin-top: 8px; padding: 12px; border: 1.5px solid var(--field); border-radius: 10px; font: 13px/1.6 ui-monospace, Menlo, Consolas, monospace; resize: vertical; }
.empty { font-size: 14px; color: var(--muted); }

@media (max-width: 640px) {
  .top { padding: 14px 16px; }
  .wrap { padding: 20px 16px 48px; }
  .card { padding: 20px; }
}

.pin-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 16px;
  padding: 12px 14px;
  border: 1px solid rgba(212,175,55,.28);
  border-radius: 12px;
  background: rgba(212,175,55,.08);
}

.pin-label {
  font-size: 13px;
  color: var(--muted);
}

.gallery-pin {
  font-size: 22px;
  letter-spacing: 4px;
  color: var(--gold);
  font-weight: 800;
}
