/* Base visual compartida — inspirada en itinerario-boda.html (rosa, crema, dorado suave). */
*, *::before, *::after { box-sizing: border-box; }
:root {
  --rose: #c0737a;
  --rose-lt: #f7eced;
  --rose-dk: #7a3a40;
  --gold: #b89a5a;
  --gold-lt: #f5f0e6;
  --gold-dk: #8a6f35;
  --green: #4a8c6a;
  --green-lt: #eaf4ee;
  --blue: #4a6cb0;
  --blue-lt: #eef2fb;
  --amber: #b07820;
  --amber-lt: #fef8ec;
  --danger: #b5372f;
  --danger-lt: #fdecea;
  --ink: #2a2220;
  --ink-mid: #6b5c5a;
  --ink-lt: #8f7f77;
  --bg: #faf8f5;
  --bg-deep: #f3ede5;
  --card: #ffffff;
  --border: #e8e0d8;
  --border-strong: #d8ccbd;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow: 0 1px 2px rgba(60, 40, 30, .05), 0 4px 16px rgba(60, 40, 30, .06);
  --shadow-lg: 0 10px 40px rgba(60, 40, 30, .18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --focus: 0 0 0 3px rgba(184, 154, 90, .45);
}
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.45; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .4em; }
p { margin: 0 0 .8em; }
a { color: var(--rose-dk); }
img, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 1000; }
.skip-link:focus { left: 8px; }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: 22px;
  border: 1px solid var(--border); background: var(--card); color: var(--ink-mid);
  font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, transform .05s;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--border-strong); background: #fffdfa; }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--rose); border-color: var(--rose); color: #fff; }
.btn-primary:hover { background: #b2656c; border-color: #b2656c; }
.btn-gold { background: var(--gold-lt); border-color: #ddd0b0; color: var(--gold-dk); }
.btn-green { background: var(--green-lt); border-color: #b0d8c0; color: var(--green); }
.btn-danger { background: var(--danger-lt); border-color: #f1b8b3; color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: rgba(0, 0, 0, .04); border-color: transparent; }
.btn-sm { min-height: 32px; padding: 5px 12px; font-size: 13px; }
.btn-lg { min-height: 52px; padding: 12px 26px; font-size: 17px; }
.btn-icon { width: 40px; padding: 0; }
.btn-block { width: 100%; }

/* Formularios */
.field { margin-bottom: 14px; }
.field > label, .label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-mid); margin-bottom: 5px; }
.input, .field input[type=text], .field input[type=password], .field input[type=number], .field input[type=search],
.field input[type=time], .field input[type=date], .field input[type=email], .field input[type=url], .field select, .field textarea, select.input, textarea.input {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px;
  background: #fff; font-size: 16px; color: var(--ink);
}
.field textarea, textarea.input { min-height: 80px; resize: vertical; line-height: 1.5; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: var(--focus); }
.field .hint { font-size: 12px; color: var(--ink-lt); margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--rose); }
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > .field { flex: 1 1 140px; }

/* Tarjetas y avisos */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 20px; }
.notice { border-radius: 12px; padding: 12px 14px; font-size: 14px; border: 1px solid var(--border); background: var(--bg); }
.notice-error { background: var(--danger-lt); border-color: #f1b8b3; color: #7d241e; }
.notice-ok { background: var(--green-lt); border-color: #b0d8c0; color: #2c5e43; }
.notice-warn { background: var(--amber-lt); border-color: #f0d890; color: #7a5310; }
.notice-info { background: var(--blue-lt); border-color: #c4d2ef; color: #2c4677; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--bg-deep); color: var(--ink-mid); border: 1px solid var(--border); white-space: nowrap; }
.badge-rose { background: var(--rose-lt); color: var(--rose-dk); border-color: #e4c0c3; }
.badge-gold { background: var(--gold-lt); color: var(--gold-dk); border-color: #e2d4b2; }
.badge-green { background: var(--green-lt); color: #2f6b4c; border-color: #b0d8c0; }
.badge-amber { background: var(--amber-lt); color: #7a5310; border-color: #f0d890; }
.badge-red { background: var(--danger-lt); color: var(--danger); border-color: #f1b8b3; }

/* Mensajes emergentes */
.toast-region { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; z-index: 2000; pointer-events: none; width: min(560px, calc(100% - 24px)); }
.toast { pointer-events: auto; background: var(--ink); color: #fff; font-size: 14px; padding: 11px 16px; border-radius: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: flex-start; animation: toastIn .2s ease-out; max-width: 100%; }
.toast.ok { background: #2f6b4c; }
.toast.error { background: var(--danger); }
.toast.warn { background: #8a5d12; }
.toast button { background: none; border: 0; color: #fff; opacity: .8; cursor: pointer; font-size: 16px; padding: 0 0 0 6px; }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Diálogos */
dialog.modal { border: 0; padding: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); width: min(560px, calc(100% - 24px)); max-height: calc(100% - 32px); color: var(--ink); background: var(--card); }
dialog.modal::backdrop { background: rgba(30, 20, 18, .45); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 19px; margin: 0; }
.modal-body { padding: 16px 20px; overflow-y: auto; max-height: calc(100vh - 200px); }
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; padding: 12px 20px 16px; border-top: 1px solid var(--border); }
.modal-close { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg); color: var(--ink-mid); font-size: 18px; cursor: pointer; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
