/* WavePin — The Joshua Wave */
/* WavePin brand palette (brand/WavePin-Brand-Guidelines.jpeg):
   Deep Ocean Blue #0A3D62 · Teal Wave #00BFA5 · Sunlit Gold #FFD54F */
:root {
  --deep: #0A3D62;
  --wave: #00BFA5;
  --cyan: #4DD0BA;
  --foam: #e3f7f3;
  --sun: #FFD54F;
  --ink: #1d2b36;
  --muted: #5b7284;
  --bg: #f7fafc;
  --card: #ffffff;
  --danger: #b3402e;
  --radius: 14px;
}

@font-face {
  font-family: 'Trajan Pro';
  src: url('icons/TrajanPro-Bold.otf') format('opentype');
  font-weight: 700;
  font-display: swap;
}
.brand-font { font-family: 'Trajan Pro', Georgia, serif; }

* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

.view { min-height: 100dvh; padding-bottom: 84px; }
[hidden] { display: none !important; }

/* ---------- header ---------- */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(14px + env(safe-area-inset-top)) 18px 14px;
  background: var(--deep);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.link-btn {
  background: none; border: none; color: inherit;
  opacity: 0.85; font-size: 15px; cursor: pointer; padding: 4px;
}

/* ---------- login ---------- */
#view-login {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(170deg, var(--deep) 0%, var(--wave) 62%, var(--cyan) 100%);
  padding: 24px;
}
.login-card {
  background: var(--card); border-radius: 20px; padding: 32px 26px;
  width: 100%; max-width: 380px; text-align: center;
  box-shadow: 0 18px 50px rgba(6, 40, 65, 0.35);
}
.login-pin { width: 108px; height: 108px; margin-bottom: 6px; }
.login-by { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 2px; margin-top: 6px; }
.login-parent { width: min(52%, 180px); height: auto; margin: 2px auto 0; }
.login-card h1 { font-size: 24px; color: var(--deep); font-family: 'Trajan Pro', Georgia, serif; letter-spacing: 0.5px; }
.tagline { color: var(--muted); margin: 4px 0 22px; }
.login-card form { text-align: left; display: grid; gap: 14px; }
.forgot-link {
  background: none; border: none; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--wave); cursor: pointer; padding: 4px; justify-self: center;
}

/* ---------- forms ---------- */
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; color: var(--deep); }
.wp-wave { color: var(--deep); }
.wp-pin { color: var(--wave); }

input[type="email"], input[type="password"], input[type="text"], textarea {
  font: inherit; padding: 12px 14px; border: 1.5px solid #ccdbe6;
  border-radius: 10px; background: #fff; color: var(--ink); width: 100%;
}
input:focus, textarea:focus { outline: 2px solid var(--wave); border-color: var(--wave); }
.hint { color: var(--muted); font-weight: 400; font-size: 13px; }
.optional { color: var(--muted); font-weight: 400; }
.error { color: var(--danger); font-size: 14px; min-height: 1em; }
.pad { padding: 20px; }

