:root {
  --gold: #F4BE38;
  --lemon: #EDDA5E;
  --green: #71951E;
  --forest: #587529;
  --rose: #CB7087;
  --blush: #EDBECA;
  --pink: #FFD6DC;
  --cream: #FFF1E4;
  /* extras */
  --ink: #2C3A1A;
  --ink-soft: #5E6B4C;
  --berry: #C8364A;
  --white: #FFFFFF;
  --line: rgba(88, 117, 41, .16);
  --shadow: 0 8px 24px rgba(88, 117, 41, .14);
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, sans-serif;
  color: var(--ink);
  background: var(--cream);
  background-image:
    radial-gradient(circle at 10% 10%, rgba(244,190,56,.18) 0 120px, transparent 121px),
    radial-gradient(circle at 92% 22%, rgba(203,112,135,.16) 0 160px, transparent 161px),
    radial-gradient(circle at 80% 95%, rgba(113,149,30,.14) 0 180px, transparent 181px);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: 'Fredoka', 'Nunito', sans-serif; margin: 0; }
.festive { font-family: 'Mountains of Christmas', 'Fredoka', cursive; }
button { font: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

/* snow */
.snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.snow i { position: absolute; top: -10px; color: #fff; text-shadow: 0 0 4px rgba(203,112,135,.5); animation: fall linear infinite; opacity: .9; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 800; font-size: 16px;
  background: var(--forest); color: #fff; box-shadow: 0 4px 0 #3e5a1c; transition: transform .1s, box-shadow .1s, opacity .2s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #3e5a1c; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 0 #c9931c; }
.btn.rose { background: var(--rose); box-shadow: 0 4px 0 #a2506a; }
.btn.berry { background: var(--berry); box-shadow: 0 4px 0 #8f2233; }
.btn.ghost { background: var(--white); color: var(--ink); box-shadow: 0 0 0 2px var(--line) inset; }
.btn.small { padding: 8px 14px; font-size: 14px; }
.btn.block { width: 100%; }

.card { background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px; font-weight: 800; font-size: 13px; }
.muted { color: var(--ink-soft); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(120px);
  background: var(--ink); color: #fff; padding: 14px 20px; border-radius: 16px; font-weight: 700;
  max-width: calc(100vw - 32px); z-index: 100; transition: transform .3s; text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--berry); }

.offline {
  position: fixed; top: 0; left: 0; right: 0; z-index: 90; background: var(--berry); color: #fff;
  text-align: center; font-weight: 800; padding: 8px; font-size: 14px; transform: translateY(-100%); transition: transform .3s;
}
.offline.show { transform: none; }

.modal-bg { position: fixed; inset: 0; background: rgba(44,58,26,.55); display: none; align-items: center; justify-content: center; z-index: 80; padding: 16px; }
.modal-bg.show { display: flex; }
.modal { background: var(--white); border-radius: 24px; padding: 24px; max-width: 420px; width: 100%; max-height: 90vh; overflow: auto; }

input[type=text], input[type=password], textarea {
  width: 100%; font: inherit; font-size: 17px; padding: 14px 16px; border-radius: 14px;
  border: 2px solid var(--line); background: var(--cream); color: var(--ink); outline: none;
}
input:focus, textarea:focus { border-color: var(--green); background: #fff; }
img[src="/logo.webp"] { mix-blend-mode: multiply; }
