.raid-board.nest-board { --header-map: url("/art/nests/wetland-lookout.webp"); --map-position: 47%; padding-bottom: 36px; }
.nest-board h2, .nest-board h3 { margin: 0; font: 700 1.9rem/1.08 Cond,sans-serif; }
.nest-board h3 { font-size: 1.55rem; }
.nest-board :where(p:not(.board-intro)) { margin: 0; line-height: 1.45; }
.nest-board .nest-timing { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; margin-top: 8px; }
.nest-timing strong { color: var(--gold); font-variant-numeric: tabular-nums; }
.nest-timing time { color: var(--muted); font-size: .88rem; white-space: nowrap; }
.nest-text-link { color: var(--gold); font-size: .88rem; font-weight: 620; }
.nest-text-link:hover { text-decoration: underline; text-underline-offset: .2em; }
.nest-layout { display: grid; grid-template-columns: minmax(0,1fr) clamp(244px,23%,280px); gap: clamp(18px,2.1vw,28px); align-items: start; margin-top: 24px; }
.nest-directory, .nest-party, .nest-inline { scroll-margin-top: 14px; }
.nest-directory { grid-area: 1 / 1; container: directory / inline-size; min-width: 0; }
.nest-directory-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nest-directory-head p, .nest-detail-head p { color: var(--muted); margin-top: 4px; font-size: .88rem; }
.nest-filters { display: flex; gap: 8px; align-items: stretch; margin: 15px 0; }
.nest-filters .board-search { order: 0; flex: 1; max-width: 420px; }
.nest-filters select { height: 100%; max-width: 100%; }
@container directory (min-width: 710px) {
    .nest-tools { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 16px; }
    .nest-filters { flex: 0 1 430px; margin: 0; }
    .nest-directory-head { align-items: flex-start; flex-direction: column; gap: 3px; }
}
.nest-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(min(100%,166px),1fr)); gap: 12px; }
.nest-card, .nest-detail { --tint: var(--type,#acd1c1); }
.nest-card {
    min-width: 0; display: flex; flex-direction: column; overflow: hidden;
    color: var(--paper); border: 1px solid var(--edge); border-radius: 10px; background: #24282e;
    transition: border-color .16s, box-shadow .16s;
}
.nest-card:hover, .nest-card:focus-visible { color: var(--paper); border-color: var(--tint); box-shadow: 0 4px 15px #0003; }
.nest-card-stage, .nest-detail-head {
    background-color: #2a3333;
    background-image: radial-gradient(ellipse at 76% 46%,color-mix(in srgb,var(--tint) 22%,#293132), transparent 78%),
        linear-gradient(120deg,#282c30,color-mix(in srgb,var(--tint) 12%,#262c32));
}
.nest-card-stage { flex: 1; position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; min-height: 135px; padding: 12px 13px 10px; overflow: hidden; }
.nest-card-stage::before {
    content: ""; position: absolute; z-index: -1; inset: 0; pointer-events: none;
    background: repeating-radial-gradient(ellipse at 103% 16%,transparent 0 20px,#e2f6eb0b 21px,transparent 22px 35px);
    mask-image: linear-gradient(110deg,transparent 19%,#000 95%);
}
.nest-dex { color: var(--tint); font: 650 .76rem/1.25 Sans,sans-serif; font-variant-numeric: tabular-nums; letter-spacing: .045em; }
.nest-card-stage img {
    position: absolute; z-index: -1; top: 4px; right: 8%; width: 100px; height: 98px; object-fit: contain;
    filter: drop-shadow(0 6px 4px #111b1c55); transition: transform .18s;
}
.nest-card:hover img, .nest-card:focus-visible img { transform: translateY(-2px) scale(1.04); }
.nest-card-stage strong { margin-top: 73px; font: 690 1.55rem/1.08 Cond,sans-serif; overflow-wrap: anywhere; }
.nest-card-foot {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 6px; padding: 8px 11px; min-height: 36px;
    border-top: 1px solid #ffffff0b; font-size: .78rem; line-height: 1.35;
}
.nest-card-foot > :first-child { font-weight: 670; white-space: nowrap; }
.nest-card-foot i { margin-right: 2px; color: var(--tint); }
.nest-card-region { color: var(--muted); }
.nest-card-region:not(:empty)::before { content: "· "; }
.nest-card-foot > :last-child { margin-left: auto; font-weight: 700; color: var(--tint); }
.nest-card-foot .nest-premium, .nest-card-foot .nest-premium i { color: var(--gold); white-space: nowrap; }
.nest-directory .nest-checked { margin-top: 13px; font-size: .8rem; color: var(--muted); }
.nest-sidebar {
    grid-area: 1 / 2; position: sticky; top: 16px; max-height: calc(100dvh - 32px);
    display: flex; flex-direction: column; gap: 14px; overflow: auto; scrollbar-width: thin;
}
.nest-sidebar > * { flex: none; }
.nest-party { overflow: hidden; border-radius: 12px; background: #262830; border: 1px solid #494654; }
.nest-party-art {
    display: flex; align-items: flex-end; min-height: 148px; padding: 14px 18px;
    background: linear-gradient(0deg,#24252ef7 0%,#24252e65 24%,transparent 58%),url("/art/nests/shiny-party.webp?v=2") center 57% / cover;
}
.nest-party-art h2 { font-size: 2.05rem; }
.nest-party-art h2 span, .nest-vote span { color: var(--gold); }
.nest-party-body { padding: 14px 18px 16px; }
.nest-party-body h3 { font-size: 1.42rem; }
.nest-party-body p, .nest-empty p, .nest-wild p { margin: 6px 0 12px; font-size: .92rem; color: #c8cbd4; }
.nest-party-action { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; padding: 7px 12px; border-radius: 6px; background: var(--gold); color: #251e16; font-size: .9rem; font-weight: 700; }
.nest-party-action:hover { background: #ffdb91; }
.nest-ballot { margin-top: 12px; }
.nest-ballot summary { cursor: pointer; color: #d0cdd9; font-size: .83rem; }
.nest-ballot p { font-size: .82rem; margin-bottom: 0; }
.nest-party-body .nest-confirm { padding: 9px; border-left: 3px solid #add6b7; color: #ddf2df; background: #303b34; }
.nest-winner { border-bottom: 1px solid var(--edge); padding-bottom: 13px; margin-bottom: 14px; }
.nest-winner > small { color: var(--gold); }
.nest-winner h3 { margin-top: 4px; font-size: 1.75rem; }
.nest-party h4 { margin: 15px 0 5px; font-size: .86rem; }
.nest-leaders { margin: 0 0 12px; padding-left: 1.25rem; }
.nest-leaders li::marker { color: var(--muted); font-size: .78rem; }
.nest-leaders a { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; padding: 7px 0; color: var(--paper); border-bottom: 1px solid var(--edge); }
.nest-leaders a:hover strong { color: var(--gold); }
.nest-leaders small { display: block; color: var(--muted); font-size: .77rem; }
.nest-leaders b { white-space: nowrap; font-size: .76rem; color: var(--gold); }
.nest-empty, .nest-wild { padding: 17px 20px; background: var(--panel); border: 1px solid var(--edge); border-radius: 9px; }
.nest-migration {
    display: grid; grid-template-columns: minmax(0,30%) minmax(0,1fr);
    grid-template-areas: "title title" "art copy"; gap: 16px clamp(18px,3cqi,28px);
    padding: clamp(20px,3.5cqi,32px) 0; border-block: 1px solid var(--edge);
}
.nest-migration img {
    grid-area: art; width: 100%; height: auto; border-radius: 4px;
}
.nest-board .nest-migration h3 { grid-area: title; align-self: end; font-size: clamp(1.7rem,4cqi,2.2rem); }
.nest-migration-copy { grid-area: copy; max-width: 61ch; color: var(--muted); }
.nest-migration-copy p { font-size: .96rem; line-height: 1.55; }
.nest-migration-copy p:first-child { color: var(--paper); }
.nest-migration-copy p + p { margin-top: .7em; }
@container directory (max-width: 560px) {
    .nest-migration { grid-template-columns: minmax(0,1fr); grid-template-areas: "title" "art" "copy"; gap: 14px; }
    .nest-migration img { max-width: 320px; }
}
.nest-wild { margin-top: 18px; }
.nest-wild ul, .nest-choices ul { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 9px 0 14px; padding: 0; }
.nest-wild li a, .nest-choices a { display: block; padding: 6px 9px; border-radius: 5px; color: #d1eadd; background: #2b3935; }
.nest-wild li strong { margin-left: 3px; }
.nest-detail { padding: 0; overflow: hidden; color: var(--paper); background: #23272e; border: 1px solid #50565c; border-radius: 12px; }
dialog.nest-detail { width: min(520px,calc(100% - 24px)); max-height: 84dvh; margin: auto; box-shadow: 0 18px 90px #0009; }
dialog.nest-detail[open] { display: flex; flex-direction: column; }
dialog.nest-detail::backdrop { background: #0b1017bb; backdrop-filter: blur(3px); }
html:has(.nest-detail:modal) { overflow: hidden; }
.nest-detail-head { flex: none; display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--edge); }
.nest-detail-head img { object-fit: contain; }
.nest-detail-head h3 { font-size: 2rem; margin: 2px 0; }
.nest-close { align-self: flex-start; margin-left: auto; width: 40px; height: 40px; flex: none; font: 400 1.5rem/1 Sans,sans-serif; color: var(--paper); background: #222930; border: 1px solid #596069; border-radius: 7px; cursor: pointer; }
.nest-close:hover { border-color: var(--tint); }
.nest-places { list-style: none; margin: 0; padding: 0 18px; }
dialog .nest-places { overflow-y: auto; overscroll-behavior: contain; }
.nest-places li { padding: 13px 0; border-bottom: 1px solid var(--edge); }
.nest-places li:last-child { border: 0; }
.nest-places li:target { background: #39352a; outline: 1px solid var(--gold); }
.nest-location-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.nest-location-head form { flex: none; }
.nest-place-head i { color: var(--tint); }
.nest-place-head small { margin-left: 6px; color: var(--muted); }
.nest-coords { min-width: 0; container: coordinates / inline-size; }
.nest-coords code { display: block; margin-top: 3px; font-size: .86rem; overflow-wrap: anywhere; user-select: all; color: #e8ebef; }
.nest-coords .copy[data-copied] .clone { display: none; }
@container coordinates (max-width: 289px) {
    .nest-coords .actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
.nest-coords .actions:has(.copy[hidden]) { grid-template-columns: repeat(3,minmax(0,1fr)); }
.nest-coords [data-copy-result]:empty { display: none; }
.nest-coords [data-copy-result] { font-size: .82rem; }
.nest-vote { display: inline-flex; gap: 5px; align-items: center; justify-content: center; padding: 6px 8px; min-height: 34px; border: 1px solid #6a593b; border-radius: 5px; background: #393428; color: #f8db9e; font: 620 .8rem/1.2 Sans,sans-serif; cursor: pointer; }
.nest-vote:hover { border-color: var(--gold); }
.nest-back { display: block; padding: 12px 18px; border-top: 1px solid var(--edge); }
@media (max-width: 820px) {
    .nest-layout { display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
    .nest-sidebar { display: contents; }
    .nest-board[data-nest-view="locations"] .nest-directory { order: -1; }
    .nest-sidebar > .discord-panel { order: 1; }
    .nest-party-art { min-height: 92px; background-position: center,center 57%; }
    .nest-party-body { padding: 10px 14px; }
    .nest-party-action { display: inline-flex; gap: 9px; }
    .nest-ballot { display: inline-block; vertical-align: middle; margin: 5px 0 5px 8px; }
    .nest-ballot[open] { display: block; margin-left: 0; }
}
@media (max-width: 600px) {
    body:has(.nest-board) .mast nav { flex-wrap: nowrap; justify-content: space-between; gap: 4px; }
    .nest-board .raid-masthead::before { background-image: linear-gradient(90deg,#181a21ef,#181a2177 76%),var(--header-map); }
    .nest-layout { margin-top: 19px; }
    .nest-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; }
    .nest-filters { flex-wrap: wrap; gap: 6px; margin: 10px 0; }
    .nest-filters .board-search { flex: 1 1 135px; max-width: none; }
    .nest-filters select { min-height: 41px; }
    .nest-card-stage { padding-inline: 10px; min-height: 124px; }
    .nest-card-stage img { right: 5%; height: 90px; width: 90px; }
    .nest-card-stage strong { font-size: 1.4rem; margin-top: 66px; }
    .nest-card-foot { padding: 7px 8px; font-size: .73rem; }
    .nest-detail-head { padding: 10px; }
    .nest-detail-head img { width: 64px; height: 64px; }
    .nest-places { padding: 0 12px; }
    .nest-vote { min-height: 38px; }
}
@media (max-width: 355px) {
    .nest-filters .board-search { padding-left: 7px; }
    .nest-filters .search-icon { display: none; }
    .nest-filters .search-submit { padding-inline: 6px; }
}
