
:root {
  --green: #173f35;
  --green-2: #285c4d;
  --cream: #f4f0e4;
  --sand: #ded1b6;
  --ink: #17302a;
  --white: #fff;
  --shadow: 0 8px 22px rgba(22, 55, 46, .10);
}
* { box-sizing: border-box; }
html { background: var(--cream); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(#e9e3d3, var(--cream));
  min-height: 100vh;
}
button, input, textarea { font: inherit; }
button { cursor: pointer; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  color: white;
  background: var(--green);
}
.eyebrow { margin: 0; font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
h1 { margin: 2px 0 0; font-size: 1.55rem; }
main { max-width: 760px; margin: 0 auto; padding: 16px 14px 100px; }
.card {
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(23,63,53,.09);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 18px;
  margin-bottom: 16px;
}
.hero { background: radial-gradient(circle at top right, #416f61, var(--green)); color: white; }
.hero h2 { margin: 4px 0 14px; font-size: 1.55rem; }
.hero-grid { display: grid; grid-template-columns: 1fr 1.45fr; gap: 18px; align-items: center; }
.moon { font-size: 4.5rem; line-height: 1; }
.strong { font-weight: 750; margin: 5px 0; }
.muted { opacity: .75; margin: 4px 0; font-size: .92rem; }
.label { margin: 0; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.primary {
  width: 100%; margin-top: 16px; border: 0; border-radius: 14px;
  padding: 13px 16px; font-weight: 750; color: var(--green);
  background: var(--cream);
}
.icon-btn {
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid rgba(255,255,255,.25);
  color: inherit; background: rgba(255,255,255,.1); font-size: 1.4rem;
}
.section-title { font-size: 1.05rem; margin: 22px 4px 10px; }
.tile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.tile {
  min-height: 112px; text-align: left; border: 0; border-radius: 18px;
  background: white; color: var(--ink); padding: 15px;
  display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow);
}
.tile-icon { font-size: 1.7rem; }
.tile b, .tile small { display: block; }
.tile small { margin-top: 5px; color: #526b64; line-height: 1.25; }
.korero { border-left: 6px solid var(--green-2); }
.korero h2, .notice h3 { margin-top: 0; }
.notice { background: #ece5d5; box-shadow: none; }
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: rgba(255,255,255,.97); border-top: 1px solid #d8d0bf;
  padding: 7px max(8px, env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
}
.bottom-nav button {
  border: 0; background: transparent; color: #5d706a;
  display: grid; gap: 2px; justify-items: center; font-size: 1.2rem;
}
.bottom-nav span { font-size: .72rem; }
.bottom-nav .active { color: var(--green); font-weight: 800; }
dialog {
  width: min(92vw, 650px); max-height: 86vh; overflow: auto;
  border: 0; border-radius: 20px; padding: 0; color: var(--ink);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
dialog::backdrop { background: rgba(8,25,20,.58); }
.dialog-head {
  position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 14px 18px; color: white; background: var(--green);
}
.dialog-head h2 { margin: 0; font-size: 1.2rem; }
.dialog-head .icon-btn { border-color: rgba(255,255,255,.25); }
#panelContent { padding: 18px; }
.info-block { background: #f3efe5; padding: 14px; border-radius: 14px; margin-bottom: 12px; }
.info-block h3 { margin: 0 0 7px; }
.compass {
  width: 210px; height: 210px; border: 2px solid var(--green); border-radius: 50%;
  margin: 18px auto; position: relative; display: grid; place-items: center;
  background: radial-gradient(circle, #fff, #e9e1ce);
}
.compass::before { content: "N"; position: absolute; top: 8px; font-weight: 800; }
.arrow { font-size: 4rem; transform-origin: center; }
textarea, input {
  width: 100%; border: 1px solid #bdb5a3; border-radius: 12px; padding: 11px;
  background: white;
}
textarea { min-height: 110px; resize: vertical; }
.form-row { margin-bottom: 12px; }
.secondary {
  border: 0; border-radius: 12px; padding: 11px 14px; background: var(--green); color: white; font-weight: 700;
}
.entry { border-left: 4px solid var(--green-2); padding: 8px 11px; background: #f4f0e7; border-radius: 8px; margin-top: 9px; }
@media (max-width: 420px) {
  .hero-grid { grid-template-columns: 1fr 1.3fr; gap: 12px; }
  .moon { font-size: 3.8rem; }
}


/* Growing Kai / Māra kai */
.mara-overview {
  background: linear-gradient(135deg, #e7efe8, #f4f0e4);
  border-left: 5px solid var(--green-2);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 12px;
}
.mara-overview h3 { margin: 4px 0 6px; font-size: 1.18rem; }
.mara-location { margin: 4px 0 10px; color: #526b64; font-weight: 700; }
.mara-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mara-block { margin-bottom: 12px; }
.mara-list { margin: 7px 0 0; padding-left: 20px; columns: 2; column-gap: 22px; }
.mara-list li { break-inside: avoid; margin-bottom: 5px; }
.mara-journal-btn { margin-top: 8px; }
.mara-note { line-height: 1.45; }
.mara-source { margin: 12px 0 2px; }
.mara-source a { color: var(--green); font-weight: 750; }
@media (max-width: 560px) {
  .mara-grid { grid-template-columns: 1fr; }
  .mara-list { columns: 1; }
}

.mara-grid-three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .mara-grid-three { grid-template-columns: 1fr; }
}
