:root {
  color-scheme: light;
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-strong: #eef7f4;
  --text: #172026;
  --muted: #60707f;
  --border: #dce3ea;
  --accent: #0f766e;
  --accent-dark: #0b5d56;
  --danger: #b42318;
  --shadow: 0 18px 45px rgba(27, 39, 51, 0.08);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; line-height: 1.5; }
.page-shell { width: min(1040px, calc(100% - 32px)); margin: 0 auto; padding: 40px 0; }
.header-block { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; padding: 28px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow); }
.brand-row { display: flex; align-items: center; gap: 18px; }
.brand-mark { display: grid; place-items: center; width: 64px; height: 64px; flex: 0 0 auto; color: var(--accent); background: var(--surface-strong); border: 1px solid #cce5dd; border-radius: 8px; }
.brand-mark svg { width: 38px; height: 38px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; font-weight: 780; }
.header-block p { margin-top: 8px; color: var(--muted); font-size: 1rem; }
.status-card { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; padding: 9px 12px; color: #11453f; background: #e7f6f2; border: 1px solid #c5e7df; border-radius: 8px; font-size: 0.92rem; font-weight: 650; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, 0.12); }
.content-block { margin-top: 18px; padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; }
.section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
h2 { font-size: 1.2rem; font-weight: 760; }
.ghost-button, .download-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px; border-radius: 8px; font-size: 0.94rem; font-weight: 720; text-decoration: none; cursor: pointer; }
.ghost-button { color: var(--text); background: #f9fafb; border: 1px solid var(--border); }
.ghost-button:hover { background: #f0f4f7; }
.ghost-button svg, .download-button svg { width: 18px; height: 18px; }
.upload-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.upload-form label { display: grid; gap: 7px; color: #334155; font-size: 0.9rem; font-weight: 720; }
.upload-form input, .upload-form textarea { width: 100%; min-height: 42px; padding: 10px 12px; color: var(--text); background: #fbfcfd; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-size: 0.95rem; }
.upload-form input[type="file"] { padding: 8px 10px; }
.upload-form textarea { resize: vertical; }
.full-span, .upload-message { grid-column: 1 / -1; }
.upload-submit { width: max-content; min-width: 132px; color: #fff; background: var(--accent); border: 1px solid var(--accent-dark); }
.upload-submit:disabled { cursor: wait; opacity: 0.65; }
.upload-message { min-height: 22px; color: var(--muted); font-size: 0.92rem; }
.upload-message.success { color: var(--accent-dark); font-weight: 700; }
.upload-message.error { color: var(--danger); font-weight: 700; }
.app-list { display: grid; gap: 12px; }
.app-item { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.app-meta { min-width: 0; }
.app-title-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.app-title-row h3 { font-size: 1.1rem; line-height: 1.25; font-weight: 760; overflow-wrap: anywhere; }
.version { padding: 4px 8px; color: #164e63; background: #e6f6fb; border: 1px solid #bde9f5; border-radius: 8px; font-size: 0.82rem; font-weight: 720; }
.description { margin-top: 8px; color: var(--muted); overflow-wrap: anywhere; }
.details { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 12px 0 0; }
.details div { display: flex; gap: 6px; min-width: 0; }
.details dt, .details dd { margin: 0; font-size: 0.84rem; }
.details dt { color: #7a8794; font-weight: 700; }
.details dd { color: #334155; overflow-wrap: anywhere; }
.download-button { flex: 0 0 auto; color: #fff; background: var(--accent); border: 1px solid var(--accent-dark); }
.download-button:hover { background: var(--accent-dark); }
.download-button.disabled { pointer-events: none; opacity: 0.5; }
.empty-state, .error-box { padding: 34px 20px; text-align: center; border: 1px dashed #cbd5df; border-radius: 8px; background: #fbfcfd; }
.empty-icon { display: grid; place-items: center; width: 58px; height: 58px; margin: 0 auto 14px; color: var(--accent); background: var(--surface-strong); border-radius: 8px; }
.empty-icon svg { width: 36px; height: 36px; }
.empty-state h3 { font-size: 1.05rem; font-weight: 760; }
.empty-state p { max-width: 680px; margin: 8px auto 0; color: var(--muted); }
code { padding: 2px 5px; background: #edf2f7; border-radius: 5px; color: #24313d; font-size: 0.9em; overflow-wrap: anywhere; }
.error-box { color: var(--danger); border-color: #f0b7b2; background: #fff7f6; }
@media (max-width: 720px) {
  .page-shell { width: min(100% - 20px, 1040px); padding: 18px 0; }
  .header-block, .content-block { padding: 18px; }
  .header-block, .section-title-row, .app-item { flex-direction: column; align-items: stretch; }
  .brand-row { align-items: flex-start; }
  .brand-mark { width: 54px; height: 54px; }
  .brand-mark svg { width: 32px; height: 32px; }
  .status-card { width: 100%; justify-content: center; }
  .ghost-button, .download-button, .upload-submit { width: 100%; }
  .details, .upload-form { grid-template-columns: 1fr; }
  .details { flex-direction: column; gap: 6px; }
}
