:root {
  --bg: #000000;
  --panel: #071015;
  --panel-strong: #120c06;
  --ink: #f4fbff;
  --muted: #a9b7c7;
  --line: #24313d;
  --focus: #44d7ff;
  --hn: #ff6600;
  --mint: #43d99d;
  --rose: #ff5f7a;
  --gold: #ffd166;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 600px;
  height: 600px;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  position: fixed;
  inset: 0;
}

.display-shell {
  width: 600px;
  height: 600px;
  padding: 22px 58px 20px;
  display: grid;
  grid-template-rows: 78px 122px 234px 58px 66px;
  gap: 10px;
  overflow: hidden;
  background: var(--bg);
}

.topbar {
  min-width: 0;
  display: grid;
  grid-template-columns: 1fr 128px;
  align-items: start;
  gap: 16px;
}

.brand-block,
.status-stack,
.story-band,
.content-band,
.thread-band,
.controls,
.control,
.point-row {
  min-width: 0;
}

.kicker,
.thread-label,
.control span {
  margin: 0;
  color: var(--hn);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.1;
  text-transform: uppercase;
}

h1 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 29px;
  line-height: 1;
  font-weight: 850;
}

.status-stack {
  display: grid;
  justify-items: end;
  gap: 6px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.1;
}

#clock {
  color: var(--mint);
  font-size: 22px;
  font-weight: 800;
}

#sync-status {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.story-band {
  padding: 14px 0 12px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.story-meta-row,
.section-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.1;
}

#rank-label {
  color: var(--gold);
  font-weight: 850;
}

#domain-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#story-title {
  margin: 12px 0 0;
  max-height: 74px;
  overflow: hidden;
  color: var(--ink);
  font-size: 30px;
  line-height: 1.18;
  font-weight: 820;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.content-band {
  padding: 12px 0 0;
  overflow: hidden;
}

.section-row {
  grid-template-columns: 1fr auto;
  margin-bottom: 10px;
}

#mode-title {
  color: var(--mint);
  font-size: 18px;
  font-weight: 820;
}

#comment-count {
  color: var(--muted);
  font-size: 16px;
}

.point-list {
  height: 190px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-rows: repeat(4, 1fr);
  gap: 8px;
  overflow: hidden;
}

.point-row {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  min-height: 0;
  padding: 8px 0;
  border-bottom: 1px solid rgba(36, 49, 61, 0.88);
}

.point-mark {
  width: 10px;
  height: 10px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--hn);
}

.point-row:nth-child(2) .point-mark {
  background: var(--mint);
}

.point-row:nth-child(3) .point-mark {
  background: var(--rose);
}

.point-row:nth-child(4) .point-mark {
  background: var(--gold);
}

.point-copy {
  min-width: 0;
  color: var(--ink);
  font-size: 19px;
  line-height: 1.22;
  font-weight: 620;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.thread-band {
  display: grid;
  grid-template-columns: 102px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.thread-label {
  color: var(--rose);
  font-size: 14px;
}

#thread-note {
  min-width: 0;
  max-height: 40px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.controls {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: stretch;
}

.control {
  min-height: 62px;
  padding: 8px 7px;
  display: grid;
  place-items: center;
  gap: 3px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  text-align: center;
  font: inherit;
}

.control strong {
  max-width: 88px;
  overflow: hidden;
  color: var(--ink);
  font-size: 17px;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.control:focus,
.control.is-focused {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(68, 215, 255, 0.34);
  background: var(--panel-strong);
}

.is-stale #sync-status {
  color: var(--gold);
}
