@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Noto+Sans+JP:wght@400;500;700&display=swap');

:root {
  --bg: #0c0d0f;
  --bg-2: #131518;
  --panel: #171a1e;
  --panel-2: #1d2126;
  --line: #262b31;
  --line-2: #323840;
  --text: #e9ecef;
  --muted: #8d959e;
  --accent: #8fb3c9;
  --accent-ink: #0c0d0f;
  --ok: #6fbf8e;
  --warn: #d9b25f;
  --err: #e0716b;
  --radius: 10px;
  --font: 'Inter', 'Noto Sans JP', -apple-system, 'Hiragino Sans', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ---------- controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: border-color .15s, background .15s, opacity .15s;
}
.btn:hover { border-color: #49515b; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--err); }
.btn.danger:hover { border-color: var(--err); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--panel-2); }

input[type=text], input[type=password], input[type=search], input[type=number], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--bg-2); outline: none; transition: border-color .15s;
}
textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .02em; }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }

/* ---------- gate / login pages ---------- */
.center-page { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.gate { width: 100%; max-width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 32px 28px; text-align: center; }
.gate .brand { margin: 0 0 18px; font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); }
.gate h1 { margin: 0 0 8px; font-size: 20px; font-weight: 600; }
.gate form { display: grid; gap: 10px; margin-top: 18px; text-align: left; }
.gate .btn { width: 100%; height: 40px; }
.err { color: var(--err); font-size: 13px; }
