:root {
  color-scheme: light;
  --ink: #15191f;
  --muted: #64707d;
  --line: #dde3e8;
  --paper: #f6f7f3;
  --surface: #ffffff;
  --accent: #dd2e44;
  --accent-dark: #b91f32;
  --blue: #246bfe;
  --green: #16856f;
  --yellow: #f1b72a;
  --shadow: 0 20px 55px rgba(31, 38, 45, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family:
    "Inter", "Segoe UI", "Yu Gothic UI", "Hiragino Sans", sans-serif;
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 28px;
  background: #11161c;
  color: #fff;
}

.brand {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.1;
}

.brand p,
.status-panel p,
.toolbar p,
.preview-meta p {
  color: var(--muted);
}

.brand p {
  color: rgba(255, 255, 255, 0.68);
  margin-top: 4px;
  font-size: 13px;
}

.nav-stack {
  display: grid;
  gap: 8px;
}

.language-control {
  display: grid;
  gap: 8px;
  color: rgba(255, 255, 255, 0.72);
  font-weight: 800;
}

.language-control select {
  min-height: 40px;
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.language-control option {
  color: var(--ink);
}

.nav-item {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.icon {
  font-size: 18px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-panel,
.auth-panel {
  margin-top: auto;
  padding: 18px;
  background: #fff;
  color: var(--ink);
}

.auth-panel {
  margin-top: 0;
}

.panel-label,
.eyebrow {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-panel strong,
.auth-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.status-panel p,
.auth-panel p {
  margin: 8px 0 14px;
  font-size: 13px;
  line-height: 1.55;
}

.connection-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.connection-toggle input {
  width: auto;
}

.primary,
.ghost {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 16px;
  font-weight: 800;
}

.primary {
  background: var(--accent);
  color: #fff;
}

.primary:hover {
  background: var(--accent-dark);
}

.ghost {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.full {
  width: 100%;
}

.status-panel .ghost,
.auth-panel .ghost {
  margin-top: 8px;
}

.auth-panel button:disabled {
  cursor: default;
  opacity: 0.56;
}

.main {
  min-width: 0;
  padding: 32px;
}

.topbar,
.toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.topbar h2 {
  margin-top: 6px;
  font-size: clamp(28px, 4vw, 54px);
  line-height: 1.03;
}

.now-card {
  min-width: 136px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: right;
  box-shadow: var(--shadow);
}

.now-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.now-card strong {
  display: block;
  font-size: 26px;
  line-height: 1;
}

.notice {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 28px 0;
  padding: 18px;
  border: 1px solid #efc7ce;
  border-radius: 8px;
  background: #fff4f5;
}

.notice.active {
  display: flex;
}

.notice p {
  margin-top: 4px;
  color: #7a4350;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.toolbar {
  margin-bottom: 18px;
}

.toolbar-controls {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.toolbar h3,
.composer h3,
.ops-grid h3 {
  font-size: 26px;
}

.toolbar p {
  margin-top: 6px;
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.segment {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.segment.active {
  background: #11161c;
  color: #fff;
}

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

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

.aside-card {
  display: grid;
  align-content: center;
  min-height: 220px;
  border: 1px solid #d8e0e7;
  border-radius: 8px;
  background: #fbfcfd;
  padding: 18px;
}

.aside-card h4 {
  margin-top: 8px;
  font-size: 20px;
  line-height: 1.2;
}

.aside-card p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.post-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 28%),
    var(--scene-bg, #22314b);
  cursor: zoom-in;
  display: block;
  width: 100%;
  padding: 0;
}

.post-image::before {
  content: "";
  position: absolute;
  inset: 18% 12%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 8px;
}

.post-image::after {
  content: "";
  position: absolute;
  width: 42%;
  height: 32%;
  left: 10%;
  bottom: 13%;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.22);
  box-shadow:
    145px -48px 0 rgba(255, 255, 255, 0.12),
    92px 12px 0 rgba(0, 0, 0, 0.18);
}

.post-image.has-photo {
  background-size: cover;
  background-position: center;
}

.post-image.has-photo::before,
.post-image.has-photo::after {
  display: none;
}

.post-body {
  padding: 14px;
}

.post-topline,
.post-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.platform,
.time-badge {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 800;
}

.platform {
  background: #eef4ff;
  color: #144fbf;
}

.time-badge {
  background: #ecfaf4;
  color: #126a54;
}

.time-badge.late {
  background: #fff4d9;
  color: #8a5a00;
}

.post-card h4 {
  margin-top: 12px;
  font-size: 20px;
}

.post-card p {
  min-height: 42px;
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.5;
}

.post-footer {
  justify-content: flex-start;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.curious-button {
  width: 100%;
  min-height: 38px;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
}

.curious-button:hover,
.curious-button.active {
  border-color: rgba(36, 107, 254, 0.28);
  background: #eef4ff;
  color: #144fbf;
}

.post-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
}

.post-actions .ghost {
  min-height: 34px;
  padding: 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.delete-button {
  grid-column: 1 / -1;
}

.delete-button[hidden],
.hide-button[hidden],
.report-button[hidden] {
  display: none;
}

.image-modal {
  width: min(1120px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #101318;
  color: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.45);
}

.image-modal::backdrop {
  background: rgba(9, 12, 16, 0.72);
}

.image-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}

.image-modal-header span {
  display: block;
  color: rgba(255, 255, 255, 0.64);
  font-size: 12px;
  font-weight: 800;
}

.image-modal-header strong {
  font-size: 18px;
}

.icon-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}

.image-modal img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 92px);
  object-fit: contain;
  background: #05070a;
}

.report-modal {
  width: min(520px, calc(100vw - 32px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.report-modal::backdrop {
  background: rgba(9, 12, 16, 0.62);
}

.report-panel {
  display: grid;
}

.report-panel .image-modal-header {
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}

.report-panel .image-modal-header span {
  color: var(--accent);
}

.report-options {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.report-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  font-weight: 700;
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 16px 16px;
}

.report-queue-status {
  min-height: 28px;
  margin: 0 0 12px;
  color: var(--muted);
  font-weight: 800;
}

.report-queue {
  display: grid;
  gap: 12px;
}

.report-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--shadow);
}

.report-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.report-card-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 999px;
  background: #fff4f5;
  padding: 0 9px;
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 800;
}

.report-card h4 {
  font-size: 20px;
}

.report-card p {
  color: var(--muted);
  line-height: 1.5;
}

.report-details {
  display: grid;
  gap: 8px;
  margin: 0;
}

.report-details div {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
}

.report-details dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.report-details dd {
  margin: 0;
}

.report-card-actions {
  display: flex;
  justify-content: flex-end;
}

.avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--avatar, var(--accent));
}

.capture-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.75fr);
  gap: 22px;
}

