:root {
  --bg-color: #f5f5f7; /* Apple 缁忓吀鐨勯潪甯告祬鐨勭伆鐧借壊 */
  --text-primary: #1d1d1f; /* Apple 楂樼骇榛?*/
  --text-secondary: #86868b;
  --glass-bg: rgba(255, 255, 255, 0.65);
  --glass-border: rgba(255, 255, 255, 0.6);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.04);
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* 姣涚幓鐠冨渾瑙?*/
  --radius-lg: 24px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ======== Dynamic Background Orbs ======== */
/* 杩欎簺鍏夋枒鍥哄畾鍦ㄥ簳灞傦紝琚笂灞傜殑姣涚幓鐠冭鐩栧悗浼氫骇鐢熸瀬浣崇殑楂樼骇璐ㄦ劅 */
.background-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  overflow: hidden;
  background-color: #fbfbfd;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: float 20s infinite ease-in-out alternate;
}

.orb-1 {
  width: 50vw;
  height: 50vw;
  background: #ffb6ff; /* 妯辫姳绮?*/
  top: -20%;
  left: -10%;
  animation: float1 18s infinite ease-in-out;
}

.orb-2 {
  width: 60vw;
  height: 60vw;
  background: #a1c4fd; /* 澶╃┖钃?*/
  bottom: -20%;
  right: -10%;
  animation: float2 22s infinite ease-in-out;
}

.orb-3 {
  width: 45vw;
  height: 45vw;
  background: #c2e9fb; /* 娴呴潚鑹?*/
  top: 30%;
  left: 30%;
  animation: float3 25s infinite ease-in-out;
}

@keyframes float1 {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(15vw, 15vh) scale(1.1); }
  66% { transform: translate(-5vw, 10vh) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes float2 {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-15vw, -10vh) scale(1.2); }
  66% { transform: translate(10vw, -15vh) scale(0.8); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes float3 {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(10vw, -15vh) scale(0.9); }
  66% { transform: translate(-10vw, 15vh) scale(1.1); }
  100% { transform: translate(0, 0) scale(1); }
}

/* ======== Layout & Glassmorphism Utilities ======== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* 鍏敤姣涚幓鐠冪被 */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ======== Floating Header ======== */
header {
  position: sticky;
  top: 20px;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 32px;
  border-radius: 100px; /* 绫讳技鑳跺泭 */
  margin-bottom: 60px;
}

.logo {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.nav-links a {
  margin-left: 32px;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* ======== Hero Section ======== */
.hero {
  text-align: center;
  margin: 80px 0 100px 0;
}

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  margin-bottom: 24px;
  /* 鑻规灉椋庢枃瀛楁笎鍙?*/
  background: linear-gradient(135deg, #1d1d1f 0%, #434343 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 21px;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 600px;
  margin: 0 auto;
}

/* ======== Bento Box (Grid) Articles ======== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.story-entry {
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
}

/* 鑻规灉鐗规湁鐨勫脊鎬ф偓鍋滃弽棣?*/
.story-entry:hover {
  transform: scale(1.02) translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* 濡傛灉鍚庣画鏈夌湡瀹炵殑鍥剧墖锛屾斁鍦ㄨ繖閲?*/
.card-cover {
  height: 180px;
  width: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.1) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.3);
}

.card-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.article-date {
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin-bottom: 12px;
}

.article-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.3;
  margin-bottom: 12px;
}

.article-summary {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ======== Footer ======== */
footer {
  margin-top: 120px;
  padding: 40px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}

/* 鍝嶅簲寮?*/
@media (max-width: 768px) {
  header {
    flex-direction: column;
    border-radius: var(--radius-md);
    padding: 20px;
  }
  .nav-links {
    margin-top: 16px;
  }
  .nav-links a {
    margin: 0 16px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .hero p {
    font-size: 18px;
  }
}

/* ======== Publish Form (Apple Style) ======== */
.publish-form-container {
  margin-bottom: 60px;
  padding: 32px;
  border-radius: var(--radius-lg);
}

.publish-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.apple-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text-primary);
  margin-bottom: 16px;
  transition: all 0.3s ease;
  outline: none;
}

.apple-input:focus {
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.apple-textarea {
  min-height: 120px;
  resize: vertical;
}

.apple-input::placeholder {
  color: var(--text-secondary);
}

.apple-btn {
  background: #1d1d1f;
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.apple-btn:hover {
  transform: scale(0.97);
  background: #333336;
}

.apple-btn:active {
  transform: scale(0.93);
}

.apple-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ======== View States ======== */
.status-msg {
  text-align: center;
  color: var(--text-secondary);
  padding: 40px 0;
  font-weight: 500;
}
.status-msg.error {
  color: #ff3b30;
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  padding: 20px;
}

/* ======== Post Detail View ======== */
.post-detail {
  padding: 0;
  border-radius: var(--radius-lg);
  margin-bottom: 60px;
}
.detail-cover {
  width: 100%;
  height: 350px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border-color);
  border-top-left-radius: var(--radius-lg);
  border-top-right-radius: var(--radius-lg);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
  cursor: zoom-in;
}
.detail-cover:hover {
  transform: scale(1.02);
  position: relative;
  z-index: 10;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-lg);
}
.detail-content-wrap {
  padding: 40px 50px;
}
.back-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 15px;
  margin-bottom: 24px;
  font-weight: 600;
}
.back-btn:hover { color: var(--text-primary); }
.detail-title {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
  letter-spacing: -1px;
}
.detail-meta {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* Markdown overrides (github-markdown-css) */
.markdown-body {
  font-family: var(--font-family);
  background: transparent !important;
  color: var(--text-primary) !important;
  font-size: 16px;
  line-height: 1.8;
}
.markdown-body h1, .markdown-body h2 {
  border-bottom: none;
}

/* ======== Login View ======== */
.login-page {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
}
.login-box {
  padding: 40px;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
}
.login-box h2 {
  margin-bottom: 30px;
  font-weight: 700;
}
.error-text {
  color: #ff3b30;
  margin-top: 15px;
  font-size: 14px;
}

/* ======== Admin Dashboard ======== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14px;
}
.admin-table th, .admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.admin-table th {
  font-weight: 600;
  color: var(--text-secondary);
}
.action-btn {
  border: none;
  background: none;
  font-weight: 600;
  cursor: pointer;
  margin-right: 12px;
}
.action-btn.edit { color: #007aff; }
.action-btn.delete { color: #ff3b30; }

/* ======== Health Bar ======== */
.health-bar {
  margin-top: 40px;
  padding: 20px;
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 14px;
  border-left: 5px solid transparent;
}
.health-bar.success {
  border-left-color: #34c759;
}
.health-bar.error {
  border-left-color: #ff3b30;
}
.health-bar.loading {
  border-left-color: #007aff;
}
.health-content {
  margin-bottom: 8px;
  color: var(--text-primary);
}
.health-reason {
  color: var(--text-secondary);
}

/* ======== Upload Dropzone ======== */
.upload-dropzone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 15px;
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
}
.upload-dropzone:hover, .upload-dropzone.drag-over {
  border-color: #007aff;
  background: rgba(0, 122, 255, 0.05);
}
.upload-dropzone img.preview-image {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--radius-sm);
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.upload-dropzone span.placeholder {
  color: var(--text-secondary);
  font-size: 14px;
  display: block;
  margin-bottom: 10px;
}

.cover-image-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -8px 0 18px; padding: 8px 11px; color: var(--text-secondary); border: 1px solid rgba(255,255,255,.55); border-radius: 12px; background: rgba(255,255,255,.28); font-size: 10px; }
.cover-image-actions button { padding: 6px 9px; color: #c83d38; border: 0; border-radius: 8px; background: rgba(200,61,56,.08); font-family: inherit; font-size: 10px; cursor: pointer; }
.cover-image-actions button:hover { background: rgba(200,61,56,.14); }

/* ======== 鍥剧墖鏌ョ湅涓庢偓鍋滅壒鏁?======== */
.markdown-body img {
  border-radius: var(--radius-md);
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
  max-width: 100%;
}
.markdown-body img:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
  position: relative;
  z-index: 10;
}

.markdown-body video {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 72vh;
  margin: 24px auto;
  border-radius: var(--radius-md);
  background: #111;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.14);
}

