/* ============ picpic · base.css ============ */
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fredoka";
  src: url("../fonts/Fredoka-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("../fonts/Caveat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("../fonts/Baloo2-ExtraBold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #2b2118;
  --cream: #fff8ec;
  --paper: #ffffff;
  --teal: #12a79b;
  --teal-dark: #0d8178;
  --mustard: #f2b33d;
  --terra: #e8654b;
  --lilac: #9b6bd6;
  --muted: #7a7166;
  --line: #e8ddca;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(43, 33, 24, 0.12);
  --font-display: "Fredoka", "Baloo 2", system-ui, sans-serif;
  --font-hand: "Caveat", "Comic Sans MS", cursive;
  --font-body: "Fredoka", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--teal); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 0.4em; }

.container { width: min(1080px, 92%); margin: 0 auto; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-display); font-weight: 600; font-size: 16px;
  border-radius: 999px; border: 2px solid var(--ink);
  padding: 12px 26px; cursor: pointer; text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--ink); }
.btn:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--ink); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-mustard { background: var(--mustard); color: var(--ink); }
.btn-ghost { background: transparent; box-shadow: none; border-color: transparent; color: var(--ink); }
.btn-ghost:hover { text-decoration: underline; box-shadow: none; }
.btn-sm { padding: 7px 16px; font-size: 14px; box-shadow: 0 2px 0 var(--ink); }
.btn-danger { background: var(--terra); color: #fff; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- forms ---------- */
.field { margin-bottom: 14px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; font: inherit; font-weight: 500;
  border: 2px solid var(--line); border-radius: 12px;
  padding: 11px 14px; background: var(--paper); color: var(--ink);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,167,155,.18);
}
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------- navbar ---------- */
.nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 0;
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.nav-logo img { width: 40px; height: 40px; }
.nav-logo span { font-family: var(--font-display); font-weight: 600; font-size: 24px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }

/* ---------- cards ---------- */
.card {
  background: var(--paper); border: 2px solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- badge ---------- */
.badge {
  display: inline-block; padding: 3px 12px; border-radius: 999px;
  font-size: 12px; font-weight: 600; border: 1.5px solid var(--ink);
}
.badge-pro { background: var(--mustard); }
.badge-free { background: #e6e0d4; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(43,33,24,.5);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 20px;
}
.modal-backdrop[hidden] {
  display: none;
}
.modal { background: var(--paper); border: 2px solid var(--ink); border-radius: 20px; padding: 26px; width: min(460px, 100%); max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }
.modal h3 { margin-top: 0; }

/* ---------- toast ---------- */
#toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: var(--cream); padding: 12px 22px; border-radius: 999px;
  font-weight: 600; z-index: 100; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(-4px); }
#toast.err { background: var(--terra); color: #fff; }

.footer-cta { padding: 40px 0; text-align: center; color: var(--muted); }