.composer,
.preview-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.composer {
  display: grid;
  gap: 18px;
  padding: 22px;
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 210px;
  border: 2px dashed #b8c4ce;
  border-radius: 8px;
  background: #f9fbfc;
  text-align: center;
}

.upload-zone.dragging {
  border-color: var(--accent);
  background: #fff4f5;
}

.upload-zone input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #11161c;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.upload-zone small {
  color: var(--muted);
}

.upload-note,
.safety-note {
  margin-top: -8px;
  color: var(--muted);
  font-size: 13px;
}

.safety-note {
  margin-top: -10px;
  border-left: 3px solid var(--yellow);
  padding-left: 10px;
  line-height: 1.5;
}

.auto-fill-note {
  display: none;
  margin-top: -10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.auto-fill-note.active {
  display: block;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

label span {
  font-size: 13px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  padding: 12px;
}

textarea {
  resize: vertical;
}

.composer-actions {
  display: flex;
  gap: 10px;
}

.preview-panel {
  overflow: hidden;
}

.snapshot-preview {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.24), transparent 25%),
    #17212d;
  color: rgba(255, 255, 255, 0.72);
  background-size: cover;
  background-position: center;
}

.snapshot-preview.has-photo {
  color: transparent;
}

.scene-lines {
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
}

.preview-meta {
  padding: 18px;
}

.preview-meta span {
  color: var(--accent);
  font-weight: 800;
}

.preview-meta strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
}

.preview-meta p {
  margin-top: 8px;
  line-height: 1.55;
}

.ops-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.ops-grid .panel {
  padding: 20px;
}

.ops-grid .wide {
  grid-column: 1 / -1;
}

.check-list,
.roadmap {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.rule-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.rule-list div {
  min-height: 76px;
  display: grid;
  align-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.rule-list span {
  color: var(--muted);
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .feed-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .main,
  .sidebar {
    padding: 18px;
  }

  .topbar,
  .toolbar,
  .notice {
    align-items: stretch;
    flex-direction: column;
  }

  .feed-grid,
  .capture-layout,
  .form-grid,
  .ops-grid {
    grid-template-columns: 1fr;
  }

  .report-details div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .segmented {
    width: 100%;
  }

  .toolbar-controls {
    justify-items: stretch;
  }

  .segment {
    flex: 1 1 auto;
  }

  .composer-actions {
    flex-direction: column;
  }
}
