/* Olive & Linen — shared tokens and base components */
:root {
  --bg: #F4EFE4; --bg2: #EDE6D6; --surface: #FBF8F1; --line: #E2D9C5; --line2: #D6CCB6;
  --ink: #2E2A22; --muted: #5d564a; --faint: #8a8170;
  --olive: #6E7B4E; --olive-d: #5a6640; --terra: #9A5B3F; --ok: #5f7a45; --bad: #a5523b;
  --serif: 'EB Garamond', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, serif;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif;
  --radius: 16px;
  color-scheme: light;
}
* { box-sizing: border-box; }
/* Greek text: Apple font for the whole text, so names like Robert and Plzeň match (set in ui.js) */
[lang="el"] { font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', system-ui, sans-serif !important; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); -webkit-text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: .005em; }
h1 { font-size: 34px; line-height: 1.1; }
h2 { font-size: 28px; line-height: 1.12; }
p { line-height: 1.6; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.eyebrow { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; color: var(--olive); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-top: 16px; }
.serif { font-family: var(--serif); }
.prose { font-family: var(--serif); font-size: 20px; line-height: 1.55; white-space: pre-line; }
.riddle { font-family: var(--serif); font-size: 21px; line-height: 1.5; font-style: italic; white-space: pre-line; }
button { font: inherit; cursor: pointer; border: 0; border-radius: 999px; padding: 14px 22px; font-weight: 600; -webkit-tap-highlight-color: transparent; }
button:disabled { opacity: .45; cursor: default; }
.btn { background: var(--olive); color: #F8F3E8; width: 100%; font-size: 16px; }
.btn:active:not(:disabled) { transform: scale(.985); background: var(--olive-d); }
.ghost { background: transparent; color: var(--olive); border: 1px solid var(--line2); }
.link { background: none; padding: 6px 0; color: var(--olive); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.small { padding: 9px 14px; font-size: 14px; }
input[type=text], input[type=password], textarea, select, input[type=datetime-local] {
  width: 100%; font: inherit; font-size: 17px; padding: 13px 15px; border-radius: 12px; border: 1px solid var(--line2);
  background: #fff; color: var(--ink); outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--olive); box-shadow: 0 0 0 3px rgba(110,123,78,.15); }
.tile { width: 34px; height: 42px; border-radius: 8px; display: inline-grid; place-items: center; font-family: var(--serif); font-size: 23px; color: var(--terra); border: 1px dashed #C9BEA5; }
.tile.f { border: 1px solid var(--terra); background: var(--surface); }
.shake { animation: shake .42s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.fade { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.modal { position: fixed; inset: 0; background: rgba(46,42,34,.45); display: grid; place-items: center; padding: 20px; z-index: 50; }
.modal .card { max-width: 400px; width: 100%; margin: 0; }
.row { display: flex; gap: 10px; align-items: center; }
.center { text-align: center; }
.spark { position: fixed; pointer-events: none; z-index: 60; font-size: 18px; color: var(--terra); animation: spark 1.1s ease-out forwards; }
@keyframes spark { from { opacity: 1; transform: translate(0,0) scale(.6); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.2); } }
