:root {
  color-scheme: dark;
  --bg: #000000;
  --ink: #ffffff;
  --ink-body: #f0f0f0;
  --ink-secondary: #8a8a8a;
  --ink-muted: #585858;
  --divider: rgba(255, 255, 255, 0.08);
  --hover-wash: rgba(255, 255, 255, 0.03);
  --cta-bg: #ffffff;
  --cta-bg-hover: #e4e4e4;
  --cta-ink: #000000;
  --pill-soft-bg: rgba(255, 255, 255, 0.075);
  --pill-soft-hover: rgba(255, 255, 255, 0.14);
  --pill-soft-ink: #f0f0f0;
  --input-bg: #080808;
  --input-border: rgba(255, 255, 255, 0.14);
  --input-border-hover: rgba(255, 255, 255, 0.28);
  --panel-bg: #111111;
  --panel-drawer-bg: #070707;
  --track-bg: #1e1e1e;
  --code-bg: rgba(255, 255, 255, 0.06);
  --error-ink: #ff6b6b;
  --toast-bg: #ffffff;
  --toast-ink: #000000;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei UI", "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --content-width: 880px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background-color: var(--bg);
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Noir Dark Fluted Glass Refraction + Real-Time Cursor Fluid Flow Backdrop */
.studio-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 430px;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

body[data-page="progress"] .studio-backdrop,
body[data-page="blog"] .studio-backdrop,
body[data-page="updates"] .studio-backdrop,
body[data-page="blog_post"] .studio-backdrop,
body[data-page="update_post"] .studio-backdrop,
body[data-page="studio"] .studio-backdrop {
  height: 330px;
}

.studio-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Pure borderless transparent floating topbar — seamless over fluted glass at y=0 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: transparent;
  transition: background-color 0.22s ease;
}

.topbar.is-scrolled {
  background: rgba(0, 0, 0, 0.74);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.topbar-inner {
  max-width: var(--content-width);
  height: 68px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 11px;
  border-radius: 999px;
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.nav-link:hover {
  color: var(--ink);
}

.nav-link.is-active {
  color: var(--ink);
  background: var(--pill-soft-bg);
}

.nav-link--studio {
  font-size: 13px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.14s var(--ease);
}

.pill-btn:hover:not(:disabled) {
  background: var(--cta-bg-hover);
}

.pill-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.pill-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.pill-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.text-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  padding: 0 14px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.16s ease, background-color 0.16s ease;
}

.text-btn:hover {
  color: var(--ink);
  background: var(--pill-soft-bg);
}

.text-btn--danger {
  color: var(--error-ink);
}

.text-btn--danger:hover {
  color: var(--error-ink);
  background: rgba(255, 107, 107, 0.12);
}

/* Main open canvas container — zero outer frame borders */
.shell {
  position: relative;
  z-index: 2;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 204px 24px 96px;
}

body[data-page="progress"] .shell,
body[data-page="blog"] .shell,
body[data-page="updates"] .shell,
body[data-page="blog_post"] .shell,
body[data-page="update_post"] .shell,
body[data-page="studio"] .shell {
  padding-top: 132px;
}

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--divider);
}

.page-title {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--ink);
}

.page-stats {
  font-size: 13.5px;
  color: var(--ink-secondary);
}

/* Composer panel */
.compose-panel {
  margin: 20px 0 8px;
  padding: 24px;
  border-radius: 14px;
  background: var(--panel-bg);
}

.idea-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field-grid--3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-secondary);
}

.char-count {
  font-size: 12px;
  color: var(--ink-muted);
}

.idea-form input[type="text"],
.idea-form select,
.idea-form textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.55;
  outline: none;
  transition: border-color 0.16s ease;
}

.idea-form textarea {
  resize: vertical;
  min-height: 104px;
}

.idea-form input[type="text"]:hover,
.idea-form select:hover,
.idea-form textarea:hover {
  border-color: var(--input-border-hover);
}

.idea-form input[type="text"]:focus,
.idea-form select:focus,
.idea-form textarea:focus {
  border-color: var(--ink);
}

.form-error {
  margin: 0;
  font-size: 13px;
  color: var(--error-ink);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

/* ============================================================================
   IDEAS LIST + REAL-TIME LIVE PULSE
   ============================================================================ */
.idea-list {
  display: flex;
  flex-direction: column;
}

.idea-card {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 20px;
  align-items: start;
  padding: 24px 8px;
  border-bottom: 1px solid var(--divider);
  background: transparent;
  transition: background-color 0.2s ease;
}

.idea-card:last-child {
  border-bottom: none;
}

.idea-card:hover {
  background: var(--hover-wash);
}

.idea-card--top {
  padding: 28px 8px;
}

.idea-card.is-updated .vote-btn {
  animation: vote-pulse 0.65s var(--ease);
}

@keyframes vote-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.55); }
  100% { box-shadow: 0 0 0 10px rgba(255, 255, 255, 0); }
}

