:root {
  --bg: #14110d;
  --surface: #1e1a14;
  --surface-2: #272118;
  --line: #3a3124;
  --text: #f3e9d6;
  --muted: #a8997f;
  --amber: #f0a830;
  --amber-dark: #c98412;
  --danger: #e2674f;
  --radius: 16px;
  --gap: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
a { color: inherit; }

.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

/* Полоса демо */
.demo-bar {
  background: var(--amber);
  color: #1a1206;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 16px;
}
.demo-bar a { text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }

/* Шапка */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(240, 168, 48, .28), transparent 65%),
    radial-gradient(600px 380px at 0% 100%, rgba(201, 132, 18, .16), transparent 70%),
    linear-gradient(180deg, #1c160e, var(--bg));
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Unbounded', 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: .02em;
}
.logo svg { width: 28px; height: 28px; color: var(--amber); flex: none; }
.nav-links { display: flex; gap: 22px; font-size: 15px; color: var(--muted); }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--text); }

.hero-body { padding: 56px 0 72px; }
.eyebrow {
  color: var(--amber);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hero h1 {
  font-family: 'Unbounded', 'Manrope', sans-serif;
  font-size: clamp(40px, 9vw, 84px);
  line-height: 1.02;
  font-weight: 800;
  margin: 14px 0 18px;
  letter-spacing: -.01em;
}
.hero h1 span { color: var(--amber); }
.lead { color: var(--muted); font-size: clamp(16px, 2.4vw, 20px); max-width: 520px; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 30px; }
.status { display: inline-flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 600; }
.status::before {
  content: '';
  width: 9px; height: 9px; border-radius: 50%;
  background: #6fd08c;
  box-shadow: 0 0 0 4px rgba(111, 208, 140, .18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  background: var(--amber);
  color: #1a1206;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: #ffbb48; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--surface-2); }
.btn.small { min-height: 42px; padding: 0 18px; font-size: 14px; }

/* Секции */
section { padding: 64px 0; }
section + section { border-top: 1px solid var(--line); }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; }
h2 {
  font-family: 'Unbounded', 'Manrope', sans-serif;
  font-size: clamp(24px, 4.6vw, 36px);
  font-weight: 700;
  line-height: 1.15;
}
.updated { color: var(--muted); font-size: 14px; margin-top: 6px; }
.empty { color: var(--muted); }

/* Карусель */
.car-nav { display: flex; gap: 8px; flex: none; }
.car-nav button {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.car-nav button:hover { background: var(--amber); border-color: var(--amber); color: #1a1206; }

.car-track {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.car-track::-webkit-scrollbar { display: none; }

.slide {
  flex: 0 0 calc((100% - 2 * var(--gap)) / 3);
  min-width: 0;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.media { position: relative; background: #1b1610; }
.media-beer { aspect-ratio: 4 / 5; }
.media-poster { aspect-ratio: 3 / 4; }
.media > img, .media > svg, .media > .poster {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  display: block;
}
.media > img { object-fit: cover; }
.media > .poster { display: flex; }

.tap-num {
  flex: none;
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1.5px solid var(--amber);
  color: var(--amber);
  font-family: 'Unbounded', 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 15px;
}
.media .tap-num {
  position: absolute; top: 14px; left: 14px;
  background: rgba(20, 17, 13, .78);
  backdrop-filter: blur(4px);
}

.cap { padding: 16px 18px 18px; }
.cap-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.cap h3 { font-size: 19px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cap-sub { color: var(--muted); font-size: 14px; margin-top: 2px; }
.cap-meta { color: var(--muted); font-size: 13px; margin-top: 8px; }
.tap-price { flex: none; font-weight: 800; font-size: 19px; color: var(--amber); white-space: nowrap; }

.car-dots { display: flex; justify-content: center; gap: 4px; margin-top: 18px; }
.car-dots button {
  width: 24px; height: 24px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid; place-items: center;
}
.car-dots button::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 999px;
  background: var(--line);
  transition: width .25s, background .25s;
}
.car-dots button.on::before { width: 22px; background: var(--amber); }

/* Афиша */
.gig-date {
  position: absolute; top: 14px; left: 14px;
  width: 62px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 9px 0 8px;
  background: var(--bg);
  color: var(--text);
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.gig-day { font-family: 'Unbounded', 'Manrope', sans-serif; font-size: 22px; font-weight: 800; line-height: 1; }
.gig-month { color: var(--amber); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-top: 4px; }
.gig-dow { color: var(--amber); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; }
.gig-info { font-size: 14px; margin-top: 8px; }

/* Афиша, нарисованная сайтом (когда фото не загружено) */
.poster {
  --p-bg: #f0a830; --p-ink: #1a1206; --p-accent: #1a1206;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  padding: 20px;
  overflow: hidden;
  background: var(--p-bg);
  color: var(--p-ink);
}
.poster::before {
  content: '';
  position: absolute;
  top: -22%; right: -30%;
  width: 95%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: repeating-radial-gradient(circle, var(--p-accent) 0 3px, transparent 3px 16px);
  opacity: .5;
}
.poster > * { position: relative; }
.poster-genre { font-size: 12px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.poster-band {
  font-family: 'Unbounded', 'Manrope', sans-serif;
  font-weight: 800;
  font-size: clamp(22px, 2.9vw, 31px);
  line-height: 1.05;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.poster-foot { font-size: 12px; font-weight: 700; opacity: .7; padding-top: 10px; border-top: 2px solid currentColor; }
.poster.p1 { --p-bg: #7a1f2b; --p-ink: #f6e8cf; --p-accent: #f0a830; }
.poster.p2 { --p-bg: #15324a; --p-ink: #f6e8cf; --p-accent: #f0a830; }
.poster.p3 { --p-bg: #efe3c8; --p-ink: #1a1206; --p-accent: #c9431f; }

/* Контакты */
.info { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.info-card { padding: 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.info-card h3 { color: var(--amber); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 10px; }
.info-card p { font-size: 17px; }
.info-card p + p { margin-top: 4px; }
.info-card .sub { color: var(--muted); font-size: 14px; }
.info-card a { text-decoration: none; }
.info-card a:hover { color: var(--amber); }

footer { border-top: 1px solid var(--line); padding: 26px 0 40px; color: var(--muted); font-size: 13px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; }

@media (max-width: 900px) {
  .slide { flex-basis: calc((100% - var(--gap)) / 2); }
  .poster-band { font-size: clamp(22px, 4.6vw, 32px); }
}

@media (max-width: 560px) {
  :root { --gap: 12px; }
  .nav-links { display: none; }
  .hero-body { padding: 36px 0 52px; }
  section { padding: 46px 0; }
  .car-nav { display: none; }
  .slide { flex-basis: 78%; }
  .poster-band { font-size: clamp(22px, 7.4vw, 32px); }
}

/* ---------- Панель управления ---------- */
.admin { background: var(--bg); padding-bottom: 110px; }
.admin-top {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(20, 17, 13, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.admin-top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 56px; }
.admin-top strong { font-family: 'Unbounded', 'Manrope', sans-serif; font-size: 14px; }
.admin-top a { color: var(--amber); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.admin .wrap { max-width: 620px; }
.admin h2 { font-size: 20px; margin: 30px 0 4px; }
.hint { color: var(--muted); font-size: 14px; margin-bottom: 16px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 12px; }
.card-head .tap-num { width: 30px; height: 30px; font-size: 12px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.photo { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.ph-prev {
  flex: none;
  width: 84px; height: 105px;
  display: grid; place-items: center;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: var(--bg);
  overflow: hidden;
  text-align: center;
}
.ph-prev img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-prev span { color: var(--muted); font-size: 11px; line-height: 1.3; padding: 6px; }
.ph-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 0; }

.f { display: block; margin-bottom: 10px; min-width: 0; }
.f span { display: block; color: var(--muted); font-size: 13px; margin-bottom: 5px; }
.f input, .login input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 48px;
  padding: 0 14px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  font-size: 16px; /* меньше 16px iPhone увеличивает страницу при вводе */
  color-scheme: dark;
  -webkit-appearance: none;
  appearance: none;
}
.f input:focus, .login input:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: transparent; }
.f input::placeholder { color: #6f6452; }

.link-danger { background: none; border: 0; padding: 8px 0 2px; color: var(--danger); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.add { width: 100%; margin-top: 4px; }
.reset { display: block; margin: 28px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

.save-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 6;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  background: rgba(20, 17, 13, .94);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--line);
}
.save-bar .btn { display: flex; width: 100%; max-width: 580px; margin: 0 auto; min-height: 54px; font-size: 17px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 7;
  width: max-content;
  max-width: calc(100vw - 40px);
  transform: translate(-50%, 12px);
  padding: 12px 18px;
  background: #2f6b43;
  color: #fff;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: #8f3324; }

.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.login form { width: 100%; max-width: 360px; text-align: center; }
.login h1 { font-family: 'Unbounded', 'Manrope', sans-serif; font-size: 22px; margin-bottom: 6px; }
.login p { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.login input { text-align: center; letter-spacing: .3em; font-size: 20px; margin-bottom: 12px; }
.login .btn { width: 100%; }
.login .error { color: var(--danger); margin: 12px 0 0; }
.login .back { display: inline-block; margin-top: 22px; color: var(--muted); font-size: 14px; }

[hidden] { display: none !important; }
