:root {
  --coral: #ec5f50;
  --coral-deep: #c8412f;
  --peach: #ffe3d4;
  --rose: #e4c3c0;
  --navy: #090f1c;
  --slate: #1b2332;
  --muted: #667084;
  --line: #ebe6e3;
  --paper: #fcf9f8;
  --white: #fff;
  --sidebar: 300px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--slate);
  font: 400 16px/1.55 Raleway, system-ui, sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: 0.4; }
button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 2px solid var(--coral);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
img { max-width: 100%; display: block; }

.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  flex-shrink: 0;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.brand { padding: 28px 24px 18px; display: grid; gap: 14px; }
.mark {
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--coral);
  display: grid; place-items: center;
}
.mark span {
  width: 18px; height: 18px; border: 2px solid #ffe3d4; border-radius: 50%;
  box-shadow: inset 0 0 0 4px transparent, 0 0 0 2px #fff;
}
.brand small { letter-spacing: 0.14em; font-size: 11px; color: var(--muted); }
.filters { padding: 0 16px 14px; display: grid; gap: 10px; }
.search {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); border-radius: 999px; padding: 10px 14px; color: var(--muted);
}
.search input { border: 0; outline: 0; width: 100%; background: transparent; color: var(--navy); }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button, .tabs button, .text-btn, .ghost {
  border: 0; background: transparent; color: var(--muted);
}
.pills button {
  border-radius: 999px; padding: 6px 10px; font-size: 12px; border: 1px solid var(--line);
}
.pills button[aria-pressed="true"] { background: var(--navy); color: white; border-color: var(--navy); }
.list-label {
  display: flex; justify-content: space-between; padding: 4px 22px 10px;
  font-size: 11px; letter-spacing: 0.08em; color: var(--muted);
}
.list { overflow: auto; padding: 0 10px 12px; display: grid; gap: 4px; align-content: start; }
.post-item {
  display: flex; gap: 10px; text-align: left; width: 100%;
  padding: 12px; border-radius: 14px; border: 1px solid transparent; background: transparent; color: inherit;
}
.post-item:hover { background: var(--paper); }
.post-item.active { background: var(--peach); border-color: #f3cfc4; }
.post-item b { display: block; font-weight: 500; font-size: 14px; color: var(--navy); }
.post-item small { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; margin-top: 4px; }
.num { color: var(--muted); font-size: 13px; min-width: 20px; padding-top: 2px; }
.badge {
  font-size: 10px; letter-spacing: 0.04em; border-radius: 999px; padding: 1px 6px;
}
.badge.improved { background: var(--peach); color: var(--coral-deep); }
.badge.kept { background: #eef3ea; color: #3d6b32; }
.side-foot {
  border-top: 1px solid var(--line); padding: 16px 22px 20px;
  display: grid; gap: 6px; font-size: 12px; color: var(--muted);
}
.side-foot .by { display: flex; align-items: center; gap: 8px; }
.side-foot img { width: 84px; height: auto; }

.workspace { flex: 1; min-width: 0; }
.topbar {
  height: 72px; background: white; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; padding: 0 28px; gap: 12px;
  position: sticky; top: 0; z-index: 5;
}
.topbar strong { font-weight: 500; }
.menu { display: none; border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 12px; }
.main { padding: 32px 32px 0; max-width: 1180px; }
.overview { display: flex; justify-content: space-between; gap: 24px; align-items: end; margin-bottom: 22px; }
.eyebrow { font-size: 12px; letter-spacing: 0.12em; color: var(--coral-deep); margin-bottom: 8px; }
.overview h1 { font-size: 36px; font-weight: 500; letter-spacing: -0.03em; color: var(--navy); line-height: 1.15; }
.lede { color: var(--muted); max-width: 640px; margin-top: 8px; }
.stats { display: flex; gap: 18px; }
.stats div { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 12px 16px; min-width: 92px; }
.stats b { display: block; font-size: 28px; font-weight: 500; color: var(--navy); line-height: 1; }
.stats span { font-size: 12px; color: var(--muted); }
.note {
  background: white; border: 1px solid var(--line); border-left: 3px solid var(--coral);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 22px; font-size: 14px; color: var(--slate);
}

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.context { display: flex; gap: 12px; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.context span:first-child { color: var(--coral-deep); font-weight: 600; }
.content h2 { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; color: var(--navy); }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.meta span { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 4px 10px; font-size: 12px; color: #5c6574; }
.meta .improved { background: var(--peach); border-color: #f3cfc4; color: var(--coral-deep); }
.meta .kept { background: #eef3ea; border-color: #d5e4cf; color: #3d6b32; }

.toolbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.tabs { display: flex; gap: 6px; }
.tabs button { border-radius: 999px; padding: 8px 14px; font-size: 14px; }
.tabs button[aria-selected="true"] { background: var(--navy); color: white; }
.text-btn { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; padding: 8px 0; }
.text-btn:hover { color: var(--coral-deep); }

.card { background: white; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.publisher { display: flex; gap: 12px; align-items: center; padding: 22px 24px 8px; }
.avatar {
  width: 42px; height: 42px; border-radius: 12px; background: var(--coral); flex-shrink: 0;
}
.publisher strong { display: block; font-weight: 500; font-size: 14px; }
.publisher span { font-size: 12px; color: var(--muted); }
.caption { white-space: pre-wrap; padding: 8px 24px 22px; font-size: 16px; line-height: 1.7; }
.caption-foot {
  border-top: 1px solid var(--line); padding: 12px 24px;
  display: flex; justify-content: space-between; font-size: 11px; letter-spacing: 0.08em; color: var(--muted);
}
.caption-foot span:last-child { letter-spacing: 0; }
details.original { margin-top: 14px; background: white; border: 1px solid var(--line); border-radius: 14px; }
details.original summary { cursor: pointer; padding: 14px 16px; font-size: 13px; color: #5c6574; }
details.original p { white-space: pre-wrap; padding: 0 16px 16px; color: #5c6574; font-size: 14px; line-height: 1.65; }

.stage { background: #111; border-radius: 18px; overflow: hidden; }
.frame { position: relative; aspect-ratio: 4 / 5; background: var(--navy); }
.frame img { width: 100%; height: 100%; object-fit: contain; background: #111; }
.overlay {
  position: absolute; left: 14px; right: 14px; bottom: 14px;
  padding: 16px 16px 14px;
  background: rgba(9, 15, 28, 0.92);
  border-radius: 16px;
  color: white;
}
.kicker {
  display: inline-block; background: var(--peach); color: var(--coral-deep);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; font-weight: 600; margin-bottom: 10px;
}
.overlay strong { display: block; font-size: clamp(26px, 4vw, 40px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.overlay em { display: block; margin-top: 8px; font-style: normal; font-size: 15px; color: #ffe3d4; }
.frames-nav { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 12px; color: white; font-size: 13px; }
.frames-nav button { color: white; background: transparent; border: 0; font-size: 18px; padding: 6px 10px; }
.thumbs { display: flex; gap: 8px; overflow: auto; padding: 0 12px 12px; }
.thumbs button { border: 2px solid transparent; padding: 0; border-radius: 8px; overflow: hidden; flex: 0 0 64px; background: #222; }
.thumbs button[aria-pressed="true"] { border-color: var(--coral); }
.thumbs img { width: 64px; height: 80px; object-fit: cover; }
.compare { padding: 0 4px 8px; }
.compare .text-btn { color: var(--muted); }

.rail { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 20px; position: sticky; top: 92px; }
.rail h3 { font-size: 20px; font-weight: 500; color: var(--navy); }
.rail .label { font-size: 11px; letter-spacing: 0.1em; color: var(--coral-deep); margin: 16px 0 6px; }
.rail p { font-size: 14px; line-height: 1.6; color: #3d4656; }
.pager { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); margin-top: 22px; padding: 14px 0 28px; }
.foot {
  display: flex; align-items: center; gap: 12px; padding: 8px 32px 28px; color: var(--muted); font-size: 13px;
}
.foot img { width: 92px; }
.foot .credit { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.backdrop { display: none; }
@media (max-width: 1040px) {
  .layout { grid-template-columns: 1fr; }
  .rail { position: static; }
  .stats { display: none; }
}
@media (max-width: 800px) {
  .sidebar {
    position: fixed; z-index: 20; transform: translateX(-105%); transition: transform 0.2s ease;
  }
  .sidebar.open { transform: none; }
  .backdrop { display: block; position: fixed; inset: 0; background: rgba(9, 15, 28, 0.4); z-index: 15; }
  .menu { display: inline-flex; }
  .main { padding: 22px 16px 0; }
  .overview h1 { font-size: 30px; }
  .topbar { padding: 0 16px; }
  .foot { padding: 8px 16px 24px; flex-wrap: wrap; }
  .foot .credit { margin-left: 0; }
}
