:root {
  --ink: #151515;
  --muted: #60636f;
  --panel: #ffffff;
  --line: #d8dde8;
  --blue: #1768e8;
  --blue-dark: #101f4f;
  --yellow: #ffd836;
  --green: #18b57a;
  --pink: #e63b7a;
  --surface: #f4f7fb;
  --shadow: 0 12px 32px rgba(15, 18, 32, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, Arial, Helvetica, sans-serif;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

button,
select,
input,
textarea {
  border: 0;
}

button {
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 82px;
  padding: 12px clamp(18px, 5vw, 56px);
  color: var(--ink);
  background: var(--yellow);
  border-bottom: 5px solid #161616;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--ink);
  text-decoration: none;
  font-family: 'Luckiest Guy', Inter, sans-serif;
  font-size: 24px;
}

.logo,
#logo1 {
  display: block;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

.logo {
  width: 76px;
  height: 54px;
  background-image: url(aa57645305c22507d12d.png);
}

#menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--ink);
  background: rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.18);
  border-radius: 6px;
}

nav ul {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  color: var(--ink);
  text-decoration: none;
  border-radius: 6px;
}

nav a:hover,
nav a:focus-visible {
  color: #fff;
  background: #161616;
}

#items-count {
  margin-left: 4px;
  color: var(--blue-dark);
}

nav a:hover #items-count,
nav a:focus-visible #items-count {
  color: #fff;
}

main {
  min-height: calc(100vh - 82px);
}

.dashboard {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(280px, 420px);
  gap: 28px;
  align-items: end;
  width: 100%;
  padding: 46px clamp(18px, 6vw, 72px) 34px;
  color: #fff;
  background: linear-gradient(135deg, #101010 0%, #232323 58%, #123b88 100%);
  overflow: hidden;
}

.dashboard::after {
  content: '';
  position: absolute;
  right: clamp(12px, 6vw, 90px);
  bottom: -30px;
  width: 260px;
  height: 170px;
  background: url(002bd15b253beb8efcdc.png) center / contain no-repeat;
  opacity: 0.14;
  pointer-events: none;
}

.compact-dashboard {
  grid-template-columns: 1fr;
  min-height: 220px;
}

.dashboard-title,
.stats-row,
.toolbar {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--yellow);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: 'Luckiest Guy', Inter, sans-serif;
  letter-spacing: 0;
}

h1 {
  max-width: 680px;
  margin-bottom: 0;
  font-size: 46px;
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: 30px;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.stats-row div {
  min-height: 82px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.stats-row span {
  display: block;
  font-size: 26px;
  font-weight: 800;
}

.stats-row small {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 700;
}

.toolbar {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(210px, 0.7fr) auto;
  gap: 12px;
}

.search-field,
.select-field,
.tab-list {
  display: flex;
  align-items: center;
  min-height: 48px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.search-field,
.select-field {
  gap: 10px;
  padding: 0 14px;
  color: var(--muted);
}

.search-field input,
.select-field select {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: transparent;
  outline: 0;
}

.tab-list {
  padding: 4px;
}

.tab-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 12px;
  color: var(--ink);
  background: transparent;
  border-radius: 6px;
  font-weight: 800;
  white-space: nowrap;
}

.tab-button.is-active {
  color: var(--ink);
  background: var(--yellow);
}

.catalog-section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.item {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 472px;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.item::before {
  content: '';
  display: block;
  height: 5px;
  background: linear-gradient(90deg, var(--yellow), var(--green), var(--pink));
}

.item-art {
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  padding: 16px;
  background: #eaf0f9;
}

.item-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.item-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 16px 8px;
}

.item-meta,
.item-badges,
.modal-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.item-meta span,
.item-badges span,
.modal-facts span,
.comments-count,
.price-pill,
.date-pill,
.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 5px 8px;
  color: var(--ink);
  background: #eef3fb;
  border: 1px solid #dce4ef;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
}

.item h2 {
  font-family: Inter, Arial, sans-serif;
  font-size: 19px;
  line-height: 1.2;
}

.item p {
  display: -webkit-box;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.item-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 0 16px 16px;
}

.item-badges {
  min-height: 30px;
}

.price-pill img {
  width: 16px;
  height: 16px;
}

.button-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.item-btn,
.like-btn,
#submit-comment {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 12px;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  font-weight: 800;
}

.item-btn:hover,
.item-btn:focus-visible,
#submit-comment:hover,
#submit-comment:focus-visible {
  background: var(--blue-dark);
}

.like-btn {
  min-width: 76px;
  color: var(--ink);
  background: var(--yellow);
}

