*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #111; --surface: #1c1c1e; --border: #2c2c2e;
  --text: #f5f5f7; --muted: #8e8e93; --accent: #f5c518;
  --danger: #ff453a; --r: 10px;
  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--font);
  font-size: 1rem; line-height: 1.5; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.site-header { width: 100%; padding: 0.75rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border); font-size: 0.875rem;
  color: var(--muted); gap: 1rem; }
.site-header .title { font-weight: 600; color: var(--text); font-size: 1rem; }
.site-header nav { display: flex; gap: 1rem; }

main { flex: 1; width: 100%; max-width: 480px; padding: 2rem 1.25rem;
  display: flex; flex-direction: column; align-items: center; gap: 2rem; }

.login-wrap { width: 100%; display: flex; flex-direction: column; gap: 1rem; }
.login-wrap h1 { font-size: 1.5rem; font-weight: 700; text-align: center; }

input[type="password"] { width: 100%; padding: 0.85rem 1rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r); color: var(--text); font-size: 1rem;
  font-family: var(--font); outline: none; min-height: 48px; }
input:focus { border-color: var(--accent); }

.btn { display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border: none; border-radius: var(--r);
  font-size: 1rem; font-family: var(--font); font-weight: 600;
  cursor: pointer; min-height: 48px; transition: opacity 0.1s; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: #000; width: 100%; }
.btn-ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); }

.error-msg { color: var(--danger); font-size: 0.875rem; text-align: center; min-height: 1.25em; }

.name-display { font-size: clamp(2rem, 12vw, 5rem); font-weight: 700;
  text-align: center; letter-spacing: -0.02em; word-break: break-word; }
.counter { color: var(--muted); font-size: 0.875rem; }

.stars { display: flex; gap: 0.5rem; }
.star-btn { background: none; border: none; font-size: clamp(2rem, 10vw, 3rem);
  cursor: pointer; color: var(--muted); padding: 0.25rem;
  min-width: 48px; min-height: 48px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: var(--r);
  transition: color 0.1s, transform 0.1s; }
.star-btn:hover:not(:disabled) { color: var(--accent); transform: scale(1.15); }
.star-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.skip-btn { color: var(--muted); border: 1px solid var(--border);
  background: transparent; padding: 0.6rem 1.5rem; border-radius: var(--r);
  font-size: 0.9rem; cursor: pointer; min-height: 48px; font-family: var(--font); }
.skip-btn:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.skip-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.done-msg { text-align: center; color: var(--muted); font-size: 1rem; line-height: 1.8; }
.done-msg a { font-weight: 600; }

.results-header { display: flex; align-items: center; gap: 1rem;
  width: 100%; justify-content: space-between; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.6rem 0.5rem; text-align: left; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; }
tr:last-child td { border-bottom: none; }
td:nth-child(1) { color: var(--muted); width: 2.5rem; }
td:nth-child(3), td:nth-child(4), td:nth-child(5),
th:nth-child(3), th:nth-child(4), th:nth-child(5) { text-align: right; }
