:root {
  --ink: #062d4d;
  --ink-2: #16435e;
  --green: #00795f;
  --green-bright: #13a27c;
  --mint: #dff3ec;
  --ice: #eef5f7;
  --white: #ffffff;
  --muted: #617482;
  --line: #d9e3e7;
  --amber: #f3b23c;
  --red: #c94b4b;
  --shadow: 0 22px 60px rgba(6, 45, 77, 0.12);
  --radius: 24px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #f7fafb; font-family: "DM Sans", sans-serif; font-size: 16px; line-height: 1.5; }
button, select { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; top: -50px; left: 12px; z-index: 100; padding: 10px 16px; color: white; background: var(--ink); border-radius: 0 0 10px 10px; transition: top .15s ease; }
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--green-bright); outline-offset: 2px; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; padding: 18px max(5vw, 24px); background: rgba(247, 250, 251, .9); border-bottom: 1px solid rgba(217, 227, 231, .7); backdrop-filter: blur(18px); }
.brand { display: inline-flex; gap: 10px; align-items: center; font-family: "Manrope", sans-serif; font-weight: 800; letter-spacing: -.02em; }
.brand-logo { display: block; width: auto; height: 64px; object-fit: contain; }
.footer-logo { height: 74px; }
nav { display: flex; gap: 28px; align-items: center; font-size: 14px; font-weight: 600; }
nav a:hover { color: var(--green); }
.guide-link { padding: 9px 14px; background: white; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; }

main { overflow: hidden; }
.planner-shell { display: grid; grid-template-columns: .86fr 1.14fr; gap: clamp(40px, 7vw, 110px); min-height: 700px; padding: 70px max(5vw, 24px) 90px; background: radial-gradient(circle at 2% 2%, #d9f2e9 0, transparent 30%), var(--white); }
.intro { position: relative; display: flex; flex-direction: column; justify-content: flex-start; padding-top: clamp(16px, 5vw, 64px); max-width: 540px; }
.intro > * { position: relative; z-index: 1; }

.intro-glow {
  position: absolute; z-index: 0; top: 50%; left: 78%; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(19,162,124,.16) 0%, rgba(19,162,124,.07) 45%, rgba(19,162,124,0) 72%);
  transform: translate(-50%, -50%); border-radius: 50%; pointer-events: none;
  animation: glow-drift 10s ease-in-out infinite;
}
@keyframes glow-drift { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-46%, -54%) scale(1.08); } }

.intro-route { width: min(260px, 60vw); margin-bottom: 22px; opacity: .85; transform: perspective(600px); transition: transform .25s ease; will-change: transform; }
.intro-route svg { display: block; width: 100%; height: auto; }

.intro-badges { display: flex; gap: 10px; margin-bottom: 24px; }
.badge-pill {
  display: grid; place-items: center; width: 46px; height: 46px;
  background: white; border: 1px solid var(--line); border-radius: 14px; font-size: 19px;
  box-shadow: 0 8px 18px rgba(6,45,77,.08); cursor: default;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
  animation: badge-in .5s ease backwards; animation-delay: calc(var(--i) * .08s);
}
.badge-pill:hover { transform: translateY(-7px) rotate(-6deg); box-shadow: 0 14px 26px rgba(6,45,77,.16); border-color: var(--green-bright); }
.badge-pill:nth-child(even):hover { transform: translateY(-7px) rotate(6deg); }
@keyframes badge-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 980px) { .intro-glow { display: none; } }
.eyebrow, .meta { margin: 0 0 10px; color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: "Manrope", sans-serif; line-height: 1.08; letter-spacing: -.04em; }
h1 { max-width: 600px; font-size: clamp(40px, 6vw, 84px); }
h2 { font-size: clamp(30px, 4vw, 56px); }
h3 { font-size: 22px; }
.intro > p:not(.eyebrow) { max-width: 490px; margin: 24px 0 42px; color: var(--muted); font-size: 18px; }
.time-window { display: flex; align-items: center; gap: 14px; color: var(--ink-2); font-size: 14px; font-weight: 700; }
.time-window .line { position: relative; width: min(210px, 35vw); height: 2px; background: var(--line); }
.time-window .line::before, .time-window .line::after { position: absolute; top: -4px; width: 10px; height: 10px; content: ""; background: var(--green); border-radius: 50%; }
.time-window .line::before { left: 0; } .time-window .line::after { right: 0; }

