:root {
  --canvas: #f3f5f0;
  --surface: #ffffff;
  --surface-soft: #edf1ea;
  --surface-strong: #e1e8de;
  --ink: #18211b;
  --muted: #68736b;
  --line: #d5dcd3;
  --line-strong: #bcc8bd;
  --primary: #256b48;
  --primary-hover: #1b5639;
  --primary-soft: #dcebe2;
  --amber: #d89b42;
  --amber-soft: #f6ead5;
  --blue: #3f6f9f;
  --blue-soft: #e1ebf4;
  --danger: #b64b4b;
  --danger-soft: #fae8e6;
  --shadow: 0 12px 34px rgba(25, 42, 30, .09);
  --radius: 8px;
  --content: 1180px;
}

html { color-scheme: light; }
html[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #101511;
  --surface: #19201a;
  --surface-soft: #222b23;
  --surface-strong: #2b352c;
  --ink: #eef4ef;
  --muted: #a8b3aa;
  --line: #354037;
  --line-strong: #4c5a4e;
  --primary: #52b77e;
  --primary-hover: #67c990;
  --primary-soft: #203a2b;
  --amber: #e1aa50;
  --amber-soft: #392d1a;
  --blue: #7aa8d5;
  --blue-soft: #1d3040;
  --danger: #e17d7d;
  --danger-soft: #3c2222;
  --shadow: 0 14px 38px rgba(0, 0, 0, .28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; }
button, a, input, textarea { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
svg { display: block; }
.lucide { width: 18px; height: 18px; stroke-width: 2; }
.container { width: min(calc(100% - 32px), var(--content)); margin: 0 auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
html[data-theme="dark"] .site-header { background: rgba(25, 32, 26, .96); }
html[data-theme="dark"] .button-primary,
html[data-theme="dark"] .upload-dialog-icon,
html[data-theme="dark"] .brand-mark { color: #0e1b13; }
.header-inner {
  min-height: 68px;
  display: grid;
  grid-template-columns: auto minmax(240px, 540px) auto;
  align-items: center;
  gap: 24px;
}
.header-inner.compact { display: flex; justify-content: space-between; }
.header-inner.compact > span { flex: 1; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-weight: 800;
}
.brand-mark {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--primary);
  border: 2px solid var(--ink);
  border-radius: 4px;
  font-size: 14px;
  line-height: 1;
}
.brand-mark::after {
  content: "";
  position: absolute;
  right: -4px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  background: var(--amber);
  border: 2px solid var(--ink);
}
.brand-copy { min-width: 0; }
.brand-name { display: block; font-size: 16px; line-height: 1.2; letter-spacing: 0; }
.brand-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.header-search {
  display: grid;
  grid-template-columns: 1fr 40px;
  min-width: 0;
  height: 42px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--surface-soft);
  overflow: hidden;
}
.header-search:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 107, 72, .12); }
.header-search input {
  min-width: 0;
  border: 0;
  outline: 0;
  padding: 0 13px;
  color: var(--ink);
  background: transparent;
}
.header-search input::placeholder { color: #7e8981; }
.icon-button {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
.icon-button:hover { color: var(--primary); background: var(--primary-soft); }
.theme-toggle .theme-icon-sun { display: none; }
.theme-toggle .theme-icon-moon { display: block; }
html[data-theme="dark"] .theme-toggle .theme-icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .theme-icon-moon { display: none; }
.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  font-weight: 750;
  line-height: 1;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { color: #fff; background: var(--primary); border-color: var(--primary); }
.button-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.button-secondary { color: var(--ink); background: var(--surface); border-color: var(--line-strong); }
.button-secondary:hover { color: var(--primary); border-color: var(--primary); }
.button-danger { color: var(--danger); background: var(--danger-soft); border-color: #e8bcbc; }
.button-danger:hover { color: #fff; background: var(--danger); border-color: var(--danger); }
.button-wide { width: 100%; }
.button:disabled { opacity: .48; cursor: not-allowed; transform: none; }

.world-strip {
  position: relative;
  min-height: 188px;
  display: flex;
  align-items: flex-end;
  background: #b9ddd0 url('/assets/pixel-landscape.svg') center / cover no-repeat;
  border-bottom: 1px solid #9ebbad;
  overflow: hidden;
}
.world-strip::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(245, 250, 246, .16);
  pointer-events: none;
}
html[data-theme="dark"] .world-strip,
html[data-theme="dark"] .auth-scene {
  background-color: #607767;
  background-blend-mode: multiply;
  border-color: #425648;
}
html[data-theme="dark"] .world-strip::before { background: rgba(10, 18, 12, .22); }
html[data-theme="dark"] .world-kicker { color: #c0e8cf; }
html[data-theme="dark"] .world-note { color: #d0e2d5; }
.world-content {
  position: relative;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding-top: 32px;
  padding-bottom: 24px;
}
.world-copy { max-width: 600px; }
.world-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: #214c37;
  font-size: 12px;
  font-weight: 800;
}
.world-kicker::before { content: ""; width: 8px; height: 8px; background: var(--amber); border: 1px solid var(--ink); }
.world-title { margin: 0; font-size: 34px; line-height: 1.15; letter-spacing: 0; }
.world-note { margin: 8px 0 0; color: #385747; font-size: 14px; font-weight: 600; }
.download-hero {
  width: min(100%, 300px);
  min-height: 58px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding: 9px 12px;
  color: #fff;
  background: var(--primary);
  border: 1px solid rgba(255, 255, 255, .48);
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(20, 66, 42, .22);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.download-hero:hover { color: #fff; background: var(--primary-hover); box-shadow: 0 10px 24px rgba(20, 66, 42, .3); transform: translateY(-1px); }
.download-hero:focus-visible { outline: 3px solid rgba(255, 255, 255, .9); outline-offset: 3px; }
.download-hero-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--primary); background: #fff; border-radius: 6px; }
.download-hero-copy { min-width: 0; }
.download-hero-copy strong { display: block; font-size: 15px; line-height: 1.2; }
.download-hero-copy small { display: block; margin-top: 3px; color: rgba(255, 255, 255, .82); font-size: 11px; font-weight: 650; }
.download-hero-arrow { width: 18px; height: 18px; }
.stat-row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.stat {
  min-width: 92px;
  padding: 10px 12px;
  color: #fff;
  background: rgba(24, 33, 27, .88);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
}
.stat strong { display: block; font-size: 20px; line-height: 1.1; letter-spacing: 0; }
.stat span { display: block; margin-top: 3px; color: #d9e5dc; font-size: 11px; }

.access-card {
  min-height: 64px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding: 12px 14px;
  background: var(--primary-soft);
  border: 1px solid #bdd5c5;
  border-radius: var(--radius);
}
html[data-theme="dark"] .access-card { border-color: #365943; }
.access-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--primary); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.access-copy { min-width: 0; }
.access-copy strong { display: block; font-size: 13px; }
.access-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.access-card code { max-width: 260px; padding: 6px 9px; overflow: hidden; color: var(--primary); background: var(--surface); border: 1px solid var(--line); border-radius: 5px; font: 700 12px/1.2 ui-monospace, "Cascadia Code", monospace; text-overflow: ellipsis; white-space: nowrap; }
.access-copy-button { white-space: nowrap; }

.workspace {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding-top: 24px;
  padding-bottom: 56px;
}
.tool-panel {
  position: sticky;
  top: 92px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.upload-disclosure > summary { list-style: none; cursor: pointer; }
.upload-disclosure > summary::-webkit-details-marker { display: none; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.upload-disclosure > .panel-head { margin: 0; }
.upload-body { padding-top: 18px; }
.panel-head-actions { display: inline-flex; align-items: center; gap: 7px; }
.disclosure-icon { display: none; color: var(--muted); transition: transform .16s ease; }
.upload-disclosure[open] .disclosure-icon { transform: rotate(180deg); }
.panel-title { margin: 0; font-size: 18px; line-height: 1.25; letter-spacing: 0; }
.panel-note { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.limit-tag {
  flex: 0 0 auto;
  padding: 4px 7px;
  color: #684716;
  background: var(--amber-soft);
  border: 1px solid #e6c78f;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}
html[data-theme="dark"] .limit-tag { color: #f0c97f; border-color: #665332; }
html[data-theme="dark"] .type-icon.player,
html[data-theme="dark"] .device-icon.pc { border-color: #35516a; }
html[data-theme="dark"] .type-icon.world { border-color: #5f4c2d; }
html[data-theme="dark"] .device-icon.android { border-color: #365943; }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field-label { color: #465149; font-size: 12px; font-weight: 750; }
.text-input,
.text-area,
.number-input {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  outline: 0;
}
.text-area { min-height: 92px; resize: vertical; }
.text-input:focus,
.text-area:focus,
.number-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 107, 72, .12); }
.text-input::placeholder,
.text-area::placeholder { color: #939b95; }
.file-picker {
  position: relative;
  min-height: 88px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 14px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px dashed #9eada1;
  border-radius: 6px;
  overflow: hidden;
}
.file-picker:hover,
.file-picker:focus-within { color: var(--primary); border-color: var(--primary); background: var(--primary-soft); }
.file-picker-icon { width: 38px; height: 38px; display: grid; place-items: center; color: var(--primary); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.file-copy { min-width: 0; }
.file-copy strong { display: block; color: var(--ink); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-copy span { display: block; margin-top: 2px; font-size: 11px; }
.file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }

.collection { min-width: 0; }
.collection-toolbar {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.collection-heading { margin: 0; font-size: 20px; letter-spacing: 0; }
.collection-count { margin-left: 7px; color: var(--muted); font-size: 13px; font-weight: 500; }
.segmented {
  display: inline-grid;
  grid-template-columns: repeat(3, auto);
  padding: 3px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: 7px;
}
.segment {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 11px;
  color: var(--muted);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 750;
}
.segment:hover { color: var(--ink); }
.segment.active { color: var(--ink); background: var(--surface); box-shadow: 0 1px 3px rgba(24, 33, 27, .12); }
.archive-list { display: grid; gap: 9px; }
.archive-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 15px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.archive-item:hover { transform: translateY(-1px); border-color: #aebbb0; box-shadow: 0 8px 22px rgba(25, 42, 30, .08); }
html[data-theme="dark"] .archive-item:hover { border-color: var(--line-strong); box-shadow: 0 10px 28px rgba(0, 0, 0, .2); }
.type-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 6px; }
.type-icon.player { color: var(--blue); background: var(--blue-soft); border: 1px solid #c4d7e8; }
.type-icon.world { color: #8a5b18; background: var(--amber-soft); border: 1px solid #ead09d; }
.archive-copy { min-width: 0; }
.archive-topline { display: flex; align-items: center; gap: 8px; min-width: 0; }
.archive-title { min-width: 0; margin: 0; font-size: 16px; line-height: 1.3; letter-spacing: 0; overflow-wrap: anywhere; }
.type-label { flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 750; }
.archive-desc { margin: 5px 0 7px; color: var(--muted); font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.archive-meta { display: flex; gap: 13px; flex-wrap: wrap; color: #818b83; font-size: 11px; }
.archive-meta span { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.archive-meta .filename { max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.archive-meta .lucide { width: 13px; height: 13px; }
.download-action { min-width: 94px; }
.empty-state {
  min-height: 260px;
  display: grid;
  place-items: center;
  padding: 36px;
  text-align: center;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}
.empty-state .lucide { width: 34px; height: 34px; margin: 0 auto 12px; color: var(--primary); }
.empty-state strong { display: block; margin-bottom: 4px; color: var(--ink); font-size: 16px; }

.upload-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  place-items: center;
  padding: 20px;
  background: rgba(24, 33, 27, .72);
  backdrop-filter: blur(8px);
}
.upload-overlay.active { display: grid; }
.upload-dialog {
  width: min(100%, 380px);
  padding: 26px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(10, 22, 14, .3);
}
.upload-dialog-icon { width: 52px; height: 52px; display: grid; place-items: center; margin: 0 auto 15px; color: #fff; background: var(--primary); border-radius: 7px; }
.upload-dialog-icon .lucide { width: 26px; height: 26px; }
.upload-status { margin: 0; font-size: 18px; }
.upload-sub { margin: 6px 0 18px; color: var(--muted); font-size: 12px; }
.progress-track { height: 7px; overflow: hidden; background: var(--surface-strong); border-radius: 4px; }
.progress-bar { width: 0; height: 100%; background: var(--primary); transition: width .16s ease; }
.upload-speed { min-height: 20px; margin-top: 8px; color: var(--muted); font-size: 11px; }
.floating-download {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  min-width: 226px;
  min-height: 66px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  color: #2f2106;
  background: #f5b942;
  border: 2px solid #4d390e;
  border-radius: 10px;
  box-shadow: 0 12px 34px rgba(61, 42, 6, .3);
  transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}
.floating-download:hover { color: #211704; background: #ffc95d; box-shadow: 0 16px 40px rgba(61, 42, 6, .38); transform: translateY(-2px); }
.floating-download:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.floating-download-icon { width: 42px; height: 42px; display: grid; place-items: center; color: #fff; background: #4d390e; border-radius: 7px; }
.floating-download-icon .lucide { width: 22px; height: 22px; stroke-width: 2.4; }
.floating-download-copy { min-width: 0; }
.floating-download-copy strong { display: block; font-size: 15px; line-height: 1.15; }
.floating-download-copy small { display: block; margin-top: 4px; color: #62470e; font-size: 11px; font-weight: 750; }
.floating-download-arrow { width: 18px; height: 18px; }
.toast {
  position: fixed;
  left: 50%;
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 120;
  max-width: min(calc(100% - 32px), 420px);
  padding: 11px 15px;
  color: #fff;
  background: rgba(24, 33, 27, .94);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 7px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .24);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 14px);
  transition: opacity .18s ease, transform .18s ease;
  font-size: 13px;
  font-weight: 700;
}
.toast.active { opacity: 1; transform: translate(-50%, 0); }

.page-main { padding-top: 32px; padding-bottom: 56px; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-kicker { margin: 0 0 5px; color: var(--primary); font-size: 12px; font-weight: 800; }
.page-title { margin: 0; font-size: 30px; line-height: 1.2; letter-spacing: 0; }
.page-note { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.download-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.download-option {
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.device-icon { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 24px; border-radius: 7px; }
.device-icon.pc { color: var(--blue); background: var(--blue-soft); border: 1px solid #c4d7e8; }
.device-icon.android { color: var(--primary); background: var(--primary-soft); border: 1px solid #bdd5c5; }
.device-icon .lucide { width: 27px; height: 27px; }
.platform-label { color: var(--muted); font-size: 11px; font-weight: 800; }
.download-option h2 { margin: 6px 0 8px; font-size: 22px; letter-spacing: 0; }
.download-option p { max-width: 480px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.download-option footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.download-option footer span { color: var(--muted); font-size: 11px; }

.auth-page {
  display: grid;
  grid-template-rows: 150px 1fr;
  background: var(--canvas);
}
.auth-scene { background: #b9ddd0 url('/assets/pixel-landscape.svg') center 66% / cover no-repeat; border-bottom: 1px solid #9ebbad; }
.auth-main { display: grid; place-items: start center; padding: 0 16px 48px; }
.auth-panel {
  width: min(100%, 420px);
  margin-top: -48px;
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 56px rgba(24, 33, 27, .16);
}
.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.auth-brand strong { display: block; font-size: 16px; }
.auth-brand span { color: var(--muted); font-size: 11px; }
.auth-title { margin: 0 0 18px; font-size: 22px; letter-spacing: 0; }
.alert { margin-bottom: 13px; padding: 10px 12px; border-radius: 6px; font-size: 12px; }
.alert-error { color: #7d2929; background: var(--danger-soft); border: 1px solid #e9b8b5; }
.alert-warning { color: #6f4d18; background: var(--amber-soft); border: 1px solid #e7c88e; text-align: center; }
html[data-theme="dark"] .alert-error { color: #ffc3c3; border-color: #704141; }
html[data-theme="dark"] .alert-warning { color: #f2ca83; border-color: #675332; }
.attempts { display: flex; align-items: center; gap: 7px; margin-bottom: 13px; color: var(--muted); font-size: 11px; }
.attempt-dot { width: 7px; height: 7px; background: var(--primary); border-radius: 2px; }
.attempt-dot.used { background: #d99999; }
.auth-form { display: grid; gap: 14px; }
.back-row { margin-top: 18px; text-align: center; }
.text-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.text-link:hover { color: var(--primary); }
.text-link .lucide { width: 14px; height: 14px; }

.admin-main { padding-top: 28px; padding-bottom: 56px; }
.admin-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.admin-heading h1 { margin: 0; font-size: 28px; letter-spacing: 0; }
.admin-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.settings-tool { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.settings-title { display: flex; align-items: center; gap: 8px; margin: 0 0 13px; font-size: 14px; }
.settings-title .lucide { color: var(--primary); }
.settings-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; }
.input-with-unit { position: relative; }
.input-with-unit .number-input { padding-right: 42px; }
.input-unit { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 11px; }
.table-shell { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.table-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.table-head h2 { margin: 0; font-size: 16px; }
.table-head span { color: var(--muted); font-size: 12px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 10px 13px; color: var(--muted); background: var(--surface-soft); border-bottom: 1px solid var(--line); text-align: left; font-weight: 750; }
.data-table td { padding: 12px 13px; border-bottom: 1px solid #e6eae4; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--surface-soft); }
.table-name { font-weight: 750; }
.table-file { display: block; max-width: 260px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.type-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 4px; font-size: 11px; font-weight: 750; }
.type-badge.player { color: var(--blue); background: var(--blue-soft); }
.type-badge.world { color: #815615; background: var(--amber-soft); }
.type-badge .lucide { width: 13px; height: 13px; }
.delete-form { display: inline; }
.delete-form .button { min-height: 32px; padding: 6px 9px; font-size: 11px; }
.table-empty { padding: 56px 20px; text-align: center; color: var(--muted); }
.auth-theme {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .header-inner { grid-template-columns: auto minmax(180px, 1fr) auto; gap: 14px; }
  .workspace { grid-template-columns: 280px minmax(0, 1fr); gap: 16px; }
  .archive-meta .filename { max-width: 220px; }
  .download-action { min-width: 40px; padding: 8px 10px; }
  .download-action span { display: none; }
}

@media (max-width: 720px) {
  .container { width: min(calc(100% - 24px), var(--content)); }
  .site-header { position: relative; }
  .header-inner { min-height: 62px; grid-template-columns: 1fr auto; gap: 10px; }
  .icon-button, .button { min-height: 44px; }
  .icon-button { width: 44px; height: 44px; flex-basis: 44px; }
  .access-card { grid-template-columns: 36px minmax(0, 1fr) auto; margin-top: 12px; padding: 11px 12px; }
  .access-icon { width: 36px; height: 36px; }
  .access-card code { grid-column: 2 / -1; grid-row: 2; max-width: none; }
  .access-copy-button { width: 44px; min-width: 44px; padding: 0; }
  .access-copy-button span { display: none; }
  .access-copy-button .lucide { width: 19px; height: 19px; }
  .disclosure-icon { display: block; }
  .upload-disclosure:not([open]) .upload-body { display: none; }
  .upload-disclosure > .panel-head { min-height: 52px; align-items: center; }
  .workspace { display: flex; flex-direction: column; }
  .tool-panel { order: 1; width: 100%; }
  .collection { order: 2; width: 100%; }
  .header-inner .header-search { grid-column: 1 / -1; grid-row: 2; margin-bottom: 10px; }
  .header-inner.compact { display: flex; }
  .brand-sub { display: none; }
  .world-strip { min-height: 214px; }
  .world-content { align-items: flex-start; flex-direction: column; gap: 12px; padding-top: 18px; padding-bottom: 16px; }
  .world-title { font-size: 27px; }
  .world-note { display: none; }
  .download-hero { width: 100%; min-height: 58px; margin-top: 12px; }
  .stat-row { justify-content: flex-start; }
  .stat { min-width: 78px; padding: 8px 10px; }
  .stat strong { font-size: 17px; }
  .workspace { grid-template-columns: 1fr; padding-top: 16px; }
  .tool-panel { position: static; }
  .collection-toolbar { align-items: flex-start; flex-direction: column; }
  .segmented { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .archive-item { grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; min-height: 76px; padding: 13px; }
  .type-icon { width: 40px; height: 40px; }
  .download-action { min-width: 44px; width: 44px; height: 44px; padding: 0; }
  .archive-item .download-action { width: 44px; min-width: 44px; }
  .archive-desc { display: none; }
  .archive-meta .filename { max-width: 180px; }
  .page-main { padding-top: 24px; }
  .page-intro { align-items: flex-start; flex-direction: column; }
  .page-title { font-size: 25px; }
  .download-options, .settings-grid { grid-template-columns: 1fr; }
  .download-option { min-height: 280px; padding: 20px; }
  .admin-heading { align-items: flex-start; flex-direction: column; }
  .table-shell { border: 0; background: transparent; overflow: visible; }
  .table-head { padding: 0 0 12px; border-bottom: 0; }
  .data-table, .data-table tbody, .data-table tr, .data-table td { display: block; width: 100%; }
  .data-table thead { display: none; }
  .data-table tr { margin-bottom: 9px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
  .data-table td { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 5px 0; border: 0; text-align: right; }
  .data-table td::before { content: attr(data-label); flex: 0 0 auto; color: var(--muted); font-size: 11px; font-weight: 700; }
  .table-file { max-width: 220px; }
}

@media (max-width: 440px) {
  .header-actions .button span { display: none; }
  .header-actions .button { width: 44px; padding: 0; }
  .brand-name { font-size: 15px; }
  .world-strip { min-height: 214px; }
  .download-hero { grid-template-columns: 40px minmax(0, 1fr) 18px; padding: 9px 11px; }
  .download-hero-copy strong { font-size: 14px; }
  .floating-download { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); left: 12px; min-width: 0; min-height: 62px; }
  .floating-download-copy strong { font-size: 14px; }
  .stat-row { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); }
  .stat { min-width: 0; }
  .archive-item { grid-template-columns: 38px minmax(0, 1fr) 44px; }
  .archive-topline { align-items: flex-start; flex-direction: column; gap: 2px; }
  .archive-meta span:first-child { display: none; }
  .archive-meta .filename { max-width: 150px; }
  .download-action { width: 38px; min-width: 38px; height: 38px; padding: 0; }
  .auth-panel { padding: 22px; }
  .settings-form { grid-template-columns: 1fr; }
  .settings-form .button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
