/* relay — sandbox 허브 다크 테마 토큰을 값으로 복사(별도 컨테이너라 파일 공유 불가) */
:root {
  --bg: #0f1117;
  --surface: #1a1d27;
  --border: #2a2f3d;
  --text: #e8eaef;
  --muted: #8b92a5;
  --accent: #f59e0b;
  --danger: #ef4444;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding: 0.75rem;
}

/* 설치형 앱(standalone)에선 주소창이 없어 콘텐츠가 상태바에 붙는다 — 안전영역만큼 띄운다. */
@media (display-mode: standalone) {
  body {
    padding-top: calc(0.75rem + env(safe-area-inset-top));
    padding-bottom: calc(0.75rem + env(safe-area-inset-bottom));
    padding-left: calc(0.75rem + env(safe-area-inset-left));
    padding-right: calc(0.75rem + env(safe-area-inset-right));
  }
}

.page {
  max-width: 480px;
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.site-header h1 {
  font-size: 1rem;
  margin: 0;
}

.btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  padding: 0.4rem 0.7rem;
  font-size: 0.85rem;
  cursor: pointer;
}

.btn:hover { border-color: var(--accent); }
.btn.danger:hover { border-color: var(--danger); }
.btn.primary { border-color: var(--accent); color: var(--accent); }

.section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.section h2 {
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.dropzone {
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 0.75rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
  cursor: pointer;
}

.dropzone.dragover { border-color: var(--accent); color: var(--accent); }

.file-list { list-style: none; margin: 0; padding: 0; }

.file-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  border-top: 1px solid var(--border);
}

.file-row:first-child { border-top: none; }

.file-info { flex: 1; min-width: 0; }

.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.88rem;
}

.file-meta { color: var(--muted); font-size: 0.75rem; }

.file-actions { display: flex; gap: 0.35rem; flex-shrink: 0; }

.file-actions .btn { padding: 0.25rem 0.5rem; font-size: 0.75rem; }

.empty { color: var(--muted); font-size: 0.85rem; padding: 0.3rem 0; }

/* 삭제 확인 모달 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 10;
}

.modal-backdrop[hidden] { display: none; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  width: 100%;
  max-width: 320px;
}

.modal-title { font-size: 0.95rem; margin-bottom: 0.5rem; }

.modal-file {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.4rem 0.55rem;
  font-size: 0.85rem;
  word-break: break-all;
  margin-bottom: 0.5rem;
}

.modal-note { color: var(--muted); font-size: 0.78rem; margin-bottom: 0.9rem; }

.modal-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.btn.danger-solid {
  background: var(--danger);
  border-color: var(--danger);
  color: #fff;
}

.btn.danger-solid:hover { filter: brightness(1.1); }

/* 로그인 페이지 */
.login-box {
  max-width: 320px;
  margin: 3rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem;
  text-align: center;
}

.login-box h1 { font-size: 1.1rem; margin: 0 0 1rem; }

.login-box input[type="password"] {
  width: 100%;
  padding: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  margin-bottom: 0.6rem;
}

.login-box .error { color: var(--danger); font-size: 0.8rem; margin-bottom: 0.6rem; }