.idea-rank {
  padding-top: 2px;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.idea-card--top .idea-rank {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.idea-body {
  min-width: 0;
}

.idea-text {
  margin: 0 0 10px;
  font-size: 15.5px;
  line-height: 1.72;
  color: var(--ink-body);
  white-space: pre-wrap;
  word-break: break-word;
}

.idea-card--top .idea-text {
  font-size: 16.5px;
  font-weight: 500;
  color: var(--ink);
}

.idea-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 92px;
  height: 36px;
  padding: 0 15px;
  border: none;
  border-radius: 999px;
  background: var(--pill-soft-bg);
  color: var(--pill-soft-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.14s var(--ease);
}

.vote-btn:hover:not(:disabled) {
  background: var(--pill-soft-hover);
  color: var(--ink);
}

.vote-btn:active:not(:disabled) {
  transform: scale(0.97);
}

.vote-btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.vote-btn[aria-pressed="true"] {
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 600;
}

.vote-btn[aria-pressed="true"]:hover:not(:disabled) {
  background: var(--cta-bg-hover);
  color: var(--cta-ink);
}

.vote-btn:disabled {
  opacity: 0.55;
  cursor: wait;
}

.vote-arrow {
  flex-shrink: 0;
  transition: transform 0.18s var(--ease);
}

.vote-btn:hover:not(:disabled) .vote-arrow {
  transform: translateY(-1.5px);
}

/* ============================================================================
   ORIGINAL MULTI-PROJECT PROGRESS PANEL
   Rounded dark vertical cards -> bottom rounded bar (3D WebGL hover glow on done part only)
   -> seamless deeper connected dropdown drawer (Left: borderless Todo List | Right: 1 large + N small rounded gallery)
   ============================================================================ */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding-top: 28px;
}

.prog-item {
  border-radius: 20px;
}

.prog-card {
  position: relative;
  padding: 26px 28px 26px;
  border-radius: 20px;
  background: var(--panel-bg);
  transition: border-radius 0.28s var(--ease);
}

.prog-item.is-open .prog-card {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.prog-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.prog-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: #ffffff;
}

.prog-pct {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: #888888;
  padding-top: 3px;
}

/* Bottom rounded progress track */
.prog-track-wrap {
  position: relative;
  height: 16px;
}

.prog-track {
  position: relative;
  width: 100%;
  height: 16px;
  border-radius: 999px;
  background: var(--track-bg);
  cursor: default;
}

/* Interactive ONLY on completed white portion */
.prog-done-btn {
  position: relative;
  display: block;
  height: 16px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  outline: none;
  overflow: visible;
}

.prog-done-btn:focus-visible {
  box-shadow: 0 0 0 2px #000000, 0 0 0 4px #ffffff;
}

.prog-bar-3d {
  position: absolute;
  left: -26px;
  top: -26px;
  width: calc(100% + 52px);
  height: calc(100% + 52px);
  pointer-events: none;
  display: block;
}

/* Connected deeper detail drawer smoothly sliding downward */
.prog-drawer {
  display: grid;
  grid-template-rows: 0fr;
  background: var(--panel-drawer-bg);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
  overflow: hidden;
  transition: grid-template-rows 0.34s var(--ease);
}

.prog-item.is-open .prog-drawer {
  grid-template-rows: 1fr;
}

.prog-drawer-inner {
  min-height: 0;
  overflow: hidden;
}

.prog-drawer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  gap: 32px;
  padding: 26px 28px 30px;
  align-items: start;
}

.prog-drawer-grid--solo {
  grid-template-columns: 1fr;
}

/* Left half: borderless Todo List — bold white checkmark/circle icons + medium grey text */
.todo-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.todo-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.todo-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: #ffffff;
  display: block;
}

.todo-text {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.6;
  color: #969696;
  word-break: break-word;
}

.todo-item--done .todo-text {
  color: #b4b4b4;
}

/* Right half: 1 large image at top-left + multiple small thumbnails, all rounded */
.prog-gallery {
  display: grid;
  grid-template-columns: minmax(0, 2.25fr) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.prog-gallery--single {
  grid-template-columns: 1fr;
}

.prog-hero-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: 14px;
  overflow: hidden;
  background: #121212;
}

