/* Tigers Camp: noche de campamento, tigres azules, luz de fogata */
:root {
    --night: #0d1f3c;
    --night-2: #16305a;
    --tiger: #2f6fd6;
    --tiger-light: #8db8f5;
    --fire: #f4a236;
    --pine: #24493f;
    --mist: #eef3f8;
    --ink: #1a2433;
    --muted: #5b6878;
    --display: "Lilita One", "Arial Rounded MT Bold", sans-serif;
    --logo: "Luckiest Guy", "Lilita One", sans-serif;
    --body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    font-family: var(--body);
    font-size: 1.0625rem;
    line-height: 1.6;
    color: var(--ink);
    background: var(--mist);
}

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 400;
    line-height: 1.15;
    color: var(--night);
}

h2 {
    font-size: 2rem;
    margin: 0 0 0.6em;
}

h3 {
    font-size: 1.25rem;
    margin: 0 0 0.3em;
}

a {
    color: var(--tiger);
}

:focus-visible {
    outline: 3px solid var(--fire);
    outline-offset: 3px;
}

.wrap {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

.button {
    display: inline-block;
    padding: 14px 26px;
    background: var(--fire);
    color: var(--night);
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    box-shadow: 0 0 0 0 rgba(244, 162, 54, 0.5);
}

.button:hover {
    background: #ffb957;
}

.button-small {
    padding: 8px 18px;
    font-size: 0.95rem;
}

/* Cielo nocturno */
.night {
    position: relative;
    background: radial-gradient(ellipse at 78% 95%, rgba(244, 162, 54, 0.28), transparent 45%),
                linear-gradient(180deg, #07142a 0%, var(--night) 55%, var(--night-2) 100%);
    color: #e6eefb;
    text-align: center;
    padding: 64px 20px 0;
    overflow: hidden;
}

.stars {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(1.5px 1.5px at 8% 18%, #fff, transparent),
        radial-gradient(1px 1px at 22% 40%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 35% 12%, #fff, transparent),
        radial-gradient(1px 1px at 48% 30%, #cfe0ff, transparent),
        radial-gradient(2px 2px at 63% 15%, #fff, transparent),
        radial-gradient(1px 1px at 72% 42%, #fff, transparent),
        radial-gradient(1.5px 1.5px at 86% 22%, #cfe0ff, transparent),
        radial-gradient(1px 1px at 93% 50%, #fff, transparent),
        radial-gradient(1px 1px at 15% 60%, #cfe0ff, transparent),
        radial-gradient(1px 1px at 55% 55%, #fff, transparent);
    opacity: 0.85;
}

.night-inner {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
}

.badge {
    width: 200px;
    margin: 0 auto 14px;
}

.badge img {
    width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.45));
}

.night h1 {
    font-family: var(--logo);
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #fff;
    font-size: clamp(3rem, 9vw, 5.5rem);
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0;
}

.lead {
    font-size: 1.25rem;
    color: #c9d8f2;
    margin: 12px auto 28px;
    max-width: 34ch;
}

.ridge {
    display: block;
    width: calc(100% + 40px);
    height: 180px;
    margin: 40px -20px 0;
}

.ridge-far { fill: #1d3b6b; }
.ridge-near { fill: var(--pine); }
.tent path { fill: var(--tiger); }
.tent .tent-door { fill: var(--fire); }
.fire path { fill: var(--fire); }
.fire-glow { fill: rgba(244, 162, 54, 0.25); }

@media (prefers-reduced-motion: no-preference) {
    .fire-glow {
        animation: flicker 2.4s ease-in-out infinite;
        transform-origin: center;
        transform-box: fill-box;
    }
    @keyframes flicker {
        0%, 100% { opacity: 0.6; transform: scale(1); }
        50% { opacity: 1; transform: scale(1.12); }
    }
}

/* Cifras del grupo */
.stats {
    background: var(--pine);
    padding: 30px 0 34px;
}

.stats-list {
    list-style: none;
    margin-top: 0;
    margin-bottom: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 22px 32px;
}

.stats-list li {
    display: grid;
    gap: 2px;
}

.stats-list strong {
    font-family: var(--logo);
    letter-spacing: 0.03em;
    font-weight: 400;
    font-size: clamp(2.4rem, 5vw, 3.4rem);
    line-height: 1;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.stats-list span {
    color: #b9d6c6;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

@media (max-width: 640px) {
    .stats-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

/* Franja de rayas de tigre azul: separa la noche del día */
.stripes {
    height: 22px;
    background:
        repeating-linear-gradient(115deg,
            var(--night) 0 14px,
            var(--tiger) 14px 26px,
            var(--night) 26px 34px,
            var(--tiger) 34px 58px);
}

main > section {
    padding: 64px 0;
}

.intro p {
    max-width: 640px;
}

.count {
    font-family: var(--display);
    font-size: 1.35rem;
    color: var(--pine);
}

.count span {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--tiger);
}

.section-note {
    color: var(--muted);
    margin-top: -0.4em;
}

/* Sendero de campamentos */
.trail-section {
    background: #fff;
}

.trail {
    list-style: none;
    margin: 32px 0 0;
    padding: 0;
    position: relative;
    display: grid;
    gap: 32px;
}

.trail::before {
    content: "";
    position: absolute;
    left: 21px;
    top: 10px;
    bottom: 10px;
    border-left: 4px dashed var(--tiger-light);
}

.stop {
    position: relative;
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 18px;
    align-items: start;
}

.stop-marker {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--tiger);
    color: #fff;
    font-family: var(--display);
    font-weight: 400;
    font-size: 1.3rem;
    display: grid;
    place-items: center;
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px var(--tiger);
}

.stop:first-child .stop-marker {
    background: var(--fire);
    color: var(--night);
    box-shadow: 0 0 0 2px var(--fire);
}

.stop-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    grid-template-rows: auto auto auto 1fr;
    column-gap: 22px;
    background: var(--mist);
    border-radius: 6px;
    padding: 16px;
    border-left: 6px solid var(--pine);
}

.stop-photo {
    grid-row: 1 / -1;
    aspect-ratio: 4 / 3;
    border-radius: 4px;
    overflow: hidden;
    background: var(--night);
}

.stop-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.stop-photo-empty {
    background: #fff;
    display: grid;
    place-items: center;
}

.stop-photo-empty img {
    width: 62%;
    height: auto;
    opacity: 0.55;
}

.stop-meta {
    margin: 0 0 6px;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
}

.stop-desc {
    margin: 0 0 10px;
}

.stop-card .button-small {
    justify-self: start;
    align-self: start;
}

.stop-pending {
    margin: 0;
    color: var(--muted);
    font-style: italic;
}

/* Actividades */
.activities {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px 36px;
}

.activities li {
    display: flex;
    gap: 14px;
}

.activities .icon {
    font-size: 1.8rem;
    line-height: 1;
}

.activities p {
    margin: 0;
    color: var(--muted);
}

/* Reglas */
.rules {
    background: var(--pine);
    color: #e3efe9;
}

.rules h2 {
    color: #fff;
}

.rules ul {
    margin: 0;
    padding-left: 1.2em;
    font-size: 1.2rem;
    max-width: 640px;
}

.rules li {
    margin-bottom: 8px;
}

.rules li::marker {
    content: "▲  ";
    color: var(--fire);
}

/* Pasos */
.steps {
    padding-left: 1.4em;
    max-width: 640px;
}

.steps li {
    margin-bottom: 10px;
}

.steps li::marker {
    font-family: var(--display);
    font-weight: 400;
    color: var(--tiger);
}

.night-footer {
    background: var(--night);
    color: #8fa4c6;
    text-align: center;
    padding: 28px 20px;
    font-size: 0.95rem;
}

.night-footer p {
    margin: 0;
}

@media (max-width: 640px) {
    h2 { font-size: 1.6rem; }
    .night { padding-top: 44px; }
    .ridge { height: 110px; }
    .stop-card {
        grid-template-columns: 1fr;
    }
    .stop-photo {
        grid-row: auto;
        margin-bottom: 12px;
    }
}

/* ----- Coordinar salidas ----- */
.planner {
    min-height: 100vh;
    padding-bottom: 120px;
}

.planner-top {
    background: var(--night);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
}

.planner-top h1 {
    color: #fff;
    font-size: 1.6rem;
    margin: 0;
}

.planner-home {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c9d8f2;
    text-decoration: none;
    font-weight: 600;
    padding-right: 20px;
    border-right: 1px solid #2c4772;
}

.planner-layout {
    max-width: 1180px;
    margin: 0 auto;
    padding: 28px 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 32px;
    align-items: start;
}

.trips h2 {
    font-size: 1.3rem;
}

.trip-list {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    display: grid;
    gap: 8px;
}

.trip-item {
    width: 100%;
    text-align: left;
    font: inherit;
    background: #fff;
    border: 2px solid transparent;
    border-radius: 8px;
    padding: 10px 12px;
    cursor: pointer;
    display: grid;
    gap: 2px;
    color: var(--ink);
}

.trip-item span {
    font-size: 0.9rem;
    color: var(--muted);
}

.trip-item .trip-count {
    color: var(--pine);
    font-weight: 600;
}

.trip-item:hover {
    border-color: var(--tiger-light);
}

.trip-item.active {
    border-color: var(--tiger);
    box-shadow: inset 5px 0 0 var(--tiger);
}

.trip-none, .trip-error, .muted {
    color: var(--muted);
}

.trip-error {
    color: #b3261e;
}

.ghost-button {
    font: inherit;
    font-weight: 600;
    background: none;
    border: 2px dashed var(--tiger-light);
    color: var(--tiger);
    border-radius: 8px;
    padding: 10px 12px;
    width: 100%;
    cursor: pointer;
}

.new-trip {
    margin-top: 12px;
    background: #fff;
    border-radius: 8px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.new-trip label, .who label, .code-field {
    display: grid;
    gap: 4px;
    font-weight: 600;
    font-size: 0.95rem;
}

input {
    font: inherit;
    padding: 9px 11px;
    border: 1px solid #b9c6d6;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
}

button.button {
    border: none;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

button.button:disabled {
    opacity: 0.5;
    cursor: default;
}

.form-msg, .save-msg {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.form-msg.error, .save-msg.error, .hint.warn {
    color: #b3261e;
}

.empty-state {
    background: #fff;
    border-radius: 10px;
    padding: 40px 28px;
    text-align: center;
}

.trip-head h2 {
    margin-bottom: 0.1em;
}

.trip-range {
    color: var(--muted);
    margin: 0 0 18px;
}

.who {
    background: #fff;
    border-radius: 10px;
    padding: 14px 16px;
    max-width: 460px;
}

.who input {
    font-size: 1.1rem;
}

.hint {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.legend {
    list-style: none;
    padding: 0;
    margin: 18px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    font-size: 0.9rem;
    color: var(--muted);
}

.legend li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sw {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    display: inline-block;
}

.sw-mine { border: 3px solid var(--tiger); background: #fff; }
.sw-heat { background: linear-gradient(90deg, #d9efe2, #2e8a57); }
.sw-holiday { background: #fff; box-shadow: inset 0 -4px 0 var(--fire); }
.sw-weekend { background: #e3ebf6; }

.months {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.month {
    background: #fff;
    border-radius: 10px;
    padding: 14px;
}

.month h3 {
    text-transform: capitalize;
    margin-bottom: 10px;
}

.month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.dow {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    padding-bottom: 4px;
}

.cell {
    --heat: 0;
    position: relative;
    aspect-ratio: 1;
    font: inherit;
    border: 2px solid transparent;
    border-radius: 6px;
    background: #f6f8fb;
    color: var(--ink);
    cursor: pointer;
    display: grid;
    place-items: center;
    padding: 0;
}

.cell.weekend {
    background: #e3ebf6;
}

.cell.heat {
    background: color-mix(in srgb, #2e8a57 calc(var(--heat) * 85%), #d9efe2);
    color: var(--ink);
}

.cell.hot, .cell.hot.mine::after {
    color: #fff;
}

.cell.holiday {
    box-shadow: inset 0 -4px 0 var(--fire);
}

.cell.mine {
    border-color: var(--tiger);
    font-weight: 700;
}

.cell.mine::after {
    content: "✓";
    position: absolute;
    top: 1px;
    left: 4px;
    font-size: 0.7rem;
    color: var(--tiger);
}

.cell:hover:not(:disabled) {
    border-color: var(--tiger-light);
}

.cell.mine:hover {
    border-color: var(--tiger);
}

.cell.out {
    background: none;
    color: #c3cbd6;
    cursor: default;
}

.badge-count {
    position: absolute;
    bottom: 2px;
    right: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.results {
    margin-top: 28px;
    background: #fff;
    border-radius: 10px;
    padding: 18px 20px;
}

.best-days {
    padding-left: 1.4em;
    margin: 0 0 20px;
}

.best-days li {
    margin-bottom: 8px;
}

.best-days li::marker {
    font-family: var(--display);
    font-weight: 400;
    color: var(--tiger);
}

.best-days strong {
    display: inline-block;
}

.best-days strong::first-letter {
    text-transform: uppercase;
}

.best-n {
    margin-left: 8px;
    color: var(--pine);
    font-weight: 600;
}

.best-names {
    display: block;
    font-size: 0.9rem;
    color: var(--muted);
}

.families {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.families li:not(.muted) {
    background: var(--mist);
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 0.95rem;
}

.save-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--night);
    color: #e6eefb;
    padding: 12px 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px 18px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.2);
}

.save-bar p {
    margin: 0;
}

.save-bar .save-msg {
    color: #c9d8f2;
    width: 100%;
    text-align: center;
}

.save-bar .save-msg.error {
    color: #ffb4a8;
}

.code-field {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #e6eefb;
}

.code-field input {
    width: 140px;
    padding: 6px 10px;
}

@media (max-width: 800px) {
    .planner-layout {
        grid-template-columns: 1fr;
    }
    .planner-top h1 {
        font-size: 1.25rem;
    }
    .planner-home span {
        display: none;
    }
}

/* ----- Portada: botones ----- */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.button-ghost {
    background: transparent;
    color: #fff;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}

.button-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ----- Aprender ----- */
.learn-main {
    padding-top: 32px;
    padding-bottom: 64px;
}

.learn-intro {
    max-width: 680px;
    font-size: 1.15rem;
}

.learn-index {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 36px;
}

.learn-index a {
    background: #fff;
    border-radius: 999px;
    padding: 8px 16px;
    text-decoration: none;
    font-weight: 600;
    color: var(--night);
    box-shadow: inset 0 0 0 2px var(--tiger-light);
}

.learn-index a:hover {
    box-shadow: inset 0 0 0 2px var(--tiger);
}

.guide {
    background: #fff;
    border-radius: 10px;
    padding: 24px 28px 28px;
    margin-bottom: 28px;
    border-top: 6px solid var(--pine);
    scroll-margin-top: 16px;
}

.guide-kids {
    border-top-color: var(--fire);
}

.guide-head h2 {
    margin-bottom: 0.2em;
}

.guide-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 16px;
    color: var(--muted);
    margin: 0 0 12px;
    font-size: 0.95rem;
}

.tag {
    font-weight: 600;
    border-radius: 999px;
    padding: 2px 10px;
    font-size: 0.85rem;
}

.tag-adult { background: #fde2dd; color: #8a2414; }
.tag-family { background: #e3ebf6; color: var(--night); }
.tag-kids { background: #fff1d6; color: #7a4a00; }

.guide h3 {
    font-size: 1.15rem;
    margin-top: 1.2em;
}

.materials {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 8px 20px;
}

.materials li {
    display: flex;
    gap: 10px;
    align-items: baseline;
}

.steps-list {
    padding-left: 1.4em;
    max-width: 720px;
}

.steps-list li {
    margin-bottom: 8px;
}

.steps-list li::marker {
    font-family: var(--display);
    color: var(--tiger);
}

.safety {
    background: #fff4e5;
    border-left: 5px solid var(--fire);
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 16px;
    max-width: 720px;
}

.golden-rule {
    background: var(--night);
    color: #e6eefb;
    border-radius: 10px;
    padding: 18px 22px;
    max-width: 720px;
}

.golden-rule p {
    margin: 0 0 6px;
}

.rule-big {
    font-family: var(--display);
    font-size: 1.4rem;
    color: #fff;
}

.rule-big strong {
    color: var(--fire);
    font-weight: 400;
}

.stations {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.station {
    background: var(--mist);
    border-radius: 8px;
    padding: 14px 16px;
}

.station h4 {
    font-family: var(--display);
    font-weight: 400;
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: var(--night);
}

.station p {
    margin: 0 0 6px;
}

.bingo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    max-width: 420px;
}

.bingo span {
    aspect-ratio: 1;
    border: 3px solid var(--pine);
    border-radius: 10px;
    display: grid;
    place-items: center;
    align-content: center;
    font-size: 2.4rem;
    text-align: center;
    background: #fff;
}

.bingo em {
    font-style: normal;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--ink);
}

.shopping {
    border-collapse: collapse;
    width: 100%;
    max-width: 820px;
    font-size: 0.97rem;
}

.shopping th, .shopping td {
    text-align: left;
    padding: 8px 10px;
    border-bottom: 1px solid #dde4ec;
    vertical-align: top;
}

.shopping th {
    background: var(--mist);
}

.knots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
}

.knot {
    background: var(--mist);
    border-radius: 8px;
    padding: 14px 16px;
}

.knot h3 {
    margin-top: 0;
}

.knot-use {
    font-weight: 600;
    color: var(--pine);
}

.more, .credit {
    color: var(--muted);
}

@media (max-width: 640px) {
    .guide {
        padding: 18px 16px 20px;
    }
    .shopping {
        font-size: 0.9rem;
    }
}

@media print {
    .planner-top, .stripes, .learn-index, .night-footer, .credit {
        display: none;
    }
    .guide {
        break-inside: avoid-page;
        border: 1px solid #ccc;
    }
    body {
        background: #fff;
    }
}

.knot-fig {
    margin: 8px 0;
    background: #fff;
    border-radius: 6px;
    padding: 8px;
}

.knot-fig img {
    width: 100%;
    height: auto;
    display: block;
}

.knot-fig figcaption, .ficha figcaption {
    font-size: 0.8rem;
    color: var(--muted);
    margin-top: 4px;
}

.knot-steps {
    padding-left: 1.3em;
    margin: 8px 0 0;
}

.knot-steps li {
    margin-bottom: 4px;
}

.knot-steps li::marker {
    font-family: var(--display);
    color: var(--tiger);
}

.ficha {
    margin: 20px 0 0;
    max-width: 520px;
}

.ficha img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(13, 31, 60, 0.15);
}
