:root {
    --pine: #233c32;
    --sand: #f6f3eb;
    --gold: #b28c49;
    --line: #d5d6c9
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    background: var(--sand);
    color: #24372c;
    font: 16px/1.5 'Segoe UI', Arial, sans-serif
}

header {
    background: var(--pine);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px max(4vw, 16px);
    gap: 15px
}

a {
    color: inherit;
    text-underline-offset: 3px
}

header a {
    text-decoration: none
}

nav,
.toolbar,
.inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font: 600 23px Georgia, serif
}

.brand img {
    width: 35px;
    height: 35px
}

.brand small {
    font: 13px Arial;
    color: #e2ca98
}

main {
    max-width: 1480px;
    margin: auto;
    padding: 34px 4vw 50px;
    min-height: 75vh
}

h1,
h2,
h3 {
    font-family: Georgia, serif;
    line-height: 1.12;
    font-weight: 500
}

h1 {
    font-size: clamp(34px, 4.5vw, 65px);
    margin: 8px 0 25px
}

h2 {
    font-size: 26px
}

button,
.pill {
    border: 0;
    cursor: pointer;
    border-radius: 5px;
    background: var(--pine);
    color: white;
    padding: 9px 15px;
    font: inherit
}

.plain {
    border: 1px solid #789281
}

.kicker,
dt,
small {
    font-size: 13px;
    color: #586951
}

.kicker {
    letter-spacing: .08em;
    text-transform: uppercase
}

label {
    display: block;
    margin: 5px 0;
    font-size: 14px
}

input:not([type=checkbox]),
select,
textarea {
    background: white;
    border: 1px solid #aeb7aa;
    border-radius: 4px;
    padding: 9px;
    max-width: 100%;
    font: inherit
}

label input:not([type=checkbox]),
label select,
label textarea {
    display: block;
    width: 100%
}

.toolbar {
    align-items: flex-end;
    margin: 12px 0
}

.toolbar input {
    width: 105px !important
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
    gap: 20px
}

.estate,
aside,
.narrow,
details,
.box {
    background: #fffdf7;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 18px
}

.estate {
    display: block;
    overflow: hidden;
    text-decoration: none;
    padding: 0;
    max-width: 620px
}

.estate section {
    padding: 16px 23px
}

.estate img {
    width: 100%;
    max-height: 230px;
    object-fit: cover
}

.narrow {
    max-width: 440px;
    margin: 4vh auto
}

.map-layout {
    display: grid;
    grid-template-columns: minmax(0, 2.6fr) minmax(235px, 1fr);
    gap: 18px
}

.mapbox {
    position: relative;
    background: #e5e9d9;
    border-radius: 8px;
    overflow: hidden
}

#landmap {
    width: 100%;
    height: min(65vh, 680px);
    touch-action: none;
    display: block
}

.preview {
    width: 100%;
    max-height: 55vh;
    background: #e4eadf
}

svg path {
    fill: #61976966;
    stroke: #38573c;
    stroke-width: 1;
    vector-effect: non-scaling-stroke
}

svg a:hover path,
svg a:focus path,
.selected path {
    fill: #dca44de0;
    stroke: #603e12;
    stroke-width: 2
}

.zoom {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 4px
}

figure,
dd {
    margin: 0 0 10px
}

figure img,
.thumb {
    width: 100%;
    max-width: 380px
}

aside h2 {
    overflow-wrap: anywhere
}

footer {
    border-top: 1px solid var(--line);
    padding: 20px 4vw;
    font-size: 13px
}

.tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 24px
}

.tabs a {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    text-decoration: none
}

.tabs .current {
    background: var(--pine);
    color: white
}

.scroll,
#list-pane {
    overflow: auto
}

.inline input {
    width: 150px
}

table {
    border-collapse: collapse;
    width: 100%;
    background: white;
    font-size: 14px
}

th,
td {
    padding: 9px;
    border-bottom: 1px solid var(--line);
    text-align: left
}

th {
    background: #e6eadf;
    white-space: nowrap
}

details {
    margin: 10px 0
}

summary {
    cursor: pointer;
    font-weight: 600
}

.box {
    max-width: 780px;
    margin: 12px 0
}

.box form {
    margin: 10px 0
}

.forms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: 12px
}

pre {
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

.feature[hidden],
[hidden] {
    display: none !important
}

@media(max-width:700px) {
    main {
        padding: 22px 12px
    }

    header {
        align-items: flex-start;
        padding: 10px;
        flex-wrap: wrap
    }

    .map-layout {
        grid-template-columns: 1fr
    }

    #landmap {
        height: 48vh
    }

    nav {
        font-size: 14px
    }

    .toolbar {
        gap: 6px
    }

    th,
    td {
        padding: 7px
    }

    .box {
        max-width: 100%
    }
}

.draft-map-scroll {
    min-width: 0;
    overflow: auto;
    border-radius: 8px;
}

.draft-layout .preview {
    display: block;
    min-width: 760px;
    max-height: none;
}

.draft-map-number {
    font: 700 27px 'Segoe UI', Arial, sans-serif;
    text-anchor: middle;
    dominant-baseline: central;
    fill: #123124;
    stroke: #fffdf7;
    stroke-width: 7px;
    stroke-linejoin: round;
    paint-order: stroke;
    pointer-events: none;
}

.draft-card {
    align-self: start;
}

.draft-card details {
    border: 0;
    margin: 0;
    padding: 0;
}

@media (max-width: 1100px) {
    .draft-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}
nav a[aria-current="page"] { border-bottom:2px solid #e5c795; padding-block:3px; }
.invite-form { max-width:540px; }
.invite-form fieldset { border:1px solid #d5d6c9; border-radius:6px; }
.invite-plots { display:grid; grid-template-columns:repeat(auto-fit,minmax(165px,1fr)); gap:3px 12px; max-height:240px; overflow:auto; }
.invite-history { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:6px 0; border-bottom:1px solid #d5d6c9; }
@media (max-width: 600px) { .invite-history { align-items:flex-start; flex-direction:column; } }
.session-links { display:flex; align-items:center; gap:10px; font-size:14px; }
.session-links form { margin:0; }
.session-links:empty { display:none; }
.buyer-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)); gap:12px; }
.buyer-grid .box { max-width:none; min-width:0; margin:0; }
.buyer-grid .box h2,.buyer-grid .box h3 { margin:0 0 6px; }
.buyer-tile output { overflow-wrap:anywhere; }