.prog-hero-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 14px;
}

.prog-thumbs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.prog-thumbs-bottom {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 10px;
}

.prog-thumb-btn {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: none;
  border-radius: 10px;
  overflow: hidden;
  background: #141414;
  cursor: pointer;
  opacity: 0.76;
  transition: opacity 0.16s ease, transform 0.16s var(--ease);
}

.prog-thumb-btn:hover,
.prog-thumb-btn.is-active {
  opacity: 1;
}

.prog-thumb-btn:hover {
  transform: scale(1.02);
}

.prog-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

/* ============================================================================
   BLOG & UPDATES & MARKDOWN
   ============================================================================ */
.post-list,
.update-list {
  display: flex;
  flex-direction: column;
}

.post-row {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 28px 8px;
  border-bottom: 1px solid var(--divider);
  color: inherit;
  text-decoration: none;
  transition: background-color 0.16s ease;
}

.post-row:last-child { border-bottom: none; }
.post-row:hover { background: var(--hover-wash); }

.post-row--has-cover {
  grid-template-columns: 118px minmax(0, 1fr) 188px;
  align-items: center;
}

.post-cover-thumb {
  width: 188px;
  height: 110px;
  border-radius: 12px;
  overflow: hidden;
  background: #0d0d0d;
}

.post-cover-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.28s var(--ease);
}

.post-row:hover .post-cover-thumb img {
  transform: scale(1.03);
}

.update-cover {
  margin: 4px 0 18px;
  border-radius: 14px;
  overflow: hidden;
  background: #0d0d0d;
}

.update-cover img {
  display: block;
  width: 100%;
  max-height: 360px;
  object-fit: cover;
}

.article-cover {
  margin: 0 0 32px;
  border-radius: 16px;
  overflow: hidden;
  background: #0d0d0d;
}

.article-cover img {
  display: block;
  width: 100%;
  max-height: 440px;
  object-fit: cover;
}

.markdown figure.md-figure {
  margin: 22px 0;
}

.markdown figure.md-figure img {
  margin: 0;
  border-radius: 14px;
}

.markdown figure.md-figure figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-secondary);
  text-align: center;
}

.post-date {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-secondary);
  white-space: nowrap;
}

.post-main { min-width: 0; }

.post-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--pill-soft-bg);
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 500;
}

.badge--solid {
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 600;
}

.post-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.35;
  color: var(--ink);
}

.post-summary {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.update-entry {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 28px;
  padding: 32px 8px;
  border-bottom: 1px solid var(--divider);
}

.update-entry:last-child { border-bottom: none; }

.update-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-top: 4px;
}

.update-content { min-width: 0; }

.update-title-link {
  display: inline-block;
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.3;
  color: var(--ink);
  text-decoration: none;
}

.update-title-link:hover { opacity: 0.78; }

.post-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.back-link {
  color: var(--ink-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.16s ease;
}

.back-link:hover { color: var(--ink); }

.article { max-width: 720px; }

.article-head {
  padding-bottom: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--divider);
}

.article-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--ink-secondary);
}

.article-title {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.2;
  color: var(--ink);
}

.article-summary {
  margin: 14px 0 0;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.markdown {
  font-size: 15.5px;
  line-height: 1.8;
  color: var(--ink-body);
  word-break: break-word;
}

.markdown > :first-child { margin-top: 0; }
.markdown > :last-child { margin-bottom: 0; }
.markdown h2 { margin: 32px 0 12px; font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.3; color: var(--ink); }
.markdown h3 { margin: 24px 0 10px; font-size: 17.5px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink); }
.markdown p { margin: 0 0 16px; }
.markdown ul, .markdown ol { margin: 0 0 16px; padding-left: 22px; }
.markdown li { margin-bottom: 6px; }
.markdown code { font-family: var(--font-mono); font-size: 0.88em; padding: 2px 6px; border-radius: 5px; background: var(--code-bg); }
.markdown pre { margin: 0 0 18px; padding: 16px 18px; border-radius: 10px; background: var(--code-bg); overflow-x: auto; font-size: 13.5px; line-height: 1.6; }
.markdown pre code { padding: 0; background: transparent; }
.markdown blockquote { margin: 0 0 18px; padding: 2px 0 2px 16px; border-left: 2px solid var(--ink-muted); color: var(--ink-secondary); }
.markdown hr { border: none; border-top: 1px solid var(--divider); margin: 28px 0; }
.markdown a { color: var(--ink); text-underline-offset: 3px; }
.markdown img { display: block; max-width: 100%; height: auto; margin: 20px 0; border-radius: 12px; }

