@view-transition { navigation: auto; }

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
    display: flex;
    flex-direction: column;
    background: #0f1512;
    color: #f4f1ea;
    font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

a { color: inherit; }

header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    border-bottom: 1px solid #26302a;
}

header h1 { margin: 0 auto 0 0; font-size: 18px; font-weight: 600; }
header .samurai { display: flex; opacity: .6; }
header .samurai:hover { opacity: 1; }
header .back { text-decoration: none; opacity: .75; }
header .back:hover { opacity: 1; }
header .hint { margin-left: auto; font-size: 14px; opacity: .65; }

.legend { display: flex; gap: 16px; margin-left: auto; font-size: 14px; }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 3px; vertical-align: -1px; }
.available { background: #22c55e; }
.sold { background: #ef4444; }

main { position: relative; flex: 1; min-height: 0; }
#viewer { position: absolute; inset: 0; }

/* Zones */
.zone { cursor: pointer; transition: fill-opacity .15s; }
.zone:hover { fill-opacity: 1.8 !important; stroke-width: 4px !important; }

.bubble { min-width: 170px; }
.bubble strong { display: block; font-size: 16px; }
.bubble dl { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 6px 0 0; font-size: 14px; }
.bubble dt { opacity: .7; }
.bubble dd { margin: 0; text-align: right; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; color: #fff; }

/* Card shown on a tap, where there is no hover */
#card {
    position: absolute;
    left: 16px; right: 16px; bottom: 56px;
    z-index: 100;
    max-width: 360px;
    margin: 0 auto;
    padding: 16px;
    border-radius: 12px;
    background: rgba(15, 21, 18, .95);
    box-shadow: 0 8px 30px rgba(0, 0, 0, .5);
}

.button {
    display: block;
    margin-top: 12px;
    padding: 10px 16px;
    border: 0;
    border-radius: 8px;
    background: #f4f1ea;
    color: #0f1512;
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

/* Unit page */
.unit { display: grid; grid-template-columns: 1fr 340px; height: 100%; }
.unit .view { position: relative; min-height: 320px; }
.unit aside { padding: 24px; overflow: auto; border-left: 1px solid #26302a; }
.unit aside h2 { margin: 8px 0 4px; font-size: 26px; }
.unit .price { font-size: 20px; }
.unit dl { display: grid; grid-template-columns: 1fr auto; gap: 10px 12px; margin: 24px 0; padding: 16px 0; border-block: 1px solid #26302a; }
.unit dt { opacity: .7; }
.unit dd { margin: 0; font-weight: 600; }
.unit small { display: block; margin-top: 12px; opacity: .6; }

@media (max-width: 800px) {
    .unit { grid-template-columns: 1fr; grid-template-rows: 55% auto; }
    .unit aside { border-left: 0; }
    header .hint { display: none; }
}

/* Drawing help (?edit) */
.draw {
    position: fixed; top: 70px; right: 16px; z-index: 200;
    width: 300px; padding: 12px;
    border-radius: 8px; background: rgba(0, 0, 0, .85); font-size: 14px;
}
.draw p { margin: 0 0 8px; }
.draw textarea { width: 100%; font: 12px monospace; }
