:root {
    --guide-gold: #d4af37;
    --guide-cream: #fff4c4;
    --guide-panel: rgba(18, 16, 13, .94);
    --guide-panel-soft: rgba(37, 31, 25, .84);
    --guide-border: rgba(212, 175, 55, .32);
    --guide-text: #e8e1d6;
    --guide-muted: #aaa397;
}

.guide-page {
    min-height: 100vh;
    color: var(--guide-text);
    background: #080706;
}

.guide-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background:
        linear-gradient(180deg, rgba(5, 5, 6, .64), rgba(6, 5, 4, .96)),
        url("../img/maps/Map003_Tiles/File0010.jpg") center / cover no-repeat;
    filter: saturate(.65);
}

.guide-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 18% 15%, rgba(212, 175, 55, .1), transparent 33%),
        radial-gradient(circle at 82% 28%, rgba(93, 145, 181, .08), transparent 30%),
        linear-gradient(90deg, rgba(255, 255, 255, .018) 1px, transparent 1px),
        linear-gradient(rgba(255, 255, 255, .014) 1px, transparent 1px);
    background-size: auto, auto, 48px 48px, 48px 48px;
}

.guide-hero {
    padding: 132px 0 56px;
    text-align: center;
    border-bottom: 1px solid var(--guide-border);
    background: linear-gradient(180deg, rgba(31, 25, 20, .92), rgba(10, 9, 8, .76));
    box-shadow: 0 20px 55px rgba(0, 0, 0, .58);
}

.weather-hero {
    background:
        radial-gradient(circle at 50% 0, rgba(86, 146, 190, .22), transparent 48%),
        linear-gradient(180deg, rgba(22, 28, 34, .94), rgba(10, 9, 8, .8));
}

.evolution-hero {
    background:
        radial-gradient(circle at 50% 0, rgba(169, 101, 221, .15), transparent 46%),
        linear-gradient(180deg, rgba(31, 25, 20, .94), rgba(10, 9, 8, .8));
}

.guide-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--guide-gold);
    font: 700 .75rem/1 "Cinzel", serif;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.guide-kicker svg {
    width: 17px;
}

.guide-hero h1 {
    margin: 14px 0 0;
    color: var(--guide-cream);
    font: 800 clamp(2.15rem, 5vw, 3.6rem)/1.05 "Cinzel", serif;
    letter-spacing: .07em;
    text-transform: uppercase;
    text-shadow: 0 3px 14px #000;
}

.guide-hero p {
    max-width: 770px;
    margin: 0 auto;
    color: #c5beb2;
    font-size: 1rem;
    line-height: 1.75;
}

.guide-divider {
    width: 110px;
    height: 2px;
    margin: 18px auto 22px;
    background: linear-gradient(90deg, transparent, var(--guide-gold), var(--guide-cream), var(--guide-gold), transparent);
    box-shadow: 0 0 14px rgba(212, 175, 55, .45);
}

.guide-shell {
    padding-top: 34px;
    padding-bottom: 50px;
}

.guide-callout,
.rule-panel {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 26px;
    padding: 22px 25px;
    border: 1px solid var(--guide-border);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(42, 35, 28, .9), rgba(15, 14, 12, .96));
    box-shadow: 0 16px 38px rgba(0, 0, 0, .42);
}

.callout-icon,
.rule-panel > svg {
    width: 48px;
    height: 48px;
    padding: 11px;
    flex: 0 0 48px;
    color: var(--guide-cream);
    border: 1px solid var(--guide-border);
    border-radius: 50%;
    background: rgba(212, 175, 55, .08);
}

.guide-callout h2,
.rule-panel h2 {
    margin: 0 0 5px;
    color: var(--guide-cream);
    font: 700 1.05rem "Cinzel", serif;
}

.guide-callout p,
.rule-panel p {
    margin: 0;
    color: var(--guide-muted);
    line-height: 1.55;
}

.guide-stat {
    margin-left: auto;
    min-width: 130px;
    text-align: center;
}

.guide-stat strong {
    display: block;
    color: #8ed7ff;
    font: 800 2rem "Cinzel", serif;
}

.guide-stat span {
    color: var(--guide-muted);
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.weather-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin-bottom: 22px;
    color: var(--guide-muted);
    font-size: .84rem;
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 7px;
    border-radius: 50%;
}

.legend-dot.positive { background: #61d78a; box-shadow: 0 0 8px #61d78a; }
.legend-dot.negative { background: #72bce9; box-shadow: 0 0 8px #72bce9; }
.legend-dot.neutral { background: #a8a096; }

.weather-card {
    height: 100%;
    min-height: 322px;
    padding: 22px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--guide-border);
    border-radius: 12px;
    background: linear-gradient(145deg, rgba(39, 32, 26, .92), var(--guide-panel));
    box-shadow: 0 18px 38px rgba(0, 0, 0, .5);
    transition: transform .2s ease, border-color .2s ease;
}

.weather-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 244, 196, .62);
}

.weather-card::after {
    content: "";
    position: absolute;
    width: 170px;
    height: 170px;
    right: -65px;
    top: -80px;
    border-radius: 50%;
    background: rgba(212, 175, 55, .08);
    filter: blur(4px);
}

.tone-rain::after,
.tone-storm::after { background: rgba(72, 145, 196, .2); }
.tone-snow::after { background: rgba(170, 220, 255, .18); }
.tone-clouds::after { background: rgba(150, 156, 167, .16); }

.weather-card-head {
    display: flex;
    align-items: center;
    gap: 13px;
}

.weather-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    color: #f2ca58;
    border: 1px solid currentColor;
    border-radius: 13px;
    background: rgba(255, 255, 255, .035);
}

