/* Easy on the Eyes – shared design system (buttons, fields, cards). Loaded on every page after /fonts/fonts.css.
   Selectors start with "body" so they win over older page-level styles without !important. */
:root {
  --eoe-navy:#1f5f4a; --eoe-navy-2:#164536; --eoe-coral:#1d9a66; --eoe-coral-2:#1a8a5b;
  --eoe-r:14px; --eoe-r-lg:22px;
  --eoe-shadow-sm:0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.06);
  --eoe-shadow:0 1px 2px rgba(16,24,40,.05), 0 12px 32px -12px rgba(16,24,40,.18);
  --eoe-ring:0 0 0 4px rgba(31,95,74,.18);
}
@media (prefers-color-scheme: dark) and (max-width: 0px) { :root { --eoe-ring:0 0 0 4px rgba(127,179,213,.25); --eoe-shadow:0 1px 2px rgba(0,0,0,.3), 0 14px 34px -14px rgba(0,0,0,.6); } }

/* ---------- buttons ---------- */
body .btn, body button.primary, body a.primary, body .eoe-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:10px; min-height:52px; padding:0 24px;
  border-radius:var(--eoe-r); border:1px solid transparent; font-family:inherit; font-size:17px; font-weight:700; line-height:1.1;
  letter-spacing:.005em; text-decoration:none; cursor:pointer; text-align:center; text-wrap:balance; max-width:100%; -webkit-user-select:none; user-select:none;
  background:linear-gradient(180deg,#3cc48c 0%,var(--eoe-coral-2) 100%); color:#fff;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 8px 18px -8px rgba(26,138,91,.6);
  transition:transform .12s ease, box-shadow .15s ease, filter .15s ease, background-color .15s ease;
}
body .btn:hover, body button.primary:hover, body a.primary:hover, body .eoe-btn:hover { transform:translateY(-1px); filter:brightness(1.04); box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 12px 22px -8px rgba(26,138,91,.6); }
body .btn:active, body button.primary:active, body a.primary:active, body .eoe-btn:active { transform:translateY(0); filter:brightness(.98); }
body .btn:disabled, body button.primary:disabled { opacity:.55; cursor:not-allowed; transform:none; }
body .btn.navy, body .eoe-btn.navy { background:linear-gradient(180deg,#2a7a5e 0%,var(--eoe-navy-2) 100%); box-shadow:inset 0 1px 0 rgba(255,255,255,.16), 0 8px 18px -8px rgba(22,69,54,.6); }
body .btn.ghost, body .eoe-btn.ghost, body button.ghost, body a.ghost.btn {
  background:var(--card,#fff); color:var(--ink,#17212b); border-color:var(--line,#e3dccf); box-shadow:var(--eoe-shadow-sm);
}
body .btn.ghost:hover, body .eoe-btn.ghost:hover, body button.ghost:hover { filter:none; border-color:color-mix(in srgb,var(--ink,#17212b) 30%,transparent); box-shadow:var(--eoe-shadow-sm); }
body .btn.small, body .eoe-btn.small { min-height:42px; padding:0 16px; font-size:15px; border-radius:12px; }
body .btn:focus-visible, body button:focus-visible, body a:focus-visible, body select:focus-visible { outline:3px solid rgba(29,154,102,.55); outline-offset:2px; }

/* older pages style a plain <nav>; the app menu ignores those rules */
body nav.eoe-nav { display:block; max-width:none; margin:0; padding:0; justify-content:normal; gap:0; }

/* grids and flex rows never grow wider than the screen */
body .lobby, body .stack { min-width:0; } body .lobby > *, body .stack > *, body .row > * { min-width:0; }

/* ---------- fields ---------- */
body input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), body select, body textarea {
  min-height:50px; border-radius:12px; border:1.5px solid var(--line,#e3dccf); background:var(--card,#fff); color:var(--ink,#17212b);
  padding:10px 14px; font-family:inherit; font-size:17px; transition:border-color .15s, box-shadow .15s;
}
body select { padding-inline-end:36px; appearance:none; -webkit-appearance:none; cursor:pointer;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%23889' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:right 14px center; }
html[dir=rtl] body select { background-position:left 14px center; padding-inline-end:14px; padding-inline-start:36px; }
body input:focus, body select:focus, body textarea:focus { outline:none; border-color:var(--eoe-navy); box-shadow:var(--eoe-ring); }
body input[type=checkbox], body input[type=radio] { accent-color:var(--eoe-navy); width:22px; height:22px; }

/* ---------- surfaces ---------- */
body .eoe-card { background:var(--card,#fff); border:1px solid var(--line,#e3dccf); border-radius:var(--eoe-r-lg); box-shadow:var(--eoe-shadow); padding:22px; }
body dialog { border:1px solid var(--line,#e3dccf); border-radius:var(--eoe-r-lg); box-shadow:0 30px 80px -20px rgba(0,0,0,.45); }
body dialog::backdrop { background:rgba(12,18,26,.55); backdrop-filter:blur(3px); }

/* phones: room for the bottom tab bar from /nav.js */
@media (max-width:760px) { body.eoe-has-tabs { padding-bottom:calc(74px + env(safe-area-inset-bottom)) !important; } }

/* brand colours: modern green, like the app (overrides older page palettes) */
html:root { color-scheme:light; --coral:#1d9a66; --navy:#1f5f4a; --eoe-coral:#1d9a66; --eoe-coral-2:#1a8a5b; --eoe-navy:#1f5f4a; --eoe-navy-2:#164536; }
@media (prefers-color-scheme: dark) and (max-width: 0px) { html:root { --coral:#46c08a; } }
