:root {
  --brand: #364f91;
  --brand-strong: #293d73;
  --brand-soft: #eef1f9;
  --accent: #d20011;
  --accent-soft: #fff0f1;
  --ink: #182033;
  --muted: #6f7890;
  --line: #e8ebf2;
  --surface: #ffffff;
  --surface-soft: #f6f8fb;
  --danger: #ef476f;
  --success: #15a66b;
  --warning: #e99a2f;
  --shadow: 0 16px 42px rgba(19, 29, 55, .08);
  --shadow-hover: 0 20px 50px rgba(19, 29, 55, .14);
  --radius: 14px;
  --content: 1240px;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden], .hidden { display: none !important; }

.container { width: min(var(--content), calc(100% - 40px)); margin: 0 auto; }
.muted { color: var(--muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.stack { display: grid; gap: 16px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-wrap { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.spread { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 66px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(224,228,238,.9);
  backdrop-filter: blur(18px);
}
.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr) auto;
  align-items: center;
  gap: 28px;
}
.brand { display: flex; align-items: center; gap: 12px; min-width: max-content; }
.brand-logo {
  width: 112px;
  height: 35px;
  object-fit: contain;
  object-position: left center;
  flex: 0 0 auto;
}
.brand-on-dark .brand-logo {
  width: 132px;
  height: 44px;
  padding: 7px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 12px 30px rgba(0,0,0,.16);
}
.brand-copy b { display: block; font-size: 16px; line-height: 1.1; }
.brand-copy small { display: block; color: var(--muted); margin-top: 3px; font-size: 11px; }
.header-nav { display: flex; align-items: center; gap: 22px; }
.header-nav a { color: #4d566c; font-size: 14px; font-weight: 650; white-space: nowrap; }
.header-nav a:hover, .header-nav a.active { color: var(--brand); }
.header-search {
  min-width: 220px;
  max-width: 480px;
  width: 100%;
  justify-self: center;
  display: flex;
  background: #f3f6fa;
  border: 1px solid transparent;
  border-radius: 10px;
  overflow: hidden;
}
.header-search:focus-within { background: white; border-color: #aeb9d7; box-shadow: 0 0 0 4px rgba(54,79,145,.10); }
.header-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; padding: 10px 13px; }
.header-search button { border: 0; background: transparent; padding: 0 14px; color: var(--muted); }
.header-actions { display: flex; align-items: center; gap: 10px; justify-self: end; }
.avatar-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-weight: 800;
}
.avatar-button img { width: 100%; height: 100%; object-fit: cover; }
.mobile-nav-toggle { display: none; border: 0; background: transparent; font-size: 20px; }

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: var(--brand); box-shadow: 0 9px 20px rgba(54,79,145,.22); }
.btn-primary:hover { background: var(--brand-strong); }
.btn-secondary { color: var(--brand); background: var(--brand-soft); }
.btn-ghost { color: #4a5369; background: white; border-color: var(--line); }
.btn-danger { color: white; background: var(--danger); }
.btn-small { padding: 7px 11px; border-radius: 8px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.page-main { padding: 28px 0 68px; }
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 8px 26px rgba(20,36,70,.045);
}
.panel-pad { padding: 24px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 34px 0 18px; }
.section-head h2 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.section-head p { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.section-kicker { color: var(--accent); font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .12em; }
.section-inline h2 { margin: 4px 0 0; }
.section-inline p { margin: 7px 0 20px; color: var(--muted); }
.section-link { color: var(--brand); font-weight: 700; font-size: 14px; }

.hero-shell { margin-top: 22px; display: grid; grid-template-columns: 1.58fr 1fr; gap: 16px; }
.hero-banner {
  border-top: 3px solid var(--accent);
  min-height: 335px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  color: white;
  background:
    radial-gradient(circle at 88% 5%, rgba(92,118,196,.46), transparent 31%),
    linear-gradient(135deg, #11182c, #263a70 64%, #364f91);
  box-shadow: var(--shadow);
}
.hero-grid-art {
  position: absolute;
  inset: 0;
  opacity: .23;
  background-image: linear-gradient(rgba(255,255,255,.24) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.24) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to left, black, transparent 70%);
}
.hero-code-window {
  position: absolute;
  width: 42%;
  right: 5%;
  top: 14%;
  padding: 17px;
  border-radius: 14px;
  background: rgba(7,12,26,.72);
  border: 1px solid rgba(255,255,255,.24);
  box-shadow: 0 22px 50px rgba(0,0,0,.24);
  transform: rotate(1deg);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 2;
}
.hero-code-window span { display: block; color: rgba(255,255,255,.48); white-space: nowrap; }
.hero-code-window span:nth-child(1) { color: #8fb4ff; }
.hero-code-window span:nth-child(2) { color: #fff; padding-left: 18px; }
.hero-code-window span:nth-child(3) { color: #ff8d96; padding-left: 36px; }
.hero-copy { position: relative; z-index: 2; width: 60%; padding: 42px 38px; }
.hero-eyebrow { display: inline-flex; padding: 7px 10px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.2); border-radius: 6px; font-family: var(--mono); font-size: 11px; font-weight: 750; letter-spacing: .08em; }
.hero-copy h1 { margin: 18px 0 12px; font-size: clamp(30px, 4vw, 48px); line-height: 1.12; letter-spacing: -.04em; }
.hero-copy p { margin: 0 0 24px; color: rgba(255,255,255,.84); line-height: 1.8; font-size: 15px; }
.hero-copy .btn-ghost { background: rgba(255,255,255,.13); color: white; border-color: rgba(255,255,255,.28); }
.hero-side { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hero-mini {
  min-height: 159px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  color: var(--ink);
  background: white;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-mini:hover { transform: translateY(-2px); border-color: #c6cee1; }
.hero-mini:nth-child(4) { border-bottom: 3px solid var(--accent); }
.hero-mini::after { content: "</>"; position: absolute; right: 12px; bottom: -8px; color: var(--brand); font-size: 62px; font-weight: 900; opacity: .06; }
.hero-mini b { display: block; font-size: 18px; margin: 10px 0 8px; }
.hero-mini p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.hero-mini small { color: var(--brand); font-family: var(--mono); font-weight: 800; letter-spacing: .05em; }

.channel-bar { margin-top: 22px; display: grid; grid-template-columns: repeat(8, minmax(0,1fr)); gap: 10px; }
.channel {
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: #4e5870;
  font-size: 13px;
  font-weight: 700;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.channel:hover, .channel.active { transform: translateY(-2px); border-color: #bec7df; box-shadow: 0 10px 24px rgba(54,79,145,.1); color: var(--brand); }
.channel-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: var(--brand-soft); color: var(--brand); }

.filter-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.filter-row select, .filter-row input { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: white; color: var(--ink); outline: 0; }
.filter-row select:focus, .filter-row input:focus { border-color: #aeb9d7; box-shadow: 0 0 0 4px rgba(54,79,145,.08); }

.project-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 22px 18px; }
.project-card { min-width: 0; }
.project-cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 13px;
  background: linear-gradient(135deg, #dbe8ff, #edf5ff);
  box-shadow: 0 7px 18px rgba(20,36,70,.08);
}
.project-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.project-card:hover .project-cover img { transform: scale(1.04); }
.project-cover-fallback { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(255,255,255,.94); font-weight: 900; font-size: 24px; background: linear-gradient(135deg, #364f91, #d20011); }
.project-cover-fallback[data-category="小游戏"] { background: linear-gradient(135deg, #ff8b58, #f6bf46); }
.project-cover-fallback[data-category="学习工具"] { background: linear-gradient(135deg, #1aa578, #4ecb9d); }
.project-cover-fallback[data-category="人工智能"] { background: linear-gradient(135deg, #7759d6, #c26ee1); }
.cover-badges { position: absolute; left: 9px; top: 9px; display: flex; gap: 6px; }
.cover-badge { padding: 5px 8px; border-radius: 7px; background: rgba(12,18,34,.72); color: white; font-size: 11px; font-weight: 750; backdrop-filter: blur(8px); }
.cover-badge.featured { background: rgba(210,0,17,.92); }
.cover-stats { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 28px 10px 8px; color: white; font-size: 12px; background: linear-gradient(transparent, rgba(8,13,24,.72)); }
.project-title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin: 10px 0 6px; line-height: 1.45; font-size: 15px; font-weight: 760; min-height: 43px; }
.project-title:hover { color: var(--brand); }
.project-summary { margin: 0; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.project-author { margin-top: 9px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #81899b; font-size: 12px; }
.author-inline { display: flex; align-items: center; gap: 7px; min-width: 0; }
.mini-avatar { width: 22px; height: 22px; flex: 0 0 auto; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); overflow: hidden; font-size: 11px; font-weight: 800; }
.mini-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-inline span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty-state { padding: 58px 24px; text-align: center; border: 1px dashed #ccd3e1; border-radius: 16px; color: var(--muted); background: white; }
.empty-state b { display: block; color: var(--ink); font-size: 20px; margin-bottom: 8px; }

.form-shell { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; align-items: start; }
.form-card { min-width: 0; background: white; border: 1px solid var(--line); border-radius: 18px; padding: 26px; }
.form-card h1, .form-card h2 { margin-top: 0; }
.form-section + .form-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.form-section-title { margin: 0 0 17px; font-size: 18px; }
.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-weight: 720; font-size: 14px; }
.field small { color: var(--muted); line-height: 1.5; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid #dfe4ed;
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  padding: 12px 13px;
  outline: 0;
}
.field textarea { min-height: 140px; resize: vertical; line-height: 1.7; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: #aeb9d7; box-shadow: 0 0 0 4px rgba(54,79,145,.09); }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.check-row input { margin-top: 3px; }
.cover-upload { border: 1px dashed #bfc9da; border-radius: 14px; padding: 16px; background: #fbfcfe; }
.cover-preview { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: linear-gradient(135deg,#364f91,#d20011); display: grid; place-items: center; color: white; margin-bottom: 12px; }
.cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.source-upload-status { min-height: 42px; margin-top: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f6f8fb; color: var(--muted); font-size: 14px; line-height: 1.5; }
.source-upload-status[data-state="loading"] { border-color: #8fa1d1; background: #f1f4fb; color: #364f91; }
.source-upload-status[data-state="success"] { border-color: #78b68a; background: #f1faf4; color: #236437; }
.source-upload-status[data-state="error"] { border-color: #dba0a5; background: #fff5f6; color: #a01724; }
.sticky-card { position: sticky; top: 88px; }
.publish-summary { display: grid; gap: 13px; }
.summary-item { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.summary-item span { color: var(--muted); }

.detail-hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(320px,.7fr); gap: 24px; }
.detail-cover { aspect-ratio: 16 / 9; border-radius: 18px; overflow: hidden; background: linear-gradient(135deg,#364f91,#d20011); }
.detail-cover img { width: 100%; height: 100%; object-fit: cover; }
.detail-info { padding: 10px 0; }
.detail-info h1 { font-size: clamp(28px, 4vw, 40px); margin: 10px 0 12px; line-height: 1.2; }
.detail-info .lead { color: var(--muted); line-height: 1.8; }
.tag-list { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { padding: 5px 9px; border-radius: 999px; color: var(--brand); background: var(--brand-soft); font-size: 12px; font-weight: 700; }
.detail-stats { display: flex; gap: 22px; margin: 22px 0; }
.detail-stat b { display: block; font-size: 22px; }
.detail-stat small { color: var(--muted); }
.detail-layout { margin-top: 24px; display: grid; grid-template-columns: minmax(0,1fr) 310px; gap: 24px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tab { border: 0; background: transparent; padding: 13px 16px; color: var(--muted); font-weight: 700; border-bottom: 2px solid transparent; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.prose { color: #3f485e; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.runtime-box { border-radius: 14px; background: #111827; color: #d8e1f2; padding: 22px; min-height: 210px; }
.runtime-box code { color: #62dbff; }
.preview-frame-shell { border: 1px solid var(--line); background: #fff; overflow: hidden; }
.preview-toolbar { min-height: 54px; padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.preview-toolbar span { min-width: 0; display: flex; flex-direction: column; }
.preview-toolbar small { color: var(--muted); }
.project-preview-frame { display: block; width: 100%; height: min(68vh, 720px); min-height: 420px; border: 0; background: #fff; }
.preview-manage { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.preview-publish-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.preview-publish-row .field { margin: 0; }
.preview-history { margin-top: 16px; display: grid; gap: 8px; }
.preview-history-item { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 11px; border: 1px solid var(--line); background: #fafbfc; }
.preview-history-item span:first-child { min-width: 0; display: flex; flex-direction: column; }
.preview-history-item small { color: var(--muted); }
.preview-security-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.empty-state.compact { padding: 30px 18px; }
.comment-list { display: grid; gap: 14px; }
.comment-item { display: grid; grid-template-columns: 38px 1fr; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; overflow: hidden; }
.comment-avatar img { width: 100%; height: 100%; object-fit: cover; }
.comment-body b { font-size: 14px; }
.comment-body small { color: var(--muted); margin-left: 8px; }
.comment-body p { margin: 7px 0 0; line-height: 1.7; }

.auth-page { min-height: 100vh; background: linear-gradient(135deg, #edf4ff, #f8fbff 52%, #ecf9fb); }
.auth-layout { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.auth-branding { position: relative; overflow: hidden; padding: 64px max(48px, calc((100vw - var(--content))/2)); color: white; background: linear-gradient(145deg,#1f2f5c,#364f91 68%,#8d111b); }
.auth-branding::after { content: "</>"; position: absolute; right: -30px; bottom: -70px; font-size: 280px; font-weight: 900; opacity: .08; }
.auth-branding h1 { margin: 100px 0 18px; font-size: clamp(38px,6vw,72px); line-height: 1.05; letter-spacing: -.05em; }
.auth-branding p { max-width: 540px; font-size: 17px; line-height: 1.9; color: rgba(255,255,255,.82); }
.auth-points { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 34px; }
.auth-point { padding: 16px; border-radius: 13px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.auth-point b { display:block; margin-bottom: 6px; }
.auth-point small { color: rgba(255,255,255,.75); line-height: 1.5; }
.auth-card-wrap { display: grid; place-items: center; padding: 38px; }
.auth-card { width: min(440px,100%); background: white; border: 1px solid var(--line); border-radius: 20px; padding: 30px; box-shadow: var(--shadow); }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 5px; border-radius: 12px; background: #f1f4f8; margin-bottom: 24px; }
.auth-tab { border: 0; border-radius: 9px; padding: 10px; background: transparent; color: var(--muted); font-weight: 750; }
.auth-tab.active { background: white; color: var(--brand); box-shadow: 0 4px 12px rgba(20,36,70,.08); }
.agreement { display: flex; align-items: flex-start; gap: 9px; color: var(--muted); font-size: 12px; line-height: 1.6; margin: 12px 0 18px; }
.account-result { padding: 16px; background: var(--brand-soft); border: 1px solid #ccd3e7; border-radius: 12px; }
.account-id { font-size: 27px; font-weight: 900; color: var(--brand); letter-spacing: .05em; }

.dashboard-grid { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: 24px; align-items: start; }
.profile-card { text-align: center; padding: 25px; }
.profile-avatar { width: 82px; height: 82px; border-radius: 50%; margin: 0 auto 13px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; font-size: 28px; font-weight: 900; overflow:hidden; }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.side-nav { display: grid; gap: 6px; margin-top: 20px; text-align: left; }
.side-nav a, .side-nav button { border: 0; background: transparent; padding: 11px 12px; border-radius: 9px; color: #566078; font-weight: 650; text-align: left; }
.side-nav a:hover, .side-nav a.active, .side-nav button:hover { background: var(--brand-soft); color: var(--brand); }
.metric-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 14px; }
.metric { padding: 19px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.metric b { display:block; font-size: 26px; margin-bottom: 5px; }
.metric small { color: var(--muted); }
.points-overview { display: grid; grid-template-columns: .85fr 1.15fr; overflow: hidden; color: white; background: #18213b; border-radius: var(--radius); box-shadow: var(--shadow); }
.points-balance { padding: 28px; border-right: 1px solid rgba(255,255,255,.12); background: linear-gradient(145deg, #18213b, #2c417b); }
.points-balance small { display: block; font-family: var(--mono); letter-spacing: .12em; color: #aebce1; }
.points-balance strong { display: block; margin: 12px 0 8px; font-family: var(--mono); font-size: clamp(42px, 6vw, 68px); line-height: 1; }
.points-balance span { color: rgba(255,255,255,.66); font-size: 12px; line-height: 1.7; }
.quota-summary { display: grid; align-content: center; gap: 18px; padding: 26px; }
.quota-usage .spread { font-size: 12px; }
.quota-usage b { font-family: var(--mono); font-size: 12px; color: #dce4ff; }
.quota-track { height: 5px; margin-top: 8px; overflow: hidden; background: rgba(255,255,255,.12); border-radius: 999px; }
.quota-track i { display: block; height: 100%; background: linear-gradient(90deg, #7089d0, #fff); border-radius: inherit; }
.quota-catalog { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quota-card { min-height: 174px; padding: 18px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fafbfe; }
.quota-card h3 { margin: 9px 0 6px; font-size: 16px; }
.quota-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.quota-cost { color: var(--accent); font-family: var(--mono); font-size: 12px; font-weight: 800; }
.points-ledger { display: grid; }
.ledger-row { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid var(--line); }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row span { display: grid; gap: 4px; }
.ledger-row b { font-size: 13px; }
.ledger-row small { color: var(--muted); font-size: 11px; }
.ledger-row > strong { font-family: var(--mono); font-size: 16px; }
.points-plus { color: var(--success); }
.points-minus { color: var(--accent); }
.admin-points-panel { margin: 0 0 22px; border-top: 3px solid var(--accent); }
.admin-points-form { display: grid; grid-template-columns: 1fr 160px 1.4fr auto; gap: 12px; align-items: end; margin-top: 18px; }
.admin-points-form .field { margin: 0; }
.my-project-list { display: grid; gap: 12px; }
.my-project-item { display: grid; grid-template-columns: 140px minmax(0,1fr) auto; gap: 16px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 14px; }
.my-project-thumb { aspect-ratio: 16/9; border-radius: 10px; overflow: hidden; background: linear-gradient(135deg,#364f91,#d20011); }
.my-project-thumb img { width:100%; height:100%; object-fit:cover; }
.status-pill { display: inline-flex; padding: 5px 9px; border-radius: 999px; background: #eff2f7; color: #687187; font-size: 12px; font-weight: 700; }
.status-pill.published { background: #e8f8f1; color: var(--success); }
.status-pill.pending { background: #fff5e7; color: var(--warning); }

.teacher-shell { display: grid; grid-template-columns: 220px minmax(0,1fr); min-height: calc(100vh - 66px); }
.teacher-sidebar { padding: 22px 15px; background: #172033; color: #c9d2e6; }
.teacher-sidebar h3 { color: white; padding: 0 10px; }
.teacher-sidebar button { width:100%; border:0; color:inherit; background:transparent; text-align:left; padding:12px 10px; border-radius:9px; }
.teacher-sidebar button.active, .teacher-sidebar button:hover { background:rgba(255,255,255,.09); color:white; }
.teacher-main { padding: 28px; min-width:0; }
.table-wrap { overflow-x:auto; }
.data-table { width:100%; border-collapse: collapse; font-size:13px; }
.data-table th, .data-table td { padding:12px 10px; border-bottom:1px solid var(--line); text-align:left; vertical-align:middle; }
.data-table th { color:var(--muted); font-size:12px; background:#fafbfc; }
.teacher-sidebar a { display: block; padding: 12px 10px; border-radius: 9px; color: inherit; white-space: nowrap; }
.teacher-sidebar a:hover { background: rgba(255,255,255,.09); color: white; }
.admin-community-panel { margin-top: 22px; border-top: 3px solid var(--brand); }
.admin-community-panel h3 { margin: 24px 0 10px; }
.admin-subsection-title { padding-top: 20px; border-top: 1px solid var(--line); }

.site-footer { margin-top: 60px; border-top: 1px solid var(--line); background: white; }
.footer-inner { display: grid; grid-template-columns: 1.5fr repeat(3,1fr); gap: 28px; padding: 36px 0; }
.footer-inner h4 { margin:0 0 12px; }
.footer-inner a, .footer-inner p { display:block; margin:7px 0; color:var(--muted); font-size:13px; line-height:1.7; }
.footer-bottom { border-top:1px solid var(--line); padding:18px 0; color:var(--muted); font-size:12px; }

.toast-stack { position: fixed; right: 20px; top: 82px; z-index: 100; display:grid; gap:10px; }
.toast { min-width: 260px; max-width: 360px; padding: 13px 15px; color: #273149; background: white; border:1px solid var(--line); border-left:4px solid var(--brand); border-radius:10px; box-shadow:var(--shadow); animation: toast-in .22s ease; }
.toast.error { border-left-color:var(--danger); }
.toast.success { border-left-color:var(--success); }
@keyframes toast-in { from { opacity:0; transform: translateY(-8px); } }
.loading-skeleton { background: linear-gradient(90deg,#eef1f5,#f8f9fb,#eef1f5); background-size:200% 100%; animation:skeleton 1.2s linear infinite; }
@keyframes skeleton { to { background-position:-200% 0; } }

@media (max-width: 1050px) {
  .header-inner { grid-template-columns:auto 1fr auto; gap:16px; }
  .header-nav { display:none; }
  .hero-shell { grid-template-columns:1fr; }
  .hero-side { grid-template-columns:repeat(4,1fr); }
  .hero-mini { min-height:135px; }
  .channel-bar { grid-template-columns:repeat(4,1fr); }
  .project-grid { grid-template-columns:repeat(3,1fr); }
  .form-shell, .detail-layout { grid-template-columns:1fr; }
  .sticky-card { position:static; }
  .auth-layout { grid-template-columns:1fr; }
  .auth-branding { min-height:420px; }
  .auth-branding h1 { margin-top:45px; }
}

@media (max-width: 760px) {
  .container { width:min(100% - 24px,var(--content)); }
  .site-header { height:auto; }
  .header-inner { min-height:62px; grid-template-columns:1fr auto; }
  .brand-copy small { display:none; }
  .header-search { grid-column:1/-1; max-width:none; margin-bottom:10px; }
  .header-actions .desktop-only { display:none; }
  .hero-banner { min-height:390px; }
  .hero-copy { width:100%; padding:30px 24px; }
  .hero-code-window { width:55%; right:-8%; top:auto; bottom:6%; opacity:.72; }
  .hero-side { grid-template-columns:1fr 1fr; }
  .channel-bar { grid-template-columns:repeat(4,1fr); }
  .project-grid { grid-template-columns:repeat(2,1fr); gap:20px 12px; }
  .form-card { padding:20px; }
  .field-grid { grid-template-columns:1fr; gap:0; }
  .detail-hero { grid-template-columns:1fr; }
  .dashboard-grid { grid-template-columns:1fr; }
  .points-overview { grid-template-columns: 1fr; }
  .points-balance { border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .quota-catalog { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns:1fr 1fr; }
  .my-project-item { grid-template-columns:100px 1fr; }
  .my-project-item > :last-child { grid-column:1/-1; }
  .teacher-shell { grid-template-columns:1fr; }
  .admin-points-form { grid-template-columns: 1fr 1fr; }
  .admin-points-form .field:nth-child(3), .admin-points-form .btn { grid-column: 1 / -1; }
  .teacher-sidebar { display:flex; overflow-x:auto; gap:6px; }
  .teacher-sidebar h3 { display:none; }
  .teacher-sidebar button { width:auto; white-space:nowrap; }
  .footer-inner { grid-template-columns:1fr 1fr; }
  .auth-branding { display:none; }
  .auth-card-wrap { padding:24px 14px; }
}

@media (max-width: 520px) {
  .preview-toolbar { align-items: flex-start; flex-direction: column; }
  .preview-publish-row { grid-template-columns: 1fr; }
  .preview-publish-row .btn { width: 100%; }
  .project-preview-frame { min-height: 360px; height: 62vh; }
  .hero-side { grid-template-columns:1fr; }
  .channel-bar { grid-template-columns:repeat(2,1fr); }
  .project-grid { grid-template-columns:1fr; }
  .project-title { min-height:auto; }
  .section-head { align-items:flex-start; }
  .profile-card { padding: 18px; display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 4px 14px; align-items: center; text-align: left; }
  .profile-avatar { width: 56px; height: 56px; margin: 0; grid-row: 1 / 3; font-size: 20px; }
  .profile-card h2, .profile-card p { margin: 0; }
  .side-nav { grid-column: 1 / -1; display: flex; gap: 4px; margin-top: 12px; overflow-x: auto; }
  .side-nav a, .side-nav button { white-space: nowrap; }
  .metric-grid { grid-template-columns:1fr 1fr; gap: 10px; }
  .metric { padding: 15px; }
  .admin-points-form { grid-template-columns: 1fr; }
  .admin-points-form .field:nth-child(3), .admin-points-form .btn { grid-column: auto; }
  .footer-inner { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

:where(a,button,input,textarea,select):focus-visible { outline:3px solid rgba(54,79,145,.32); outline-offset:2px; }

/* V0.7 — Aikyun developer community and virtual sites */
.home-header .header-inner,
.community-page + .site-footer .header-inner,
body:has(.community-page) .header-inner,
body:has(.discussion-page) .header-inner {
  grid-template-columns: auto auto minmax(240px, 1fr) auto;
  gap: 24px;
}
.main-nav { display: flex; align-items: center; gap: 6px; }
.main-nav a {
  position: relative;
  padding: 9px 11px;
  border-radius: 8px;
  color: #505a70;
  font-size: 13px;
  font-weight: 720;
}
.main-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.main-nav a.active { color: var(--brand); }
.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 2px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
}
.header-spacer { min-width: 180px; }
.home-main { position: relative; }
.home-main::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 420px;
  height: 420px;
  top: -180px;
  left: -240px;
  border-radius: 50%;
  background: rgba(54,79,145,.07);
  filter: blur(2px);
}
.hero-shell { gap: 18px; }
.hero-banner {
  min-height: 410px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 86% 14%, rgba(96,125,217,.52), transparent 29%),
    radial-gradient(circle at 72% 92%, rgba(57,88,168,.38), transparent 38%),
    linear-gradient(135deg, #0c1428 0%, #1b2c58 56%, #304b92 100%);
  box-shadow: 0 26px 58px rgba(19,31,67,.20);
}
.hero-banner::after {
  content: "";
  position: absolute;
  inset: auto -70px -105px auto;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
}
.hero-orbit {
  position: absolute;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  pointer-events: none;
}
.hero-orbit-one { width: 190px; height: 190px; right: 10%; top: 15%; }
.hero-orbit-two { width: 110px; height: 110px; right: 17%; top: 25%; border-color: rgba(210,0,17,.4); }
.hero-code-window {
  top: 17%;
  right: 5%;
  width: 43%;
  padding: 42px 20px 20px;
  border-radius: 16px;
  background: rgba(7,12,27,.78);
  box-shadow: 0 24px 70px rgba(0,0,0,.32);
}
.hero-code-window i {
  position: absolute;
  top: 17px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.30);
}
.hero-code-window i:nth-of-type(1) { left: 18px; background: #e65b67; }
.hero-code-window i:nth-of-type(2) { left: 31px; background: #d8a740; }
.hero-code-window i:nth-of-type(3) { left: 44px; background: #42aa79; }
.hero-code-window span:nth-of-type(1) { color: #91b6ff; }
.hero-code-window span:nth-of-type(2) { color: #fff; padding-left: 18px; }
.hero-code-window span:nth-of-type(3) { color: #ff8d96; padding-left: 36px; }
.hero-copy { width: 63%; padding: 48px 42px 34px; }
.hero-copy h1 { margin: 19px 0 15px; font-size: clamp(34px,4vw,51px); }
.hero-copy p { max-width: 540px; }
.hero-eyebrow { align-items: center; gap: 7px; }
.hero-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: #ff4856; box-shadow: 0 0 0 4px rgba(210,0,17,.18); }
.hero-actions { gap: 12px; }
.hero-text-link { margin-left: 3px; color: rgba(255,255,255,.78); font-size: 13px; font-weight: 700; }
.hero-text-link:hover { color: white; }
.hero-proof {
  display: flex;
  gap: 0;
  width: max-content;
  margin-top: 31px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.13);
}
.hero-proof span { min-width: 92px; padding-right: 24px; margin-right: 24px; border-right: 1px solid rgba(255,255,255,.13); }
.hero-proof span:last-child { margin: 0; padding: 0; border: 0; }
.hero-proof b { display: block; color: white; font-family: var(--mono); font-size: 16px; }
.hero-proof small { display: block; margin-top: 5px; color: rgba(255,255,255,.55); font-size: 10px; letter-spacing: .06em; }
.hero-side { gap: 18px; }
.hero-mini {
  min-height: 196px;
  padding: 23px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.hero-mini:hover { box-shadow: var(--shadow-hover); }
.hero-mini p { max-width: 185px; }
.hero-mini > span {
  position: absolute;
  z-index: 1;
  left: 22px;
  bottom: 19px;
  color: var(--brand);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .18s ease, transform .18s ease;
}
.hero-mini:hover > span { opacity: 1; transform: translateY(0); }
.channel-bar {
  margin-top: 26px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 12px 34px rgba(19,29,55,.05);
}
.channel { min-height: 72px; border-color: transparent; }
.channel:hover, .channel.active { background: white; }
.home-section { scroll-margin-top: 88px; }
.project-card {
  padding: 8px 8px 13px;
  border: 1px solid transparent;
  border-radius: 17px;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--line);
  background: white;
  box-shadow: 0 15px 36px rgba(19,29,55,.08);
}
.project-run-link { color: var(--brand); font-size: 12px; font-weight: 800; }
.project-run-link:hover { color: var(--accent); }
.project-cover { box-shadow: none; }

.run-page { min-width: 320px; height: 100vh; overflow: hidden; background: #101526; }
.site-browser { display: grid; grid-template-rows: 58px minmax(0,1fr); width: 100%; height: 100vh; background: #f4f6fa; }
.site-browser-bar {
  display: grid;
  grid-template-columns: auto auto minmax(160px,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid #d9deea;
  background: rgba(255,255,255,.97);
  box-shadow: 0 3px 16px rgba(17,28,55,.08);
}
.site-browser-brand { display: flex; align-items: center; gap: 9px; color: #27314b; font-size: 12px; font-weight: 800; white-space: nowrap; }
.site-browser-brand img { width: 87px; height: 31px; object-fit: contain; }
.site-browser-brand span { padding-left: 9px; border-left: 1px solid #d9deea; }
.site-browser-controls, .site-browser-actions { display: flex; align-items: center; gap: 7px; }
.browser-icon-button {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid #d8deea;
  border-radius: 9px;
  color: #36425f;
  background: white;
  font: 700 17px/1 system-ui;
}
.browser-icon-button:hover { color: var(--brand); border-color: #aebad8; background: var(--brand-soft); }
.site-browser-address {
  min-width: 0;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid #dce1eb;
  border-radius: 10px;
  color: #687087;
  background: #f4f6fa;
  font-size: 12px;
}
.site-browser-address i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #2eae6f; box-shadow: 0 0 0 3px rgba(46,174,111,.13); }
.site-browser-address span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-live-state { color: #657087; font-size: 11px; font-weight: 700; white-space: nowrap; }
.site-live-state i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; background: #2eae6f; }
.site-browser-stage { position: relative; min-height: 0; background: white; }
.site-browser-stage iframe { width: 100%; height: 100%; display: block; border: 0; background: white; }
.site-browser-stage iframe[hidden] { display: none; }
.site-browser-loading { position: absolute; inset: 0; z-index: 1; display: grid; place-content: center; justify-items: center; gap: 9px; padding: 24px; color: #24304c; text-align: center; background: #f7f8fb; }
.site-browser-loading[hidden] { display: none; }
.site-browser-loading p { margin: 0; color: var(--muted); font-size: 13px; }
.run-loader { width: 30px; height: 30px; border: 3px solid #dfe4f0; border-top-color: var(--brand); border-radius: 50%; animation: run-spin .8s linear infinite; }
@keyframes run-spin { to { transform: rotate(360deg); } }

.admin-firewall-panel { margin-top: 22px; scroll-margin-top: 80px; border-top: 3px solid var(--accent); }
.firewall-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; margin: 20px 0; }
.firewall-metrics > div { padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: #f7f8fb; }
.firewall-metrics b { display: block; color: var(--brand); font: 800 24px/1 var(--mono); }
.firewall-metrics span { display: block; margin-top: 8px; color: var(--muted); font-size: 11px; }
.firewall-lines { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.firewall-line { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; }
.firewall-line i { width: 8px; height: 8px; border-radius: 50%; background: #aeb5c4; }
.firewall-line i.enabled { background: #29a66a; box-shadow: 0 0 0 4px rgba(41,166,106,.12); }
.firewall-line span { min-width: 0; }
.firewall-line b, .firewall-line small { display: block; }
.firewall-line small { margin-top: 3px; color: var(--muted); }
.firewall-line em { color: var(--brand); font-size: 10px; font-style: normal; white-space: nowrap; }
.firewall-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin-top: 18px; }
.firewall-card { padding: 19px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.firewall-card h3 { margin-top: 0; }

.mail-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.mail-head h1 { margin: 5px 0 7px; }
.mail-head p { margin: 0; color: var(--muted); }
.mail-shell { display: grid; grid-template-columns: 190px 330px minmax(0,1fr); min-height: 590px; gap: 12px; }
.mail-folders { padding: 16px; display: flex; flex-direction: column; gap: 7px; }
.mail-folders > b { padding: 8px 10px 14px; }
.mail-folders a { display: flex; justify-content: space-between; padding: 10px; border-radius: 8px; color: #59637b; font-size: 13px; }
.mail-folders a.active, .mail-folders a:hover { color: var(--brand); background: var(--brand-soft); }
.mail-list { overflow: hidden; }
.mail-list-item { width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 15px; border: 0; border-bottom: 1px solid var(--line); color: #4d566d; background: white; text-align: left; }
.mail-list-item:hover, .mail-list-item.active { background: #f4f6fb; }
.mail-list-item i { width: 7px; height: 7px; border-radius: 50%; background: transparent; }
.mail-list-item.unread i { background: var(--accent); }
.mail-list-item b, .mail-list-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-list-item small { margin-top: 5px; color: var(--muted); font-size: 10px; }
.mail-list-item em { color: var(--accent); font-size: 10px; font-style: normal; }
.mail-reader { padding: 30px; }
.mail-reader h2 { margin: 12px 0 8px; }
.mail-meta { padding-bottom: 18px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.mail-content { min-height: 250px; padding: 24px 0; color: #39435b; line-height: 1.9; white-space: pre-wrap; }

.studio-hero, .studio-detail-hero {
  display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 40px;
  border-top: 3px solid var(--accent); border-radius: 22px; color: white;
  background: radial-gradient(circle at 85% 10%,rgba(89,116,202,.55),transparent 28%),linear-gradient(135deg,#101a35,#2d4788);
  box-shadow: 0 20px 46px rgba(20,34,70,.14);
}
.studio-hero > div:first-child { max-width: 700px; }
.studio-hero h1, .studio-detail-hero h1 { margin: 11px 0; font-size: clamp(29px,4vw,45px); }
.studio-hero p, .studio-detail-hero p { margin: 0; color: rgba(255,255,255,.72); line-height: 1.75; }
.studio-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.studio-card { min-height: 170px; display: flex; gap: 17px; padding: 22px; border: 1px solid var(--line); border-radius: 16px; background: white; transition: transform .18s ease,box-shadow .18s ease; }
.studio-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.studio-card > span, .studio-mark { width: 54px; height: 54px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 14px; color: white; background: var(--brand); font: 800 15px/1 var(--mono); }
.studio-card h3 { margin: 4px 0 8px; }
.studio-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.studio-card small { display: block; margin-top: 16px; color: #68728b; }
.studio-apply { max-width: 720px; margin: 40px auto 0; }
.notice-box { padding: 18px; border: 1px solid #cdd5e7; border-radius: 12px; background: var(--brand-soft); }
.notice-box p { margin-bottom: 0; color: var(--muted); }
.studio-detail-hero { justify-content: flex-start; }
.studio-detail-hero > div:nth-child(2) { flex: 1; }
.studio-detail-hero .studio-mark { width: 78px; height: 78px; color: var(--brand); background: white; font-size: 20px; }
.studio-detail-hero .row-wrap { margin-top: 18px; color: rgba(255,255,255,.7); font-size: 12px; }
.studio-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 20px; margin-top: 22px; align-items: start; }
.studio-member-list { display: grid; gap: 8px; }
.studio-member-list a { display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 9px; }
.studio-member-list a:hover { background: var(--brand-soft); }
.studio-member-list span b, .studio-member-list span small { display: block; }
.studio-member-list small { margin-top: 3px; color: var(--muted); }
.studio-project-manager { margin: 14px 0 20px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.studio-project-manager label { display: block; margin-bottom: 8px; font-weight: 800; color: var(--ink); }
.studio-project-manager select { min-width: min(360px, 100%); min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 12px; }
.studio-request { padding: 12px 0; border-bottom: 1px solid var(--line); }
.studio-request span b, .studio-request span small { display: block; }
.studio-request small { margin: 4px 0 9px; color: var(--muted); }
.dashboard-service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dashboard-service-card { padding: 20px; }
.dashboard-service-card > b { display: block; margin-top: 8px; color: #26314c; font-size: 17px; }
.dashboard-service-card p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.admin-section { margin-bottom: 22px; scroll-margin-top: 80px; }
.admin-mail-form { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 18px; }
.admin-mail-title, .admin-mail-content, .admin-mail-form > button { grid-column: 1/-1; }
.admin-mail-form textarea { min-height: 140px; }
.community-preview {
  margin-top: 54px;
  padding: 34px;
  overflow: hidden;
  border: 1px solid rgba(215,220,233,.9);
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(238,241,249,.82), rgba(255,255,255,.96)),
    white;
  box-shadow: 0 16px 45px rgba(19,29,55,.06);
}
.community-preview-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.community-preview-head h2 { margin: 5px 0 7px; font-size: 25px; }
.community-preview-head p { margin: 0; color: var(--muted); }
.community-preview-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.discussion-card {
  min-height: 180px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.discussion-card:not(.loading-skeleton):hover { transform: translateY(-2px); border-color: #c5cee2; box-shadow: 0 12px 28px rgba(20,36,70,.08); }
.discussion-card h3 { margin: 13px 0 8px; font-size: 16px; line-height: 1.45; }
.discussion-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.discussion-meta, .discussion-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.discussion-foot { margin-top: auto; padding-top: 18px; }
.discussion-meta .tag { border-radius: 6px; }
.community-empty { grid-column: 1/-1; padding: 28px; border: 1px dashed #cbd3e3; border-radius: 14px; color: var(--muted); text-align: center; background: rgba(255,255,255,.7); }

.community-hero {
  position: relative;
  min-height: 244px;
  padding: 46px 48px;
  overflow: hidden;
  border-top: 3px solid var(--accent);
  border-radius: 22px;
  color: white;
  background:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px),
    radial-gradient(circle at 88% 10%, rgba(94,122,209,.56), transparent 30%),
    linear-gradient(135deg,#0d162d,#293f7b);
  background-size: 34px 34px,34px 34px,auto,auto;
  box-shadow: 0 22px 52px rgba(19,31,67,.16);
}
.community-hero > div:first-child { position: relative; z-index: 1; max-width: 720px; }
.section-kicker.light { color: #aabcec; }
.community-hero h1 { margin: 13px 0 12px; font-size: clamp(30px,4vw,48px); letter-spacing: -.04em; }
.community-hero p { max-width: 650px; margin: 0; color: rgba(255,255,255,.72); line-height: 1.8; }
.community-code {
  position: absolute;
  right: 5%;
  top: 42px;
  display: grid;
  gap: 11px;
  padding: 22px 27px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 14px;
  color: rgba(255,255,255,.62);
  background: rgba(6,12,27,.42);
  font-family: var(--mono);
  transform: rotate(2deg);
}
.community-code span:nth-child(2) { padding-left: 18px; color: white; }
.community-code span:nth-child(3) { padding-left: 36px; color: #ff8d96; }
.community-layout { margin-top: 26px; display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 24px; align-items: start; }
.community-feed-column { min-width: 0; }
.community-toolbar { display: grid; gap: 16px; margin-bottom: 14px; }
.community-tabs { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 2px; }
.community-tabs button {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #586178;
  background: white;
  font-size: 12px;
  font-weight: 720;
}
.community-tabs button:hover, .community-tabs button.active { color: white; border-color: var(--brand); background: var(--brand); }
.compact-input { min-width: 220px; }
.discussion-list { display: grid; gap: 12px; }
.discussion-list-card {
  padding: 21px;
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.discussion-list-card:hover { transform: translateY(-2px); border-color: #c3cce0; box-shadow: 0 13px 32px rgba(20,36,70,.07); }
.discussion-list-main { min-width: 0; }
.discussion-list-main h2 { margin: 10px 0 8px; font-size: 18px; line-height: 1.45; }
.discussion-list-main p { margin: 0; color: var(--muted); line-height: 1.7; font-size: 13px; }
.discussion-list-main .discussion-foot { justify-content: flex-start; gap: 18px; }
.discussion-cover { width: 126px; aspect-ratio: 4/3; border-radius: 11px; overflow: hidden; background: var(--brand-soft); }
.discussion-cover img { width: 100%; height: 100%; object-fit: cover; }
.community-aside { display: grid; gap: 16px; }
.community-compose { border-top: 3px solid var(--accent); }
.community-compose h3 { margin: 4px 0 8px; }
.community-compose p { color: var(--muted); font-size: 13px; line-height: 1.65; }
.community-compose .field { margin-bottom: 13px; }
.community-compose textarea { min-height: 120px; }
.check-row.compact { padding: 8px 0; border: 0; font-size: 12px; color: var(--muted); }
.community-guidelines h3 { margin: 9px 0 13px; }
.community-guidelines ol { margin: 0 0 18px; padding-left: 20px; color: var(--muted); font-size: 13px; line-height: 1.85; }
.community-guidelines a { color: var(--brand); font-size: 13px; font-weight: 720; }
.discussion-detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 24px; align-items: start; }
.discussion-detail { padding: 30px; }
.back-link { display: inline-flex; margin-bottom: 18px; color: var(--brand); font-size: 13px; font-weight: 720; }
.discussion-detail h1 { margin: 12px 0 18px; font-size: clamp(27px,4vw,40px); line-height: 1.3; letter-spacing: -.03em; }
.discussion-author { display: flex; align-items: center; gap: 10px; padding-bottom: 20px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.discussion-body { padding: 25px 0; color: #384158; line-height: 1.9; white-space: pre-wrap; overflow-wrap: anywhere; }
.discussion-media { margin: 0 0 24px; overflow: hidden; border-radius: 14px; }
.discussion-actions { display: flex; gap: 10px; padding-top: 20px; border-top: 1px solid var(--line); }
.discussion-reply { margin-top: 18px; padding: 24px; }
.discussion-reply h3 { margin-top: 0; }
.discussion-comment { padding: 17px 0; border-bottom: 1px solid var(--line); }
.discussion-comment:last-child { border-bottom: 0; }
.discussion-comment p { margin: 7px 0 0; color: #424b61; line-height: 1.75; }
.compact-footer { margin-top: 44px; }

@media (max-width: 1050px) {
  .home-header .header-inner,
  body:has(.community-page) .header-inner,
  body:has(.discussion-page) .header-inner { grid-template-columns: auto minmax(220px,1fr) auto; }
  .main-nav { display: none; }
  .hero-banner { min-height: 390px; }
  .hero-side { grid-template-columns: repeat(4,1fr); }
  .hero-mini { min-height: 150px; padding: 18px; }
  .hero-mini > span { display: none; }
  .community-layout { grid-template-columns: minmax(0,1fr) 290px; }
}

@media (max-width: 760px) {
  .home-header .header-inner,
  body:has(.community-page) .header-inner,
  body:has(.discussion-page) .header-inner { grid-template-columns: 1fr auto; }
  .header-spacer { display: none; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .header-search { grid-column: 1/-1; grid-row: 2; }
  .hero-banner { min-height: 520px; }
  .hero-copy { width: 100%; padding: 32px 24px; }
  .hero-copy h1 { font-size: 35px; }
  .hero-code-window { width: 66%; right: -7%; bottom: 5%; top: auto; }
  .hero-proof { margin-top: 24px; }
  .hero-proof span { min-width: 78px; padding-right: 14px; margin-right: 14px; }
  .hero-side { grid-template-columns: 1fr 1fr; }
  .hero-mini { min-height: 158px; }
  .community-preview { padding: 24px 18px; }
  .community-preview-head { align-items: flex-start; }
  .community-preview-grid { grid-template-columns: 1fr; }
  .community-hero { padding: 34px 25px; }
  .community-code { display: none; }
  .community-layout, .discussion-detail-layout { grid-template-columns: 1fr; }
  .community-aside { grid-row: 1; }
  .discussion-detail { padding: 22px; }
  .site-browser { grid-template-rows: 98px minmax(0,1fr); }
  .site-browser-bar { grid-template-columns: auto 1fr auto; gap: 7px; padding: 7px 9px; }
  .site-browser-brand span, .site-live-state { display: none; }
  .site-browser-brand img { width: 76px; }
  .site-browser-controls { grid-column: 2; grid-row: 1; justify-content: flex-end; }
  .site-browser-actions { grid-column: 3; grid-row: 1; }
  .site-browser-address { grid-column: 1/-1; grid-row: 2; }
  .firewall-metrics { grid-template-columns: 1fr 1fr; }
  .firewall-lines, .firewall-grid { grid-template-columns: 1fr; }
  .mail-shell { grid-template-columns: 1fr; }
  .mail-folders { display: none; }
  .mail-list { max-height: 330px; }
  .studio-grid { grid-template-columns: 1fr; }
  .studio-hero, .studio-detail-hero { align-items: flex-start; flex-direction: column; padding: 28px 22px; }
  .studio-detail-layout { grid-template-columns: 1fr; }
  .dashboard-service-grid { grid-template-columns: 1fr; }
  .admin-mail-form { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .hero-banner { min-height: 555px; }
  .hero-copy h1 { font-size: 31px; }
  .hero-code-window { width: 82%; right: -17%; }
  .hero-text-link { width: 100%; margin: 2px 0 0; }
  .hero-proof { width: 100%; }
  .hero-proof span { flex: 1; min-width: 0; }
  .channel-bar { display: flex; overflow-x: auto; scroll-snap-type: x proximity; }
  .channel { flex: 0 0 116px; min-height: 66px; scroll-snap-align: start; }
  .community-preview-head { display: grid; }
  .community-preview-head .btn { width: max-content; }
  .discussion-list-card { grid-template-columns: 1fr; }
  .discussion-cover { width: 100%; max-height: 180px; aspect-ratio: 16/9; }
}
.grid-full{grid-column:1/-1}.content-narrow{max-width:850px;margin:auto}.admin-auth-panel{max-width:520px;margin:50px auto}.heading-compact{margin:4px 0 0}.admin-metrics{margin:22px 0}.mt-10{margin-top:10px}.mt-18{margin-top:18px}.mt-20{margin-top:20px}.mt-26{margin-top:26px}.mt-100{margin-top:100px}.line-relaxed{line-height:1.7}.brand-link{color:var(--brand)}.login-brand-copy{color:rgba(255,255,255,.72)}.login-kicker{display:block;margin-top:100px;color:#ff8d96}.teacher-loading{margin:40px}
.quota-fill-0{width:0}.quota-fill-1{width:5%}.quota-fill-2{width:10%}.quota-fill-3{width:15%}.quota-fill-4{width:20%}.quota-fill-5{width:25%}.quota-fill-6{width:30%}.quota-fill-7{width:35%}.quota-fill-8{width:40%}.quota-fill-9{width:45%}.quota-fill-10{width:50%}.quota-fill-11{width:55%}.quota-fill-12{width:60%}.quota-fill-13{width:65%}.quota-fill-14{width:70%}.quota-fill-15{width:75%}.quota-fill-16{width:80%}.quota-fill-17{width:85%}.quota-fill-18{width:90%}.quota-fill-19{width:95%}.quota-fill-20{width:100%}
