:root {
  --ink: #182033;
  --paper: #f8fafc;
  --cyan: #67e8f9;
  --green: #86efac;
  --gold: #facc15;
  --line: rgba(248, 250, 252, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; user-select: none; touch-action: manipulation; }

body {
  min-height: 100vh;
  overflow-x: hidden;
  font-family: 'Outfit', 'M PLUS Rounded 1c', sans-serif;
  color: var(--paper);
  background:
    radial-gradient(circle at 18% 10%, rgba(103, 232, 249, 0.2), transparent 30%),
    radial-gradient(circle at 82% 16%, rgba(134, 239, 172, 0.2), transparent 26%),
    linear-gradient(145deg, #182033, #1d2f47 52%, #17312d);
}

#app { width: 100%; min-height: 100vh; display: flex; justify-content: center; padding: 16px; }
.back-link {
  position: fixed; top: 15px; left: 15px; z-index: 20; padding: 8px 14px;
  border: 1px solid var(--line); border-radius: 999px; color: var(--paper); background: rgba(24,32,51,0.72);
  text-decoration: none; font-weight: 900; font-size: 0.78rem; backdrop-filter: blur(12px);
}
.app-shell { width: min(560px, 100%); min-height: calc(100vh - 32px); display: flex; flex-direction: column; justify-content: center; gap: 14px; padding-top: 40px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.eyebrow { color: var(--gold); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.12em; }
h1 { font-size: 2.45rem; line-height: 1; font-weight: 900; letter-spacing: 0; }
h1 span { color: var(--cyan); }
.wallet { min-width: 118px; padding: 10px 12px; border: 1px solid rgba(103,232,249,0.3); border-radius: 8px; background: rgba(255,255,255,0.07); text-align: right; }
.wallet span, .quest-summary span, .quest-card span { display: block; color: rgba(255,255,255,0.66); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.08em; }

.quest-summary, .quest-card, .mini-guide {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,0.11), rgba(255,255,255,0.045));
  box-shadow: 0 18px 34px rgba(0,0,0,0.24);
}
.quest-summary { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 8px; padding: 12px; align-items: stretch; }
.quest-summary div { padding: 10px; border-radius: 8px; background: rgba(255,255,255,0.07); text-align: center; }
.quest-summary b { display: block; margin-top: 4px; font-size: 1.25rem; }
button, .quest-card a {
  border: 0; border-radius: 8px; min-height: 50px; padding: 10px 12px;
  color: var(--ink); background: var(--gold); font-family: inherit; font-size: 0.86rem; font-weight: 900;
  box-shadow: 0 8px 0 rgba(0,0,0,0.24); text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
button:disabled { opacity: 0.48; box-shadow: none; }
.quest-list { display: grid; gap: 10px; }
.quest-card { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 14px; }
.quest-card h2 { margin: 3px 0 5px; font-size: 1.18rem; line-height: 1.16; letter-spacing: 0; }
.quest-card p { color: rgba(255,255,255,0.76); font-size: 0.9rem; line-height: 1.42; }
.quest-card.done { border-color: rgba(134,239,172,0.55); }
.quest-card.done h2 { color: var(--green); }
.quest-card a { background: var(--cyan); min-width: 98px; }
.mini-guide { padding: 14px 16px; }
.mini-guide h2 { font-size: 1.05rem; margin-bottom: 6px; }
.mini-guide p { color: rgba(255,255,255,0.76); font-size: 0.88rem; line-height: 1.55; }

@media (max-width: 560px) {
  #app { padding: 12px; }
  .app-shell { min-height: calc(100vh - 24px); gap: 11px; }
  h1 { font-size: 2rem; }
  .quest-summary { grid-template-columns: 1fr 1fr; }
  .quest-summary button { grid-column: 1 / -1; }
  .quest-card { grid-template-columns: 1fr; }
  .quest-card a { width: 100%; }
}
