:root {
  --black: #000000;
  --gold: #F2A900;
  --white: #FFFFFF;
  --red: #E03C31;
  --gray: #63666A;
  --light-gray: #A7A8A9;
  --panel: #FFFFFF;
  --page: #F4F4F2;
  --border: rgba(0, 0, 0, 0.14);
  --shadow: 0 22px 45px rgba(0, 0, 0, 0.14);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page);
  color: var(--black);
}

button, select, textarea {
  font: inherit;
}

.app-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  padding: 10px clamp(20px, 4vw, 48px);
  background: var(--black);
  color: var(--white);
  border-bottom: 5px solid var(--gold);
}

.brand {
  display: flex;
  align-items: center;
  gap: clamp(26px, 5vw, 72px);
  min-width: 0;
}

.brand__logo {
  display: grid;
  color: var(--white);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 0.88;
  min-width: clamp(150px, 16vw, 215px);
}

.brand__logo > span {
  display: block;
  white-space: nowrap;
}

.brand__gray {
  display: inline;
  color: var(--light-gray);
}

.brand__gold {
  display: inline;
  color: var(--gold);
}

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

h1 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 32px);
  line-height: 1;
}

.week-select {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 700;
}

select {
  min-width: 210px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.1);
  color: inherit;
  border-radius: 8px;
  padding: 10px 12px;
}

main {
  width: min(1280px, calc(100% - 40px));
  margin: 28px auto 64px;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.post-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
}

.post-card__thumb {
  position: relative;
  aspect-ratio: 4 / 5;
  background: linear-gradient(135deg, var(--black), #2A2A2A);
}

.post-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.thumb-placeholder {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--white);
  font-weight: 800;
}

.format-pill {
  position: absolute;
  left: 14px;
  bottom: 14px;
  background: var(--gold);
  color: var(--black);
  padding: 7px 10px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 12px;
  text-transform: uppercase;
}

.post-card__body {
  padding: 18px;
}

.post-card__body p {
  margin-bottom: 8px;
  color: var(--gray);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 12px;
}

.post-card__body h3 {
  min-height: 54px;
  font-size: 22px;
  line-height: 1.08;
}

.status-badge {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 900;
  color: var(--black);
}

.status-badge--draft { background: rgba(167, 168, 169, 0.18); border-color: rgba(99, 102, 106, 0.35); }
.status-badge--in-review { background: rgba(242, 169, 0, 0.18); border-color: rgba(242, 169, 0, 0.48); }
.status-badge--approved { background: rgba(224, 60, 49, 0.12); border-color: rgba(224, 60, 49, 0.35); }

.empty-state {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 36px;
}

.post-dialog {
  width: min(1180px, calc(100% - 28px));
  border: 0;
  border-radius: 10px;
  padding: 0;
  background: transparent;
}

.post-dialog::backdrop {
  background: rgba(0, 0, 0, 0.72);
}

.dialog-shell {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 520px) 1fr;
  background: var(--panel);
  border-radius: 10px;
  overflow: hidden;
}

.icon-button {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-size: 26px;
  line-height: 1;
}

.dialog-media {
  position: relative;
  display: grid;
  place-items: center;
  background: var(--black);
  min-height: 600px;
}

.dialog-media img {
  width: 100%;
  height: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.nav-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: var(--gold);
  color: var(--black);
  font-size: 32px;
  font-weight: 800;
}

.nav-button:disabled { opacity: 0.35; }
#prev-slide { left: 12px; }
#next-slide { right: 12px; }

.dialog-copy {
  padding: 42px 34px 34px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.dialog-copy__meta {
  color: var(--gray);
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.08em;
  margin: 0;
}

.dialog-copy h2 {
  font-size: clamp(28px, 4vw, 48px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  margin: 0;
}

.status-row, .actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.field {
  display: grid;
  gap: 8px;
  color: var(--gray);
  font-weight: 900;
}

.field select {
  color: var(--black);
  background: white;
  border-color: var(--border);
}

textarea {
  width: 100%;
  min-height: 220px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
  color: var(--black);
  background: var(--white);
  line-height: 1.45;
}

.thread-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: var(--white);
}

.primary-button, .secondary-button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 900;
  text-decoration: none;
}

.primary-button {
  background: var(--gold);
  color: var(--black);
}

.secondary-button {
  background: var(--black);
  color: var(--white);
}

@media (max-width: 820px) {
  .app-header {
    align-items: stretch;
    flex-direction: column;
  }

  .brand {
    align-items: center;
    gap: 24px;
  }

  .brand__logo {
    min-width: 138px;
    font-size: 26px;
  }

  .dialog-shell {
    grid-template-columns: 1fr;
  }

  .dialog-media {
    min-height: 420px;
  }
}
