:root {
  --bg: #0b0b0c;
  --bg-2: #141416;
  --card: #1b1b1f;
  --card-hover: #222228;
  --line: #2b2b31;
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --orange: #f26a1b;
  --orange-2: #ff8a3d;
  --ok: #38c172;
  --danger: #ff5c5c;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.5;
  padding-bottom: 96px;
}
h1, h2, h3 { font-family: "Barlow Condensed", "Barlow", sans-serif; letter-spacing: .01em; margin: 0; }
a { color: var(--orange-2); }
img { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }

.hero { text-align: center; padding: 40px 16px 20px; background: radial-gradient(800px 320px at 50% -40px, rgba(242, 106, 27, .35), transparent 70%); }
.hero__logo { margin: 0 auto 12px; width: 110px; height: auto; filter: drop-shadow(0 6px 16px rgba(242,106,27,.35)); }
.hero__kicker { margin: 0 0 6px; color: var(--orange-2); font-weight: 600; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; }
.hero h1 { font-size: clamp(34px, 7vw, 56px); font-weight: 800; text-transform: uppercase; line-height: 1; }
.hero h1 span { color: var(--orange); }
.hero__lead { max-width: 560px; margin: 14px auto 0; color: var(--muted); }
.hero__lead strong { color: var(--text); }
.hero__count { margin: 10px 0 0; color: var(--muted); font-size: 14px; min-height: 1.4em; }

.app { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.loading { color: var(--muted); text-align: center; padding: 40px 0; }

.section { margin: 36px 0 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 2px solid var(--orange); padding-bottom: 8px; margin-bottom: 16px; }
.section__head h2 { font-size: 28px; text-transform: uppercase; font-weight: 800; }
.section__head small { color: var(--muted); font-size: 14px; }
.section__sub { color: var(--muted); margin: -8px 0 16px; font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.grid--bas { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

.card {
  background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: border-color .15s, transform .15s, box-shadow .15s; position: relative;
}
.card:hover { background: var(--card-hover); }
.card.is-liked { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(242,106,27,.22), var(--shadow); }
.card__media { position: relative; background: #e9e9ea; aspect-ratio: 1437 / 1095; cursor: zoom-in; }
.card--bas .card__media { aspect-ratio: 1763 / 892; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__view {
  position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; background: rgba(11,11,12,.75); border-radius: 999px; padding: 3px;
}
.card__view button { border: 0; background: transparent; color: #ddd; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; }
.card__view button[aria-pressed="true"] { background: var(--orange); color: #111; }
.card__badge { position: absolute; left: 8px; top: 8px; background: rgba(11,11,12,.75); color: #fff; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; text-transform: uppercase; letter-spacing: .06em; }
.card__body { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; }
.card__title { font-family: "Barlow Condensed", sans-serif; font-weight: 700; font-size: 19px; text-transform: uppercase; }
.card__desc { color: var(--muted); font-size: 13px; margin: 0; }
.like {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; border: 2px solid var(--line); background: transparent; color: var(--text);
  border-radius: 999px; padding: 8px 14px; font-weight: 600; transition: all .15s;
}
.like:hover { border-color: var(--orange-2); }
.like[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #111; }
.like svg { width: 18px; height: 18px; }
.like[aria-pressed="true"] svg path { fill: #111; }
.card.is-locked .like { cursor: default; opacity: .9; }
.card.is-locked .like[aria-pressed="false"] { opacity: .35; }

.bar { position: fixed; inset: auto 0 0 0; z-index: 20; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, rgba(11,11,12,.98), rgba(11,11,12,.9)); border-top: 1px solid var(--line); backdrop-filter: blur(8px); }
.bar__inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bar__count { color: var(--muted); font-size: 15px; }
.bar__count strong { color: var(--text); font-size: 18px; }

.btn { border: 2px solid var(--line); background: var(--bg-2); color: var(--text); border-radius: 999px; padding: 12px 22px; font-weight: 600; transition: all .15s; }
.btn:hover { border-color: var(--muted); }
.btn--primary { background: var(--orange); border-color: var(--orange); color: #111; }
.btn--primary:hover { background: var(--orange-2); border-color: var(--orange-2); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.dlg, .zoom { border: 0; padding: 0; background: transparent; color: var(--text); max-width: min(92vw, 480px); width: 100%; }
.dlg::backdrop, .zoom::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
.dlg form { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.dlg h2 { font-size: 28px; text-transform: uppercase; margin-bottom: 6px; }
.dlg__recap { color: var(--muted); margin: 0 0 16px; font-size: 14px; }
.dlg label { display: block; font-weight: 600; margin-bottom: 6px; }
.dlg input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--bg); color: var(--text); font-size: 17px; }
.dlg input:focus { outline: none; border-color: var(--orange); }
.dlg__hint { color: var(--muted); font-size: 13px; margin: 10px 0 0; }
.dlg__error { color: var(--danger); font-size: 14px; min-height: 1.3em; margin: 8px 0 0; }
.dlg__actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 14px; }

.zoom { max-width: min(96vw, 1100px); }
.zoom img { width: 100%; border-radius: 12px; background: #e9e9ea; }
.zoom p { text-align: center; color: var(--muted); margin: 10px 0 0; }
.zoom__close { position: absolute; top: -4px; right: -4px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--orange); color: #111; font-weight: 700; font-size: 16px; z-index: 1; }

.done { margin: 28px 0 0; background: linear-gradient(135deg, rgba(242,106,27,.18), rgba(242,106,27,.04)); border: 2px solid var(--orange); border-radius: 20px; padding: 22px; }
.done h2 { font-size: 30px; text-transform: uppercase; }
.done h2 span { color: var(--orange-2); }
.done p { margin: 6px 0 0; color: var(--muted); }
.done ul { margin: 12px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.done li { background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 14px; }
.closed { margin: 28px 0 0; background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 22px; text-align: center; color: var(--muted); }

.foot { text-align: center; color: var(--muted); font-size: 13px; padding: 40px 16px 20px; }
.toast { position: fixed; left: 50%; bottom: 100px; transform: translateX(-50%); background: var(--danger); color: #fff; padding: 10px 16px; border-radius: 999px; font-weight: 600; z-index: 30; box-shadow: var(--shadow); }

@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .grid--bas { grid-template-columns: 1fr; }
  .card__body { flex-direction: column; align-items: stretch; padding: 10px; gap: 8px; }
  .card__title { font-size: 16px; }
  .like { justify-content: center; }
  .card__view button { padding: 3px 8px; font-size: 11px; }
  .card:not(.card--bas) .card__badge { display: none; }
  .bar__count { font-size: 13px; }
  .btn { padding: 10px 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