/* ============================================================================
   STUDIO ADMIN (OWNER MACHINE ONLY)
   ============================================================================ */
.studio-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-section-switch {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.studio-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 32px;
  padding-top: 24px;
}

.studio-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}

.studio-tab {
  height: 30px;
  padding: 0 11px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.studio-tab.is-active {
  background: var(--pill-soft-bg);
  color: var(--ink);
}

.studio-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.studio-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.14s ease;
}

.studio-item:hover,
.studio-item.is-selected {
  background: var(--pill-soft-bg);
}

.studio-item-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-item-meta {
  font-size: 11.5px;
  color: var(--ink-secondary);
}

.editor-head-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.editor-mode-tabs {
  display: flex;
  gap: 4px;
}

.editor-mode-btn {
  height: 26px;
  padding: 0 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
}

.editor-mode-btn:hover {
  color: var(--ink);
}

.editor-mode-btn.is-active {
  background: var(--pill-soft-bg);
  color: var(--ink);
}

.upload-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--pill-soft-bg);
  color: var(--ink);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.16s ease, color 0.16s ease;
}

.upload-pill:hover {
  background: var(--pill-soft-hover);
}

.upload-pill--primary {
  background: #ffffff;
  color: #000000;
  font-weight: 600;
}

.upload-pill--primary:hover {
  background: #e2e2e2;
}

.cover-dropzone {
  position: relative;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: #080808;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.cover-dropzone:hover,
.cover-dropzone:focus-visible,
.cover-dropzone.is-dragover {
  outline: none;
  border-color: rgba(255, 255, 255, 0.55);
  background: #101010;
}

.cover-dropzone-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 24px 16px;
  text-align: center;
}

.cover-dropzone-title {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-body);
}

.cover-dropzone-sub {
  font-size: 12px;
  color: var(--ink-secondary);
}

.cover-preview-wrap {
  position: relative;
  width: 100%;
  max-height: 220px;
  overflow: hidden;
}

.cover-preview-img {
  display: block;
  width: 100%;
  max-height: 220px;
  object-fit: cover;
}

.editor-drop-wrap {
  position: relative;
}

.editor-drop-wrap.is-dragover textarea {
  border-color: rgba(255, 255, 255, 0.65);
}

.editor-drop-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.78);
  border: 1.5px dashed rgba(255, 255, 255, 0.6);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.editor-drop-wrap.is-dragover .editor-drop-hint {
  opacity: 1;
}

.media-tray {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #0a0a0a;
}

.media-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.media-tray-label {
  font-size: 12px;
  color: var(--ink-secondary);
}

.media-tray-status {
  font-size: 12px;
  color: var(--ink);
}

.media-tray-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
}

.media-thumb-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 9px;
  overflow: hidden;
  background: #141414;
}

.media-thumb-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-thumb-actions {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  transition: opacity 0.16s ease;
}

.media-thumb-card:hover .media-thumb-actions,
.media-thumb-card:focus-within .media-thumb-actions {
  opacity: 1;
}

.media-mini-btn {
  height: 22px;
  padding: 0 9px;
  border: none;
  border-radius: 999px;
  background: #ffffff;
  color: #000000;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.media-mini-btn--ghost {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

.media-mini-btn:hover {
  opacity: 0.88;
}

.studio-preview {
  min-height: 260px;
  padding: 18px;
  border-radius: 10px;
  background: var(--panel-bg);
}

/* Studio Projects — Custom Progress + Visual Todo Builder + Visual Image Grid */
.field-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.proj-pct-badge {
  min-width: 44px;
  text-align: right;
  font-size: 13.5px;
  font-weight: 600;
  color: #ffffff;
}

.proj-pct-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #0c0c0c;
}

.proj-pct-mini-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #202020;
  overflow: hidden;
}

.proj-pct-mini-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #ffffff;
  transition: width 0.16s var(--ease);
}

.proj-pct-controls {
  display: flex;
  align-items: center;
  gap: 14px;
}

.proj-pct-slider {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: #262626;
  outline: none;
  cursor: pointer;
}

.proj-pct-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: transform 0.14s ease;
}

.proj-pct-slider::-webkit-slider-thumb:hover {
  transform: scale(1.14);
}

.proj-pct-slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border: none;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.45);
  cursor: pointer;
}

.proj-pct-num-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  height: 32px;
  border-radius: 9px;
  background: #151515;
}

.proj-pct-num {
  width: 44px;
  padding: 0;
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  text-align: right;
  outline: none;
  -moz-appearance: textfield;
}