.planner { align-self: center; padding: 30px; background: #f8fbfb; border: 1px solid var(--line); border-radius: 30px; box-shadow: var(--shadow); }
fieldset { padding: 0; margin: 0 0 27px; border: 0; }
legend { width: 100%; margin-bottom: 6px; font-family: "Manrope", sans-serif; font-size: 16px; font-weight: 800; }
legend span { display: inline-grid; width: 27px; height: 27px; margin-right: 9px; place-items: center; color: white; background: var(--ink); border-radius: 50%; font-family: "DM Sans", sans-serif; font-size: 11px; }
.field-hint { margin: 0 0 12px 36px; color: var(--muted); font-size: 13px; }
.choice-grid { display: grid; gap: 9px; }
.time-options { grid-template-columns: repeat(4, 1fr); }
.need-options { grid-template-columns: repeat(5, 1fr); }
.choice-grid button, .energy-row button { min-height: 46px; padding: 10px 8px; background: white; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease, background .15s ease; }
.need-options button { display: flex; min-height: 68px; flex-direction: column; gap: 5px; align-items: center; }
.need-options button span { font-size: 19px; }
.choice-grid button:hover, .energy-row button:hover { border-color: var(--green); transform: translateY(-1px); }
.choice-grid button:active, .energy-row button:active { transform: translateY(0) scale(.98); }
.choice-grid button.selected, .energy-row button.selected { color: white; background: var(--ink); border-color: var(--ink); box-shadow: 0 6px 18px rgba(6,45,77,.18); }
.select-wrap { position: relative; display: block; }
.select-wrap::after { position: absolute; top: 50%; right: 16px; content: "⌄"; transform: translateY(-55%); pointer-events: none; }
select { width: 100%; height: 48px; padding: 0 44px 0 15px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 12px; appearance: none; }
.energy-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.primary-action, .secondary-action, .light-action, .map-action { border: 0; font-weight: 800; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease; }
.primary-action { display: flex; width: 100%; min-height: 54px; align-items: center; justify-content: space-between; padding: 0 22px; color: white; background: var(--green); border-radius: 14px; box-shadow: 0 10px 26px rgba(0,121,95,.22); }
.primary-action:hover { background: #00664f; }
.primary-action:disabled { cursor: not-allowed; opacity: .45; box-shadow: none; transform: none; }
.primary-action span { font-size: 22px; }

/* Progreso del formulario */
.form-progress { position: relative; height: 8px; margin-bottom: 24px; background: var(--line); border-radius: 99px; overflow: hidden; }
.form-progress-fill { height: 100%; background: linear-gradient(90deg, var(--green), var(--green-bright)); border-radius: 99px; transition: width .3s ease; }
.form-progress-label { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; font-weight: 700; text-align: right; }

.selection-summary { margin: 4px 0 14px; padding: 12px 14px; color: var(--ink-2); background: var(--ice); border-radius: 12px; font-size: 13px; font-weight: 700; }
.form-validation-message { margin: 0 0 14px; padding: 10px 14px; color: #7a2727; background: #fbeaea; border: 1px solid #f2c6c6; border-radius: 12px; font-size: 13px; font-weight: 700; }

.result-section, .places-section { padding: 90px max(5vw, 24px); }
.result-section { background: var(--ink); color: white; }
.result-heading, .section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; flex-wrap: wrap; }
.result-heading .eyebrow { color: #7cd5bb; }
.result-heading-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.secondary-action { flex: none; padding: 12px 18px; color: white; background: transparent; border: 1px solid #45657b; border-radius: 12px; }
.secondary-action:hover { border-color: var(--green-bright); }

.result-empty { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 70px 24px; color: #b9cddb; text-align: center; background: rgba(255,255,255,.04); border: 1px dashed #2f5570; border-radius: var(--radius); }
.result-empty-icon { font-size: 40px; }
.result-empty p { max-width: 420px; margin: 0; }

.result-loading { display: flex; flex-direction: column; align-items: center; gap: 18px; padding: 60px 24px; }
.skeleton-card { display: grid; gap: 10px; width: min(420px, 100%); padding: 22px; background: rgba(255,255,255,.06); border-radius: 18px; }
.skeleton-line { height: 14px; background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.22), rgba(255,255,255,.08)); background-size: 200% 100%; border-radius: 8px; animation: shimmer 1.3s infinite; }
.skeleton-line.w60 { width: 60%; } .skeleton-line.w40 { width: 40%; } .skeleton-line.w80 { width: 80%; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.loading-message { margin: 0; color: #b9cddb; font-weight: 700; }

.plan-ready-card { padding: 26px 28px; background: linear-gradient(135deg, #0a3a61, #062d4d); border: 1px solid #1c4b6c; border-radius: var(--radius); }
.plan-ready-head { margin-bottom: 18px; }
.plan-ready-badge { display: inline-block; padding: 6px 12px; margin-bottom: 12px; color: var(--ink); background: #a9ead6; border-radius: 999px; font-size: 12px; font-weight: 800; }
.plan-headline { max-width: 760px; margin: 0; color: #e8f4ef; font-size: 16px; line-height: 1.6; }
.plan-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.plan-stat { padding: 12px 14px; background: rgba(255,255,255,.06); border-radius: 14px; }
.plan-stat span { display: block; margin-bottom: 4px; color: #9fc2d6; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.plan-stat strong { display: block; font-family: "Manrope", sans-serif; font-size: 17px; }
.plan-timer { display: flex; align-items: center; gap: 10px; margin-top: 16px; padding: 10px 14px; color: #062d4d; background: var(--amber); border-radius: 12px; font-weight: 800; font-size: 13px; }

.plan-warnings { display: grid; gap: 8px; margin-top: 18px; }
.plan-warnings p { margin: 0; padding: 12px 14px; color: #5a3b12; background: #fdecd2; border-radius: 12px; font-size: 13px; font-weight: 700; }

.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }
.chip-action { padding: 10px 16px; color: white; background: rgba(255,255,255,.08); border: 1px solid #3a5b74; border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; transition: background .15s ease, transform .15s ease; }
.chip-action:hover { background: rgba(255,255,255,.16); transform: translateY(-1px); }

.summary-tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 10px; }
.tile { padding: 14px; text-align: center; background: rgba(255,255,255,.05); border: 1px solid #23445e; border-radius: 14px; }
.tile span { display: block; margin-bottom: 6px; color: #9fc2d6; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.tile strong { font-family: "Manrope", sans-serif; font-size: 18px; }
.distribution-bar { display: flex; height: 10px; margin-bottom: 30px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.distribution-bar .segment { height: 100%; transition: width .4s ease; }
.seg-activity { background: var(--green-bright); }
.seg-walk { background: #4f8fb8; }
.seg-margin { background: var(--amber); }

.result-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 18px; }
.plan-card, .map-card { min-height: 520px; padding: 28px; color: var(--ink); background: white; border-radius: var(--radius); }
.plan-summary { display: flex; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.summary-icon { display: grid; width: 52px; height: 52px; flex: none; place-items: center; color: white; background: var(--green); border-radius: 15px; font-size: 22px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.profile-tags span { padding: 5px 8px; color: var(--ink-2); background: var(--ice); border-radius: 7px; font-size: 11px; font-weight: 800; }

.timeline { padding: 7px 0 2px; margin: 0; list-style: none; counter-reset: steps; max-height: 640px; overflow-y: auto; }
.timeline li { position: relative; display: grid; grid-template-columns: 34px 118px 1fr; gap: 12px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line); }
.timeline li::before { display: grid; width: 30px; height: 30px; place-items: center; color: white; background: var(--ink); border-radius: 50%; font-size: 12px; font-weight: 800; counter-increment: steps; content: counter(steps); }
.timeline-transfer::before { background: var(--muted); }
.timeline-arrival::before { background: var(--green); }
.step-when { display: grid; gap: 4px; padding-top: 4px; }
.step-when time { color: var(--ink-2); font-size: 12px; font-weight: 800; }
.step-duration { display: inline-block; padding: 2px 8px; color: var(--green); background: var(--mint); border-radius: 999px; font-size: 11px; font-weight: 800; width: fit-content; }
.step-detail strong { display: block; font-size: 15px; }
.step-detail > p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.step-meta { color: var(--muted); font-size: 12px; }
.status-chip { display: inline-block; margin-bottom: 6px; padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.status-pendiente { color: var(--ink-2); background: var(--ice); }
.status-en-curso { color: #7a5a04; background: #fdecc4; }
.status-completado { color: #0c5c3f; background: #d6f2e6; }
.unverified-tag { display: inline-block; margin-top: 6px; padding: 3px 9px; color: #7a5a04; background: #fdecc4; border-radius: 999px; font-size: 10px; font-weight: 800; }
.activity-block { padding: 10px 0; }
.activity-block + .activity-block { margin-top: 6px; border-top: 1px dashed var(--line); }
.activity-label { display: flex; align-items: center; gap: 6px; margin: 4px 0; font-weight: 800; }
.priority-badge { padding: 2px 7px; border-radius: 999px; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.priority-alta { color: #7a2727; background: #fbe3e3; }
.priority-media { color: #7a5a04; background: #fdecc4; }
.priority-baja { color: var(--ink-2); background: var(--ice); }
.step-reason, .step-bring { margin: 3px 0 0; color: var(--muted); font-size: 12.5px; }
.step-reason::before, .step-bring::before { font-weight: 800; }
.routine-summary { margin: 4px 0 8px; color: var(--green); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.routine-steps { display: grid; gap: 6px; padding: 0; margin: 0 0 6px; list-style: none; counter-reset: routine-step; }
.routine-steps li { position: relative; padding: 7px 10px 7px 34px; color: var(--ink-2); background: var(--ice); border-radius: 10px; font-size: 13px; line-height: 1.4; border: 0; }
.routine-steps li::before { position: absolute; top: 7px; left: 10px; display: grid; width: 18px; height: 18px; place-items: center; color: white; background: var(--green); border-radius: 50%; font-size: 10px; font-weight: 800; counter-increment: routine-step; content: counter(routine-step); }
.step-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.map-link-btn, .step-done-btn { padding: 7px 12px; color: var(--ink-2); background: var(--ice); border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 800; cursor: pointer; }
.map-link-btn:hover, .step-done-btn:hover { border-color: var(--green); color: var(--green); }

.map-card { display: flex; flex-direction: column; background: var(--ice); }
.map-top { display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.walk-time { padding: 7px 10px; color: var(--green); background: var(--mint); border-radius: 99px; font-size: 12px; font-weight: 800; }
.leaflet-wrap { position: relative; min-height: 320px; margin: 20px 0 14px; overflow: hidden; border-radius: 18px; }
#campus-map { width: 100%; height: 100%; min-height: 320px; background: #dcece8; border-radius: 18px; }
.map-fallback { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; text-align: center; color: var(--muted); background: var(--ice); border-radius: 18px; }
.map-pin-badge { display: grid; width: 28px; height: 28px; place-items: center; color: white; border: 3px solid white; border-radius: 50%; font-size: 12px; font-weight: 800; box-shadow: 0 4px 10px rgba(6,45,77,.3); }
.map-pin-focus { animation: pin-pop .6s ease; }
@keyframes pin-pop { 0% { transform: scale(1); } 40% { transform: scale(1.4); } 100% { transform: scale(1); } }
.route-details { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 0 0 14px; padding: 0; }
.route-details div { display: grid; gap: 2px; padding: 10px 12px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.route-details dt { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.route-details dd { margin: 0; font-weight: 700; font-size: 13px; }
.route-note { margin: 0 0 14px; padding: 10px 12px; color: #7a5a04; background: #fdecc4; border-radius: 10px; font-size: 12px; }
.google-action { display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; color: white; background: var(--green); border-radius: 11px; font-size: 14px; font-weight: 800; }
.map-action { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 14px 0 0; color: var(--ink); background: transparent; border-top: 1px solid #cbdcd8; text-align: left; margin-top: 10px; }
.directions { padding: 12px 0 0; color: var(--muted); font-size: 14px; } .directions p { margin: 7px 0; }

.recommendations-card, .history-card { margin-top: 22px; padding: 26px 28px; background: white; color: var(--ink); border-radius: var(--radius); }
.recommendations-card h3, .history-card h3 { margin-bottom: 14px; }
.recommendations-card ul { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.recommendations-card li { position: relative; padding: 10px 14px 10px 34px; color: var(--ink-2); background: var(--ice); border-radius: 12px; font-size: 14px; }
.recommendations-card li::before { position: absolute; left: 12px; content: "💡"; }
.history-card ul { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.history-card li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; color: var(--ink-2); background: var(--ice); border-radius: 10px; font-size: 13px; }
.history-card li span { color: var(--muted); font-weight: 700; }

.places-section { background: white; }
.section-heading > p { max-width: 420px; margin: 0; color: var(--muted); }
.place-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.place-card { position: relative; min-height: 250px; padding: 22px; overflow: hidden; background: #f6f9fa; border: 1px solid var(--line); border-radius: 18px; transition: transform .2s ease, box-shadow .2s ease; }
.place-card:hover { transform: translateY(-3px); box-shadow: 0 15px 34px rgba(6,45,77,.09); }
.place-card h3 { padding-right: 90px; font-size: 19px; }
.place-card > p { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.place-card .place-type { position: absolute; top: 23px; right: 20px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.place-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.access-badge, .distance-badge, .hours-badge { padding: 3px 9px; border-radius: 999px; font-size: 10.5px; font-weight: 800; }
.access-badge { color: var(--ink-2); background: var(--ice); }
.distance-badge { color: var(--green); background: var(--mint); }
.hours-badge { color: #0c5c3f; background: #d6f2e6; }
.place-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.place-add-btn { padding: 8px 12px; color: white; background: var(--green); border: 0; border-radius: 999px; font-size: 12px; font-weight: 800; cursor: pointer; }
.place-add-btn:hover { background: #00664f; }
.place-card .map-link { color: var(--green); font-size: 12px; font-weight: 800; align-self: center; }
.place-card .map-link:hover { text-decoration: underline; }

.cambas-section { display: grid; grid-template-columns: 1.08fr .92fr; min-height: 560px; color: white; background: var(--green); }
.cambas-copy { padding: 80px max(5vw, 24px); }
.tag { display: inline-block; padding: 6px 9px; margin-bottom: 20px; color: var(--ink); background: #a9ead6; border-radius: 7px; font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.cambas-copy h2 { max-width: 680px; } .cambas-copy > p { max-width: 650px; margin: 24px 0 30px; color: #d8f5eb; font-size: 18px; }
.cambas-copy dl { display: flex; gap: 50px; margin: 0 0 34px; } .cambas-copy dl div { display: grid; gap: 3px; } .cambas-copy dt { color: #b9e7da; font-size: 12px; font-weight: 800; text-transform: uppercase; } .cambas-copy dd { margin: 0; font-weight: 700; }
.light-action { padding: 14px 18px; color: var(--ink); background: white; border-radius: 12px; } .light-action span { margin-left: 16px; }
.cambas-graphic { position: relative; display: grid; min-height: 500px; place-items: center; overflow: hidden; background: var(--ink); }
.cambas-graphic::before { position: absolute; width: 360px; height: 360px; content: ""; border: 1px solid rgba(255,255,255,.17); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.04), 0 0 0 140px rgba(255,255,255,.03); }
.room-card { z-index: 2; display: grid; width: 260px; min-height: 280px; align-content: center; padding: 30px; background: white; border-radius: 22px; transform: rotate(-3deg); box-shadow: 0 30px 50px rgba(0,0,0,.2); }
.room-card span { color: var(--green); font-weight: 800; } .room-card strong { color: var(--ink); font-family: "Manrope", sans-serif; font-size: 76px; line-height: 1; letter-spacing: -.07em; } .room-card small { margin-top: 20px; color: var(--muted); font-size: 14px; }
.formula { position: absolute; color: #9fe0cc; font-family: "Manrope", sans-serif; font-weight: 700; opacity: .6; } .formula-a { top: 14%; left: 10%; font-size: 24px; transform: rotate(-7deg); } .formula-b { right: 14%; bottom: 15%; font-size: 46px; } .formula-c { top: 20%; right: 8%; font-size: 17px; transform: rotate(8deg); }

footer { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 28px max(5vw, 24px); color: var(--muted); background: white; font-size: 13px; } footer p { margin: 0; }

dialog { width: min(560px, calc(100% - 32px)); padding: 34px; color: var(--ink); border: 0; border-radius: 24px; box-shadow: 0 25px 80px rgba(6,45,77,.25); } dialog::backdrop { background: rgba(2,25,42,.68); backdrop-filter: blur(5px); } .dialog-close { position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; background: var(--ice); border: 0; border-radius: 50%; font-size: 24px; cursor: pointer; } .guide-steps { display: grid; gap: 18px; padding: 0; margin: 28px 0; list-style: none; } .guide-steps li { display: flex; gap: 14px; } .guide-steps li > span { display: grid; width: 34px; height: 34px; flex: none; place-items: center; color: white; background: var(--ink); border-radius: 50%; font-weight: 800; } .guide-steps strong { display: block; } .guide-steps p { margin: 2px 0 0; color: var(--muted); }
.toast { position: fixed; right: 22px; bottom: 22px; z-index: 30; max-width: 360px; padding: 13px 18px; color: white; background: var(--ink); border-radius: 12px; box-shadow: var(--shadow); opacity: 0; transform: translateY(14px); transition: .25s ease; pointer-events: none; } .toast.show { opacity: 1; transform: translateY(0); }
.alarm-bar { position: fixed; top: 0; left: 0; z-index: 40; display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; padding: 14px 18px; color: white; background: var(--ink-2); font-size: 14px; font-weight: 800; box-shadow: var(--shadow); }
.alarm-bar button { padding: 8px 14px; color: var(--ink); background: white; border: 0; border-radius: 999px; font-weight: 800; cursor: pointer; }
.alarm-bar.ringing { background: var(--amber); animation: alarm-pulse 1s infinite; }
.departure-bar { top: auto; bottom: 0; background: var(--green); }
@keyframes alarm-pulse { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.3); } }

@media (max-width: 980px) {
  .planner-shell, .result-grid, .cambas-section { grid-template-columns: 1fr; }
  .planner-shell { gap: 45px; padding-top: 54px; } .intro { max-width: 720px; }
  .plan-card, .map-card { min-height: auto; }
  .place-grid { grid-template-columns: repeat(2, 1fr); } .cambas-graphic { min-height: 480px; }
  .plan-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-tiles { grid-template-columns: repeat(3, 1fr); }
  .route-details { grid-template-columns: 1fr; }
  .directory-tools { grid-template-columns: 1fr; }
  .place-count { justify-self: start; }
}

@media (max-width: 680px) {
  .topbar { padding: 10px 18px; } .brand-logo { height: 52px; } .topbar nav a { display: none; } nav { gap: 0; } .guide-link { font-size: 13px; }
  .planner-shell { padding: 42px 18px 58px; } .intro > p:not(.eyebrow) { margin: 18px 0 30px; font-size: 16px; } .planner { padding: 20px 16px; border-radius: 22px; }
  .time-options { grid-template-columns: repeat(2, 1fr); } .need-options { grid-template-columns: repeat(3, 1fr); } .need-options button:last-child { grid-column: span 2; }
  .need-options.multi { grid-template-columns: repeat(2, 1fr); } .need-options.multi button:last-child { grid-column: auto; }
  .result-section, .places-section { padding: 64px 18px; } .result-heading, .section-heading { align-items: start; flex-direction: column; } .result-heading h2 { font-size: 30px; }
  .plan-card, .map-card { padding: 20px; border-radius: 18px; }
  .timeline li { grid-template-columns: 30px 84px 1fr; gap: 8px; }
  .plan-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .summary-tiles { grid-template-columns: repeat(2, 1fr); }
  .map-top { flex-direction: column; }
  .place-grid { grid-template-columns: 1fr; } .cambas-copy { padding: 64px 18px; } .cambas-copy dl { flex-direction: column; gap: 18px; } .cambas-graphic { min-height: 430px; }
  footer { align-items: start; flex-direction: column; } .room-card { width: 235px; min-height: 250px; }
  .two-select-grid, .preference-grid { grid-template-columns: 1fr; }
  legend small { float: none; display: block; margin-left: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Formulario expandido y directorio de campus */
legend small { float: right; margin-top: 6px; color: var(--green); font-family: "DM Sans", sans-serif; font-size: 12px; font-weight: 700; }
.two-select-grid, .preference-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.select-wrap .select-label, .preference-grid label, .note-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 800; }
.select-wrap select { margin-top: 6px; }
.need-options.multi { grid-template-columns: repeat(4, 1fr); }
.need-options.multi button { min-height: 74px; }
.need-options.multi button.selected { background: var(--green); border-color: var(--green); }
.activity-detail { padding: 14px 16px; margin-bottom: 10px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.activity-detail:last-child { margin-bottom: 0; }
.activity-detail-title { display: block; margin-bottom: 10px; color: var(--green); font-family: "Manrope", sans-serif; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.preference-box { padding-top: 22px; border-top: 1px solid var(--line); }
.preference-grid { grid-template-columns: repeat(3, 1fr); }
.preference-grid select { height: 44px; margin-top: 5px; padding-left: 10px; font-size: 13px; }
.check-row { display: flex; gap: 9px; align-items: center; margin: 15px 0; color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: var(--green); }
.note-label { margin: 0; }
.note-label input, .directory-search input { width: 100%; height: 46px; margin-top: 5px; padding: 0 14px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 12px; font: inherit; font-size: 14px; }
.directory-tools { display: grid; grid-template-columns: minmax(240px, 1fr) auto auto auto; gap: 14px; align-items: center; margin-bottom: 24px; }
.directory-search input { margin: 0; background: #f6f9fa; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-row button { padding: 9px 12px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; cursor: pointer; }
.filter-row button.active { color: white; background: var(--ink); border-color: var(--ink); }
.sort-wrap select { height: 42px; padding: 0 34px 0 12px; font-size: 13px; }
.place-count { color: var(--muted); font-size: 13px; font-weight: 700; white-space: nowrap; }
.source-note { margin: 26px 0 0; color: var(--muted); font-size: 12px; }
.source-note a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.empty-directory { grid-column: 1 / -1; padding: 34px; color: var(--muted); background: var(--ice); border-radius: 18px; text-align: center; }

/* ---------------------------------------------------------------------- */
/* Plan activo: pestañas, control de gastos                                */
/* ---------------------------------------------------------------------- */
.start-plan-btn { width: auto; min-height: 46px; padding: 0 20px; }
.danger-action { border-color: var(--red); color: #ffd8d8; }
.danger-action:hover { background: rgba(201,75,75,.18); }

.plan-tabs { display: flex; gap: 8px; margin: 22px 0; padding: 6px; overflow-x: auto; background: rgba(255,255,255,.06); border-radius: 14px; }
.plan-tabs button { flex: 1; min-width: 120px; padding: 10px 14px; color: #b9cddb; background: transparent; border: 0; border-radius: 10px; font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap; }
.plan-tabs button.active { color: var(--ink); background: white; }

.gastos-panel { display: grid; gap: 18px; }
.budget-card, .expense-breakdown-card, .expense-history-card { padding: 24px 26px; background: white; color: var(--ink); border-radius: var(--radius); }
.budget-card h3, .expense-breakdown-card h3, .expense-history-card h3 { margin-bottom: 6px; }
.budget-quick-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.budget-quick-btn { padding: 10px 14px; color: var(--ink-2); background: var(--ice); border: 1px solid var(--line); border-radius: 999px; font-weight: 800; font-size: 13px; cursor: pointer; }
.budget-quick-btn.selected { color: white; background: var(--ink); border-color: var(--ink); }
.budget-active { display: grid; gap: 16px; }

.expense-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.expense-stat { padding: 16px; background: var(--ice); border-radius: 16px; text-align: center; color: var(--ink); }
.expense-stat span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.expense-stat strong { display: block; font-family: "Manrope", sans-serif; font-size: 22px; transition: color .2s ease; }
.expense-stat strong.pulse { animation: stat-pulse .5s ease; }
@keyframes stat-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }

.budget-progress-wrap { padding: 18px 20px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.budget-progress { height: 14px; margin-bottom: 10px; overflow: hidden; background: var(--ice); border-radius: 999px; }
.budget-progress-fill { height: 100%; border-radius: 999px; transition: width .4s ease, background .3s ease; }
.budget-progress-fill.verde { background: var(--green-bright); }
.budget-progress-fill.amarillo { background: #e0b400; }
.budget-progress-fill.naranja { background: var(--amber); }
.budget-progress-fill.rojo { background: var(--red); }
.budget-progress-fill.sin-limite { background: #8aa6b8; }
.budget-progress-message { margin: 0; color: var(--ink-2); font-size: 13px; font-weight: 700; }

.expense-add-btn { width: auto; min-height: 50px; padding: 0 22px; }
.expense-recommendations { display: grid; gap: 8px; }
.expense-recommendations p { margin: 0; padding: 10px 14px; color: var(--ink-2); background: var(--mint); border-radius: 12px; font-size: 13px; font-weight: 700; }

.breakdown-row { display: grid; grid-template-columns: 26px 1fr auto; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 13px; }
.breakdown-row .breakdown-bar-track { grid-column: 1 / -1; height: 8px; margin-top: 4px; overflow: hidden; background: var(--ice); border-radius: 999px; }
.breakdown-row .breakdown-bar-fill { height: 100%; background: var(--green-bright); border-radius: 999px; transition: width .4s ease; }
.breakdown-row strong { font-weight: 800; }

.expense-history-card ul { display: grid; gap: 10px; padding: 0; margin: 12px 0 0; list-style: none; }
.expense-item { display: grid; grid-template-columns: 32px 1fr auto; align-items: start; gap: 12px; padding: 12px 14px; background: var(--ice); border-radius: 14px; }
.expense-item .expense-icon { font-size: 18px; }
.expense-item .expense-main strong { display: block; font-size: 14px; }
.expense-item .expense-meta { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.expense-item .expense-category-tag { display: inline-block; margin-top: 4px; padding: 2px 8px; color: var(--ink-2); background: white; border-radius: 999px; font-size: 10.5px; font-weight: 800; }
.expense-item .expense-amount { font-family: "Manrope", sans-serif; font-weight: 800; color: var(--red); white-space: nowrap; }
.expense-item .expense-actions { display: flex; gap: 6px; grid-column: 1 / -1; margin-top: 6px; }
.expense-item .expense-actions button { padding: 5px 10px; color: var(--ink-2); background: white; border: 1px solid var(--line); border-radius: 999px; font-size: 11px; font-weight: 800; cursor: pointer; }
.expense-item .expense-actions button:hover { border-color: var(--green); color: var(--green); }
.empty-expenses { margin: 14px 0 0; color: var(--muted); font-size: 13px; text-align: center; }

.final-summary-card { padding: 26px 28px; background: white; color: var(--ink); border-radius: var(--radius); }
.final-summary-recommendation { margin: 14px 0; padding: 12px 14px; color: var(--ink-2); background: var(--mint); border-radius: 12px; font-weight: 700; font-size: 13px; }

.activity-detail .expense-from-activity-btn { margin-top: 10px; padding: 7px 12px; color: var(--green); background: var(--mint); border: 0; border-radius: 999px; font-size: 12px; font-weight: 800; cursor: pointer; }

#expense-dialog, #confirm-dialog { width: min(480px, calc(100% - 32px)); }
#expense-form { display: grid; gap: 12px; margin-top: 18px; }
#confirm-dialog p { margin: 0 0 18px; font-weight: 700; }

.mobile-tabs { position: fixed; bottom: 0; left: 0; z-index: 35; display: none; width: 100%; padding: 8px max(4vw, 10px); background: white; border-top: 1px solid var(--line); box-shadow: 0 -8px 24px rgba(6,45,77,.08); }
.mobile-tabs button { display: flex; flex: 1; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); background: transparent; border: 0; font-size: 11px; font-weight: 800; cursor: pointer; }
.mobile-tabs button span { font-size: 18px; }
.mobile-tabs button.active { color: var(--green); }
.plan-finalized .expense-add-btn, .plan-finalized .expense-actions, .plan-finalized .expense-from-activity-btn, .plan-finalized #budget-edit { display: none !important; }

@media (max-width: 980px) {
  .expense-summary-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 680px) {
  .plan-tabs { display: none; }
  .mobile-tabs.is-active-mode { display: flex; }
  .result-section { padding-bottom: 90px; }
  .budget-card, .expense-breakdown-card, .expense-history-card, .final-summary-card { padding: 18px; }
  .expense-item { grid-template-columns: 28px 1fr; }
  .expense-item .expense-amount { grid-column: 2; justify-self: start; }
}

@media print {
  .topbar, .planner-shell, .places-section, .cambas-section, footer, .guide-link, .toast, .alarm-bar,
  .result-heading-actions, .action-row, #history-card, .form-progress, .skip-link,
  .plan-tabs, .mobile-tabs, #budget-card, .expense-add-btn, .expense-item .expense-actions { display: none !important; }
  .result-section { padding: 0; color: var(--ink); background: white; }
  .plan-ready-card { background: white; border: 1px solid var(--line); }
  .plan-headline, .plan-stat span { color: var(--muted) !important; }
  .plan-stat strong { color: var(--ink); }
  .leaflet-wrap { display: none; }
  .result-grid { grid-template-columns: 1fr; }
  a[href]::after { content: " (" attr(href) ")"; font-size: 10px; color: var(--muted); }
}
