:root {
    color-scheme: light;
    --ink: #172825;
    --green: #105849;
    --line: #cdd7d2;
    --paper: #f5f7f4;
    font: 16px/1.5 "Inter", "Segoe UI", sans-serif;
    background: var(--paper);
    color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--green); text-underline-offset: .2em; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #5086c1; outline-offset: 2px; }
h1, h2, p, figure { margin: 0; }
h1 { font-size: clamp(2rem,4vw,3.2rem); line-height: 1.08; letter-spacing: -.05em; font-weight: 650; }
h2 { font-size: 1.25rem; letter-spacing: -.025em; }
button, .button, input, textarea, select { font: inherit; }
button, .button { display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid var(--line); padding: .65rem 1rem; color: var(--ink); background: white; font-weight: 600; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #e6eeea; }
.primary { background: var(--green); color: white; border-color: var(--green); }
.primary:hover { background: #123d34; }
button:disabled { color: #60716b; opacity: .55; cursor: default; }
input, select, textarea { border: 1px solid #acbcb4; border-radius: 5px; background: #fff; color: var(--ink); padding: .58rem .75rem; width: 100%; min-width: 0; }
textarea { resize: vertical; }
input[type=checkbox] { width: auto; accent-color: var(--green); }
label, legend { display: block; font-weight: 600; font-size: .9rem; }
label input, label textarea, label select { margin-top: .3rem; }
header { background: #fff; border-bottom: 1px solid var(--line); }
.bar,.page { max-width: 1440px; padding-inline: clamp(1.1rem,5vw,5rem); margin: auto; }
.bar { display:flex; gap: 3rem; align-items:center; min-height: 70px; }
.brand { display:inline-flex; align-items:center; gap:.7rem; white-space:nowrap; font-weight:600; font-size:1.2rem; color:var(--ink); }
.brand b { display:inline-grid; place-items:center; padding:.17rem .45rem; background:var(--green); color:white; font-size:1rem; letter-spacing:-.06em; border-radius:6px; }
.logo { text-decoration:none; }
nav { display:flex; gap:1.7rem; align-self:stretch; flex:1; }
nav a { display:grid; align-content:center; border-bottom:3px solid transparent; text-decoration:none; color:#455954; font-size:.95rem; }
nav [aria-current] { color:var(--green); font-weight:650; border-color:var(--green); }
.quiet { border-color:transparent; }
.page { padding-block:2.7rem 4rem; }
.title p,.muted,.box p { color:#4d625b; }
.title p { margin-top:.6rem; }
.heading,.actions { display:flex; flex-wrap:wrap; gap:.75rem; align-items:center; }
.heading { justify-content:space-between; }
details { margin:1.5rem 0; }
summary { color:var(--green); font-weight:600; cursor:pointer; }
details form { display:flex; flex-wrap:wrap; align-items:flex-end; gap:.5rem; margin-top:.7rem; }
.box,.metrics>div { border:1px solid var(--line); background:white; border-radius:9px; }
.sample img { width:100%; display:block; aspect-ratio:3/2; object-fit:cover; }
.gallery-toolbar,.gallery-search,.gallery-views,.gallery-pager { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; }
.gallery-toolbar { justify-content:space-between; gap:.8rem; margin:1.25rem 0 1rem; }
.gallery-views { gap:0; border:1px solid var(--line); border-radius:7px; background:white; padding:3px; }
.gallery-views a { text-decoration:none; border-radius:4px; padding:.4rem .85rem; }
.gallery-views [aria-current] { color:white; background:var(--green); }
.gallery-search input { width:clamp(11rem,18vw,17rem); }
.gallery-search button { padding:.58rem .8rem; }
.gallery-pager { justify-content:flex-end; margin-bottom:.55rem; font-size:.9rem; }
.gallery-pager span { font-variant-numeric:tabular-nums; }
.cabin-gallery { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,12rem),1fr)); gap:.55rem; }
.cabin-tile { position:relative; display:grid; place-items:center; min-width:0; overflow:hidden; background:#27384a; color:white; border:1px solid #667988; border-radius:6px; aspect-ratio:3/2; text-decoration:none; }
.cabin-tile img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.tile-name { position:absolute; inset:auto 0 0; display:grid; place-items:center; min-height:1.85rem; padding:.18rem .35rem; background:rgba(28,45,61,.91); text-align:center; font-size:clamp(.8rem,1vw,1.05rem); font-weight:600; line-height:1.17; overflow-wrap:anywhere; }
a.cabin-tile:hover .tile-name { background:#105849; }
.missing-thumb { margin-bottom:1.5rem; font-size:.85rem; color:#e8eef0; }
.empty-tile { display:none; }
.gallery-empty { padding:1rem 0; }
.withdrawn ul { padding-inline-start:1.35rem; }
.models-table th a { display:inline-flex; align-items:center; gap:.45rem; color:inherit; text-decoration:none; }
.models-table th a:hover { text-decoration:underline; }
.models-table th a span { color:#546a60; }
.models-table th[aria-sort] a { color:var(--green); }
@media(min-width:1200px) {
    .cabin-gallery { grid-template-columns:repeat(6,minmax(0,1fr)); grid-template-rows:repeat(5,minmax(0,1fr)); height:clamp(24rem,calc(100vh - 16rem),51rem); }
    .gallery-pager + .cabin-gallery { height:clamp(24rem,calc(100vh - 18rem),51rem); }
    .cabin-tile { aspect-ratio:auto; min-height:0; }
    .empty-tile { display:block; border:1px dashed var(--line); border-radius:6px; }
}
small,table small { display:block; color:#536760; font-size:.85rem; }
[hidden] { display:none!important; }
.login { display:grid; grid-template-columns:minmax(350px, .83fr) 1.17fr; min-height:100vh; background:#fff; }
.loginform { max-width:40rem; width:100%; margin-inline:auto; padding:clamp(1.5rem,5vw,5rem); display:flex; flex-direction:column; }
.loginform>div { margin:auto 0; padding:4rem 0; }
.loginform h1 { margin:0 0 2rem; }
.loginform form,.fields { display:grid; gap:1.1rem; }
.loginart { position:relative; background:#152c31; }
.loginart img { width:100%; height:100%; position:absolute; object-fit:cover; object-position:50% 40%; }
.loginart figcaption { position:absolute; bottom:0; width:100%; color:white; background:linear-gradient(transparent,rgba(0,0,0,.75)); padding:4rem 2rem 1.6rem; display:flex; justify-content:space-between; align-items:baseline; font-size:1.4rem; }
.loginart figcaption span { font-size:.9rem; }
.back { display:inline-block; margin-bottom:1.1rem; }
.editor { display:grid; grid-template-columns:minmax(0,1.55fr) minmax(245px,1fr); gap:1.25rem; margin-top:1.6rem; align-items:start; }
.box { padding:1.25rem; }
aside { display:grid; gap:1rem; }
aside .box p,aside .box form { margin-top:.7rem; }
.sample { border:1px solid var(--line); border-radius:9px; overflow:hidden; background:white; }
.sample figcaption { padding:.75rem 1rem; color:#465952; }
fieldset { border:1px solid var(--line); border-radius:5px; padding:.85rem; }
fieldset p { margin-bottom:.75rem; font-size:.9rem; }
.refs { display:flex; flex-wrap:wrap; gap:.7rem; }
.refs img { width:90px; height:60px; object-fit:contain; display:block; }
.refs label { margin-bottom:.7rem; }
.danger { color:#96432d; }
.error,.notice { padding:.8rem 1rem; border-left:3px solid #a53a28; background:#fff0e8; }
.notice { margin:0 0 1.3rem; border-color:#23826b; background:#e3f2e9; }
.metrics,.filters { display:flex; flex-wrap:wrap; gap:.75rem; margin:1.4rem 0; }
.metrics>div { flex:1 1 140px; padding:.8rem 1rem; }
.metrics strong { display:block; font-size:1.5rem; letter-spacing:-.03em; }
.filters { align-items:flex-end; }
.filters label { max-width:20rem; flex:1 1 145px; }
.tablewrap { overflow-x:auto; background:white; border:1px solid var(--line); border-radius:7px; margin:1.25rem 0; }
table { width:100%; border-collapse:collapse; line-height:1.3; }
td,th { padding:.85rem 1rem; text-align:left; border-bottom:1px solid #e2e7e3; }
th { background:#e9efea; font-size:.86rem; }
td { font-size:.94rem; }
td small { margin-top:.25rem; overflow-wrap:anywhere; }
.result { display:block; width:min(100%,640px); margin:1rem 0; }
@media(max-width:760px) {
    .bar { flex-wrap:wrap; gap:.65rem; padding-block:.8rem 0; justify-content:space-between; }
    nav { order:3; flex-basis:100%; gap:1rem; overflow-x:auto; }
    nav a { padding:.5rem 0; white-space:nowrap; }
    .editor,.login { grid-template-columns:1fr; }
    .loginart { display:none; }
    .loginform { min-height:100vh; }
    .page { padding-block:1.6rem; }
    .heading { align-items:flex-start; }
    .gallery-search { display:grid; width:100%; grid-template-columns:minmax(0,1fr) auto; }
    .gallery-search label { grid-column:1/-1; }
    .gallery-search input { width:100%; }
}
.history-photo img { display:block; width:96px; height:64px; object-fit:contain; border-radius:4px; background:#f2f2f2; }
.history-photo small { display:block; min-width:5rem; }
