* { box-sizing: border-box; }
body { margin: 0; background: #f1f4f8; color: #162238; font: 16px/1.5 system-ui, -apple-system, sans-serif; }
header { height: 80px; background: #101c2d; display: flex; align-items: center; justify-content: space-between; padding: 0 5%; color: white; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; color: white; text-decoration: none; font-size: 23px; font-weight: 650; letter-spacing: -.6px; }
.brand b { font-size: 12px; letter-spacing: 2px; color: #38d9ba; margin-left: 6px; }
.mark { background: #38d9ba; color: #101c2d; width: 35px; height: 35px; border-radius: 10px; text-align: center; line-height: 35px; }
.headright { display: flex; align-items: center; gap: 18px; }
header nav { display: flex; gap: 6px; }
header nav a { color: #d5deea; text-decoration: none; font-size: 14px; font-weight: 650; padding: 8px 12px; border-radius: 8px; }
header nav a.on, header nav a:hover { background: #1c2c44; color: white; }
.tag { font-size: 14px; color: #aebdce; }
main { max-width: 1500px; margin: auto; padding: 36px 5%; display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 32px; }
main.archive, main.detail { display: block; max-width: 1100px; }
h1 { font-size: 30px; letter-spacing: -1px; margin: 6px 0 20px; }
h2 { font-size: 21px; margin: 7px 0; }
.eyebrow { font-size: 12px; letter-spacing: 1.8px; font-weight: 750; color: #506278; margin: 0; }
.sectiontop { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pill { border: 1px solid #cfd9e5; background: white; padding: 6px 12px; border-radius: 20px; font-size: 12px; white-space: nowrap; }
.preview { background: #162238; border-radius: 18px; position: relative; overflow: hidden; min-height: 350px; display: flex; align-items: center; justify-content: center; aspect-ratio: 4/3; box-shadow: 0 16px 45px #12223814; margin-top: 16px; }
.preview:has(#empty[hidden]):has(#video[hidden]) { aspect-ratio: auto; }
canvas { width: 100%; height: auto; display: block; max-width: 100%; }
#empty { position: absolute; text-align: center; padding: 25px; color: white; }
#empty p { color: #b3c0d1; margin: 5px 0 20px; }
.cameraicon { font-size: 70px; color: #38d9ba; }
button, .button { border: 0; border-radius: 9px; background: #12836f; color: white; padding: 13px 18px; font: 600 14px system-ui; cursor: pointer; text-align: center; display: inline-block; text-decoration: none; }
button:hover, .button:hover { filter: brightness(.94); }
button:disabled { opacity: .4; cursor: default; }
.secondary { color: #26394e; background: #e4eaf1; border: 1px solid #cfd9e5; }
.danger { color: #8d2d32; }
.toolbar, .export, .actions, .filters { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; align-items: end; }
.export { padding-top: 18px; border-top: 1px solid #d9e1ea; }
.export button:first-child { flex: 1; }
.toolbar label:not(.button) { flex: 1; min-width: 180px; }
#message { font-size: 14px; color: #576b83; margin: 15px 0 0; }
#savedRow { margin: 8px 0 0; }
#savedRow a { color: #12836f; font-weight: 700; }
aside { background: white; border: 1px solid #dee5ed; border-radius: 16px; overflow: hidden; }
.panelhead { padding: 22px 24px; border-bottom: 1px solid #e8edf3; }
#form { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.filters { background: white; border: 1px solid #dee5ed; border-radius: 16px; padding: 16px; align-items: end; }
.filters label { min-width: min(100%, 320px); flex: 1; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
input, select, textarea { width: 100%; border: 1px solid #ccd6e2; border-radius: 7px; padding: 10px; font: 16px system-ui; background: #fbfcfe; color: #162238; min-width: 0; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: 2px solid #12836f; outline-offset: 2px; }
.twocol { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { font-size: 12px; color: #63758c; margin: 12px 0 0; }
.notice { background: #eaf6f3; padding: 18px 24px; font-size: 14px; }
.notice p { margin: 5px 0; color: #41645b; }
footer { text-align: center; color: #667890; font-size: 12px; padding: 10px 20px 30px; }
video { width: 100%; position: absolute; height: 100%; object-fit: contain; background: #101c2d; }
[hidden] { display: none !important; }
.banner, .flash { border-radius: 12px; padding: 12px 16px; margin: 0 0 18px; font-size: 14px; }
.banner { background: #fff6e8; color: #6a4b16; border: 1px solid #f0ddb8; grid-column: 1 / -1; }
.flash.ok { background: #eaf6f3; color: #146152; border: 1px solid #c6e6dc; }
.steps { padding: 0; list-style: none; display: flex; gap: 8px; margin: 0 0 22px; }
.steps li { flex: 1; background: #e3e9f1; border-radius: 8px; padding: 12px; text-align: center; font-size: 14px; font-weight: 650; }
.steps li.active { background: #12836f; color: white; }
.steps li.done { background: #d3eee7; color: #126d59; }
form input:disabled, form textarea:disabled, form select:disabled { opacity: 1; color: #4a5d73; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 22px; }
.card { display: flex; flex-direction: column; background: white; border: 1px solid #dee5ed; border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; min-height: 100%; }
.card:hover { border-color: #12836f; }
.card img { width: 100%; height: 180px; object-fit: cover; object-position: top; background: #162238; }
.cardbody { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px 16px; }
.cardbody strong { font-size: 16px; }
.cardbody span { color: #576b83; font-size: 13px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.badges em { font-style: normal; background: #e3e9f1; color: #26394e; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; }
.badges em.good { background: #d3eee7; color: #126d59; }
.badges em.warn { background: #fff1d6; color: #7a5410; }
.emptybox { background: white; border: 1px solid #dee5ed; border-radius: 16px; padding: 28px; margin-top: 18px; }
.emptybox p { color: #576b83; }
.document { width: 100%; height: auto; border-radius: 16px; background: #101c2d; display: block; }
.sheet { background: white; border: 1px solid #dee5ed; border-radius: 16px; padding: 8px 22px 18px; margin-top: 18px; }
dl { margin: 0; }
dl div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 10px 0; border-top: 1px solid #e8edf3; }
dl dt { color: #63758c; font-size: 14px; }
dl dd { margin: 0; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-top: 1px solid #e8edf3; vertical-align: top; }
th { color: #63758c; font-size: 12px; letter-spacing: .04em; }
.actions form { padding: 0; margin: 0; }
@media (max-width: 950px) {
    main { grid-template-columns: 1fr; padding: 22px 5%; gap: 22px; }
    aside { max-width: none; }
    .preview { min-height: 270px; }
    .tag { display: none; }
    h1 { font-size: 25px; }
    .sectiontop { align-items: flex-start; }
    .pill { margin-top: 5px; font-size: 11px; padding: 5px 8px; }
    header { height: 65px; }
    .brand { font-size: 21px; }
    dl div { grid-template-columns: 1fr; gap: 2px; }
}
@media (max-width: 400px) {
    .sectiontop { display: block; }
    .pill { display: inline-block; margin-bottom: 15px; }
    h1 { margin-bottom: 10px; }
    .toolbar button, .toolbar .button { flex: 1; }
    .steps li { padding: 9px 4px; font-size: 12px; }
}
