:root {
  --purple-900: #1E1049;
  --purple-800: #2A1864;
  --purple-700: #3E22A6;
  --purple-100: #E7E1FF;
  --lime: #EFEA3A;
  --lime-dim: #d8d42f;
  --ink: #1B1330;
  --cream: #F5F1FF;
  --muted: #B4A3E8;
  --danger: #FF6B6B;
  --success: #7CE38B;
}

* { box-sizing: border-box; }

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 50% -10%, var(--purple-700) 0%, var(--purple-900) 55%, #150a38 100%);
  background-attachment: fixed;
  color: var(--cream);
  margin: 0;
  padding: 32px 16px 60px;
  min-height: 100vh;
}

.wrap { max-width: 460px; margin: 0 auto; }

.hero { text-align: center; margin-bottom: 24px; }
.mascot { margin-bottom: 4px; }
.mascot svg { filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35)); }

.wordmark {
  font-family: 'Baloo 2', 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 44px;
  color: var(--lime);
  letter-spacing: 0.5px;
  line-height: 1;
  text-shadow: 0 2px 0 rgba(0,0,0,0.15);
}

.sub {
  color: var(--muted);
  font-size: 14.5px;
  margin: 10px auto 0;
  max-width: 340px;
  line-height: 1.5;
}

.card {
  background: var(--purple-800);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 26px;
  padding: 24px;
  margin-top: 18px;
  box-shadow: 0 20px 40px -20px rgba(0,0,0,0.5);
}

.hidden { display: none !important; }

.tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  background: rgba(0,0,0,0.18);
  padding: 5px;
  border-radius: 999px;
}
.tab {
  flex: 1;
  padding: 10px;
  background: transparent;
  border: none;
  color: var(--muted);
  border-radius: 999px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 14px;
  transition: all .15s ease;
}
.tab.active { background: var(--lime); color: var(--ink); }

.form { display: flex; flex-direction: column; gap: 12px; }

input {
  background: rgba(255,255,255,0.06);
  border: 2px solid rgba(255,255,255,0.12);
  color: var(--cream);
  padding: 13px 16px;
  border-radius: 16px;
  font-size: 15px;
  font-family: 'Nunito', sans-serif;
  outline: none;
  transition: border-color .15s ease;
}
input::placeholder { color: var(--muted); }
input:focus { border-color: var(--lime); }

button { font-family: 'Nunito', sans-serif; }

.btn-primary {
  background: var(--lime);
  color: var(--ink);
  border: none;
  padding: 14px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
  transition: transform .12s ease, background .12s ease;
}
.btn-primary:hover:not(:disabled) { transform: translateY(-2px); background: var(--lime-dim); }
.btn-primary:active:not(:disabled) { transform: translateY(0); }
.btn-primary:disabled { background: #4a436e; color: var(--muted); cursor: not-allowed; }

button.link {
  background: transparent;
  color: var(--muted);
  border: none;
  padding: 0;
  text-decoration: underline;
  cursor: pointer;
  font-weight: 700;
  font-size: 13px;
}

.error { color: var(--danger); font-size: 13px; min-height: 4px; font-weight: 700; }
.success { color: var(--success); font-size: 13px; font-weight: 700; }

.userbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  font-size: 14px;
  color: var(--cream);
}
.userbar b { color: var(--lime); }

.upload-area {
  border: 3px dashed rgba(239,234,58,0.45);
  border-radius: 20px;
  padding: 26px;
  text-align: center;
  cursor: pointer;
  margin-bottom: 14px;
  transition: border-color .15s ease, background .15s ease;
  background: rgba(255,255,255,0.03);
}
.upload-area:hover { border-color: var(--lime); background: rgba(239,234,58,0.06); }
.upload-area p { color: var(--muted); font-weight: 700; margin: 0; }
.upload-area img { max-width: 100%; max-height: 220px; border-radius: 14px; }

#loading { margin-top: 12px; color: var(--muted); font-size: 14px; font-weight: 700; text-align: center; }

table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
td { padding: 8px 4px; border-bottom: 1px solid rgba(255,255,255,0.08); }
td:first-child { color: var(--muted); width: 40%; font-weight: 700; }
td:last-child { font-weight: 700; }

.cmdBlock { margin-top: 16px; }
.cmdBlock label { font-size: 13px; color: var(--muted); font-weight: 700; }
.hint { font-weight: 400; font-size: 12px; }
.cmdRow { display: flex; gap: 8px; margin-top: 6px; }
.cmdRow code {
  flex: 1;
  background: var(--purple-900);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--lime);
  padding: 10px;
  border-radius: 12px;
  font-size: 12px;
  word-break: break-all;
  font-family: 'SFMono-Regular', Consolas, monospace;
}
.copyBtn {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  background: var(--purple-100);
  color: var(--ink);
  border: none;
  border-radius: 10px;
  cursor: pointer;
}
.copyBtn:hover { background: var(--lime); }

.warn { font-size: 12px; color: #FFC55C; margin-top: 16px; font-weight: 700; }

.foot {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 28px;
  opacity: 0.7;
}

.mascot-img {
  width: 132px;
  height: auto;
  border-radius: 20px;
  filter: drop-shadow(0 8px 18px rgba(0,0,0,0.35));
}

.privacy-notice {
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.privacy-notice a {
  color: var(--lime);
  font-weight: 800;
  text-decoration: none;
}
.privacy-notice a:hover { text-decoration: underline; }