.btn {
  font: inherit; font-weight: 700; border: none; border-radius: 12px;
  padding: 14px; cursor: pointer; width: 100%;
}
.btn.primary { background: var(--wave); color: #fff; }
.btn.primary:active { background: var(--deep); }
.btn.danger-link { background: none; color: var(--danger); font-weight: 500; padding: 8px; }

.share-btn {
  font: inherit; font-weight: 700; cursor: pointer; width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  margin-top: 14px; padding: 12px; border-radius: 12px;
  background: var(--foam); color: var(--deep); border: 1.5px solid #c4ebe3;
}
.share-btn:active { background: #d2f1ea; }
.home-share { width: auto; margin-top: 4px; padding: 12px 22px; }
.qr-toggle { color: var(--deep); opacity: 0.75; font-size: 14px; text-decoration: underline; margin-top: -10px; }
.qr-card {
  background: var(--card); border-radius: var(--radius); padding: 16px; text-align: center;
  box-shadow: 0 6px 24px rgba(10, 61, 98, 0.12); max-width: 260px;
}
.qr-card img { width: 200px; height: 200px; display: block; margin: 0 auto 8px; }
.qr-card p { font-size: 14px; color: var(--ink); line-height: 1.4; }
.qr-card a { display: inline-block; margin-top: 8px; font-size: 13px; color: var(--wave); font-weight: 600; }

/* ---------- capture ---------- */
.capture-wrap {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 40px 24px; min-height: calc(100dvh - 200px);
}
.capture-btn {
  width: min(64vw, 260px); height: min(64vw, 260px); border-radius: 50%;
  border: none; cursor: pointer; color: #fff;
  background: radial-gradient(circle at 30% 25%, var(--cyan), var(--wave) 48%, var(--deep));
  box-shadow: 0 14px 40px rgba(35, 35, 102, 0.45), inset 0 -6px 18px rgba(0,0,0,0.18);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.08s ease;
}
.capture-btn:active { transform: scale(0.96); }
.capture-btn:disabled { opacity: 0.7; }
.capture-icon { font-size: 52px; }
.capture-label { font-size: 20px; font-weight: 800; line-height: 1.25; text-align: center; }
.capture-status { text-align: center; color: var(--muted); max-width: 300px; }
.chip {
  font: inherit; font-weight: 600; border: none; cursor: pointer;
  background: var(--sun); color: #4a3900; border-radius: 999px; padding: 10px 18px;
  box-shadow: 0 4px 14px rgba(255, 213, 79, 0.5);
}

/* ---------- cards ---------- */
.card-list { display: grid; gap: 10px; padding: 16px; }
.card {
  font: inherit; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid #e3edf4; border-radius: var(--radius);
  padding: 14px 16px; display: grid; gap: 3px;
  box-shadow: 0 2px 8px rgba(13, 79, 124, 0.06);
}
div.card { cursor: default; }
.card strong { color: var(--deep); font-size: 16px; }
.card span { color: var(--muted); font-size: 14px; }
.card em { color: var(--sun); font-style: normal; font-weight: 700; font-size: 14px; }
.card.draft { border-left: 4px solid var(--sun); }

/* ---------- community pin moderation ---------- */
.mod-section { display: grid; gap: 10px; margin-bottom: 8px; }
.mod-title { font-weight: 800; color: var(--deep); font-size: 13px; text-transform: uppercase; letter-spacing: 0.6px; }
.mod-card { border-left: 4px solid var(--wave); }
.mod-card .verified { color: var(--wave); font-style: normal; font-weight: 700; }
.mod-card .unverified { color: var(--muted); font-style: normal; }
.mod-actions { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; margin-top: 8px; align-items: center; }
.mod-actions input { padding: 9px 12px; }
.mod-actions .btn { width: auto; padding: 10px 16px; }

/* ---------- detail ---------- */
.detail-form { display: grid; gap: 18px; padding: 20px 18px; max-width: 480px; margin: 0 auto; }
.detail-when { color: var(--muted); font-size: 14px; }
.affirmation-card {
  background: var(--foam); border-radius: var(--radius); padding: 16px;
  display: grid; gap: 10px; border: 1px solid #c4ebe3;
}
.affirmation-title { font-weight: 800; color: var(--deep); font-size: 14px; text-transform: uppercase; letter-spacing: 0.6px; }
#affirmation-text { color: var(--ink); font-style: italic; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink); }
.check input { width: 20px; height: 20px; accent-color: var(--wave); flex-shrink: 0; margin-top: 2px; }

/* ---------- briefing ---------- */
#briefing-map { height: 42dvh; }

/* ---------- tabbar ---------- */
#tabbar[hidden] { display: none; }
#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1000;
  display: flex; background: var(--card); border-top: 1px solid #e3edf4;
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; font: inherit; font-size: 12px; font-weight: 600;
  background: none; border: none; color: var(--muted); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 0 7px;
}
.tab span { font-size: 21px; }
.tab.active { color: var(--deep); }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px;
  font-size: 15px; opacity: 0; pointer-events: none; transition: all 0.25s ease; z-index: 2000;
  max-width: 88vw; text-align: center;
}
#toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- board ideas ---------- */
.idea-card p { margin: 4px 0; font-size: 15px; color: var(--ink); line-height: 1.4; white-space: pre-wrap; }
