@import url('https://fonts.googleapis.com/css2?family=Jua&display=swap');
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Jua', system-ui, 'Malgun Gothic', sans-serif;
  background: #fff8ec; color: #2b2b2b; min-height: 100vh; min-height: 100dvh;
}
button { font-family: inherit; cursor: pointer; border: 0; }
input { font-family: inherit; }
.topbar {
  display: flex; align-items: center; gap: 8px; padding: 10px 14px;
  position: relative; z-index: 50;
}
.topbar a, .topbar button.plan-btn {
  background: rgba(255,255,255,.85); color: #333; text-decoration: none;
  padding: 8px 14px; border-radius: 999px; font-size: 16px; box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.topbar .grow { flex: 1; }
.btn {
  background: #ff8a3d; color: #fff; font-size: 22px; padding: 14px 24px; border-radius: 16px;
  box-shadow: 0 4px 0 #c95f1d; transition: transform .05s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #c95f1d; }
.btn.blue { background: #3d8bff; box-shadow: 0 4px 0 #1d5fc9; }
.btn.green { background: #2fb36b; box-shadow: 0 4px 0 #1d8048; }
.btn.gray { background: #9a9a9a; box-shadow: 0 4px 0 #6d6d6d; }
.btn:disabled { opacity: .45; }
.answer-input {
  font-size: 30px; width: 200px; text-align: center; padding: 10px; border-radius: 14px;
  border: 3px solid #ccc; outline: none;
}
.answer-input:focus { border-color: #3d8bff; }
.overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center;
  z-index: 100; padding: 16px;
}
.overlay.hidden, .hidden { display: none !important; }
.card {
  background: #fff; color: #2b2b2b; border-radius: 22px; padding: 24px; max-width: 560px; width: 100%;
  box-shadow: 0 10px 30px rgba(0,0,0,.3); max-height: 90vh; overflow: auto;
}
.card h2 { margin: 0 0 12px; font-size: 28px; }
.plan-list { padding-left: 20px; line-height: 1.6; font-size: 18px; font-family: system-ui, 'Malgun Gothic', sans-serif; }
.rank-table { width: 100%; border-collapse: collapse; font-size: 18px; }
.rank-table td, .rank-table th { padding: 6px 8px; border-bottom: 1px solid #eee; text-align: left; }
.rank-table tr.me td { background: #fff3b0; }
.shake { animation: shake .4s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-10px)} 40%{transform:translateX(10px)} 60%{transform:translateX(-6px)} 80%{transform:translateX(6px)} }
.pop { animation: pop .5s; }
@keyframes pop { 0%{transform:scale(.4);opacity:0} 60%{transform:scale(1.15);opacity:1} 100%{transform:scale(1)} }
