:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #08111f;
  color: #e5edf8;
  --surface: #101d31;
  --surface-soft: #16263d;
  --border: #263a55;
  --muted: #91a4bd;
  --accent: #64d7b0;
  --accent-strong: #2fba8c;
  --warning: #ffd187;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: radial-gradient(circle at 90% 0%, #173255 0, transparent 38%), var(--background, #08111f); }
button { font: inherit; }
.app-shell { width: min(100% - 32px, 980px); margin: 0 auto; padding: 48px 0 28px; }
.app-header, .section-heading, .app-footer, .compact { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.eyebrow { margin: 0 0 8px; color: var(--accent); font-size: .73rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 620px; margin-bottom: 12px; font-size: clamp(2.1rem, 7vw, 4.5rem); letter-spacing: -.06em; line-height: .98; }
h2 { margin-bottom: 0; font-size: 1.35rem; letter-spacing: -.03em; }
.subtitle { max-width: 550px; margin-bottom: 0; color: var(--muted); font-size: 1.05rem; line-height: 1.6; }
.status-pill, .count-label { border: 1px solid var(--border); border-radius: 999px; color: var(--muted); font-size: .82rem; padding: 9px 13px; white-space: nowrap; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 14px var(--accent); }
.notice { margin: 42px 0; padding: 20px; border: 1px solid #365273; border-radius: 18px; background: linear-gradient(135deg, #142c43, #0e1b2e); }
.notice strong { color: var(--warning); }
.notice p { max-width: 760px; margin: 8px 0 0; color: var(--muted); line-height: 1.6; }
.upload-card { margin: 0 0 42px; padding: 22px; border: 1px solid var(--border); border-radius: 18px; background: rgba(16, 29, 49, .88); }
.upload-help { max-width: 680px; margin: 8px 0 18px; color: var(--muted); line-height: 1.6; }
#folder-input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; clip-path: inset(50%); }
.upload-button { display: inline-block; padding: 11px 14px; border-radius: 11px; background: var(--accent-strong); color: #06151a; cursor: pointer; font-weight: 800; }
.upload-button:hover { background: var(--accent); }
.upload-summary { margin: 16px 0 0; color: var(--muted); font-size: .88rem; }
.folder-files { display: grid; gap: 6px; max-height: 155px; margin: 12px 0 0; padding: 0; overflow: auto; list-style: none; }
.folder-files li { padding: 8px 10px; border-radius: 8px; background: var(--surface-soft); color: #b9c9dc; font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.section-heading { margin: 0 0 16px; align-items: end; }
.permission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 12px; }
.permission-card, .activity-card { border: 1px solid var(--border); border-radius: 18px; background: rgba(16, 29, 49, .88); }
.permission-card { padding: 18px; transition: border-color .2s, transform .2s; }
.permission-card:hover { border-color: #4b6a92; transform: translateY(-2px); }
.card-top { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.permission-icon { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 12px; background: var(--surface-soft); color: var(--accent); font-size: 1.2rem; }
.permission-card h3 { margin: 17px 0 7px; font-size: 1rem; }
.permission-card p { min-height: 42px; margin-bottom: 17px; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.permission-state { color: var(--muted); font-size: .74rem; }
.permission-state.enabled { color: var(--accent); }
.primary-button, .text-button { border: 0; cursor: pointer; }
.primary-button { width: 100%; padding: 11px 14px; border-radius: 11px; background: var(--accent-strong); color: #06151a; font-weight: 800; }
.primary-button:hover { background: var(--accent); }
.activity-card { margin-top: 28px; padding: 22px; }
.compact { align-items: start; margin-bottom: 12px; }
.empty-state { margin: 0; color: var(--muted); font-size: .9rem; }
.activity-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.activity-list li { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px solid var(--border); color: var(--muted); font-size: .88rem; }
.activity-list li:last-child { border-bottom: 0; }
.activity-list time { color: #657b98; white-space: nowrap; }
.app-footer { margin-top: 28px; align-items: start; color: #657b98; font-size: .78rem; line-height: 1.5; }
.app-footer p { max-width: 580px; margin-bottom: 0; }
.text-button { padding: 0; background: transparent; color: var(--accent); }
.privacy-dialog { max-width: 520px; border: 1px solid var(--border); border-radius: 18px; background: var(--surface); color: inherit; box-shadow: 0 20px 70px #0008; }
.privacy-dialog::backdrop { background: #020814b8; backdrop-filter: blur(4px); }
.dialog-content { padding: 10px; }
.dialog-content p:not(.eyebrow) { color: var(--muted); line-height: 1.6; }
@media (max-width: 600px) { .app-shell { padding-top: 28px; } .app-header, .app-footer { align-items: start; flex-direction: column; } .status-pill { align-self: start; } .count-label { font-size: .72rem; } }