.tone-rain .weather-icon,
.tone-storm .weather-icon { color: #78c7f5; }
.tone-snow .weather-icon { color: #c9edff; }
.tone-clouds .weather-icon { color: #bac0ca; }

.weather-icon svg { width: 28px; height: 28px; }
.weather-card h2 { margin: 0 0 3px; color: var(--guide-cream); font: 700 1.2rem "Cinzel", serif; }
.weather-card code { color: #918a81; font-size: .72rem; }
.weather-summary { min-height: 48px; margin: 18px 0 13px; color: #c9c1b5; line-height: 1.5; }
.effect-list { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.effect-list li { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border-radius: 7px; font-weight: 700; font-size: .87rem; }
.effect-list svg { width: 17px; height: 17px; }
.effect-positive { color: #93e6ad; background: rgba(57, 165, 95, .1); border: 1px solid rgba(97, 215, 138, .2); }
.effect-negative { color: #a9dcfa; background: rgba(70, 147, 194, .1); border: 1px solid rgba(114, 188, 233, .2); }
.weather-note { margin: 14px 0 0; color: #8e887f; font-size: .77rem; line-height: 1.45; }
.rule-panel { margin-top: 30px; margin-bottom: 0; }

.evolution-rules {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.rule-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 78px;
    padding: 14px;
    border: 1px solid var(--guide-border);
    border-radius: 10px;
    background: var(--guide-panel);
}

.rule-chip svg { width: 25px; color: var(--guide-gold); }
.rule-chip span { display: grid; color: var(--guide-muted); font-size: .75rem; }
.rule-chip strong { color: var(--guide-cream); font-size: .88rem; }

.guide-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin: 20px 0;
    color: var(--guide-muted);
}

.guide-count { color: var(--guide-cream); font: 800 1.35rem "Cinzel", serif; }
.guide-search { display: flex; align-items: center; width: min(380px, 100%); gap: 9px; padding: 9px 13px; border: 1px solid var(--guide-border); border-radius: 8px; background: rgba(9, 8, 7, .88); }
.guide-search svg { width: 18px; color: var(--guide-gold); }
.guide-search input { width: 100%; color: var(--guide-text); border: 0; outline: 0; background: transparent; }
.guide-search input::placeholder { color: #77716a; }

.evolution-list { display: grid; gap: 22px; }
.evolution-chain { padding: 22px; border: 1px solid var(--guide-border); border-radius: 12px; background: linear-gradient(145deg, rgba(39, 31, 27, .93), rgba(13, 12, 11, .97)); box-shadow: 0 18px 42px rgba(0, 0, 0, .5); }
.chain-title { display: flex; justify-content: space-between; align-items: end; gap: 15px; padding-bottom: 14px; border-bottom: 1px solid rgba(212, 175, 55, .16); }
.chain-eyebrow { color: var(--guide-gold); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; }
.chain-title h2 { margin: 3px 0 0; color: var(--guide-cream); font: 700 1.25rem "Cinzel", serif; }
.chain-stage-count { color: var(--guide-muted); font-size: .76rem; }
.chain-track { display: grid; grid-template-columns: minmax(132px, 1fr) 28px minmax(132px, 1fr) 28px minmax(132px, 1fr) 28px minmax(132px, 1fr) 28px minmax(132px, 1fr); align-items: center; gap: 7px; padding-top: 19px; overflow-x: auto; }
.chain-arrow { display: grid; place-items: center; color: var(--guide-gold); opacity: .7; }
.chain-arrow svg { width: 22px; }
.stage-card { display: grid; min-width: 132px; min-height: 214px; justify-items: center; align-content: start; gap: 7px; padding: 12px 9px; border: 1px solid rgba(212, 175, 55, .25); border-radius: 9px; background: rgba(6, 6, 6, .5); }
.stage-card img,
.missing-model { width: 104px; height: 112px; object-fit: contain; image-rendering: pixelated; }
.missing-model { display: grid; place-items: center; color: #665f58; border: 1px dashed #4d4741; border-radius: 8px; }
.missing-model svg { width: 30px; }
.stage-label { color: var(--guide-cream); font: 700 .76rem "Cinzel", serif; }
.stage-status { color: #8f887e; font-size: .7rem; }
.stage-card small { color: #918a80; font-size: .67rem; text-align: center; }
.normal-stage { border-color: rgba(129, 184, 216, .35); }
.stage-missing { opacity: .58; filter: saturate(.45); }

.guide-empty { padding: 62px 20px; text-align: center; color: var(--guide-muted); border: 1px solid var(--guide-border); border-radius: 12px; background: var(--guide-panel); }
.guide-empty > svg { width: 42px; height: 42px; margin-bottom: 12px; color: var(--guide-gold); }
.guide-empty h2 { color: var(--guide-cream); font: 700 1.2rem "Cinzel", serif; }
.guide-footer { padding: 34px 0; text-align: center; color: #777168; border-top: 1px solid rgba(212, 175, 55, .12); }

@media (max-width: 991px) {
    .evolution-rules { grid-template-columns: repeat(2, 1fr); }
    .guide-stat { display: none; }
}

@media (max-width: 575px) {
    .guide-hero { padding: 112px 18px 42px; }
    .guide-shell { padding-top: 22px; }
    .guide-callout, .rule-panel { align-items: flex-start; padding: 18px; }
    .evolution-rules { grid-template-columns: 1fr; }
    .guide-toolbar { align-items: stretch; flex-direction: column; }
    .guide-search { width: 100%; }
    .chain-title { align-items: flex-start; flex-direction: column; }
    .weather-card { min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
    .weather-card { transition: none; }
}
