.lwl {
    --ink: #241d1b;
    --muted: #665951;
    --edge: #dbcfc4;
    --paper: #faf6ef;
    --brand: #672a3b;
    color: var(--ink);
    background: var(--paper);
    border: 1px solid var(--edge);
    border-radius: 16px;
    max-width: 1120px;
    margin: 0 auto;
    font: 16px/1.5 system-ui, sans-serif;
    overflow-wrap: anywhere;
}
.lwl * { box-sizing: border-box; }
.lwl a { color: var(--brand); font-weight: 650; text-underline-offset: 3px; }
.lwl a:focus-visible, .lwl button:focus-visible, .lwl input:focus-visible, .lwl select:focus-visible {
    outline: 3px solid #996116;
    outline-offset: 2px;
}
.lwl-header, .lwl nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px clamp(12px, 4vw, 32px); }
.lwl-header { justify-content: space-between; background: #302123; border-radius: 15px 15px 0 0; }
.lwl .lwl-header a { color: #fff7ed; text-decoration: none; padding: 7px 0; }
.lwl-header a:first-child { font: 700 24px/1.2 Georgia, serif; }
.lwl-header span { font: 600 13px system-ui, sans-serif; margin-left: 5px; }
.lwl nav { border-bottom: 1px solid var(--edge); gap: 3px; }
.lwl nav a, .lwl-columns a { text-decoration: none; padding: 10px 9px; border-radius: 8px; white-space: nowrap; }
.lwl [aria-current="page"], .lwl [aria-current="true"] { background: #eadbe0; }
.lwl-screen { padding: clamp(14px, 4vw, 32px); }
.lwl h1, .lwl h2 { font-family: Georgia, serif; line-height: 1.14; color: var(--ink); }
.lwl h1 { margin: 0 0 20px; font-size: clamp(34px, 6vw, 54px); }
.lwl h2 { margin: 4px 0 12px; font-size: clamp(23px, 4vw, 30px); }
.lwl p { margin: 6px 0 12px; }
.lwl label { display: block; font-weight: 650; min-width: 0; }
.lwl input:not([type="hidden"]):not([type="checkbox"]), .lwl select {
    display: block; width: 100%; min-height: 46px; border: 1px solid #ad9e92; border-radius: 8px;
    background: #fff; color: var(--ink); padding: 9px 12px; font: inherit;
}
.lwl button {
    min-height: 46px; border: 0; border-radius: 8px; padding: 9px 16px;
    background: var(--brand); color: white; font: 650 16px system-ui, sans-serif; cursor: pointer;
}
.lwl .lwl-chip { color: var(--brand); background: #eadbe0; }
.lwl-inline { display: flex; align-items: end; flex-wrap: wrap; gap: 8px 12px; }
.lwl-search .lwl-inline { flex-wrap: nowrap; margin-top: 8px; }
.lwl #lwl-query { flex: 1; min-width: 0; font-size: 18px; }
.lwl-search { position: relative; }
.lwl #lwl-suggestions {
    position: absolute; z-index: 5; top: 100%; left: 0; right: 0; margin-top: 4px;
    border: 1px solid var(--edge); border-radius: 8px; background: var(--paper);
    box-shadow: 0 6px 14px #0002; overflow: hidden;
}
.lwl-suggestion { padding: 12px; cursor: pointer; }
.lwl-suggestion + .lwl-suggestion { border-top: 1px solid var(--edge); }
.lwl-suggestion:hover, .lwl-suggestion[aria-selected="true"] { background: var(--brand); color: var(--paper); }
.lwl-card { background: #fffdf9; border: 1px solid var(--edge); border-radius: 12px; padding: 16px; margin: 12px 0; }
.lwl-producer { color: var(--muted); font-size: .86rem; font-weight: 700; }
.lwl-placement { border-top: 1px solid var(--edge); margin: 10px 0; padding-top: 10px; }
.lwl-coordinate { color: var(--brand); font-size: 1.18rem; }
.lwl-note { color: var(--muted); }
.lwl-scroll { position: relative; overflow-x: auto; padding: 4px; }
.lwl-wall { display: grid; grid-template-columns: repeat(10, minmax(100px, 1fr)); min-width: 1040px; gap: 5px; }
.lwl-wall-one { grid-template-columns: 1fr; min-width: 0; }
.lwl-storage-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr)); min-width: 0; }
.lwl .lwl-cell {
    min-height: 67px; padding: 7px; border: 1px solid var(--edge); border-radius: 6px;
    color: var(--ink); background: #f0ede8; text-decoration: none;
}
.lwl-cell small { display: block; font-weight: 550; line-height: 1.25; }
.lwl .lwl-confirmed { background: #dfeadb; }
.lwl .lwl-probable, .lwl .lwl-reconstructed { background: #f5e5bd; }
.lwl .lwl-empty { background: #fff; }
.lwl .lwl-unidentified { background: #e9dce9; }
.lwl .lwl-cell[aria-current="location"] { outline: 3px solid var(--brand); outline-offset: -3px; }
.lwl-fields, .lwl-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 12px; }
.lwl-check { align-self: center; }
.lwl-progress { display: flex; align-items: center; gap: 10px; margin: 8px 0; }
.lwl-progress progress { width: min(30vw, 200px); accent-color: var(--brand); }
.lwl-columns { margin: 10px 0; gap: 3px; }
@media (prefers-color-scheme: dark) {
    .lwl { --ink: #f8eee5; --muted: #dacbc1; --edge: #685751; --paper: #261e20; --brand: #f2aec1; }
    .lwl .lwl-card, .lwl input:not([type="hidden"]):not([type="checkbox"]), .lwl select { background: #342a2b; }
    .lwl button { color: #302123; }
    .lwl [aria-current="page"], .lwl [aria-current="true"], .lwl .lwl-chip { background: #4b2f3a; color: #f8eee5; }
    .lwl .lwl-cell { background: #332b2b; }
    .lwl .lwl-confirmed { background: #263d2d; }
    .lwl .lwl-probable, .lwl .lwl-reconstructed { background: #493923; }
    .lwl .lwl-unidentified { background: #3d2d45; }
    .lwl .lwl-empty { background: #49423d; }
}