/* Lightbox */
.lightbox-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: zoom-out;
  animation: fadeIn 0.3s ease;
}
.lightbox-img {
  max-width: 80vw;
  max-height: 80vh;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  cursor: default;
  animation: zoomIn 0.3s ease;
}
.lightbox-close {
  position: absolute;
  top: 30px;
  right: 40px;
  font-size: 40px;
  color: white;
  background: transparent;
  border: none;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.lightbox-close:hover {
  opacity: 1;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes zoomIn {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* ========================================================
   Layout refresh · 2026-07-11
   ======================================================== */
:root {
  --bg-color: #f4f5f7;
  --text-primary: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --border-color: rgba(29, 29, 31, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.68);
  --glass-border: rgba(255, 255, 255, 0.82);
  --glass-shadow: 0 18px 60px rgba(34, 46, 70, 0.08);
  --radius-xl: 36px;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --glass-opacity: 0.42;
}

html {
  scroll-behavior: smooth;
}

body {
  line-height: 1.6;
}

.background-orbs {
  background:
    radial-gradient(circle at 8% 8%, rgba(255, 205, 236, 0.45), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(181, 215, 255, 0.5), transparent 34%),
    #f7f8fa;
}

.orb {
  opacity: 0.32;
  filter: blur(110px);
}

.container {
  width: min(100% - 40px, 1180px);
  max-width: none;
  padding: 22px 0 0;
}

.glass-panel {
  border-color: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Header */
.site-header {
  top: 16px;
  min-height: 68px;
  padding: 10px 12px 10px 14px;
  margin-bottom: 54px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: #1d1d1f;
  border-radius: 13px;
  font-size: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 7px 18px rgba(29, 29, 31, 0.18);
}

.logo-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.logo-copy small {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

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

.nav-links a {
  margin: 0;
  padding: 10px 16px;
  border-radius: 13px;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.nav-links a:hover,
.nav-links a.router-link-exact-active {
  color: var(--text-primary);
  background: rgba(29, 29, 31, 0.055);
}

.nav-links .nav-admin {
  color: #fff;
  background: #1d1d1f;
}

.nav-links .nav-admin:hover,
.nav-links .nav-admin.router-link-active {
  color: #fff;
  background: #343437;
  transform: translateY(-1px);
}

/* Home hero */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.75fr);
  gap: 22px;
  margin-bottom: 92px;
}

.hero-copy,
.hero-aside {
  border-radius: var(--radius-xl);
}

.hero-copy {
  min-height: 460px;
  padding: clamp(40px, 6vw, 76px);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.88), rgba(255,255,255,0.58)),
    radial-gradient(circle at 88% 16%, rgba(140, 199, 255, 0.32), transparent 35%);
}

.eyebrow,
.section-kicker {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.eyebrow i {
  width: 7px;
  height: 7px;
  background: #34c759;
  border-radius: 50%;
  box-shadow: 0 0 0 5px rgba(52, 199, 89, 0.12);
}

.hero-copy h1 {
  margin: 34px 0 24px;
  font-size: clamp(50px, 6vw, 76px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 0.99;
}

.hero-copy h1 span {
  color: transparent;
  background: linear-gradient(100deg, #6668d9, #1682c4 48%, #20a382);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-copy > p {
  max-width: 590px;
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-top: 38px;
}

.hero-actions .apple-btn {
  display: inline-flex;
  align-items: center;
  gap: 22px;
  padding: 13px 18px 13px 22px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
}

.hero-actions .apple-btn span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  color: #1d1d1f;
  background: #fff;
  border-radius: 50%;
}

.article-count {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.hero-aside {
  display: flex;
  flex-direction: column;
  min-height: 460px;
  padding: 28px;
  color: #fff;
  background:
    radial-gradient(circle at 85% 12%, rgba(91, 151, 255, 0.45), transparent 36%),
    linear-gradient(155deg, rgba(39, 42, 51, 0.96), rgba(20, 22, 28, 0.98));
  border-color: rgba(255, 255, 255, 0.11);
}

.aside-topline,
.system-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.aside-topline {
  color: rgba(255, 255, 255, 0.52);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffd60a;
  box-shadow: 0 0 0 5px rgba(255, 214, 10, 0.1);
}

.live-dot.success {
  background: #30d158;
  box-shadow: 0 0 0 5px rgba(48, 209, 88, 0.12);
}

.live-dot.error {
  background: #ff453a;
  box-shadow: 0 0 0 5px rgba(255, 69, 58, 0.12);
}

.now-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin: auto 0;
}

.now-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 15px;
  font-size: 19px;
}

.now-card strong {
  display: block;
  max-width: 190px;
  font-size: 19px;
  line-height: 1.45;
}

.now-card p {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
}

.system-status {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 12px;
}

.system-status span {
  color: rgba(255, 255, 255, 0.48);
}

.system-status strong {
  font-size: 12px;
}

.hero-aside .health-reason {
  display: -webkit-box;
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.42);
  font-size: 10px;
  line-height: 1.4;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Article collection */
.article-section {
  scroll-margin-top: 116px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 28px;
  padding: 0 6px;
}

.section-heading h2 {
  margin-top: 6px;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.15;
  letter-spacing: -0.045em;
}

.section-note {
  color: var(--text-secondary);
  font-size: 13px;
}

.bento-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
}

.story-entry {
  grid-column: span 4;
  min-height: 440px;
  background: rgba(255, 255, 255, 0.7);
  border-radius: var(--radius-lg);
}

.story-entry--featured {
  grid-column: span 8;
}

.story-entry:hover {
  transform: translateY(-7px);
  box-shadow: 0 24px 64px rgba(34, 46, 70, 0.13);
}

.card-cover {
  height: 220px;
  background:
    linear-gradient(135deg, rgba(134, 140, 255, 0.4), rgba(108, 212, 192, 0.3)),
    rgba(255, 255, 255, 0.36);
  background-position: center;
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.story-entry--featured .card-cover {
  height: 280px;
}

.story-entry:hover .card-cover {
  transform: scale(1.025);
}

.card-content {
  position: relative;
  z-index: 1;
  padding: 26px 28px 28px;
  background: rgba(255, 255, 255, 0.42);
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.article-date {
  margin: 0;
  font-size: 11px;
}

.article-title {
  max-width: 650px;
  margin-bottom: 10px;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.story-entry--featured .article-title {
  font-size: clamp(26px, 3vw, 34px);
}

.article-summary {
  max-width: 680px;
  line-height: 1.7;
}

.read-more {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 26px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 700;
}

.read-more i {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  background: rgba(29, 29, 31, 0.06);
  border-radius: 50%;
  font-style: normal;
  transition: transform 0.2s ease, background 0.2s ease;
}

.story-entry:hover .read-more i {
  color: #fff;
  background: #1d1d1f;
  transform: translateX(3px);
}

/* Inner pages */
.post-detail {
  overflow: visible;
  border-radius: var(--radius-xl);
}

.detail-cover {
  height: min(48vw, 480px);
}

.detail-content-wrap {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 54px clamp(28px, 4vw, 52px) 76px;
}

.detail-title {
  font-size: clamp(38px, 6vw, 62px);
  letter-spacing: -0.045em;
}

.markdown-body {
  font-size: 17px;
  line-height: 1.9;
}

.admin-dashboard > .glass-panel,
.publish-form-container,
.login-box {
  border-radius: var(--radius-lg) !important;
}

footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 110px;
  padding: 42px 6px;
  text-align: left;
  border-top: 1px solid var(--border-color);
}

footer strong {
  color: var(--text-primary);
  font-size: 17px;
}

footer div p {
  margin-top: 4px;
  font-size: 12px;
}

.footer-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.footer-meta p {
  margin: 0;
}

.site-version {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .04em;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.account-settings-panel { padding: 32px; }
.account-settings-heading { margin-bottom: 24px; }
.account-settings-heading p { margin-top: 7px; }
.account-settings-grid {
  display: grid;
  grid-template-columns: minmax(190px, .72fr) repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}
.account-identity-card, .account-form-card {
  min-width: 0;
  padding: 22px;
  border-radius: var(--radius-md);
}
.account-identity-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 42px;
}
.account-settings-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--accent-color);
  font-size: 22px;
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: var(--glass-bg);
}
.account-identity-card small, .account-identity-card p,
.account-form-title small, .account-form-card label small {
  color: var(--text-secondary);
  font-size: 12px;
}
.account-identity-card strong {
  display: block;
  margin: 5px 0 8px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: .08em;
}
.account-form-card {
  display: flex;
  flex-direction: column;
  gap: 15px;
  border: 1px solid var(--border-color);
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.account-form-title {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 2px;
}
.account-form-card label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  font-weight: 650;
}
.account-form-card .apple-input:disabled { cursor: not-allowed; opacity: .68; }
.account-form-card .apple-btn { align-self: flex-end; margin-top: auto; }
@media (max-width: 1050px) {
  .account-settings-grid { grid-template-columns: 1fr 1fr; }
  .account-identity-card {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 18px;
  }
}
@media (max-width: 680px) {
  .account-settings-panel { padding: 24px 18px; }
  .account-settings-grid { grid-template-columns: 1fr; }
  .account-identity-card { grid-column: auto; }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    margin-bottom: 72px;
  }

  .hero-copy,
  .hero-aside {
    min-height: 0;
  }

  .hero-aside {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 26px;
  }

  .aside-topline {
    grid-column: 1 / -1;
  }

  .now-card {
    margin: 0;
  }

  .system-status {
    min-width: 180px;
  }

  .story-entry,
  .story-entry--featured {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .container {
    width: min(100% - 24px, 1180px);
    padding-top: 12px;
  }

  .site-header {
    top: 10px;
    flex-direction: row;
    padding: 8px 9px;
    margin-bottom: 30px;
    border-radius: 18px;
  }

  .logo-mark {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  .logo-copy small,
  .nav-links > a:first-child {
    display: none;
  }

  .nav-links {
    margin: 0;
  }

  .nav-links .nav-admin {
    padding: 9px 13px;
    font-size: 13px;
  }

  .hero-grid {
    gap: 14px;
    margin-bottom: 62px;
  }

  .hero-copy {
    padding: 38px 25px 32px;
    border-radius: 27px;
  }

  .hero-copy h1 {
    margin: 28px 0 20px;
    font-size: clamp(43px, 14vw, 58px);
  }

  .hero-copy > p {
    font-size: 16px;
    line-height: 1.7;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
    margin-top: 30px;
  }

  .hero-aside {
    display: flex;
    min-height: 320px;
    padding: 24px;
    border-radius: 27px;
  }

  .now-card {
    margin: auto 0;
  }

  .system-status {
    min-width: 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .bento-grid {
    display: block;
  }

  .story-entry,
  .story-entry--featured {
    min-height: 0;
    margin-bottom: 16px;
    border-radius: 24px;
  }

  .card-cover,
  .story-entry--featured .card-cover {
    height: 210px;
  }

  .story-entry--featured .article-title,
  .article-title {
    font-size: 24px;
  }

  .detail-cover {
    height: 260px;
  }

  .detail-content-wrap {
    padding: 32px 22px 48px;
  }

  .admin-table {
    display: block;
    overflow-x: auto;
  }

  footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 24px;
    margin-top: 72px;
  }

  .footer-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* ========================================================
   Global responsive safety and readable mobile controls
   ======================================================== */
html, body, #app { max-width: 100%; overflow-x: clip; }
.container, main, section, article, aside, nav, form, .glass-panel { min-width: 0; }
img, video, canvas, svg { max-width: 100%; }
.apple-input, .apple-textarea, input, textarea, select { max-width: 100%; }

@media (max-width: 760px) {
  :root { --radius-lg: 20px; --radius-md: 14px; }

  body { font-size: 15px; }
  .container { width: calc(100% - 20px); padding-top: 10px; }
  .site-header { width: 100%; min-height: 58px; gap: 8px; padding: 8px; margin-bottom: 22px; }
  .logo { flex: 0 1 auto; min-width: 0; gap: 8px; }
  .logo-mark { flex: 0 0 36px; width: 36px; height: 36px; }
  .logo-copy { font-size: 18px; }
  .nav-links { min-width: 0; gap: 3px; }
  .nav-links a { padding: 8px 10px; font-size: 14px; }
  .user-nav { min-width: 0; }
  .user-name { max-width: 58px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .global-search { flex: 0 0 38px; width: 38px; height: 38px; }
  .global-search.open { width: min(280px, calc(100vw - 42px)); }

  .studio-page { width: 100%; gap: 14px; }
  .studio-page > *, .studio-grid, .studio-grid > *, .studio-side { width: 100%; max-width: 100%; min-width: 0; }
  .studio-section-nav { top: 76px; width: 100%; max-width: calc(100vw - 20px); gap: 4px; padding: 7px; overscroll-behavior-x: contain; scroll-snap-type: x proximity; }
  .studio-section-nav > button, .studio-nav-channel { min-height: 42px; padding: 7px 10px 7px 7px; font-size: 12px; scroll-snap-align: start; }
  .studio-header, .account-settings-panel, .site-settings-panel, .invitation-panel, .tag-admin-panel, .publish-form-container, .manage-panel, .bug-panel { padding: 18px 15px; border-radius: 20px; }
  .panel-heading { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .panel-heading h3 { font-size: 21px; }
  .settings-save { width: 100%; }
  .settings-group { grid-template-columns: 1fr; gap: 12px; }
  .settings-fields, .settings-fields.two-columns, .account-settings-grid, .bug-submit-grid, .invitation-summary { grid-template-columns: minmax(0, 1fr); }
  .settings-fields .full-field { grid-column: auto; }
  .invitation-create-actions { grid-column: auto; }
  .invitation-card { grid-template-columns: minmax(0, 1fr); }
  .invitation-card > p { grid-column: 1; }
  .invitation-code-row { flex-wrap: wrap; }
  .invitation-code-row code { overflow-wrap: anywhere; }
  .tag-admin-list { grid-template-columns: minmax(0, 1fr); }

  .studio-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-side { grid-template-columns: minmax(0, 1fr); }
  .metric-card { padding: 17px; }
  .upload-dropzone { min-height: 140px; }
  .content-media-uploader { width: 100%; padding: 12px; }
  .content-media-uploader strong { font-size: 14px; }
  .content-media-uploader small { font-size: 11px; line-height: 1.5; }
  .note-editor { width: 100%; }
  .editor-mode-switch { overflow-x: auto; }
  .editor-mode-switch button { min-height: 40px; padding: 9px 13px; font-size: 13px; white-space: nowrap; }
  .note-toolbar { gap: 6px; padding: 8px; scroll-snap-type: x proximity; overscroll-behavior-x: contain; }
  .note-toolbar button { flex-direction: column; min-width: 72px; min-height: 52px; gap: 3px; padding: 7px 8px; border: 1px solid rgba(29,29,31,.045); background: rgba(255,255,255,.3); scroll-snap-align: start; }
  .note-toolbar button span { font-size: 15px; line-height: 1; }
  .note-toolbar button small { display: block; color: var(--text-primary); font-size: 11px; font-weight: 650; white-space: nowrap; }
  .rich-content-input, .note-editor .content-input { min-height: 320px; padding: 16px; font-size: 16px; line-height: 1.75; }
  .note-editor-footer { font-size: 10px; }
  .apple-input, .apple-textarea, input, textarea, select { font-size: 16px; }
  .visibility-grid { grid-template-columns: minmax(0, 1fr); }
  .visibility-option { min-height: 68px; }
  .publish-actions { align-items: stretch; }
  .publish-actions .apple-btn { width: 100%; min-height: 48px; font-size: 15px; }

  .home-feed-layout, .post-detail-layout, .auth-layout, .channel-layout, .search-layout { grid-template-columns: minmax(0, 1fr); }
  .home-feed-sidebar, .post-sidebar { position: static; width: 100%; }
  .story-entry, .post-detail-card, .channel-hero, .auth-box, .auth-story { max-width: 100%; }
  .article-title { overflow-wrap: anywhere; }
  .detail-content-wrap, .post-content { overflow-wrap: anywhere; }
  .markdown-body pre { max-width: 100%; overflow-x: auto; }
  .markdown-body table { display: block; max-width: 100%; overflow-x: auto; }

  .manage-item { width: 100%; }
  .manage-main { min-width: 0; }
  .manage-main h4 { overflow-wrap: anywhere; }
  .manage-actions { flex-wrap: wrap; }
  .batch-toolbar { width: 100%; }
  .batch-visibility-select { min-width: 0; }
  .bug-report-card, .comment-item, .comment-body { max-width: 100%; min-width: 0; }
  .inline-reply-composer { width: 100%; margin-right: 0; }
}

/* Beta 0.9.6 orientation-safe tablet portrait layout. */
@media (orientation: portrait) and (max-width: 900px) {
  html, body, #app { width: 100%; max-width: 100%; overflow-x: clip; }
  .container { width: calc(100% - 20px); max-width: 100%; padding-top: 10px; }

  .site-header { top: 8px; display: flex; min-height: 58px; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; margin-bottom: 22px; border-radius: 18px; }
  .site-header .logo { min-width: 0; margin: 0; }
  .site-header .logo-copy { font-size: 18px; }
  .site-header .nav-links { display: flex; align-items: center; min-width: 0; gap: 4px; margin: 0; }
  .site-header .nav-links a { margin: 0; padding: 8px 10px; }

  .studio-page { display: grid; grid-template-columns: minmax(0,1fr); align-items: start; gap: 14px; width: 100%; max-width: 100%; }
  .studio-page > .studio-section-nav,
  .studio-page > .studio-header,
  .studio-page > .account-settings-panel,
  .studio-page > .site-settings-panel,
  .studio-page > .invitation-panel,
  .studio-page > .tag-admin-panel,
  .studio-page > .studio-grid,
  .studio-page > .manage-panel,
  .studio-page > .bug-panel { grid-column: 1; grid-row: auto; width: 100%; max-width: 100%; min-width: 0; }

  .studio-section-nav { position: sticky; top: 76px; z-index: 40; display: flex; align-items: center; gap: 5px; width: 100%; max-width: calc(100vw - 20px); padding: 8px; overflow-x: auto; overflow-y: hidden; border-radius: 17px; }
  .studio-nav-title { display: none; }
  .studio-section-nav > button, .studio-nav-channel { display: grid; flex: 0 0 auto; grid-template-columns: 24px auto; width: auto; min-height: 40px; padding: 7px 10px 7px 7px; margin: 0; border: 0; border-radius: 12px; white-space: nowrap; writing-mode: horizontal-tb; }
  .studio-section-nav i, .studio-nav-channel i { display: none; }

  .studio-header { display: flex; align-items: center; justify-content: space-between; flex-direction: row; flex-wrap: wrap; gap: 14px; width: 100%; padding: 18px; border-radius: 20px; }
  .studio-identity { display: flex; align-items: center; min-width: 0; gap: 12px; }
  .studio-identity > div { min-width: 0; }
  .studio-identity h2, .studio-name-row, .avatar-hint { writing-mode: horizontal-tb; word-break: normal; }
  .studio-actions { display: flex; flex: 0 0 auto; width: auto; gap: 7px; }
  .studio-actions .ghost-btn { flex: 0 0 auto; width: auto; writing-mode: horizontal-tb; }

  .account-settings-panel, .site-settings-panel, .invitation-panel, .tag-admin-panel, .publish-form-container, .manage-panel, .bug-panel { width: 100%; max-width: 100%; min-width: 0; padding: 20px 18px; border-radius: 20px; }
  .account-settings-heading, .panel-heading { width: 100%; }
  .account-settings-heading h3, .account-settings-heading p, .panel-heading h3, .panel-heading p { max-width: 100%; writing-mode: horizontal-tb; word-break: normal; overflow-wrap: anywhere; }
  .account-settings-grid, .settings-fields, .settings-fields.two-columns, .settings-group, .studio-grid, .studio-side, .bug-submit-grid { grid-template-columns: minmax(0,1fr); width: 100%; min-width: 0; }
  .account-form-card { width: 100%; min-width: 0; }
  .settings-group { gap: 12px; }
  .settings-fields .full-field { grid-column: auto; }

  .home-feed-layout { grid-template-columns: minmax(0,1fr); }
  .discovery-sidebar { position: static; grid-row: auto; max-height: none; padding-right: 0; overflow: visible; }
}

@media (max-width: 390px) {
  .container { width: calc(100% - 12px); }
  .site-header { border-radius: 16px; }
  .logo-copy { display: none; }
  .nav-links a { padding-right: 8px; padding-left: 8px; }
  .studio-section-nav { max-width: calc(100vw - 12px); }
  .studio-header, .account-settings-panel, .site-settings-panel, .invitation-panel, .tag-admin-panel, .publish-form-container, .manage-panel, .bug-panel { padding-right: 12px; padding-left: 12px; }
  .note-toolbar button { min-width: 68px; }
}

/* ========================================================
   Beta 0.8.0 compact account cards and unified pagination
   ======================================================== */
.account-settings-panel { padding: 25px 28px; }
.account-settings-heading { margin-bottom: 17px; }
.account-settings-grid { grid-template-columns: minmax(170px,.62fr) repeat(2,minmax(0,1fr)); align-items: start; gap: 13px; }
.account-identity-card, .account-form-card { height: auto; min-height: 0; padding: 17px 18px; }
.account-identity-card { justify-content: flex-start; gap: 16px; }
.account-settings-icon { width: 36px; height: 36px; border-radius: 11px; font-size: 18px; }
.account-identity-card strong { font-size: clamp(24px,2.6vw,32px); }
.account-form-card { gap: 11px; }
.account-form-card label { gap: 5px; }
.account-form-card .apple-input { padding-top: 11px; padding-bottom: 11px; }
.account-form-card .apple-btn { margin-top: 4px; }

.pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 9px 11px; border-radius: 15px; box-shadow: none; }
.pagination > span { color: var(--text-secondary); font-size: 10px; font-variant-numeric: tabular-nums; }
.pagination > div { display: flex; align-items: center; gap: 4px; }
.pagination button { display: grid; place-items: center; min-width: 31px; height: 31px; padding: 0 7px; color: var(--text-secondary); border: 0; border-radius: 9px; background: rgba(255,255,255,.38); font-family: inherit; font-size: 11px; cursor: pointer; }
.pagination button:hover { color: var(--text-primary); background: rgba(29,29,31,.06); }
.pagination button.active { color: #fff; background: #1d1d1f; }
.pagination button:disabled { opacity: .3; cursor: default; }

.page-size-setting { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.page-size-setting > button { min-height: 42px; padding: 9px 13px; color: var(--text-secondary); border: 1px solid var(--border-color); border-radius: 12px; background: rgba(255,255,255,.34); font-family: inherit; font-size: 11px; cursor: pointer; }
.page-size-setting > button.active { color: #fff; border-color: #1d1d1f; background: #1d1d1f; }
.page-size-setting label { display: grid; grid-template-columns: auto 100px auto; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 10px; }
.page-size-setting .apple-input { padding: 9px 10px; }

@media (max-width: 1050px) {
  .account-settings-grid { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .account-identity-card { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .account-settings-panel { padding: 18px 15px; }
  .account-settings-grid { grid-template-columns: minmax(0,1fr); }
  .account-identity-card { grid-column: auto; }
  .pagination { align-items: stretch; flex-direction: column; }
  .pagination > div { justify-content: center; overflow-x: auto; }
  .pagination > span { text-align: center; }
  .page-size-setting { align-items: stretch; flex-direction: column; }
  .page-size-setting label { grid-template-columns: auto minmax(0,1fr) auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================================
   Community, authentication and creator modules · 2026-07-11
   ======================================================== */
.text-action,
.ghost-btn,
.text-btn,
.action-btn {
  color: var(--text-primary);
  text-decoration: none;
}

.text-action {
  align-self: center;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

.card-footer-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 24px;
}

.card-footer-line .read-more {
  margin: 0;
  padding: 0;
  gap: 14px;
}

.author-link {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s ease;
}

.author-link:hover {
  color: var(--accent);
}

.empty-state {
  padding: 76px 28px;
  border-radius: var(--radius-xl);
  text-align: center;
}

.empty-state > span {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  background: rgba(0, 113, 227, 0.08);
  border-radius: 18px;
  color: var(--accent);
  font-size: 22px;
}

.empty-state h3 { font-size: 24px; }
.empty-state p { margin-top: 8px; color: var(--text-secondary); }

/* Authentication */
.auth-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.85fr) minmax(0, 1.15fr);
  gap: 22px;
  min-height: 630px;
}

.auth-story,
.auth-box {
  border-radius: var(--radius-xl);
}

.auth-story {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(42px, 7vw, 82px);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.85), rgba(255,255,255,0.48)),
    radial-gradient(circle at 18% 12%, rgba(185, 158, 255, 0.35), transparent 34%),
    radial-gradient(circle at 88% 80%, rgba(93, 202, 228, 0.32), transparent 38%);
}

.auth-story h1 {
  margin: 25px 0;
  font-size: clamp(42px, 5.4vw, 68px);
  line-height: 1.08;
  letter-spacing: -0.055em;
  white-space: pre-line;
}

.auth-story > p {
  max-width: 570px;
  color: var(--text-secondary);
  font-size: 17px;
}

.privacy-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 44px;
}

.privacy-preview span {
  padding: 9px 13px;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.auth-box {
  padding: 34px;
  background: rgba(255, 255, 255, 0.76);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 36px;
  background: rgba(29, 29, 31, 0.055);
  border-radius: 15px;
}

.auth-tabs button {
  padding: 10px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 650;
  cursor: pointer;
}

.auth-tabs button.active {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 14px rgba(34, 46, 70, 0.08);
}

.auth-heading {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 30px;
}

.auth-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  color: #fff;
  background: #1d1d1f;
  font-size: 20px;
}

.auth-heading h2 { font-size: 24px; }
.auth-heading p { color: var(--text-secondary); font-size: 12px; }

.field-label {
  display: block;
  margin: 2px 0 7px 4px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.auth-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 8px;
}

.auth-rate-limit {
  margin: 10px 0 12px;
  padding: 12px 14px;
  border: 1px solid rgba(197, 53, 53, 0.16);
  border-radius: 12px;
  color: #8f2e2e;
  background: rgba(255, 235, 235, 0.58);
}

.auth-rate-limit > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.auth-rate-limit span {
  font-size: 12px;
  font-weight: 750;
}

.auth-rate-limit strong {
  min-width: 52px;
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  letter-spacing: 0;
  text-align: right;
}

.auth-rate-limit p {
  margin-top: 4px;
  color: #a34b4b;
  font-size: 10px;
  line-height: 1.5;
}

.auth-note {
  margin-top: 20px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
}

.username-availability {
  margin: -8px 4px 12px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
}

.username-availability.available {
  color: #23824c;
}

.username-availability.unavailable {
  color: #c53535;
}

/* Channel */
.channel-hero {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
  padding: clamp(34px, 5vw, 60px);
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, rgba(255,255,255,0.83), rgba(255,255,255,0.55));
}

.channel-avatar,
.avatar,
.mini-avatar {
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #6568d9, #2797b8);
  font-weight: 800;
  text-transform: uppercase;
}

.channel-avatar {
  width: 88px;
  height: 88px;
  border-radius: 28px;
  font-size: 34px;
  box-shadow: 0 15px 30px rgba(69, 108, 184, 0.22);
}

.channel-hero h1 {
  margin: 5px 0 2px;
  font-size: clamp(34px, 5vw, 52px);
  letter-spacing: -0.045em;
}

.channel-hero p { color: var(--text-secondary); }
.channel-count { color: var(--text-secondary); font-size: 13px; font-weight: 650; }
.channel-content { margin-top: 34px; }
.channel-content .bento-grid {
  align-items: start;
}
.channel-content .bento-grid.masonry-grid {
  --masonry-gap: 22px;
  grid-auto-flow: row dense;
  grid-auto-rows: 1px;
  column-gap: var(--masonry-gap);
  row-gap: 0;
}
.channel-content .story-entry {
  grid-column: span 4;
  min-height: 0;
  align-self: start;
}

/* Detail privacy and author */
.detail-eyebrow {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
}

.detail-eyebrow span { color: var(--accent); }

.detail-author {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 230px;
  margin: 6px 0 44px;
  padding: 10px 13px;
  border-radius: 17px;
  color: inherit;
  text-decoration: none;
}

.detail-author .avatar,
.studio-identity .avatar {
  width: 42px;
  height: 42px;
  border-radius: 13px;
}

.detail-author > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; line-height: 1.25; }
.detail-author small { color: var(--text-secondary); font-size: 9px; }
.detail-author strong { font-size: 13px; }
.detail-author i { font-style: normal; }
.detail-error { padding: 90px 20px; }
.detail-error p { margin: 8px 0 28px; }
.detail-error .apple-btn { display: inline-block; text-decoration: none; }

/* Creator studio */
.studio-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  margin-bottom: 22px;
  border-radius: 24px;
}

.studio-identity,
.studio-actions,
.panel-heading,
.publish-actions,
.manage-item,
.manage-actions {
  display: flex;
  align-items: center;
}

.studio-identity { gap: 13px; }
.studio-identity h2 { margin-top: 2px; font-size: 20px; }
.studio-actions { gap: 8px; }

.ghost-btn,
.text-btn {
  padding: 9px 13px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.42);
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.ghost-btn.danger { color: #d93636; }

.studio-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: start;
  gap: 22px;
}

.publish-form-container {
  margin: 0;
  padding: clamp(26px, 4vw, 42px);
  background: rgba(255, 255, 255, 0.69);
}

.panel-heading {
  justify-content: space-between;
  margin-bottom: 28px;
}

.panel-heading h3 { margin-top: 4px; font-size: 25px; }
.summary-input { min-height: 92px; }
.content-input { min-height: 360px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

.content-media-uploader {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  padding: 10px;
  border: 1px dashed rgba(29, 29, 31, 0.14);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.content-media-uploader:hover,
.content-media-uploader.drag-over {
  border-color: rgba(0, 113, 227, 0.46);
  background: rgba(0, 113, 227, 0.055);
}

.content-media-uploader.drag-over { transform: translateY(-2px); }
.content-media-uploader.uploading { cursor: wait; }

.media-plus {
  display: grid;
  place-items: center;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  border-radius: 14px;
  color: #9aa0a8;
  background: rgba(29, 29, 31, 0.035);
  font-size: 34px;
  font-weight: 300;
}

.content-media-uploader > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.content-media-uploader strong { font-size: 13px; }
.content-media-uploader small {
  margin-top: 5px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.note-editor {
  overflow: hidden;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.28);
}

.editor-mode-switch { display: flex; gap: 4px; padding: 7px 9px 0; background: rgba(255,255,255,.26); }
.editor-mode-switch button { padding: 7px 12px; color: var(--text-secondary); border: 0; border-radius: 10px 10px 0 0; background: transparent; font-family: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.editor-mode-switch button.active { color: var(--text-primary); background: rgba(255,255,255,.72); box-shadow: 0 4px 14px rgba(40,55,90,.06); }

.note-toolbar {
  display: flex;
  gap: 3px;
  padding: 7px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border-color);
  scrollbar-width: thin;
}

.note-toolbar button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  flex: 0 0 auto;
  min-width: 48px;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  color: var(--text-secondary);
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.note-toolbar button:hover {
  color: var(--text-primary);
  background: rgba(29, 29, 31, 0.055);
}

.note-toolbar button span { font-size: 12px; font-weight: 800; }
.note-toolbar button small { font-size: 9px; }

.note-editor .content-input {
  display: block;
  width: 100%;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  resize: vertical;
}

.note-editor .content-input:focus { box-shadow: none; }

.rich-content-input { overflow-y: auto; min-height: 360px; padding: 20px; color: var(--text-primary); background: rgba(255,255,255,.2); outline: none; font-family: inherit; font-size: 15px; line-height: 1.8; white-space: normal; }
.rich-content-input:empty::before { color: var(--text-secondary); content: attr(data-placeholder); pointer-events: none; }
.rich-content-input p { margin: 0 0 1em; }
.rich-content-input h2 { margin: 1.2em 0 .55em; font-size: 1.45em; }
.rich-content-input blockquote { margin: 1em 0; padding: 8px 14px; color: var(--text-secondary); border-left: 3px solid var(--accent); background: rgba(0,113,227,.05); }
.rich-content-input ul, .rich-content-input ol { margin: .8em 0; padding-left: 1.8em; }
.rich-content-input img, .rich-content-input video { display: block; max-width: 100%; max-height: 70vh; margin: 16px auto; border-radius: 14px; }
.rich-content-input a { color: var(--accent); text-decoration: underline; }

.note-editor-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 9px;
}

.note-editor-footer b { font-variant-numeric: tabular-nums; font-weight: 650; }

@media (max-width: 640px) {
  .content-media-uploader { gap: 10px; }
  .media-plus { flex-basis: 58px; width: 58px; height: 58px; font-size: 28px; }
  .content-media-uploader small { white-space: normal; }
  .note-toolbar button { min-width: 36px; padding: 7px; }
  .note-toolbar button small { display: none; }
}

.visibility-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0 0 20px;
}

.visibility-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--border-color);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: border 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.visibility-option:hover { transform: translateY(-2px); }
.visibility-option.active { border-color: rgba(0, 113, 227, 0.35); background: rgba(0, 113, 227, 0.07); }
.visibility-option input { display: none; }
.visibility-icon { display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; background: rgba(29,29,31,0.055); border-radius: 12px; font-size: 17px; }
.visibility-option > span:last-child { display: flex; flex-direction: column; }
.visibility-option strong { font-size: 13px; }
.visibility-option small { margin-top: 2px; color: var(--text-secondary); font-size: 10px; line-height: 1.4; }

.people-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: -7px 0 20px;
  padding: 16px;
  border-radius: 17px;
  box-shadow: none;
}

.people-picker > strong,
.people-picker > p { flex-basis: 100%; font-size: 12px; }
.people-picker > p { color: var(--text-secondary); }

.person-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 6px 7px;
  border: 1px solid var(--border-color);
  border-radius: 999px;
  background: rgba(255,255,255,0.52);
  font-size: 11px;
  cursor: pointer;
}

.person-chip:has(input:checked) { color: #fff; background: #1d1d1f; }
.person-chip input { display: none; }
.person-chip small { opacity: 0.62; }
.mini-avatar { width: 23px; height: 23px; border-radius: 50%; font-size: 9px; }

.publish-actions {
  justify-content: space-between;
  margin-top: 20px;
}

.publish-actions > span { color: var(--text-secondary); font-size: 12px; font-weight: 650; }
.studio-side { display: grid; gap: 14px; position: sticky; top: 108px; }

.metric-card {
  padding: 24px;
  border-radius: 22px;
}

.metric-card > span { color: var(--text-secondary); font-size: 11px; font-weight: 650; }
.metric-card strong { display: block; margin: 12px 0 2px; font-size: 28px; letter-spacing: -0.04em; }
.metric-card p { color: var(--text-secondary); font-size: 11px; }

.manage-panel {
  margin-top: 22px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius-lg);
}

.manage-list { display: grid; gap: 10px; }
.manage-item { justify-content: space-between; gap: 20px; padding: 17px 18px; border-radius: 18px; box-shadow: none; }
.manage-main h4 { margin: 5px 0 1px; font-size: 15px; }
.manage-main p { color: var(--text-secondary); font-size: 10px; }
.visibility-badge { padding: 4px 7px; color: var(--accent); background: rgba(0,113,227,0.07); border-radius: 7px; font-size: 9px; font-weight: 700; }
.manage-actions { gap: 3px; }
.manage-actions .action-btn { margin: 0; padding: 7px 8px; border: 0; background: transparent; font-family: inherit; font-size: 11px; cursor: pointer; }

.batch-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; padding: 13px 14px; border-radius: 17px; box-shadow: none; }
.batch-select-all { display: inline-flex; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 12px; cursor: pointer; }
.batch-select-all input, .manage-selector input { accent-color: var(--accent); }
.batch-toolbar > strong { margin-right: auto; font-size: 12px; }
.batch-visibility-select { width: auto; min-width: 180px; padding: 8px 30px 8px 11px; font-size: 11px; }
.batch-toolbar .action-btn { margin: 0; white-space: nowrap; }
.manage-item.selected { border-color: rgba(0,113,227,.3); background: rgba(235,246,255,.48); }
.manage-selector { display: grid; flex: 0 0 auto; place-items: center; align-self: stretch; cursor: pointer; }
.manage-selector input { width: 16px; height: 16px; }

