:root {
  --bg: #0f1117;
  --panel: #181b24;
  --line: #2a2f3d;
  --text: #eef0f6;
  --muted: #98a0b3;
  --accent: #6c8cff;
  --accent2: #b06cff;
  --warn: #ffd166;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 50% -200px, #1d2340 0%, var(--bg) 60%) no-repeat, var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Segoe UI', 'Malgun Gothic', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }
header.top { display: flex; align-items: center; justify-content: space-between; padding: 18px 0; }
.brand { font-weight: 800; font-size: 20px; letter-spacing: -0.02em; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.brand .dot { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 18px 4px 0 -3px #4fd1c5, 8px 14px 0 -4px #ff8fab; margin-right: 16px; }
.lang { display: flex; gap: 4px; }
.lang button { background: transparent; border: 1px solid var(--line); color: var(--muted); border-radius: 8px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; }
.lang button[aria-pressed='true'] { color: var(--text); border-color: var(--accent); }

.hero { text-align: center; padding: 24px 0 8px; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 0 0 8px; letter-spacing: -0.03em; }
.hero p { margin: 0 auto; max-width: 560px; color: var(--muted); }

form#form { display: flex; gap: 8px; max-width: 640px; margin: 22px auto 6px; }
form#form input { flex: 1; min-width: 0; padding: 14px 16px; font: inherit; font-size: 16px; color: var(--text); background: var(--panel); border: 1px solid var(--line); border-radius: 12px; outline: none; }
form#form input:focus { border-color: var(--accent); }
.btn { padding: 0 22px; font: inherit; font-weight: 700; font-size: 15px; color: #fff; border: 0; border-radius: 12px; cursor: pointer; background: linear-gradient(135deg, var(--accent), var(--accent2)); white-space: nowrap; }
.btn:hover { filter: brightness(1.1); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.btn.ghost { background: var(--panel); border: 1px solid var(--line); color: var(--text); padding: 10px 16px; font-weight: 600; }
.hint { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 6px; }
#msg { text-align: center; min-height: 26px; color: var(--warn); font-size: 14px; margin: 6px 0 0; }

#result { display: none; margin-top: 8px; }
.result-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; margin-bottom: 10px; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who img { width: 44px; height: 44px; border-radius: 50%; }
.who h2 { margin: 0; font-size: 18px; line-height: 1.3; overflow-wrap: anywhere; }
.who small { color: var(--muted); }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tools select { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; font: inherit; font-size: 14px; }
#stage { position: relative; width: 100%; background: #0b0d13; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; touch-action: pan-y; }
#stage canvas { display: block; width: 100%; cursor: grab; }
#stage canvas.dragging { cursor: grabbing; }
#tip { position: absolute; pointer-events: none; display: none; background: rgba(10, 12, 18, 0.92); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.45; max-width: 240px; z-index: 2; }
#tip b { display: block; font-size: 14px; }
#tip span { color: var(--muted); }
.note { color: var(--muted); font-size: 13px; text-align: center; margin: 8px 0 0; }

.ad-slot { margin: 18px auto; text-align: center; min-height: 0; }
.ad-slot[hidden] { display: none; }

section.info { margin: 56px 0 0; }
section.info h2 { font-size: 20px; margin: 0 0 12px; }
.faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { color: var(--muted); margin: 8px 0 0; }
.steps { color: var(--muted); padding-left: 20px; }

footer { margin: 64px 0 32px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
footer a { color: var(--muted); }

.page { max-width: 760px; margin: 0 auto; padding: 8px 16px 0; }
.page h1 { font-size: 28px; }
.page h2 { font-size: 18px; margin-top: 28px; }
.page p, .page li { color: #cfd4e2; }

@media (max-width: 560px) {
  form#form { flex-direction: column; }
  .btn { padding: 14px 22px; }
}

.loginbox { text-align: center; margin: 22px auto 0; max-width: 640px; }
.loginbox .hint { margin: 10px auto 0; max-width: 460px; }
.btn.steam { display: inline-flex; align-items: center; gap: 10px; padding: 15px 30px; font-size: 17px; text-decoration: none; background: linear-gradient(135deg, #1b6fa8, #2a475e); border: 1px solid #66c0f4; }
.manual { margin-top: 14px; color: var(--muted); font-size: 14px; }
.manual summary { cursor: pointer; }
.manual form#form { margin-top: 10px; }
.lang #logout { margin-left: 6px; }
