/* ==========================================================================
   project-view.css — single project layout + plot detail modal
   ========================================================================== */

.project-header {
    padding: 30px clamp(20px, 5vw, 56px) 8px;
}

.project-header .back-row {
    margin-bottom: 18px;
}

.project-header h1 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 3.2vw, 2.2rem);
    margin: 0 0 6px;
}

.project-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 20px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--ink-soft);
}

.project-meta span b {
    color: var(--ink);
    font-weight: 600;
}

.view-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 28px;
    padding: 22px clamp(20px, 5vw, 56px) 72px;
    align-items: start;
}

@media (max-width: 860px) {
    .view-layout {
        grid-template-columns: 1fr;
    }

    .legend-panel {
        order: 2;
    }
}

.stage-wrap {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow-card);
}

.stage {
    position: relative;
    width: 100%;
    line-height: 0;
    background: var(--line);
    border-radius: 2px;
    overflow: hidden;
}

.stage img {
    display: block;
    width: 100%;
    height: auto;
    user-select: none;
    -webkit-user-drag: none;
}

.stage svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.plot-polygon {
    stroke: rgba(29, 36, 32, 0.55);
    stroke-width: 0.25;
    cursor: pointer;
    transition: opacity 0.12s ease, stroke-width 0.12s ease;
    vector-effect: non-scaling-stroke;
}

.plot-polygon:hover,
.plot-polygon:focus-visible {
    opacity: 0.82;
    stroke: var(--ink);
    stroke-width: 0.5;
}

.plot-polygon.status-available {
    fill: var(--status-available);
}

.plot-polygon.status-booked {
    fill: var(--status-booked);
}

.plot-polygon.status-hold {
    fill: var(--status-hold);
}

.plot-polygon.status-registration_completed {
    fill: var(--status-registered);
}

.plot-polygon {
    fill-opacity: 0.55;
}

.legend-panel {
    background: var(--paper-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow-card);
    position: sticky;
    top: 92px;
}

.legend-panel h4 {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ink-soft);
    margin: 0 0 14px;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    padding: 7px 0;
    border-bottom: 1px dashed var(--line);
}

.legend-row:last-child {
    border-bottom: none;
}

.legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 3px;
    flex: none;
    border: 1px solid rgba(29, 36, 32, 0.25);
}

.legend-swatch.status-available {
    background: var(--status-available);
}

.legend-swatch.status-booked {
    background: var(--status-booked);
}

.legend-swatch.status-hold {
    background: var(--status-hold);
}

.legend-swatch.status-registration_completed {
    background: var(--status-registered);
}

.legend-help {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line-strong);
    font-size: 0.78rem;
    color: var(--ink-soft);
    line-height: 1.5;
}

/* ---- Plot detail modal ---------------------------------------------- */

dialog#plot-modal {
    border: none;
    border-radius: 6px;
    padding: 0;
    width: min(380px, 92vw);
    box-shadow: var(--shadow-modal);
    background: var(--paper-raised);
}

dialog#plot-modal::backdrop {
    background: rgba(29, 36, 32, 0.45);
    backdrop-filter: blur(1px);
}

.modal-card {
    padding: 26px 26px 22px;
}

.modal-topline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 18px;
}

/* the seal — echoes the card corner-mark, now the modal's focal point */
.plot-seal {
    width: 58px;
    height: 58px;
    border: 2px solid var(--brass);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    font-family: var(--font-mono);
    color: var(--brass-dark);
}

.plot-seal .no-label {
    font-size: 0.6rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.75;
}

.plot-seal .no-value {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--ink-soft);
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--ink);
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
    margin-bottom: 16px;
}

.status-pill.status-available {
    background: var(--status-available-bg);
    color: var(--status-available);
}

.status-pill.status-booked {
    background: var(--status-booked-bg);
    color: var(--status-booked);
}

.status-pill.status-hold {
    background: var(--status-hold-bg);
    color: var(--status-hold);
}

.status-pill.status-registration_completed {
    background: var(--status-registered-bg);
    color: var(--status-registered);
}

.status-pill .dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor;
}

.modal-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 18px;
}

.modal-field {
    border-top: 1px dashed var(--line);
    padding-top: 10px;
}

.modal-field .label {
    font-family: var(--font-mono);
    font-size: 0.66rem;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--ink-soft);
    display: block;
    margin-bottom: 4px;
}

.modal-field .value {
    font-family: var(--font-mono);
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--ink);
}

.modal-field.span-2 {
    grid-column: 1 / -1;
}