/* Cartaya — estilos compartidos (carta y panel) */
:root {
  --bg: #f7f7f5; --surface: #ffffff; --ink: #141414; --muted: #74746f; --faint: #a9a9a3; --line: #e8e8e3;
  --accent: #5b6b4e; --accent-soft: #eef0ea; --on-ink: #ffffff; --scrim: rgba(20,20,20,.38);
  --danger: #b54848; --ok: #2e8a57; --brand: #c2611f;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Manrope", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0e0d; --surface: #171716; --ink: #f1f1ec; --muted: #9b9b94; --faint: #66665f; --line: #262624;
    --accent: #a9b896; --accent-soft: #1e221b; --on-ink: #0e0e0d; --scrim: rgba(0,0,0,.6);
    --danger: #e27f7f; --ok: #5fc28a; --brand: #e98a48; color-scheme: dark;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.num { font-variant-numeric: tabular-nums; }
.serif { font-family: var(--font-display); font-weight: 400; }
.pad { padding-left: max(22px, env(safe-area-inset-left, 0px)); padding-right: max(22px, env(safe-area-inset-right, 0px)); }

.btn { display: flex; justify-content: center; align-items: center; gap: 10px; width: 100%; padding: 15px 20px; border-radius: 99px; background: var(--ink); color: var(--on-ink); font-weight: 600; font-size: 15px; text-decoration: none; transition: transform .12s; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { width: auto; padding: 9px 16px; font-size: 13.5px; }
.btn.danger { background: var(--danger); color: #fff; }
.btn:disabled { opacity: .5; cursor: default; }
.input { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 13px; font-size: 16px; }
.label { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 18px 0 8px; }
.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 60; transform: translate(-50%, 20px); opacity: 0; background: var(--ink); color: var(--on-ink); padding: 11px 18px; border-radius: 99px; font-size: 13.5px; font-weight: 600; transition: .3s; pointer-events: none; max-width: 90%; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.center-msg { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 30px; color: var(--muted); }
.center-msg h1 { font-family: var(--font-display); font-weight: 400; font-size: 40px; color: var(--ink); margin: 0 0 8px; }
.switch { position: relative; width: 44px; height: 26px; border-radius: 99px; background: var(--line); flex-shrink: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch[aria-checked="true"] { background: var(--ok); }
.switch[aria-checked="true"]::after { transform: translateX(18px); }
@media (prefers-reduced-motion: reduce) { *, *::after { transition: none !important; } }