.proj-pct-num::-webkit-outer-spin-button,
.proj-pct-num::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.proj-pct-unit {
  font-size: 12.5px;
  color: var(--ink-secondary);
}

.proj-pct-hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-secondary);
  line-height: 1.5;
}

.todo-bulk-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 12px;
  background: #0c0c0c;
}

.todo-bulk-wrap textarea {
  min-height: 110px;
}

.todo-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.todo-bulk-actions-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.todo-builder {
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  background: #0c0c0c;
  overflow: hidden;
}

.todo-edit-list {
  display: flex;
  flex-direction: column;
}

.todo-edit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px 8px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.14s ease;
}

.todo-edit-row:hover,
.todo-edit-row:focus-within {
  background: rgba(255, 255, 255, 0.03);
}

.todo-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.14s ease, transform 0.12s ease;
}

.todo-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}

.todo-toggle-btn:active {
  transform: scale(0.92);
}

.todo-toggle-btn .todo-icon {
  margin-top: 0;
}

.todo-edit-input,
.todo-quick-input {
  flex: 1;
  min-width: 0;
  padding: 6px 4px !important;
  border: none !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: var(--ink-body);
  font-size: 14px;
  outline: none;
}

.todo-edit-row.is-done .todo-edit-input {
  color: var(--ink);
}

.todo-row-actions {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  opacity: 0.45;
  transition: opacity 0.14s ease;
}

.todo-edit-row:hover .todo-row-actions,
.todo-edit-row:focus-within .todo-row-actions {
  opacity: 1;
}

.todo-act-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--ink-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: background-color 0.14s ease, color 0.14s ease;
}

.todo-act-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.todo-act-btn--del:hover {
  color: var(--error-ink);
}

.todo-quick-add {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px 9px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.proj-img-url-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.proj-img-url-bar input {
  flex: 1;
}

.proj-img-drop {
  cursor: default;
}

.proj-img-drop .cover-dropzone-empty {
  cursor: pointer;
}

.proj-img-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
  padding: 12px;
}

.proj-img-card {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  overflow: hidden;
  background: #141414;
}

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

.proj-img-badge {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #000000;
  font-size: 10.5px;
  font-weight: 600;
  pointer-events: none;
}

.proj-img-card .media-thumb-actions {
  gap: 4px;
}

.proj-img-card:hover .media-thumb-actions,
.proj-img-card:focus-within .media-thumb-actions {
  opacity: 1;
}

.proj-img-add-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 10;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, 0.16);
  background: transparent;
  color: var(--ink-secondary);
  font-family: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

.proj-img-add-tile:hover {
  border-color: rgba(255, 255, 255, 0.45);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.04);
}

.studio-flags {
  display: flex;
  align-items: center;
  gap: 22px;
}

.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-body);
  cursor: pointer;
}

.studio-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.empty-state {
  padding: 64px 16px;
  text-align: center;
  color: var(--ink-secondary);
  font-size: 14.5px;
}

.toast {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  z-index: 40;
  padding: 8px 18px;
  border-radius: 999px;
  background: var(--toast-bg);
  color: var(--toast-ink);
  font-size: 13px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.is-error {
  background: var(--error-ink);
  color: #ffffff;
}

@media (max-width: 780px) {
  .studio-layout,
  .prog-drawer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .field-grid--3 {
    grid-template-columns: 1fr;
  }

  .post-row,
  .post-row--has-cover,
  .update-entry {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .post-cover-thumb {
    width: 100%;
    height: 180px;
  }
}

@media (max-width: 640px) {
  .topbar-inner { padding: 0 16px; }
  .topbar-left { gap: 12px; }
  .shell { padding: 156px 16px 64px; }

  body[data-page="progress"] .shell,
  body[data-page="blog"] .shell,
  body[data-page="updates"] .shell,
  body[data-page="blog_post"] .shell,
  body[data-page="update_post"] .shell,
  body[data-page="studio"] .shell {
    padding-top: 96px;
  }

  .studio-backdrop { height: 270px; }
  .page-title { font-size: 26px; }
  .article-title { font-size: 28px; }
  .prog-card { padding: 20px 18px 22px; }
  .prog-drawer-grid { padding: 20px 18px 24px; }
  .compose-panel { padding: 18px; }
  .field-grid { grid-template-columns: 1fr; }

  .idea-card,
  .idea-card--top {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 12px;
    padding: 20px 2px;
  }

  .vote-btn {
    grid-column: 2;
    justify-self: start;
    margin-top: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