.like-btn.is-liked {
  color: #fff;
  background: var(--green);
}

.like-btn.has-error {
  color: #fff;
  background: var(--pink);
}

.wanted-card {
  min-height: 500px;
}

.rank-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  color: #fff;
  background: var(--pink);
  border-color: transparent;
}

.comments-count {
  width: fit-content;
  color: #fff;
  background: var(--green);
  border-color: transparent;
}

.empty-state {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.empty-state i {
  margin-bottom: 12px;
  color: var(--blue);
  font-size: 28px;
}

.skeleton-card {
  min-height: 420px;
  padding: 16px;
}

.skeleton-media,
.skeleton-line {
  border-radius: 8px;
  background: linear-gradient(90deg, #e5eaf2, #f6f8fb, #e5eaf2);
  background-size: 220% 100%;
  animation: shimmer 1.35s infinite linear;
}

.skeleton-media {
  aspect-ratio: 1 / 1;
  margin-bottom: 18px;
}

.skeleton-line {
  width: 78%;
  height: 16px;
  margin-bottom: 12px;
}

.skeleton-line.wide {
  width: 100%;
}

.skeleton-line.short {
  width: 46%;
}

@keyframes shimmer {
  from { background-position: 220% 0; }
  to { background-position: -220% 0; }
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(10, 12, 18, 0.72);
}

.modal.show {
  display: flex;
}

.modal-content {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  width: min(980px, 100%);
  max-height: min(780px, calc(100vh - 44px));
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: #151515;
  border-radius: 6px;
}

.modal-body {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(220px, 1fr);
  gap: 20px;
  padding: 28px;
  overflow: auto;
}

.modal-item-art {
  display: grid;
  place-items: center;
  min-height: 300px;
  background: #eaf0f9;
  border-radius: 8px;
}

.modal-item-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.modal-item-copy {
  align-self: center;
}

.modal-item-copy h2 {
  margin: 12px 0 10px;
  color: var(--ink);
}

.modal-item-copy p {
  color: var(--muted);
  line-height: 1.55;
}

.comments-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  padding: 28px;
  background: #f7f9fc;
  border-left: 1px solid var(--line);
}

.comments-panel h3 {
  margin-bottom: 0;
  font-size: 20px;
}

#comments {
  flex: 1;
  min-height: 140px;
  max-height: 320px;
  overflow: auto;
  padding-right: 8px;
}

#comments p {
  margin: 0 0 10px;
  padding: 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  line-height: 1.4;
}

.muted {
  color: var(--muted) !important;
}

#comment-form {
  display: grid;
  gap: 8px;
}

#comment-form label {
  font-weight: 800;
}

#comment-form input,
#comment-form textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  outline: 0;
}

#comment-form input:focus,
#comment-form textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 104, 232, 0.16);
}

#comment-form textarea {
  min-height: 110px;
  resize: vertical;
}

footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 18px;
  color: #fff;
  text-align: center;
  background: #161616;
}

#logo1 {
  width: 58px;
  height: 58px;
  background-image: url(76b0402b1fe0a9d3c8ac.png);
}

footer p {
  max-width: 760px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .dashboard,
  .toolbar {
    grid-template-columns: 1fr;
  }

  .modal-content,
  .modal-body {
    grid-template-columns: 1fr;
  }

  .comments-panel {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  header {
    min-height: 74px;
    padding: 10px 16px;
  }

  .brand {
    font-size: 20px;
  }

  .logo {
    width: 62px;
    height: 44px;
  }

  #menu-btn {
    display: inline-flex;
  }

  nav {
    position: absolute;
    top: 74px;
    right: 0;
    left: 0;
    display: none;
    padding: 12px 16px 18px;
    background: var(--yellow);
    border-bottom: 1px solid rgba(0, 0, 0, 0.18);
  }

  nav.open {
    display: block;
  }

  nav ul {
    flex-direction: column;
    align-items: stretch;
  }

  nav a {
    justify-content: center;
  }

  h1 {
    font-size: 36px;
  }

  .dashboard {
    padding: 34px 18px 26px;
  }

  .stats-row {
    grid-template-columns: 1fr;
  }

  .tab-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .catalog-section {
    width: min(100% - 24px, 1180px);
  }

  .items-grid {
    grid-template-columns: 1fr;
  }

  .item {
    min-height: auto;
  }

  .modal {
    padding: 12px;
  }

  .modal-content {
    max-height: calc(100vh - 24px);
    overflow: auto;
  }

  .modal-body,
  .comments-panel {
    padding: 20px;
  }
}