.invitation-panel { margin-top: 22px; padding: clamp(24px, 4vw, 38px); border-radius: var(--radius-lg); }
.invitation-heading p { margin-top: 5px; color: var(--text-secondary); font-size: 12px; }
.invitation-summary { display: grid; grid-template-columns: 150px 130px minmax(280px, 1fr); gap: 12px; margin: 20px 0 14px; }
.invitation-summary > div { padding: 16px; border: 1px solid rgba(255,255,255,.58); border-radius: 18px; background: rgba(255,255,255,.3); }
.invitation-summary small { display: block; color: var(--text-secondary); font-size: 10px; }
.invitation-summary strong { display: block; margin-top: 7px; font-size: 20px; }
.invitation-create-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.invitation-disabled-hint { margin: 0 0 14px; padding: 11px 13px; color: #8a6410; border-radius: 12px; background: rgba(255,191,0,.09); font-size: 11px; }
.invitation-list { display: grid; gap: 10px; }
.invitation-card { display: grid; grid-template-columns: minmax(210px, .8fr) minmax(300px, 1.3fr) auto; align-items: center; gap: 14px; padding: 15px 17px; border-radius: 18px; box-shadow: none; }
.invitation-card.used, .invitation-card.expired { opacity: .68; }
.invitation-code-row { display: flex; align-items: center; gap: 8px; }
.invitation-code-row code { color: var(--text-primary); font: 750 15px ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: .07em; }
.invitation-code-row button { padding: 5px 8px; color: var(--accent); border: 0; border-radius: 8px; background: rgba(0,113,227,.08); font: inherit; font-size: 10px; cursor: pointer; }
.invitation-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--text-secondary); font-size: 10px; }
.invitation-status { padding: 4px 7px; border-radius: 999px; color: #14733c; background: rgba(52,199,89,.11); font-weight: 750; }
.invitation-status.used { color: #59606b; background: rgba(90,96,107,.1); }
.invitation-status.expired { color: #a44828; background: rgba(255,149,0,.11); }
.invitation-card > p { grid-column: 2; margin: -8px 0 0; color: var(--text-secondary); font-size: 10px; }
.invitation-card-actions { justify-self: end; }
.invite-required-hint { margin: -4px 0 12px; color: var(--text-secondary); font-size: 10px; }
.invite-code-input { text-transform: uppercase; letter-spacing: .08em; }
.invite-switch { max-width: 420px; }

.tag-picker { position: relative; margin-bottom: 18px; }
.selected-tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.selected-tag-row button { padding: 6px 9px; color: var(--accent); border: 1px solid rgba(0,113,227,.14); border-radius: 999px; background: rgba(0,113,227,.07); font-family: inherit; font-size: 11px; font-weight: 650; cursor: pointer; }
.selected-tag-row span { margin-left: 4px; }
.tag-picker-panel { position: static; width: 100%; max-height: 280px; margin-top: 7px; overflow-y: auto; padding: 12px; border-radius: 16px; box-shadow: 0 12px 30px rgba(43,55,85,.1); }
.tag-picker-group + .tag-picker-group { margin-top: 10px; }
.tag-picker-group > small { display: block; margin-bottom: 6px; color: var(--text-secondary); font-size: 10px; }
.tag-picker-group > div { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-picker-group button, .tag-create-option { padding: 6px 9px; color: var(--text-primary); border: 1px solid rgba(255,255,255,.62); border-radius: 9px; background: rgba(255,255,255,.5); font-family: inherit; font-size: 11px; cursor: pointer; }
.tag-picker-group button:disabled { opacity: .38; cursor: default; }
.tag-picker-group button i { margin-left: 3px; color: var(--text-secondary); font-size: 9px; font-style: normal; }
.tag-picker-group span { color: var(--text-secondary); font-size: 11px; }
.tag-create-option { width: 100%; margin-top: 10px; color: var(--accent); text-align: left; }
.tag-picker-close { display: block; margin: 10px 0 0 auto; padding: 5px 10px; color: var(--text-secondary); border: 0; background: transparent; font-family: inherit; font-size: 10px; cursor: pointer; }
.tag-admin-panel { width: 100%; min-width: 0; margin-top: 22px; padding: clamp(24px,4vw,38px); border-radius: var(--radius-lg); }
.tag-admin-heading p { max-width: 620px; margin-top: 5px; color: var(--text-secondary); font-size: 12px; }
.tag-admin-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin: 20px 0 14px; }
.tag-admin-overview article { padding: 15px 16px; border: 1px solid rgba(255,255,255,.6); border-radius: 16px; background: rgba(255,255,255,.32); }
.tag-admin-overview small { display: block; color: var(--text-secondary); font-size: 10px; }
.tag-admin-overview strong { display: block; margin-top: 6px; font-size: 24px; }
.tag-admin-toolbar { display: grid; grid-template-columns: minmax(180px,.8fr) minmax(300px,1.2fr); gap: 10px; margin-bottom: 14px; }
.tag-admin-search { position: relative; min-width: 0; }
.tag-admin-search > span { position: absolute; top: 50%; left: 13px; z-index: 1; color: var(--text-secondary); transform: translateY(-50%); }
.tag-admin-search .apple-input { padding-left: 36px; }
.tag-admin-create { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 8px; min-width: 0; margin: 0; }
.tag-admin-create .apple-btn { white-space: nowrap; }
.tag-admin-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.tag-admin-list article { display: flex; align-items: center; justify-content: space-between; min-width: 0; gap: 12px; padding: 13px 14px; border: 1px solid rgba(255,255,255,.62); border-radius: 15px; background: rgba(255,255,255,.34); }
.tag-admin-list article.unused { border-style: dashed; background: rgba(255,255,255,.2); }
.tag-admin-list article > div { min-width: 0; }
.tag-admin-list article span { display: block; overflow: hidden; font-size: 13px; font-weight: 720; text-overflow: ellipsis; white-space: nowrap; }
.tag-admin-list article small { display: block; margin-top: 3px; color: var(--text-secondary); font-size: 9px; }
.tag-admin-list article button { flex: 0 0 auto; padding: 6px 8px; color: #c83d38; border: 0; border-radius: 8px; background: rgba(200,61,56,.07); font-family: inherit; font-size: 10px; cursor: pointer; }
.tag-admin-list article button:hover { background: rgba(200,61,56,.12); }
.tag-admin-empty { display: grid; place-items: center; min-height: 180px; padding: 30px; color: var(--text-secondary); text-align: center; }
.tag-admin-empty > span { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 10px; border-radius: 15px; color: var(--accent); background: rgba(0,113,227,.08); font-size: 20px; }
.tag-admin-empty strong { color: var(--text-primary); font-size: 16px; }
.tag-admin-empty small { margin-top: 4px; font-size: 10px; }

@media (max-width: 900px) {
  .auth-layout { grid-template-columns: 1fr; }
  .auth-story { min-height: 440px; }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-side { grid-template-columns: 1fr 1fr; position: static; }
  .channel-content .story-entry { grid-column: span 6; }
}

@media (max-width: 640px) {
  .nav-links > a:nth-child(2) { display: none; }
  .auth-layout { min-height: 0; gap: 14px; }
  .auth-story { min-height: 380px; padding: 34px 25px; border-radius: 27px; }
  .auth-story h1 { font-size: 40px; }
  .auth-box { padding: 24px; border-radius: 27px; }
  .privacy-preview { margin-top: 28px; }
  .channel-hero { grid-template-columns: auto 1fr; gap: 17px; padding: 25px; border-radius: 27px; }
  .channel-avatar { width: 62px; height: 62px; border-radius: 20px; font-size: 25px; }
  .channel-count { grid-column: 1 / -1; }
  .studio-header { align-items: flex-start; flex-direction: column; gap: 17px; }
  .studio-actions { width: 100%; }
  .studio-actions .ghost-btn { flex: 1; text-align: center; }
  .visibility-grid { grid-template-columns: 1fr; }
  .studio-side { grid-template-columns: 1fr 1fr; }
  .metric-card { padding: 18px; }
  .manage-item { align-items: flex-start; flex-direction: column; }
  .manage-item { position: relative; padding-left: 48px; }
  .manage-selector { position: absolute; top: 16px; left: 17px; height: 24px; }
  .manage-actions { width: 100%; justify-content: flex-end; }
  .batch-toolbar { align-items: stretch; }
  .batch-toolbar > strong { width: 100%; }
  .batch-visibility-select { width: 100%; }
  .invitation-summary { grid-template-columns: 1fr 1fr; }
  .invitation-create-actions { grid-column: 1 / -1; flex-wrap: wrap; justify-content: flex-start; }
  .invitation-card { grid-template-columns: 1fr; }
  .invitation-card > p { grid-column: 1; margin: 0; }
  .invitation-card-actions { justify-self: start; }
  .tag-picker-panel { position: static; max-height: 220px; margin-top: 6px; padding: 10px; }
  .tag-picker-group > div { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; }
  .tag-picker-group button { flex: 0 0 auto; }
  .tag-admin-overview { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .tag-admin-overview article { padding: 12px 10px; }
  .tag-admin-overview strong { font-size: 20px; }
  .tag-admin-toolbar { grid-template-columns: minmax(0,1fr); }
  .tag-admin-create { grid-template-columns: minmax(0,1fr); }
  .tag-admin-create .apple-btn { width: 100%; }
  .tag-admin-list { grid-template-columns: minmax(0,1fr); }
  .publish-actions { align-items: flex-end; flex-direction: column; gap: 12px; }
}

/* ========================================================
   Article-first home layout · 2026-07-11
   ======================================================== */
.home-feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  align-items: start;
  gap: 28px;
}

.feed-heading {
  min-height: 106px;
  margin-bottom: 24px;
}

.feed-heading h1 {
  margin-top: 5px;
  font-size: clamp(42px, 6vw, 64px);
  line-height: 1;
  letter-spacing: -0.055em;
}

.feed-refresh-actions { display: grid; grid-template-columns: auto auto; align-items: center; justify-items: end; gap: 5px 8px; }
.feed-refresh-actions > small { grid-column: 1 / -1; color: var(--text-secondary); font-size: 9px; }
.feed-refresh-button { display: inline-flex; align-items: center; gap: 5px; min-height: 34px; padding: 7px 10px; color: var(--text-secondary); border: 1px solid rgba(255,255,255,.62); border-radius: 11px; background: rgba(255,255,255,.4); font-family: inherit; font-size: 10px; cursor: pointer; }
.feed-refresh-button:hover { color: var(--text-primary); background: rgba(255,255,255,.66); }
.feed-refresh-button:disabled { opacity: .55; cursor: wait; }
.feed-refresh-button .spinning { animation: refreshSpin .75s linear infinite; }
@keyframes refreshSpin { to { transform: rotate(360deg); } }
.new-posts-notice { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; align-items: center; gap: 3px 10px; width: 100%; margin: -8px 0 18px; padding: 11px 13px; color: var(--text-primary); border-radius: 15px; background: rgba(231,244,255,.72); box-shadow: 0 10px 28px rgba(50,90,140,.07); font-family: inherit; text-align: left; cursor: pointer; }
.new-posts-notice > span { display: grid; grid-row: 1 / span 2; place-items: center; width: 34px; height: 34px; color: var(--accent); border-radius: 11px; background: rgba(0,113,227,.09); }
.new-posts-notice strong { font-size: 12px; }
.new-posts-notice small { color: var(--text-secondary); font-size: 9px; }
.new-posts-notice i { grid-row: 1 / span 2; grid-column: 3; color: var(--accent); font-size: 10px; font-style: normal; font-weight: 700; }

@media (max-width: 640px) {
  .feed-heading { align-items: flex-start; flex-direction: row; }
  .feed-refresh-actions { grid-template-columns: 1fr; justify-items: end; }
  .feed-refresh-actions .section-note { display: none; }
  .feed-refresh-actions > small { grid-column: 1; }
  .new-posts-notice { grid-template-columns: 32px minmax(0,1fr); }
  .new-posts-notice i { grid-row: auto; grid-column: 2; }
}

.feed-main .status-msg {
  border-radius: var(--radius-lg);
}

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

.story-list .story-entry,
.story-list .story-entry--featured {
  display: grid;
  grid-template-columns: minmax(210px, 0.72fr) minmax(0, 1.28fr);
  grid-column: 1 / -1;
  min-height: 250px;
}

.story-list .card-cover,
.story-list .story-entry--featured .card-cover {
  width: 100%;
  height: 100%;
  min-height: 250px;
  border-right: 1px solid rgba(255,255,255,0.35);
  border-bottom: 0;
}

.story-list .card-content {
  min-width: 0;
  padding: 28px;
}

.story-list .article-title,
.story-list .story-entry--featured .article-title {
  font-size: clamp(23px, 3vw, 31px);
}

.story-list .article-summary {
  -webkit-line-clamp: 2;
}

.discovery-sidebar {
  position: sticky;
  top: 108px;
  display: grid;
  gap: 16px;
}

@media (min-width: 961px) {
  .discovery-sidebar {
    align-self: start;
    max-height: calc(100vh - 124px);
    padding-right: 5px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: rgba(80,88,105,.28) transparent;
    scrollbar-gutter: stable;
    scrollbar-width: thin;
  }

  .discovery-sidebar::-webkit-scrollbar { width: 6px; }
  .discovery-sidebar::-webkit-scrollbar-track { background: transparent; }
  .discovery-sidebar::-webkit-scrollbar-thumb { border-radius: 999px; background: rgba(80,88,105,.24); }
  .discovery-sidebar::-webkit-scrollbar-thumb:hover { background: rgba(80,88,105,.4); }
}

.filter-panel,
.sidebar-note {
  border-radius: var(--radius-lg);
}

.filter-panel {
  padding: 25px 18px 18px;
  background: rgba(255, 255, 255, 0.7);
}

.sidebar-heading {
  padding: 0 7px 19px;
}

.sidebar-heading h2 {
  margin-top: 3px;
  font-size: 24px;
  letter-spacing: -0.035em;
}

.filter-item {
  display: grid;
  grid-template-columns: 39px 1fr auto;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  border-radius: 16px;
  color: var(--text-primary);
  background: transparent;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.filter-item + .filter-item {
  margin-top: 4px;
}

.filter-item:hover {
  background: rgba(29, 29, 31, 0.045);
  transform: translateX(2px);
}

.filter-item.active {
  color: #fff;
  background: #1d1d1f;
  box-shadow: 0 10px 24px rgba(29,29,31,0.16);
}

.filter-icon {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border-radius: 12px;
  background: rgba(29, 29, 31, 0.055);
  font-size: 17px;
}

.filter-item.active .filter-icon {
  background: rgba(255,255,255,0.12);
}

.filter-item > span:nth-child(2) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.filter-item strong {
  font-size: 13px;
}

.filter-item small {
  margin-top: 1px;
  color: var(--text-secondary);
  font-size: 9px;
}

.filter-item.active small {
  color: rgba(255,255,255,0.5);
}

.filter-item b {
  min-width: 25px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(29,29,31,0.055);
  font-size: 10px;
  text-align: center;
}

.filter-item.active b {
  background: rgba(255,255,255,0.12);
}

.sidebar-note {
  display: flex;
  gap: 12px;
  padding: 20px;
  background: rgba(255,255,255,0.54);
}

.sidebar-note > span {
  color: var(--accent);
}

.sidebar-note strong {
  font-size: 12px;
}

.sidebar-note p {
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.6;
}

.compact-empty {
  padding: 55px 24px;
}

.compact-empty .text-btn {
  margin-top: 18px;
}

.system-metric {
  position: relative;
  overflow: hidden;
}

.system-metric::after {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffcc00;
  box-shadow: 0 0 0 5px rgba(255,204,0,0.1);
  content: '';
}

.system-metric.success::after {
  background: #34c759;
  box-shadow: 0 0 0 5px rgba(52,199,89,0.1);
}

.system-metric.error::after {
  background: #ff3b30;
  box-shadow: 0 0 0 5px rgba(255,59,48,0.1);
}

@media (max-width: 960px) {
  .home-feed-layout {
    grid-template-columns: 1fr;
  }

  .discovery-sidebar {
    position: static;
    grid-row: 1;
    max-height: none;
    padding-right: 0;
    overflow: visible;
  }

  .filter-panel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .sidebar-heading {
    grid-column: 1 / -1;
  }

  .filter-item + .filter-item {
    margin-top: 0;
  }

  .sidebar-note {
    display: none;
  }
}

/* ========================================================
   Admin-editable site copy · 2026-07-11
   ======================================================== */
.site-settings-panel {
  margin-bottom: 22px;
  padding: clamp(25px, 4vw, 40px);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.7);
}

.settings-heading {
  align-items: flex-end;
}

.settings-heading p {
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 12px;
}

.settings-save {
  flex: 0 0 auto;
  padding: 12px 22px;
  font-size: 13px;
}

.settings-group {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 25px;
  padding: 27px 0;
  border-top: 1px solid var(--border-color);
}

.settings-group:last-of-type {
  padding-bottom: 8px;
}

.settings-group-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.settings-group-title > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--accent);
  background: rgba(0,113,227,0.08);
  font-size: 10px;
  font-weight: 800;
}

.settings-group-title div {
  display: flex;
  flex-direction: column;
}

.settings-group-title strong {
  font-size: 13px;
}

.settings-group-title small {
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 10px;
}

.settings-fields {
  display: grid;
  gap: 12px;
}

.settings-fields.two-columns {
  grid-template-columns: 1fr 1fr;
}

.settings-fields label {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.settings-fields label > span {
  margin: 0 0 6px 3px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 700;
}

.settings-fields .apple-input {
  margin-bottom: 0;
  padding: 12px 14px;
  border-radius: 13px;
  font-size: 13px;
}

.settings-fields .full-field {
  grid-column: 1 / -1;
}

.settings-textarea {
  min-height: 75px;
  resize: vertical;
}

.settings-textarea.title-copy {
  min-height: 95px;
  font-size: 16px;
  font-weight: 700;
}

.settings-message {
  margin-top: 22px;
  padding: 12px 15px;
  border-radius: 12px;
  color: #18783a;
  background: rgba(52,199,89,0.1);
  font-size: 12px;
  font-weight: 650;
}

.settings-message.error {
  color: #b42318;
  background: rgba(255,59,48,0.1);
}

@media (max-width: 760px) {
  .settings-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 17px;
  }

  .settings-save {
    width: 100%;
  }

  .settings-group {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .settings-fields.two-columns {
    grid-template-columns: 1fr;
  }

  .settings-fields .full-field {
    grid-column: auto;
  }
}

/* ========================================================
   Studio section navigation and compact comment layout · 2026-07-11
   ======================================================== */
.studio-page {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.studio-page > .studio-section-nav {
  grid-column: 1;
  grid-row: 1 / span 20;
}

.studio-page > .studio-header,
.studio-page > .account-settings-panel,
.studio-page > .site-settings-panel,
.studio-page > .invitation-panel,
.studio-page > .tag-admin-panel,
.studio-page > .studio-grid,
.studio-page > .manage-panel,
.studio-page > .bug-panel {
  grid-column: 2;
}

.studio-page > #studio-tags {
  grid-column: 2;
  grid-row: auto;
}

.studio-section-nav {
  position: sticky;
  top: 108px;
  z-index: 40;
  padding: 13px;
  border-radius: 23px;
}

.studio-nav-title {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 7px 18px;
  margin-bottom: 5px;
  border-bottom: 1px solid var(--border-color);
}

.studio-nav-title > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  color: #fff;
  background: #1d1d1f;
  font-size: 14px;
}

.studio-nav-title > div {
  display: flex;
  flex-direction: column;
}

.studio-nav-title strong {
  font-size: 12px;
}

.studio-nav-title small {
  color: var(--text-secondary);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.13em;
}

.studio-section-nav > button,
.studio-nav-channel {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 7px;
  width: 100%;
  padding: 10px 9px;
  border: 0;
  border-radius: 13px;
  color: var(--text-secondary);
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.studio-section-nav > button:hover,
.studio-nav-channel:hover {
  color: var(--text-primary);
  background: rgba(29,29,31,0.05);
  transform: translateX(2px);
}

.studio-section-nav > button.active {
  color: #fff;
  background: #1d1d1f;
  box-shadow: 0 8px 19px rgba(29,29,31,0.15);
}

.studio-section-nav > button > span:first-child,
.studio-nav-channel > span:first-child {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: rgba(29,29,31,0.05);
  font-size: 11px;
}

.studio-section-nav > button.active > span:first-child {
  background: rgba(255,255,255,0.13);
}

.studio-section-nav i,
.studio-nav-channel i {
  font-size: 9px;
  font-style: normal;
}

.studio-nav-channel {
  margin-top: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 12px 12px;
}

.studio-located-section {
  scroll-margin-top: 110px;
}

/* Reset the global site-header rules inherited by comment headers. */
.comment-body > header {
  position: static;
  top: auto;
  z-index: auto;
  justify-content: flex-start;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.comment-item {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  padding: 14px 0;
}

.comment-avatar {
  width: 34px;
  height: 34px;
}

.comment-body {
  position: relative;
  min-height: 36px;
  padding-right: 100px;
}

.comment-body > header strong {
  font-size: 13px;
}

.comment-body > header time {
  margin-left: 7px;
  font-size: 10px;
}

.comment-body > p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.65;
}

.comment-actions {
  position: absolute;
  top: 22px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.comment-item:hover > .comment-body > .comment-actions,
.comment-item:focus-within > .comment-body > .comment-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.comment-actions button {
  margin: 0;
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--text-secondary);
  background: rgba(29,29,31,0.055);
  font-size: 12px;
}

.comment-actions button:hover {
  color: var(--text-primary);
  background: rgba(29,29,31,0.09);
}

.comment-actions button.delete {
  color: #d93636;
  background: rgba(217,54,54,0.07);
}

.comment-replies {
  margin-top: 8px;
  padding-left: 10px;
}

@media (max-width: 1000px) {
  .studio-page {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-page > .studio-section-nav,
  .studio-page > .studio-header,
  .studio-page > .account-settings-panel,
  .studio-page > .site-settings-panel,
  .studio-page > .invitation-panel,
  .studio-page > .tag-admin-panel,
  .studio-page > .studio-grid,
  .studio-page > .manage-panel,
  .studio-page > .bug-panel {
    grid-column: 1;
    grid-row: auto;
  }

  .studio-section-nav {
    top: 92px;
    display: flex;
    align-items: center;
    gap: 5px;
    overflow-x: auto;
    padding: 9px;
    border-radius: 18px;
  }

  .studio-nav-title {
    display: none;
  }

  .studio-section-nav > button,
  .studio-nav-channel {
    flex: 0 0 auto;
    width: auto;
    grid-template-columns: 24px auto;
    padding: 7px 10px 7px 7px;
    white-space: nowrap;
  }

  .studio-section-nav i,
  .studio-nav-channel i {
    display: none;
  }

  .studio-nav-channel {
    margin: 0;
    padding-top: 7px;
    border: 0;
    border-radius: 13px;
  }
}

@media (max-width: 640px) {
  .comment-body {
    padding-right: 0;
  }

  .comment-actions {
    position: static;
    margin-top: 6px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .comment-actions button {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* Final mobile cascade overrides: keep these at the end of the stylesheet. */
@media (max-width: 760px) {
  html, body, #app { width: 100%; max-width: 100%; overflow-x: clip; }
  .container { width: calc(100% - 20px); max-width: 100%; }
  .studio-page { display: grid; width: 100%; max-width: 100%; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .studio-page > .studio-section-nav,
  .studio-page > .studio-header,
  .studio-page > .account-settings-panel,
  .studio-page > .site-settings-panel,
  .studio-page > .invitation-panel,
  .studio-page > .tag-admin-panel,
  .studio-page > .studio-grid,
  .studio-page > .manage-panel,
  .studio-page > .bug-panel { grid-column: 1; grid-row: auto; width: 100%; max-width: 100%; min-width: 0; }
  .studio-section-nav { max-width: calc(100vw - 20px); overflow-x: auto; }
  .studio-grid, .studio-side, .account-settings-grid, .settings-fields, .settings-fields.two-columns, .bug-submit-grid { grid-template-columns: minmax(0, 1fr); }
  .publish-form-container, .account-settings-panel, .site-settings-panel, .invitation-panel, .tag-admin-panel, .manage-panel, .bug-panel { padding: 18px 15px; }
  .note-toolbar { display: flex; overflow-x: auto; gap: 6px; padding: 8px; }
  .note-toolbar button { flex: 0 0 72px; min-width: 72px; min-height: 52px; flex-direction: column; gap: 3px; padding: 7px 8px; }
  .note-toolbar button span { font-size: 15px; }
  .note-toolbar button small { display: block; color: var(--text-primary); font-size: 11px; font-weight: 650; white-space: nowrap; }
  .rich-content-input, .note-editor .content-input { min-height: 320px; font-size: 16px; }
  .visibility-grid, .invitation-summary, .invitation-card { grid-template-columns: minmax(0, 1fr); }
  .tag-admin-list { grid-template-columns: minmax(0, 1fr); }
  .apple-input, .apple-textarea, input, textarea, select { font-size: 16px; }
}

@media (max-width: 390px) {
  .container { width: calc(100% - 12px); }
  .studio-section-nav { max-width: calc(100vw - 12px); }
  .logo-copy { display: none; }
}

/* ========================================================
   Admin user management and searchable sharing · Beta 0.11.2
   ======================================================== */
.studio-page > .admin-users-panel { grid-column: 2; }

.admin-users-panel {
  min-width: 0;
  padding: 26px;
  border-radius: var(--radius-lg);
}

.admin-users-heading p { margin-top: 5px; color: var(--text-secondary); font-size: 12px; }
.admin-user-overview { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.admin-user-overview article { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border: 1px solid rgba(255,255,255,.62); border-radius: 14px; background: rgba(255,255,255,.3); }
.admin-user-overview small { color: var(--text-secondary); font-size: 10px; font-weight: 650; }
.admin-user-overview strong { font-size: 20px; }
.admin-user-toolbar { display: grid; grid-template-columns: minmax(240px,1fr) auto; align-items: center; gap: 12px; margin-bottom: 14px; }
.admin-user-search, .share-user-search { position: relative; }
.admin-user-search > span, .share-user-search > span { position: absolute; z-index: 2; top: 50%; left: 14px; color: var(--text-secondary); transform: translateY(-50%); }
.admin-user-search .apple-input, .share-user-search .apple-input { margin: 0; padding-left: 40px; }
.admin-user-filters, .share-user-scopes { display: flex; align-items: center; gap: 5px; padding: 4px; border-radius: 12px; background: rgba(29,29,31,.045); }
.admin-user-filters button, .share-user-scopes button { min-height: 34px; padding: 7px 11px; border: 0; border-radius: 9px; color: var(--text-secondary); background: transparent; font-family: inherit; font-size: 10px; font-weight: 650; white-space: nowrap; cursor: pointer; }
.admin-user-filters button.active, .share-user-scopes button.active { color: #fff; background: #1d1d1f; }
.admin-user-list { display: grid; gap: 8px; }
.admin-user-card { overflow: hidden; border: 1px solid rgba(255,255,255,.65); border-radius: 15px; background: rgba(255,255,255,.32); }
.admin-user-card.banned { border-color: rgba(190,105,0,.16); background: rgba(255,247,230,.4); }
.admin-user-card.deleted { opacity: .72; }
.admin-user-main { display: grid; grid-template-columns: 42px minmax(170px,1.2fr) minmax(230px,1fr) auto; align-items: center; gap: 12px; padding: 11px 13px; }
.admin-user-avatar { display: grid; place-items: center; width: 42px; height: 42px; overflow: hidden; border-radius: 50%; color: #fff; background: #1d1d1f; }
.admin-user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.admin-user-avatar b { font-size: 14px; }
.admin-user-identity { min-width: 0; }
.admin-user-identity > div { display: flex; align-items: center; min-width: 0; gap: 6px; }
.admin-user-identity strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-identity small { display: block; overflow: hidden; margin-top: 2px; color: var(--text-secondary); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.admin-user-identity p { margin-top: 4px; color: #9b5c00; font-size: 9px; line-height: 1.45; }
.admin-user-identity i { padding: 3px 5px; border-radius: 6px; color: #5d6270; background: rgba(29,29,31,.05); font-size: 8px; font-style: normal; }
.admin-user-status { flex: 0 0 auto; padding: 3px 6px; border-radius: 7px; font-size: 8px; font-weight: 750; }
.admin-user-status.active { color: #237a48; background: rgba(35,122,72,.1); }
.admin-user-status.banned { color: #9b5c00; background: rgba(190,105,0,.11); }
.admin-user-status.deleted { color: #777; background: rgba(29,29,31,.07); }
.admin-user-metrics { display: flex; align-items: center; justify-content: flex-end; gap: 10px; color: var(--text-secondary); }
.admin-user-metrics span { display: flex; align-items: baseline; gap: 3px; font-size: 8px; white-space: nowrap; }
.admin-user-metrics b { color: var(--text-primary); font-size: 11px; }
.admin-user-metrics time { font-size: 8px; white-space: nowrap; }
.admin-user-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; max-width: 300px; gap: 3px; }
.admin-user-actions button { min-height: 32px; padding: 7px 8px; border: 0; border-radius: 8px; color: #555; background: rgba(29,29,31,.05); font-family: inherit; font-size: 9px; cursor: pointer; }
.admin-user-actions button.success { color: #237a48; background: rgba(35,122,72,.09); }
.admin-user-actions button.avatar-delete { color: #76561b; background: rgba(118,86,27,.08); }
.admin-user-actions button.warn { color: #9b5c00; background: rgba(190,105,0,.09); }
.admin-user-actions button.danger { color: #c43d38; background: rgba(196,61,56,.08); }
.admin-user-actions button:disabled { opacity: .45; cursor: wait; }
.admin-user-protected { justify-self: end; color: var(--text-secondary); font-size: 9px; }
.admin-user-inline-form { display: grid; grid-template-columns: minmax(150px,.65fr) minmax(220px,1.35fr) auto; align-items: end; gap: 10px; padding: 13px; border-top: 1px solid rgba(29,29,31,.07); background: rgba(255,255,255,.26); }
.admin-user-inline-form.ban-form { grid-template-columns: minmax(150px,.55fr) minmax(120px,.35fr) minmax(220px,1.1fr) auto; }
.admin-user-inline-form label { display: flex; min-width: 0; flex-direction: column; gap: 5px; }
.admin-user-inline-form label > span { color: var(--text-secondary); font-size: 9px; font-weight: 650; }
.admin-user-inline-form .apple-input { min-height: 40px; margin: 0; padding: 10px 12px; font-size: 12px; }
.admin-user-inline-form > div { display: flex; gap: 6px; }
.admin-user-inline-form .ghost-btn, .admin-user-inline-form .apple-btn { min-height: 40px; padding: 9px 14px; font-size: 11px; white-space: nowrap; }
.danger-fill { background: #a9322e; }

.share-people-picker { display: block; margin-top: -7px; padding: 16px; }
.share-picker-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.share-picker-heading > div { display: flex; min-width: 0; flex-direction: column; }
.share-picker-heading strong { font-size: 13px; }
.share-picker-heading small { color: var(--text-secondary); font-size: 9px; }
.share-picker-heading > button { padding: 6px 9px; border: 0; border-radius: 8px; color: var(--text-secondary); background: rgba(29,29,31,.05); font-family: inherit; font-size: 9px; cursor: pointer; }
.share-user-scopes { width: fit-content; margin: 9px 0; }
.selected-share-users { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 8px 0; padding: 9px; border-radius: 12px; background: rgba(0,113,227,.055); }
.selected-share-users > small { color: var(--accent); font-size: 9px; font-weight: 700; }
.selected-share-users button { padding: 6px 8px; border: 0; border-radius: 9px; color: #075fba; background: rgba(255,255,255,.62); font-family: inherit; font-size: 10px; cursor: pointer; }
.selected-share-users button span { margin-left: 3px; }
.share-people-picker > p { margin: 10px 0 0; color: var(--text-secondary); font-size: 11px; }
.share-user-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; max-height: 310px; overflow-y: auto; padding: 1px 4px 1px 1px; }
.share-user-results .person-chip { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; gap: 8px; min-width: 0; padding: 8px; border-radius: 12px; }
.share-user-results .mini-avatar { display: grid; place-items: center; width: 30px; height: 30px; overflow: hidden; color: #fff; background: #1d1d1f; }
.share-user-results .mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.share-user-results .mini-avatar b { font-size: 10px; }
.share-user-results .person-chip > span:nth-child(3) { display: flex; min-width: 0; flex-direction: column; }
.share-user-results .person-chip strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.share-user-results .person-chip small { overflow: hidden; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.share-user-results .person-chip > i { align-self: center; color: var(--text-secondary); font-size: 8px; font-style: normal; white-space: nowrap; }
.share-user-results .person-chip:has(input:checked) > i { color: rgba(255,255,255,.7); }
.share-user-results .person-chip:has(input:disabled) { opacity: .5; cursor: not-allowed; }

@media (max-width: 1000px) {
  .studio-page > .admin-users-panel { grid-column: 1; }
  .admin-user-main { grid-template-columns: 42px minmax(150px,1fr) auto; }
  .admin-user-metrics { display: none; }
}

@media (max-width: 760px) {
  .admin-users-panel { width: 100%; padding: 18px 15px; }
  .admin-users-heading { align-items: flex-start; gap: 10px; }
  .admin-user-overview { gap: 6px; }
  .admin-user-overview article { align-items: flex-start; flex-direction: column; padding: 11px; }
  .admin-user-overview strong { font-size: 17px; }
  .admin-user-toolbar { grid-template-columns: minmax(0,1fr); }
  .admin-user-filters { width: 100%; overflow-x: auto; }
  .admin-user-filters button { flex: 1 0 auto; min-height: 38px; font-size: 12px; }
  .admin-user-main { grid-template-columns: 38px minmax(0,1fr); gap: 9px; padding: 12px; }
  .admin-user-avatar { width: 38px; height: 38px; }
  .admin-user-actions { grid-column: 1 / -1; justify-content: stretch; width: 100%; max-width: none; padding-top: 3px; }
  .admin-user-actions button { flex: 1 1 auto; min-height: 38px; padding: 8px 6px; font-size: 11px; }
  .admin-user-protected { grid-column: 2; justify-self: start; }
  .admin-user-inline-form, .admin-user-inline-form.ban-form { grid-template-columns: minmax(0,1fr); }
  .admin-user-inline-form > div { justify-content: flex-end; }
  .share-user-scopes { width: 100%; overflow-x: auto; }
  .share-user-scopes button { flex: 1 0 auto; min-height: 38px; font-size: 11px; }
  .share-user-results { grid-template-columns: minmax(0,1fr); max-height: 360px; }
  .share-user-results .person-chip { min-height: 48px; }
}

@media (max-width: 390px) {
  .admin-user-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-user-actions button:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ========================================================
   Standalone article editor · Beta 0.10.0
   ======================================================== */
.studio-page > .editor-launch-panel {
  grid-column: 2;
}

.editor-launch-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border-radius: var(--radius-lg);
}

.editor-launch-panel h3 {
  margin: 4px 0 5px;
  font-size: 22px;
}

.editor-launch-panel p {
  color: var(--text-secondary);
  font-size: 13px;
}

.editor-launch-panel .apple-btn {
  flex: 0 0 auto;
  padding: 12px 22px;
  font-size: 14px;
  text-decoration: none;
}

.article-editor-page {
  display: block;
  width: 100%;
}

.article-editor-page > .editor-standalone-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
}

.article-editor-topbar {
  position: sticky;
  top: 96px;
  z-index: 70;
  display: grid;
  grid-template-columns: minmax(150px, auto) minmax(0, 1fr) minmax(150px, auto);
  align-items: center;
  gap: 18px;
  padding: 11px 14px;
  border-radius: 18px;
}

.article-editor-topbar > div {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
}

.article-editor-topbar strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.article-editor-topbar small {
  margin-top: 2px;
  color: #248a3d;
  font-size: 10px;
  font-weight: 650;
}

.article-editor-topbar small.dirty {
  color: #b25b00;
}

.article-editor-topbar .apple-btn {
  justify-self: end;
  min-width: 132px;
  padding: 11px 18px;
  font-size: 13px;
}

.editor-back-button {
  justify-self: start;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  color: var(--text-primary);
  background: rgba(29, 29, 31, 0.055);
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.editor-back-button:hover {
  background: rgba(29, 29, 31, 0.1);
  transform: translateX(-2px);
}

.editor-standalone-grid > .publish-form-container {
  width: 100%;
  margin: 0;
}

@media (max-width: 1000px) {
  .studio-page > .editor-launch-panel {
    grid-column: 1;
  }
}

@media (max-width: 640px) {
  .editor-launch-panel {
    align-items: flex-start;
    padding: 18px 15px;
  }

  .editor-launch-panel p {
    max-width: 210px;
  }

  .editor-launch-panel .apple-btn {
    padding: 10px 14px;
    white-space: nowrap;
  }

  .article-editor-topbar {
    top: 82px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
    border-radius: 16px;
  }

  .article-editor-topbar > div {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .article-editor-topbar .editor-back-button {
    grid-column: 1;
    grid-row: 2;
  }

  .article-editor-topbar .apple-btn {
    grid-column: 2;
    grid-row: 2;
    min-width: 112px;
    padding: 10px 15px;
  }

  .editor-standalone-grid > .publish-form-container {
    padding: 20px 15px;
    border-radius: 20px;
  }

  .editor-standalone-grid .panel-heading {
    margin-bottom: 20px;
  }
}

/* Final portrait override must stay last so rotation cannot reactivate legacy ≤768px rules. */
@media (orientation: portrait) and (max-width: 900px) {
  .container { width: calc(100% - 20px); max-width: 100%; }
  .site-header { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; margin-bottom: 22px; }
  .site-header .nav-links { display: flex; align-items: center; gap: 4px; margin: 0; }
  .site-header .nav-links a { margin: 0; }
  .studio-page { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; width: 100%; max-width: 100%; }
  .studio-page > * { max-width: 100%; min-width: 0; }
  .studio-page > .studio-section-nav, .studio-page > .studio-header, .studio-page > .account-settings-panel, .studio-page > .site-settings-panel, .studio-page > .invitation-panel, .studio-page > .tag-admin-panel, .studio-page > .studio-grid, .studio-page > .manage-panel, .studio-page > .bug-panel { grid-column: 1; grid-row: auto; width: 100%; }
  .studio-section-nav { position: sticky; top: 76px; display: flex; align-items: center; gap: 5px; width: 100%; max-width: calc(100vw - 20px); padding: 8px; overflow-x: auto; overflow-y: hidden; }
  .studio-nav-title { display: none; }
  .studio-section-nav > button, .studio-nav-channel { display: grid; flex: 0 0 auto; grid-template-columns: 24px auto; width: auto; min-height: 40px; padding: 7px 10px 7px 7px; margin: 0; white-space: nowrap; writing-mode: horizontal-tb; }
  .studio-section-nav i, .studio-nav-channel i { display: none; }
  .studio-header { display: flex; align-items: center; justify-content: space-between; flex-direction: row; flex-wrap: wrap; gap: 14px; width: 100%; padding: 18px; }
  .studio-identity { display: flex; align-items: center; min-width: 0; gap: 12px; }
  .studio-identity > div, .studio-name-row { min-width: 0; }
  .studio-identity h2, .studio-name-row, .avatar-hint, .studio-actions .ghost-btn { writing-mode: horizontal-tb; word-break: normal; }
  .studio-actions { display: flex; flex: 0 0 auto; width: auto; gap: 7px; }
  .studio-actions .ghost-btn { flex: 0 0 auto; width: auto; }
  .account-settings-panel, .site-settings-panel, .invitation-panel, .tag-admin-panel, .publish-form-container, .manage-panel, .bug-panel { width: 100%; max-width: 100%; min-width: 0; padding: 20px 18px; }
  .account-settings-grid, .settings-fields, .settings-fields.two-columns, .settings-group, .studio-grid, .studio-side, .bug-submit-grid { grid-template-columns: minmax(0,1fr); width: 100%; min-width: 0; }
  .account-settings-heading h3, .account-settings-heading p, .panel-heading h3, .panel-heading p { max-width: 100%; writing-mode: horizontal-tb; word-break: normal; overflow-wrap: anywhere; }
  .settings-fields .full-field { grid-column: auto; }
  .home-feed-layout { grid-template-columns: minmax(0,1fr); }
  .discovery-sidebar { position: static; grid-row: auto; max-height: none; padding-right: 0; overflow: visible; }
}

/* Beta 0.9.5 compact content-management table. */
.manage-table { gap: 6px; }
.manage-table-head, .manage-table .manage-item { display: grid; grid-template-columns: 28px minmax(170px,1.7fr) minmax(150px,1.15fr) minmax(84px,.65fr) 92px 150px; align-items: center; column-gap: 12px; }
.manage-table-head { padding: 0 13px 5px; color: var(--text-secondary); font-size: 9px; font-weight: 700; letter-spacing: .04em; }
.manage-actions-head { display: grid; grid-template-columns: repeat(3,1fr); text-align: center; }
.manage-actions-head i { font-style: normal; }
.manage-table .manage-item { min-height: 56px; padding: 8px 13px; border: 1px solid rgba(255,255,255,.6); border-radius: 13px; background: rgba(255,255,255,.32); transition: border-color .18s ease, background .18s ease, transform .18s ease; }
.manage-table .manage-item:hover { border-color: rgba(255,255,255,.9); background: rgba(255,255,255,.52); transform: translateY(-1px); }
.manage-table .manage-item.selected { border-color: rgba(0,113,227,.25); background: rgba(235,246,255,.58); }
.manage-table .manage-item.admin-restricted-post { box-shadow: inset 3px 0 0 rgba(126,93,190,.55); }
.manage-table .manage-item.admin-private-post { border-color: rgba(126,93,190,.2); background: linear-gradient(90deg,rgba(126,93,190,.07),rgba(255,255,255,.32) 28%); }
.manage-table .manage-item.admin-selected-post { border-color: rgba(181,112,22,.2); background: linear-gradient(90deg,rgba(181,112,22,.07),rgba(255,255,255,.32) 28%); box-shadow: inset 3px 0 0 rgba(181,112,22,.55); }
.manage-table .manage-selector { position: static; display: grid; align-self: center; place-items: center; width: 28px; height: 34px; padding: 0; }
.manage-title-cell { display: flex; align-items: center; min-width: 0; gap: 7px; }
.manage-title-cell > a { min-width: 0; overflow: hidden; color: var(--text-primary); font-size: 12px; font-weight: 720; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.manage-title-cell > a:hover { color: var(--accent); }
.manage-title-cell > small { flex: 0 0 auto; padding: 3px 5px; color: var(--accent); border-radius: 6px; background: rgba(0,113,227,.07); font-size: 8px; white-space: nowrap; }
.manage-title-cell > small.admin-privacy-badge { padding: 4px 7px; border: 1px solid transparent; border-radius: 8px; font-size: 8px; font-weight: 760; letter-spacing: 0; }
.manage-title-cell > small.admin-privacy-badge.private { color: #66439c; border-color: rgba(102,67,156,.14); background: rgba(126,93,190,.11); }
.manage-title-cell > small.admin-privacy-badge.selected { color: #955b0e; border-color: rgba(149,91,14,.14); background: rgba(181,112,22,.11); }
.manage-tag-cell { display: flex; align-items: center; min-width: 0; gap: 4px; overflow: hidden; }
.manage-tag-cell span, .manage-tag-cell i { flex: 0 0 auto; max-width: 86px; overflow: hidden; padding: 3px 6px; color: #5d6270; border-radius: 7px; background: rgba(29,29,31,.045); font-size: 8px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.manage-tag-cell .empty-tag { color: #a0a2a8; background: transparent; }
.manage-author-cell, .manage-date-cell { overflow: hidden; color: var(--text-secondary); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.manage-table .manage-actions { display: flex; justify-content: flex-end; gap: 2px; white-space: nowrap; }
.manage-table .manage-actions .action-btn { padding: 6px 7px; border-radius: 7px; font-size: 10px; text-decoration: none; }
.manage-table .manage-actions .view { color: var(--text-secondary); }
.manage-table .manage-actions .edit { color: var(--accent); }
.manage-table .manage-actions .delete { color: #d44742; }
.manage-table .manage-actions .action-btn:hover { background: rgba(29,29,31,.055); }

@media (max-width: 1100px) and (min-width: 761px) {
  .manage-table-head, .manage-table .manage-item { grid-template-columns: 26px minmax(140px,1.5fr) minmax(110px,1fr) 76px 86px 138px; column-gap: 8px; }
  .manage-title-cell > small:not(.admin-privacy-badge) { display: none; }
  .manage-title-cell > small.admin-privacy-badge { padding: 3px 5px; font-size: 7px; }
}

@media (max-width: 760px) {
  .manage-table-head { display: none; }
  .manage-table .manage-item { position: relative; display: grid; grid-template-columns: 26px minmax(0,1fr) auto; grid-template-rows: auto auto; gap: 6px 9px; min-height: 0; padding: 11px 10px; }
  .manage-table .manage-selector { position: static; grid-row: 1 / span 2; grid-column: 1; align-self: center; width: 26px; }
  .manage-title-cell { grid-row: 1; grid-column: 2 / -1; }
  .manage-tag-cell { grid-row: 2; grid-column: 2; }
  .manage-author-cell, .manage-date-cell { display: none; }
  .manage-table .manage-actions { grid-row: 2; grid-column: 3; width: auto; gap: 5px; }
  .manage-table .manage-actions .action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid rgba(29,29,31,.07);
    border-radius: 10px;
    background: rgba(255,255,255,.52);
    box-shadow: 0 3px 10px rgba(29,29,31,.035);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
  }
  .manage-table .manage-actions .view { color: #48484a; background: rgba(29,29,31,.055); }
  .manage-table .manage-actions .edit { color: #0068c9; background: rgba(0,113,227,.09); border-color: rgba(0,113,227,.1); }
  .manage-table .manage-actions .delete { color: #c52f2a; background: rgba(212,71,66,.09); border-color: rgba(212,71,66,.1); }
  .manage-table .manage-actions .action-btn:active { transform: scale(.96); }
}

/* Beta 0.9.0 global real-time announcement popup. */
.announcement-popup-layer { position: fixed; z-index: 10050; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding: max(84px,12vh) 18px 30px; overflow-y: auto; background: rgba(20,24,34,.28); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.announcement-popup-card { position: relative; width: min(580px,100%); padding: 30px 34px 22px; overflow: hidden; border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 28px 80px rgba(30,42,70,.2); outline: none; text-align: left; }
.announcement-popup-card h2 { margin: 0; padding-bottom: 14px; border-bottom: 1px solid rgba(29,29,31,.08); font-size: clamp(20px,3.5vw,25px); letter-spacing: -.025em; }
.announcement-popup-card > p { max-height: 48vh; margin: 18px 0 0; overflow-y: auto; color: #26262a; font-size: 17px; font-weight: 500; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.announcement-popup-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.announcement-popup-footer small { color: var(--text-secondary); font-size: 9px; }
.announcement-popup-footer button { padding: 6px 2px; color: var(--text-secondary); border: 0; background: transparent; font-family: inherit; font-size: 11px; cursor: pointer; }
.announcement-popup-footer button:hover { color: var(--text-primary); }
.announcement-popup-enter-active, .announcement-popup-leave-active { transition: opacity .22s ease; }
.announcement-popup-enter-active .announcement-popup-card, .announcement-popup-leave-active .announcement-popup-card { transition: transform .28s cubic-bezier(.16,1,.3,1), opacity .2s ease; }
.announcement-popup-enter-from, .announcement-popup-leave-to { opacity: 0; }
.announcement-popup-enter-from .announcement-popup-card { opacity: 0; transform: translateY(-18px) scale(.97); }
.announcement-popup-leave-to .announcement-popup-card { opacity: 0; transform: translateY(-10px) scale(.98); }

.popup-settings-editor { display: grid; gap: 12px; }
.popup-settings-editor > label { display: grid; gap: 6px; color: var(--text-secondary); font-size: 11px; }
.popup-settings-switches { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
.popup-content-input { min-height: 130px; resize: vertical; }
.popup-settings-editor > label > small { justify-self: end; font-size: 9px; }
.popup-settings-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.popup-settings-actions > span { max-width: 520px; color: var(--text-secondary); font-size: 9px; line-height: 1.6; }

@media (max-width: 640px) {
  .announcement-popup-layer { padding: 74px 10px 20px; }
  .announcement-popup-card { padding: 24px 20px 18px; border-radius: 21px; }
  .announcement-popup-card > p { max-height: 52vh; font-size: 16px; line-height: 1.8; }
  .popup-settings-switches { grid-template-columns: minmax(0,1fr); }
  .popup-settings-actions { align-items: stretch; flex-direction: column; }
  .popup-settings-actions .ghost-btn { width: 100%; }
}

/* Beta 0.8.1 account and security layout refinement. */
.studio-name-row { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.studio-name-row h2 { margin: 0; }
.account-id-chip { display: inline-flex; align-items: center; min-height: 22px; padding: 3px 8px; color: var(--text-secondary); border: 1px solid rgba(29,29,31,.07); border-radius: 999px; background: rgba(255,255,255,.4); font-size: 9px; font-weight: 700; letter-spacing: .06em; }

.account-settings-panel { margin-bottom: 22px; padding: clamp(24px,3vw,32px); border-radius: var(--radius-lg); background: rgba(255,255,255,.7); }
.account-settings-heading { align-items: flex-end; margin-bottom: 18px; }
.account-settings-heading p { max-width: 700px; margin-top: 5px; color: var(--text-secondary); font-size: 12px; }
.account-settings-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-items: stretch; gap: 14px; }
.account-form-card { height: 100%; min-height: 0; padding: 19px 20px; border: 1px solid rgba(255,255,255,.72); border-radius: 18px; background: rgba(255,255,255,.46); box-shadow: 0 10px 28px rgba(44,58,90,.045); }
.account-form-title { min-height: 43px; }
.account-form-title strong { font-size: 15px; }
.account-form-title small { line-height: 1.5; }
.account-form-card label > span { font-size: 11px; }
.account-form-card label small { min-height: 16px; font-size: 9px; }
.account-form-card .apple-input { min-height: 44px; }
.account-form-card .apple-btn { min-width: 112px; min-height: 42px; margin-top: auto; }

@media (max-width: 760px) {
  .studio-name-row { gap: 6px; }
  .account-id-chip { font-size: 8px; }
  .account-settings-panel { padding: 18px 15px; border-radius: 20px; }
  .account-settings-grid { grid-template-columns: minmax(0,1fr); }
  .account-form-card { padding: 17px 15px; }
  .account-form-title { min-height: 0; }
  .account-form-card .apple-btn { width: 100%; }
}

/* Inline reply composer: stays next to the selected comment. */
.inline-reply-composer {
  width: calc(100% + 100px);
  margin: 10px -100px 5px 0;
  padding: 11px;
  border-radius: 15px;
  background: rgba(255,255,255,0.54);
}

.inline-reply-heading,
.inline-reply-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inline-reply-heading {
  padding: 0 2px 8px;
  color: var(--text-secondary);
  font-size: 11px;
}

.inline-reply-heading strong {
  color: #246ba0;
}

.inline-reply-heading button {
  padding: 3px 7px;
  border: 0;
  border-radius: 7px;
  color: var(--text-secondary);
  background: rgba(29,29,31,0.055);
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}

.inline-reply-composer textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 10px 11px;
  border: 1px solid rgba(29,29,31,0.07);
  border-radius: 11px;
  outline: 0;
  color: var(--text-primary);
  background: rgba(255,255,255,0.48);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.6;
  resize: vertical;
}

.inline-reply-composer textarea:focus {
  border-color: rgba(0,113,227,0.28);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.06);
}

.inline-reply-footer {
  padding: 8px 1px 0;
}

.inline-reply-footer small {
  color: var(--text-secondary);
  font-size: 9px;
}

.inline-reply-footer .apple-btn {
  padding: 8px 13px;
  font-size: 10px;
}

@media (max-width: 640px) {
  .inline-reply-composer {
    width: 100%;
    margin-right: 0;
  }

  .inline-reply-footer small {
    max-width: 55%;
  }
}

/* Global article search · 2026-07-11 */
.global-search {
  position: relative;
  z-index: 12;
  width: 42px;
  height: 42px;
  transition: width 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

.global-search.open {
  width: min(330px, 36vw);
}

.global-search-form {
  position: absolute;
  right: 0;
  display: flex;
  align-items: center;
  width: 100%;
  height: 42px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  background: rgba(29, 29, 31, 0.045);
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.global-search.open .global-search-form {
  border-color: rgba(29, 29, 31, 0.08);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 28px rgba(29, 29, 31, 0.08);
}

.search-toggle,
.search-clear,
.search-submit,
.search-all {
  border: 0;
  font-family: inherit;
  cursor: pointer;
}

.search-toggle {
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #55555a;
  background: transparent;
}

.search-toggle svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.global-search-form input {
  min-width: 0;
  width: 100%;
  height: 100%;
  padding: 0 4px;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  background: transparent;
  font-family: inherit;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease;
}

.global-search.open input {
  opacity: 1;
  pointer-events: auto;
}

.global-search-form input::-webkit-search-cancel-button {
  display: none;
}

.search-clear {
  flex: 0 0 28px;
  height: 28px;
  border-radius: 9px;
  color: var(--text-secondary);
  background: transparent;
  font-size: 18px;
}

.search-clear:hover {
  color: var(--text-primary);
  background: rgba(29, 29, 31, 0.055);
}

.search-submit {
  flex: 0 0 auto;
  margin: 0 5px;
  padding: 7px 10px;
  border-radius: 9px;
  color: #fff;
  background: #1d1d1f;
  font-size: 11px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
}

.global-search.open .search-submit {
  opacity: 1;
  pointer-events: auto;
}

.search-submit:disabled {
  opacity: 0.38;
  cursor: default;
}

.search-suggestions {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(380px, 86vw);
  overflow: hidden;
  padding: 7px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 22px 60px rgba(29, 29, 31, 0.14);
}

.search-suggestions > a {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px;
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
}

.search-suggestions > a:hover {
  background: rgba(29, 29, 31, 0.055);
}

.suggestion-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: #1d1d1f;
  font-size: 12px;
}

.suggestion-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.search-suggestions > a > span:last-child {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.search-suggestions strong,
.search-suggestions small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-suggestions strong {
  font-size: 13px;
}

.search-suggestions small {
  margin-top: 2px;
  color: var(--text-secondary);
  font-size: 10px;
}

.search-suggestion-status {
  padding: 19px 14px;
  color: var(--text-secondary);
  text-align: center;
  font-size: 12px;
}

.search-all {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 11px;
  color: #0066cc;
  background: rgba(0, 102, 204, 0.07);
  font-size: 12px;
  font-weight: 700;
}

.search-page {
  width: 100%;
  max-width: none;
  margin: 0;
}

.search-page-heading {
  margin-bottom: 28px;
  padding: 20px 32px;
  border-radius: 24px;
  text-align: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.78), rgba(255,255,255,0.45));
}

.search-page-heading h1 {
  margin: 2px 0 5px;
  font-size: clamp(32px, 4vw, 38px);
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.search-page-heading p {
  color: var(--text-secondary);
  font-size: 12px;
}

.search-page-heading p strong {
  color: var(--text-primary);
}

.search-scopes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.search-scopes span {
  padding: 4px 9px;
  border: 1px solid rgba(29,29,31,0.06);
  border-radius: 999px;
  color: #5c5c61;
  background: rgba(255,255,255,0.52);
  font-size: 10px;
  font-weight: 650;
}

.search-results-heading {
  margin-bottom: 18px;
}

.search-results-heading h2 {
  font-size: 27px;
}

.search-page .story-list {
  grid-template-columns: 1fr;
}

@media (max-width: 760px) {
  .global-search,
  .global-search.open {
    width: 42px;
  }

  .global-search.open {
    position: static;
  }

  .global-search.open .global-search-form {
    left: 8px;
    right: 8px;
    z-index: 3;
    width: auto;
    background: rgba(255,255,255,0.96);
  }

  .global-search.open .search-suggestions {
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    width: auto;
  }

  .search-page-heading {
    margin-bottom: 22px;
    padding: 18px 14px;
    border-radius: 20px;
  }
}

/* Mobile-safe author alignment; must remain the last comment rule. */
.comment-item {
  align-items: start;
}

.comment-body {
  text-align: left;
}

.comment-body > header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  text-align: left;
}

.comment-body > header time {
  margin-left: auto;
}

@media (max-width: 640px) {
  .comment-item {
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 7px;
    padding: 12px 0;
  }

  .comment-avatar {
    width: 32px;
    height: 32px;
  }

  .comment-body > header strong {
    font-size: 13px;
  }

  .comment-body > header time {
    font-size: 9px;
  }

  .comment-body > p {
    margin-top: 3px;
    font-size: 14px;
  }

  .comment-replies {
    padding-left: 6px;
  }
}

/* ========================================================
   Community feed cards and forum-style flat replies · 2026-07-11
   ======================================================== */
.story-list .story-entry,
.story-list .story-entry--featured,
.story-entry.story-feed-entry {
  display: block;
  min-height: 0;
}

.story-preview-content {
  padding: 24px;
  background: transparent;
}

.post-card-author {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
  cursor: pointer;
}

.post-card-author .author-mini-avatar {
  width: 38px;
  height: 38px;
  font-size: 12px;
}

.post-card-author > span:nth-child(2) {
  display: flex;
  flex-direction: column;
}

.post-card-author strong {
  font-size: 13px;
}

.post-card-author small {
  color: var(--text-secondary);
  font-size: 9px;
}

.post-card-author > i {
  color: var(--text-secondary);
  font-size: 12px;
  font-style: normal;
  letter-spacing: 0.08em;
}

.story-preview-content .article-title,
.story-list .story-preview-content .article-title {
  display: -webkit-box;
  min-height: 2.56em;
  margin-bottom: 8px;
  overflow: hidden;
  font-size: clamp(22px, 3vw, 29px);
  line-height: 1.28;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.story-preview-content .article-summary {
  display: -webkit-box;
  min-height: 3.3em;
  margin-bottom: 17px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.story-preview-image {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.48);
  border-radius: 18px;
  color: rgba(29,29,31,0.34);
  background:
    linear-gradient(135deg, rgba(130,151,255,0.28), rgba(82,205,190,0.22)),
    rgba(255,255,255,0.2);
  background-position: center;
  background-size: cover;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.story-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 14px;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}

.post-tags > span {
  padding: 4px 8px;
  border-radius: 7px;
  color: #2672aa;
  background: rgba(38,114,170,0.09);
  font-size: 9px;
  font-weight: 700;
}

.story-preview-metrics {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 650;
}

.story-preview-metrics span:last-child {
  color: #e24962;
}

/* Compact community feed sizing · 2026-07-11 */
.home-feed-layout {
  grid-template-columns: minmax(0, 820px) 340px;
  justify-content: stretch;
  gap: 20px;
}

.story-preview-content {
  padding: 19px 20px 17px;
}

.post-card-author {
  margin-bottom: 12px;
}

.story-preview-content .article-title,
.story-list .story-preview-content .article-title {
  min-height: 0;
  margin-bottom: 5px;
  font-size: clamp(20px, 2.4vw, 25px);
}

.story-preview-content .article-summary {
  min-height: 0;
  margin-bottom: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.story-preview-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  justify-content: start;
  gap: 6px;
  width: 100%;
}

.story-preview-gallery.image-count-1,
.story-preview-gallery.image-count-0 {
  grid-template-columns: minmax(0, 320px);
}

.story-preview-gallery.image-count-2 {
  grid-template-columns: repeat(2, minmax(0, 280px));
}

.story-preview-gallery .story-preview-image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 15px;
}

.story-preview-image > span {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 6px;
  border-radius: 6px;
  color: #fff;
  background: rgba(29,29,31,0.58);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.story-preview-image > .image-count-badge {
  display: grid;
  z-index: 2;
  place-items: center;
  min-width: 28px;
  min-height: 24px;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,0.32);
  border-radius: 8px;
  background: rgba(20,20,22,0.72);
  box-shadow: 0 4px 14px rgba(0,0,0,0.16);
  font-size: 11px;
  letter-spacing: 0;
}

.story-preview-image.empty-cover b {
  color: rgba(29,29,31,0.3);
  font-size: 10px;
  letter-spacing: 0.14em;
}

.story-preview-footer {
  margin-top: 11px;
}

.story-preview-metrics {
  gap: 16px;
  font-size: 13px;
  font-weight: 750;
}

.story-preview-metrics > span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.story-preview-metrics b {
  font-size: 13px;
}

@media (max-width: 960px) {
  .home-feed-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .story-preview-content {
    padding: 16px;
  }

  .story-preview-metrics {
    gap: 11px;
    font-size: 12px;
  }

  .story-preview-metrics b {
    font-size: 12px;
  }

  .story-preview-gallery,
  .story-preview-gallery.image-count-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

.post-engagement {
  justify-content: flex-end;
}

.comment-replies {
  margin: 11px 0 0;
  padding: 7px 12px;
  border: 0;
  border-radius: 13px;
  background: rgba(29,29,31,0.035);
}

.comment-replies .comment-item,
.comment-replies .comment-item.is-reply {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  padding: 8px 0;
  border-bottom: 0;
}

.comment-replies .comment-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.comment-replies .comment-body {
  min-height: 28px;
}

.comment-replies .comment-body > p {
  margin-top: 2px;
  font-size: 13px;
}

.reply-to {
  margin-right: 3px;
  color: var(--text-secondary);
  font-size: 12px;
}

.reply-to b {
  color: #246ba0;
  font-weight: 700;
}

.more-replies {
  margin: 5px 0 4px 35px;
  padding: 4px 0;
  border: 0;
  color: #246ba0;
  background: transparent;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 640px) {
  .story-preview-content {
    padding: 18px;
  }

  .story-preview-image {
    border-radius: 14px;
  }

  .story-preview-footer {
    align-items: flex-end;
  }

  .post-tags {
    max-width: 65%;
  }

  .comment-replies {
    margin-left: 0;
    padding: 6px 9px;
  }
}

/* ========================================================
   User-controlled global glass transparency · 2026-07-11
   ======================================================== */
body .glass-panel:not(.hero-aside) {
  background: var(--surface, rgba(255, 255, 255, var(--glass-opacity))) !important;
  backdrop-filter: blur(28px) saturate(145%);
  -webkit-backdrop-filter: blur(28px) saturate(145%);
}

.story-entry .card-content {
  background: transparent;
}

.glass-control {
  padding: 19px;
  border-radius: var(--radius-lg);
}

.glass-control-heading {
  display: grid;
  grid-template-columns: 35px 1fr auto;
  align-items: center;
  gap: 10px;
}

.glass-control-heading > span {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 11px;
  color: #fff;
  background: linear-gradient(145deg, #6568d9, #2797b8);
}

.glass-control-heading > div {
  display: flex;
  flex-direction: column;
}

.glass-control-heading strong {
  font-size: 12px;
}

.glass-control-heading small {
  color: var(--text-secondary);
  font-size: 9px;
}

.glass-control-heading b {
  color: var(--accent);
  font-size: 11px;
}

.glass-control input[type="range"] {
  width: 100%;
  height: 4px;
  margin: 18px 0 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(101,104,217,0.75), rgba(39,151,184,0.55));
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.glass-control input[type="range"]::-webkit-slider-thumb {
  width: 17px;
  height: 17px;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  background: #1d1d1f;
  box-shadow: 0 3px 9px rgba(29,29,31,0.24);
  appearance: none;
  -webkit-appearance: none;
}

.glass-control input[type="range"]::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 3px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  background: #1d1d1f;
  box-shadow: 0 3px 9px rgba(29,29,31,0.24);
}

.glass-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.glass-presets button {
  padding: 7px 4px;
  border: 1px solid var(--border-color);
  border-radius: 9px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.26);
  font-family: inherit;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}

.glass-presets button:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.55);
}

/* ========================================================
   Signed-in account navigation · 2026-07-11
   ======================================================== */
.nav-links .user-nav,
.nav-links .user-nav.router-link-active {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 12px 5px 6px;
  color: var(--text-primary);
  background: rgba(29,29,31,0.055);
}

.nav-links .user-nav:hover {
  background: rgba(29,29,31,0.09);
  transform: translateY(-1px);
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.5);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #6568d9, #2797b8);
  box-shadow: 0 5px 13px rgba(69,108,184,0.2);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  overflow: hidden;
}

.user-avatar img,
.channel-avatar img,
.avatar img,
.author-mini-avatar img,
.comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  display: block;
  max-width: 130px;
  overflow: hidden;
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .nav-links > a.user-nav:nth-child(2) {
    display: flex;
    padding-right: 9px;
  }

  .user-avatar {
    width: 32px;
    height: 32px;
  }

  .user-name {
    max-width: 82px;
    font-size: 12px;
  }
}

/* ========================================================
   Social profiles, likes and threaded comments · 2026-07-11
   ======================================================== */
.author-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.author-mini-avatar {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  overflow: hidden;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #6568d9, #2797b8);
  font-size: 9px;
  text-transform: uppercase;
}

.card-engagement {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  margin-right: 18px;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 650;
}

.channel-avatar,
.avatar,
.comment-avatar {
  overflow: hidden;
}

.channel-social {
  display: flex;
  align-items: center;
  grid-column: 3;
  grid-row: 1;
  gap: 15px;
}

.channel-social > div {
  display: grid;
  grid-template-columns: auto auto;
  gap: 1px 7px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
}

.channel-social > div strong {
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 750;
  text-align: right;
}

.follow-btn {
  min-width: 92px;
  padding: 10px 15px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #1d1d1f;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.follow-btn.active {
  color: var(--text-primary);
  background: rgba(29,29,31,0.07);
}

.channel-hero .channel-count {
  grid-column: 2;
  grid-row: 2;
}

.avatar-upload {
  position: relative;
  cursor: pointer;
}

.avatar-upload > i {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 19px;
  height: 19px;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  color: #fff;
  background: #1d1d1f;
  font-size: 8px;
  font-style: normal;
}

.avatar-hint {
  display: block;
  margin-top: 3px;
  color: var(--text-secondary);
  font-size: 9px;
}

.detail-author .avatar {
  overflow: hidden;
}

.post-engagement {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: 56px;
  padding: 14px;
  border-radius: 22px;
}

.like-button,
.post-engagement > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 8px 15px;
  border: 0;
  border-radius: 15px;
  color: var(--text-primary);
  background: rgba(255,255,255,0.34);
  font-family: inherit;
}

.like-button {
  cursor: pointer;
}

.like-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.like-button > span {
  color: #ff375f;
  font-size: 22px;
  line-height: 1;
}

.like-button.active {
  color: #fff;
  background: #ff375f;
}

.like-button.active > span {
  color: #fff;
}

.like-button b,
.post-engagement > div strong {
  min-width: 24px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(29,29,31,0.07);
  font-size: 10px;
  text-align: center;
}

.like-button.active b {
  background: rgba(255,255,255,0.18);
}

.post-engagement > div small {
  color: var(--text-secondary);
  font-size: 10px;
}

.comments-section {
  margin-top: 68px;
  padding-top: 42px;
  border-top: 1px solid var(--border-color);
}

.comments-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
}

.comments-heading h2 {
  margin-top: 4px;
  font-size: 29px;
  letter-spacing: -0.04em;
}

.comments-heading > span {
  color: var(--text-secondary);
  font-size: 11px;
}

.comment-composer {
  padding: 17px;
  border-radius: 22px;
}

.comment-composer textarea {
  width: 100%;
  min-height: 105px;
  padding: 12px;
  border: 0;
  outline: 0;
  color: var(--text-primary);
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.7;
  resize: vertical;
}

.comment-composer > div:last-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 3px 0;
  border-top: 1px solid var(--border-color);
}

.comment-composer small {
  color: var(--text-secondary);
  font-size: 9px;
}

.comment-composer .apple-btn {
  padding: 10px 17px;
  font-size: 11px;
}

.reply-target {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  padding: 8px 11px;
  border-radius: 11px;
  color: var(--accent);
  background: rgba(0,113,227,0.07);
  font-size: 10px;
}

.reply-target button {
  border: 0;
  color: var(--text-secondary);
  background: transparent;
  cursor: pointer;
}

.comment-login,
.no-comments {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-radius: 18px;
  color: var(--text-secondary);
  font-size: 11px;
}

.comment-login a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.no-comments {
  justify-content: center;
  margin-top: 15px;
  padding: 35px 20px;
}

.comments-list {
  margin-top: 24px;
}

.comment-item {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 11px;
  padding: 17px 0;
  border-bottom: 1px solid var(--border-color);
}

.comment-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #6568d9, #2797b8);
  font-size: 12px;
  font-weight: 800;
}

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

.comment-body > header {
  display: flex;
  align-items: center;
  gap: 9px;
}

.comment-body > header strong {
  font-size: 12px;
}

.comment-body > header time {
  color: var(--text-secondary);
  font-size: 9px;
}

.comment-body > p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-item.deleted > .comment-body > p {
  color: var(--text-secondary);
  font-style: italic;
}

.comment-actions {
  margin-top: 7px;
}

.comment-actions button {
  margin-right: 12px;
  padding: 0;
  border: 0;
  color: var(--text-secondary);
  background: transparent;
  font-family: inherit;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.comment-actions button.delete {
  color: #d93636;
}

.comment-replies {
  margin-top: 10px;
  padding-left: 13px;
  border-left: 2px solid rgba(0,113,227,0.12);
}

.comment-replies .comment-item:last-child {
  border-bottom: 0;
}

.interaction-error {
  margin-top: 14px;
  padding: 10px 13px;
  border-radius: 11px;
  color: #b42318;
  background: rgba(255,59,48,0.09);
  font-size: 11px;
}

@media (max-width: 760px) {
  .card-engagement {
    display: none;
  }

  .channel-social {
    grid-column: 1 / -1;
    grid-row: auto;
    justify-content: space-between;
  }

  .channel-hero .channel-count {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .post-engagement {
    align-items: stretch;
    flex-direction: column;
  }

  .like-button,
  .post-engagement > div {
    justify-content: center;
  }

  .comments-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .comment-replies {
    padding-left: 7px;
  }
}

@media (max-width: 640px) {
  .nav-links > a:nth-child(2) {
    display: block;
  }

  .feed-heading {
    min-height: 0;
  }

  .feed-heading h1 {
    font-size: 43px;
  }

  .filter-panel {
    grid-template-columns: 1fr;
    padding: 21px 14px 14px;
  }

  .filter-item {
    grid-template-columns: 35px 1fr auto;
  }

  .filter-icon {
    width: 35px;
    height: 35px;
  }

  .story-list .story-entry,
  .story-list .story-entry--featured {
    display: flex;
    min-height: 0;
  }

  .story-list .card-cover,
  .story-list .story-entry--featured .card-cover {
    height: 205px;
    min-height: 205px;
    border-right: 0;
    border-bottom: 1px solid rgba(255,255,255,0.35);
  }
}

/* Announcement and Bug feedback modules · 2026-07-12 */
.announcement-panel {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border-radius: var(--radius-lg);
}

.announcement-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(145deg, #ff9f43, #ff6b6b);
  box-shadow: 0 9px 20px rgba(255,107,107,0.18);
}

.announcement-panel > div {
  min-width: 0;
}

.announcement-panel strong {
  display: block;
  margin: 2px 0 5px;
  font-size: 13px;
}

.announcement-panel p {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}

.announcement-switch {
  display: grid !important;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  background: rgba(255,255,255,0.32);
}

.announcement-switch > span {
  grid-column: 1 / -1;
}

.announcement-switch input {
  width: 18px;
  height: 18px;
  accent-color: #1d1d1f;
}

.announcement-switch b {
  color: var(--text-secondary);
  font-size: 11px;
}

.sidebar-order-editor {
  display: grid;
  gap: 8px;
}

.sidebar-order-editor article {
  display: grid;
  grid-template-columns: 24px 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid var(--border-color);
  border-radius: 15px;
  background: rgba(255,255,255,0.34);
  cursor: grab;
  transition: opacity 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.sidebar-order-editor article:hover {
  border-color: rgba(0,113,227,0.22);
  transform: translateY(-1px);
}

.sidebar-order-editor article.dragging {
  opacity: 0.45;
  cursor: grabbing;
}

.sidebar-drag-handle {
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
}

.sidebar-order-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(145deg, #6568d9, #2797b8);
  font-size: 12px;
}

.sidebar-order-editor article > div:nth-child(3) {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.sidebar-order-editor article strong {
  font-size: 11px;
}

.sidebar-order-editor article small {
  color: var(--text-secondary);
  font-size: 9px;
}

.sidebar-order-actions {
  display: flex;
  gap: 4px;
}

.sidebar-order-actions button {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 8px;
  color: var(--text-primary);
  background: rgba(29,29,31,0.055);
  font-family: inherit;
  cursor: pointer;
}

.sidebar-order-actions button:disabled {
  opacity: 0.3;
  cursor: default;
}

.bug-panel {
  margin-top: 22px;
  padding: clamp(24px, 4vw, 38px);
  border-radius: var(--radius-lg);
}

.bug-panel-heading {
  align-items: flex-start;
}

.bug-panel-heading h3 {
  margin-top: 4px;
  font-size: 25px;
}

.bug-panel-heading p {
  max-width: 620px;
  margin-top: 5px;
  color: var(--text-secondary);
  font-size: 11px;
}

.bug-submit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: start;
  gap: 18px;
}

.bug-form .field-label:not(:first-child) {
  margin-top: 16px;
}

.bug-description-input {
  min-height: 150px;
  resize: vertical;
}

.bug-screenshot-picker {
  display: grid;
  place-items: center;
  min-height: 130px;
  overflow: hidden;
  border: 1px dashed rgba(29,29,31,0.16);
  border-radius: 17px;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.25);
  font-size: 11px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.bug-screenshot-picker:hover {
  border-color: rgba(0,113,227,0.35);
  background: rgba(255,255,255,0.42);
}

.bug-screenshot-picker img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
}

.bug-file-actions,
.bug-submit-actions,
.bug-list-heading,
.bug-report-top,
.bug-admin-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.bug-file-actions {
  margin-top: 7px;
  color: var(--text-secondary);
  font-size: 10px;
}

.bug-file-actions span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bug-file-actions button {
  flex: 0 0 auto;
  border: 0;
  color: #c53535;
  background: transparent;
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}

.bug-submit-actions {
  margin-top: 16px;
}

.bug-submit-actions small {
  color: var(--text-secondary);
  font-size: 9px;
}

.bug-guide {
  padding: 20px;
  border-radius: 20px;
}

.bug-guide > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: 12px;
  color: #fff;
  background: #1d1d1f;
}

.bug-guide strong {
  font-size: 12px;
}

.bug-guide ol {
  margin: 12px 0 0 17px;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 2;
}

.bug-list-heading {
  margin: 30px 0 12px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.bug-list-heading h4 {
  font-size: 17px;
}

.bug-list-heading span {
  color: var(--text-secondary);
  font-size: 10px;
}

.bug-report-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.bug-report-card {
  min-width: 0;
  padding: 18px;
  border-radius: 19px;
  box-shadow: none;
}

.bug-report-top time,
.bug-report-card > small {
  color: var(--text-secondary);
  font-size: 9px;
}

.bug-status {
  padding: 5px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 750;
}

.bug-status.pending {
  color: #a15c00;
  background: rgba(255,159,67,0.13);
}

.bug-status.completed {
  color: #23824c;
  background: rgba(35,130,76,0.11);
}

.bug-report-card h4 {
  margin: 13px 0 7px;
  font-size: 16px;
  line-height: 1.35;
}

.bug-report-card > p {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.75;
  white-space: pre-wrap;
  word-break: break-word;
}

.bug-image-link {
  position: relative;
  display: block;
  width: 100%;
  max-width: 340px;
  margin-top: 13px;
  overflow: hidden;
  border: 0;
  border-radius: 13px;
  background: rgba(29,29,31,0.04);
  cursor: zoom-in;
}

.bug-image-link img {
  display: block;
  width: 100%;
  max-height: 190px;
  object-fit: cover;
}

.bug-image-link span {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 5px 7px;
  border-radius: 7px;
  color: #fff;
  background: rgba(20,20,22,0.68);
  font-size: 9px;
}

.bug-reporter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.bug-reporter .mini-avatar {
  width: 30px;
  height: 30px;
  overflow: hidden;
}

.bug-reporter .mini-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bug-reporter > span:last-child {
  display: flex;
  flex-direction: column;
}

.bug-reporter strong { font-size: 11px; }
.bug-reporter small { color: var(--text-secondary); font-size: 9px; }

.bug-admin-toolbar {
  display: flex;
  gap: 7px;
  margin-bottom: 18px;
}

.bug-admin-toolbar button {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 11px;
  border: 0;
  border-radius: 11px;
  color: var(--text-secondary);
  background: rgba(29,29,31,0.045);
  font-family: inherit;
  font-size: 10px;
  cursor: pointer;
}

.bug-admin-toolbar button.active {
  color: #fff;
  background: #1d1d1f;
}

.bug-admin-toolbar b {
  min-width: 19px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255,255,255,0.14);
  font-size: 9px;
}

.bug-admin-actions {
  justify-content: flex-end;
  margin-top: 15px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

.bug-admin-actions .action-btn {
  margin: 0;
}

@media (max-width: 760px) {
  .bug-submit-grid,
  .bug-report-list {
    grid-template-columns: 1fr;
  }

  .bug-panel {
    padding: 20px 15px;
  }

  .bug-panel-heading {
    flex-direction: column;
    gap: 12px;
  }
}

/* Final comment layout overrides: keep after all legacy rules. */
.comment-body > header {
  display: flex;
  flex-direction: row;
  align-items: center;
  position: static;
  top: auto;
  z-index: auto;
  justify-content: flex-start;
  min-height: 0;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  width: 100%;
  text-align: left;
}

.comment-item {
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  padding: 14px 0;
}

.comment-avatar {
  width: 34px;
  height: 34px;
}

.comment-body {
  position: relative;
  min-width: 0;
  min-height: 36px;
  padding-right: 100px;
  text-align: left;
}

.comment-body > header strong {
  font-size: 13px;
}

.comment-body > header time {
  margin-left: 7px;
  font-size: 10px;
}

.comment-body > p {
  margin: 4px 0 0;
  font-size: 14px;
  line-height: 1.65;
}

.comment-actions {
  position: absolute;
  top: 22px;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.comment-item:hover > .comment-body > .comment-actions,
.comment-item:focus-within > .comment-body > .comment-actions {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.comment-actions button {
  margin: 0;
  padding: 5px 9px;
  border-radius: 8px;
  color: var(--text-secondary);
  background: rgba(29,29,31,0.055);
  font-size: 12px;
}

.comment-actions button:hover {
  color: var(--text-primary);
  background: rgba(29,29,31,0.09);
}

.comment-actions button.delete {
  color: #d93636;
  background: rgba(217,54,54,0.07);
}

.comment-replies {
  margin-top: 8px;
  padding-left: 10px;
}

.comment-replies .comment-item,
.comment-replies .comment-item.is-reply {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  padding: 8px 0;
  border-bottom: 0;
}

.comment-replies .comment-avatar {
  width: 28px;
  height: 28px;
  font-size: 10px;
}

.comment-replies .comment-body {
  min-height: 28px;
}

.comment-replies .comment-body > p {
  margin-top: 2px;
  font-size: 13px;
}

@media (max-width: 640px) {
  .comment-body {
    padding-right: 0;
  }

  .comment-actions {
    position: static;
    margin-top: 6px;
    opacity: 1;
    pointer-events: auto;
    transform: none;
  }

  .comment-actions button {
    padding: 5px 8px;
    font-size: 11px;
  }
}

/* Orientation correction is placed after all legacy rules. */
@media (orientation: portrait) and (min-width: 641px) and (max-width: 900px) {
  .container { width: calc(100% - 20px); max-width: 100%; }
  .site-header { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 8px 10px; margin-bottom: 22px; }
  .site-header .nav-links { display: flex; align-items: center; gap: 4px; margin: 0; }
  .studio-page { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; width: 100%; max-width: 100%; }
  .studio-page > * { max-width: 100%; min-width: 0; }
  .studio-page > .studio-section-nav, .studio-page > .studio-header, .studio-page > .account-settings-panel, .studio-page > .site-settings-panel, .studio-page > .invitation-panel, .studio-page > .tag-admin-panel, .studio-page > .studio-grid, .studio-page > .manage-panel, .studio-page > .bug-panel { grid-column: 1; grid-row: auto; width: 100%; }
  .studio-section-nav { position: sticky; top: 76px; display: flex; align-items: center; gap: 5px; width: 100%; max-width: calc(100vw - 20px); padding: 8px; overflow-x: auto; overflow-y: hidden; }
  .studio-nav-title { display: none; }
  .studio-section-nav > button, .studio-nav-channel { display: grid; flex: 0 0 auto; grid-template-columns: 24px auto; width: auto; min-height: 40px; padding: 7px 10px 7px 7px; margin: 0; white-space: nowrap; writing-mode: horizontal-tb; }
  .studio-section-nav i, .studio-nav-channel i { display: none; }
  .studio-header { display: flex; align-items: center; justify-content: space-between; flex-direction: row; flex-wrap: wrap; gap: 14px; width: 100%; padding: 18px; }
  .studio-identity { display: flex; align-items: center; min-width: 0; gap: 12px; }
  .studio-identity > div, .studio-name-row { min-width: 0; }
  .studio-identity h2, .studio-name-row, .avatar-hint, .studio-actions .ghost-btn { writing-mode: horizontal-tb; word-break: normal; }
  .studio-actions { display: flex; flex: 0 0 auto; width: auto; gap: 7px; }
  .studio-actions .ghost-btn { flex: 0 0 auto; width: auto; }
  .account-settings-panel, .site-settings-panel, .invitation-panel, .tag-admin-panel, .publish-form-container, .manage-panel, .bug-panel { width: 100%; max-width: 100%; min-width: 0; padding: 20px 18px; }
  .account-settings-grid, .settings-fields, .settings-fields.two-columns, .settings-group, .studio-grid, .studio-side, .bug-submit-grid { grid-template-columns: minmax(0,1fr); width: 100%; min-width: 0; }
  .account-settings-heading h3, .account-settings-heading p, .panel-heading h3, .panel-heading p { max-width: 100%; writing-mode: horizontal-tb; word-break: normal; overflow-wrap: anywhere; }
  .settings-fields .full-field { grid-column: auto; }
  .home-feed-layout { grid-template-columns: minmax(0,1fr); }
  .discovery-sidebar { position: static; grid-row: auto; max-height: none; padding-right: 0; overflow: visible; }
}

/* Absolute final mobile corrections. */
@media (max-width: 760px) {
  html, body, #app { width: 100%; max-width: 100%; overflow-x: clip; }
  .container { width: calc(100% - 20px); max-width: 100%; }
  .studio-page { width: 100%; max-width: 100%; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .studio-page > * { max-width: 100%; min-width: 0; }
  .studio-page > .studio-section-nav, .studio-page > .studio-header, .studio-page > .account-settings-panel, .studio-page > .site-settings-panel, .studio-page > .invitation-panel, .studio-page > .tag-admin-panel, .studio-page > .studio-grid, .studio-page > .manage-panel, .studio-page > .bug-panel { grid-column: 1; grid-row: auto; width: 100%; }
  .studio-section-nav { max-width: calc(100vw - 20px); overflow-x: auto; }
  .studio-grid, .studio-side, .account-settings-grid, .settings-fields, .settings-fields.two-columns, .bug-submit-grid { grid-template-columns: minmax(0, 1fr); }
  .publish-form-container, .account-settings-panel, .site-settings-panel, .invitation-panel, .tag-admin-panel, .manage-panel, .bug-panel { padding: 18px 15px; }
  .note-toolbar { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
  .note-toolbar button { display: inline-flex; flex: 0 0 72px; min-width: 72px; min-height: 52px; flex-direction: column; gap: 3px; padding: 7px 8px; }
  .note-toolbar button span { font-size: 15px; }
  .note-toolbar button small { display: block; color: var(--text-primary); font-size: 11px; font-weight: 650; white-space: nowrap; }
  .rich-content-input, .note-editor .content-input { min-height: 320px; padding: 16px; font-size: 16px; }
  .visibility-grid, .invitation-summary, .invitation-card, .tag-admin-list { grid-template-columns: minmax(0, 1fr); }
  .apple-input, .apple-textarea, input, textarea, select { font-size: 16px; }
}

@media (max-width: 390px) {
  .container { width: calc(100% - 12px); }
  .studio-section-nav { max-width: calc(100vw - 12px); }
  .logo-copy { display: none; }
}
