@import url("./assets/fonts.css");

:root {
  color-scheme: dark;
  --page: #0e100e;
  --panel: #151814;
  --panel-2: #1a1d17;
  --line: #2b3026;
  --line-strong: #3b4332;
  --text: #f0f1e8;
  --muted: #a2a79a;
  --lime: #d8fa52;
  --warm: #f1c477;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --display: "Barlow Condensed", Impact, "Arial Narrow", sans-serif;
  --body: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 300px; background: var(--page); color: var(--text); font: 1rem/1.5 var(--body); }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:disabled { cursor: not-allowed; opacity: .5; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 3px; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { display: inline-block; width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.skip-link { position: fixed; top: 8px; left: 8px; transform: translateY(-150%); z-index: 5; padding: 12px; background: var(--lime); color: var(--page); }
.skip-link:focus { transform: none; }
.topbar { background: #121510; border-bottom: 1px solid var(--line); }
.top-inner, .shell { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.top-inner { min-height: 73px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand strong { display: block; font: 800 1.69rem/.91 var(--display); letter-spacing: .045em; }
.brand small { display: block; margin-top: 6px; color: #9ba28e; font: 500 .65rem/1 var(--mono); letter-spacing: .15em; }
.main-nav { display: flex; align-self: stretch; gap: 6px; }
.main-nav a { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 19px; color: var(--muted); font: 500 .86rem/1.2 var(--mono); white-space: nowrap; }
.main-nav a:hover { color: var(--text); background: #1b2115; }
.main-nav a[aria-current="page"] { color: var(--lime); background: linear-gradient(0deg,#202719,transparent 90%); }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: 0; left: 0; right: 0; height: 2px; background: var(--lime); }
.main-nav .icon { width: 17px; height: 17px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 43px; padding: 8px 15px; border: 1px solid transparent; font: 600 .875rem/1.25 var(--mono); white-space: nowrap; transition: background .16s, border-color .16s; }
.button .icon { width: 18px; height: 18px; }
.primary { color: #111609; background: var(--lime); border-color: var(--lime); }
.primary:hover { background: #e8ff97; border-color: #e8ff97; }
.secondary { color: var(--text); background: var(--panel); border-color: var(--line-strong); }
.secondary:hover { background: #262d21; border-color: #71804e; }
.text-button { background: none; border: 0; padding: 4px 0; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font: inherit; }
.text-button:hover { color: var(--lime); }

.shell { padding-top: 28px; }
.hero { min-height: 328px; display: flex; align-items: center; position: relative; isolation: isolate; border: 1px solid #3d4831; overflow: hidden; background: #11160d url("./assets/taller.webp") center 36% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg,#10130fea, #11150c52 49%,transparent 72%), repeating-linear-gradient(0deg, #0000 0 3px, #0002 3px 4px); }
.hero::after { content: ""; position: absolute; right: 0; bottom: 0; height: 8px; width: 136px; background: repeating-linear-gradient(125deg,#c8ef4faa 0 5px,transparent 5px 10px); opacity: .63; }
.hero-copy { padding: 31px 41px 36px; }
.eyebrow { margin: 0; color: var(--lime); font: 600 .76rem/1.4 var(--mono); letter-spacing: .11em; }
.signal { display: inline-block; width: 7px; height: 7px; background: var(--lime); box-shadow: 0 0 12px #d8fa5265; margin-right: 7px; vertical-align: 1px; }
.hero h1 { font: 800 clamp(4.1rem, 8.4vw, 7rem)/.84 var(--display); margin: 14px 0 14px; letter-spacing: .006em; text-shadow: 0 3px 24px #0007; }
.hero h1 em { font-style: normal; color: var(--lime); }
.hero-copy > p:not(.eyebrow) { font-size: 1rem; margin: 0 0 23px; color: #c2c7b7; }
.hero .button { padding-inline: 17px; min-height: 45px; }
.hero-corner { position: absolute; top: 12px; right: 12px; width: 19px; height: 19px; border-top: 1px solid #c8ef4f84; border-right: 1px solid #c8ef4f84; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 15px; }
.stat { min-width: 0; min-height: 91px; border: 1px solid var(--line); background: var(--panel); display: flex; align-items: center; gap: 13px; padding: 13px 17px; }
.stat-icon { display: grid; place-items: center; width: 43px; height: 43px; flex: 0 0 43px; border: 1px solid #35432a; color: var(--lime); background: #232b19; }
.stat-icon .icon { width: 22px; height: 22px; }
.stat strong { color: var(--text); display: block; font: 600 1.57rem/1.1 var(--mono); letter-spacing: -.07em; }
.stat small { color: var(--muted); font: 500 .72rem/1.25 var(--mono); display: block; margin-top: 5px; }
.collection { margin-top: 34px; }
.collection-top, .toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
h2 { margin: 3px 0 0; font: 800 3.15rem/.95 var(--display); letter-spacing: .017em; }
.collection-top { align-items: end; margin-bottom: 17px; }
.section-kicker { font-size: .74rem; letter-spacing: .12em; }
.toolbar { border-top: 1px solid var(--line); padding: 12px 0; }
.filters, .search-tools { display: flex; align-items: center; gap: 7px; min-width: 0; }
.filter { padding: 8px 11px; min-height: 38px; background: none; color: var(--muted); border: 1px solid transparent; font: 500 .8rem/1.2 var(--mono); white-space: nowrap; }
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { border-color: #475631; background: #242e1b; color: var(--lime); }
.filter-count { display: inline-block; min-width: 17px; padding: 1px 4px; margin-left: 4px; color: inherit; background: #ffffff0a; font-size: .7rem; }
.search-control, .sort-control { display: flex; align-items: center; gap: 8px; min-height: 39px; padding: 0 10px; border: 1px solid var(--line); background: var(--panel); color: var(--muted); }
.search-control:focus-within, .sort-control:focus-within { border-color: var(--lime); }
.search-control input, .sort-control select { background: transparent; color: var(--text); border: 0; outline: none; padding: 8px 0; font: 500 .8rem/1.2 var(--mono); width: 155px; min-width: 0; }
.search-control .icon, .sort-control .icon { width: 16px; height: 16px; }
.search-control input::placeholder { color: var(--muted); }
.sort-control { position: relative; }
.sort-control select { appearance: none; padding-right: 14px; width: 130px; }
.sort-control select option { background: var(--panel); }
.sort-control .chevron { position: absolute; right: 8px; pointer-events: none; width: 13px; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.card { min-width: 0; border: 1px solid var(--line-strong); background: var(--panel); overflow: hidden; display: flex; flex-direction: column; }
.card:hover { border-color: #617345; }
.card-visual { height: 178px; position: relative; background: radial-gradient(ellipse at center,#262b23,#161a15 80%); isolation: isolate; }
.card-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 48%; }
.card-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg,#0e100e28,transparent 45%,#0e100e20); }
.placeholder-art { height: 100%; display: grid; place-items: center; color: #828e71; }
.placeholder-art .icon { width: 49px; height: 49px; stroke-width: 1; }
.status { display: inline-flex; align-items: center; gap: 7px; min-width: 0; padding: 6px 8px; background: #171b15; border: 1px solid #484f40; color: #d3d7ca; font: 600 .68rem/1.15 var(--mono); letter-spacing: .035em; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; flex: 0 0 6px; background: currentColor; }
.card-visual > .status { position: absolute; top: 10px; left: 10px; z-index: 1; }
.status.active { color: var(--lime); border-color: #64763c; background: #232b17; }
.status.ready { color: var(--warm); border-color: #6b5835; background: #2b2518; }
.status.finished { color: #a3ebc6; border-color: #476856; background: #182b21; }
.card-body { padding: 13px 15px 0; flex: 1; }
.faction { margin: 0; color: var(--lime); font: 500 .73rem/1.3 var(--mono); letter-spacing: .055em; text-transform: uppercase; overflow-wrap: anywhere; }
.card h3 { margin: 2px 0 11px; font: 700 1.82rem/1.04 var(--display); overflow-wrap: anywhere; }
.card-meta, .progress-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font: 500 .75rem/1.3 var(--mono); }
.card-meta { justify-content: flex-start; gap: 16px; margin-bottom: 12px; }
.card-meta span { display: inline-flex; align-items: center; gap: 4px; }
.card-meta .icon { width: 15px; height: 15px; }
.progress-label strong { color: var(--text); font-weight: 500; }
.meter { height: 5px; background: #2a3224; margin: 6px 0 13px; }
.meter span { display: block; height: 100%; background: var(--lime); }
.card-active-mini { margin: 0 0 12px; color: #bfc9ae; font: 500 .75rem/1.4 var(--mono); overflow-wrap: anywhere; }
.card-button { display: flex; align-items: center; justify-content: space-between; width: 100%; text-align: left; min-height: 41px; padding: 8px 15px; background: #191d16; color: var(--text); border: 0; border-top: 1px solid var(--line); font: 600 .8rem/1.3 var(--mono); }
.card-button:hover { color: var(--lime); background: #222b1b; }
.card-button .icon { width: 15px; height: 15px; }
.empty { grid-column: 1/-1; padding: 42px 24px; text-align: center; border: 1px dashed var(--line-strong); background: var(--panel); }
.empty > .icon { width: 38px; height: 38px; color: var(--lime); }
.empty h3 { font: 700 2rem/1 var(--display); margin: 8px 0 4px; }
.empty p { color: var(--muted); margin: 8px 0 15px; }
.footer { margin-top: 30px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 0 25px; color: var(--muted); font: 500 .75rem/1.4 var(--mono); }
.footer .signal { background: #909d71; box-shadow: none; }

dialog { --pad: 24px; color: var(--text); width: min(640px,calc(100% - 24px)); max-height: calc(100dvh - 26px); padding: 0; background: #171a15; border: 1px solid #576444; box-shadow: 0 20px 90px #000a; }
dialog.wide { width: min(820px,calc(100% - 24px)); }
dialog::backdrop { background: #090b08cb; backdrop-filter: blur(4px); }
body:has(dialog[open]) { overflow: hidden; }
.modal-header { display: flex; gap: 10px; align-items: start; justify-content: space-between; padding: 17px var(--pad) 13px; border-bottom: 1px solid var(--line); }
.modal-header h2 { font-size: 2.5rem; overflow-wrap: anywhere; }
.modal-close { min-width: 38px; min-height: 38px; padding: 6px; }
.modal-body { padding: 18px var(--pad) var(--pad); }
.modal-body > p:first-child { margin-top: 0; }
.help { color: var(--muted); font-size: .88rem; margin: 6px 0; overflow-wrap: anywhere; }
.inline-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; font: 500 .84rem/1.4 var(--mono); }
.field input:not([type=file]), .field select, .field textarea { width: 100%; min-height: 43px; padding: 8px 10px; color: var(--text); border: 1px solid var(--line-strong); background: #11140f; }
.field input[type=file] { max-width: 100%; color: var(--muted); font-size: .78rem; }
.field input[type=file]::file-selector-button { color: var(--text); padding: 8px; margin-right: 8px; background: var(--panel-2); border: 1px solid var(--line-strong); cursor: pointer; }
.field textarea { min-height: 67px; resize: vertical; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 9px; margin-top: 5px; }
.scanner { position: relative; height: 185px; display: grid; place-items: center; background: #10150d repeating-linear-gradient(0deg,transparent 0 4px,#d8fa5208 4px 5px); border: 1px solid var(--line-strong); margin-bottom: 11px; overflow: hidden; }
.scanner video { width: 100%; height: 100%; object-fit: cover; min-height: 0; }
.scan-frame { position: absolute; pointer-events: none; inset: 20% 15%; border: 1px dashed #d8fa526d; display: grid; place-items: center; color: var(--lime); }
.scan-frame .icon { width: 45px; height: 45px; stroke-width: 1; }
.scanner.live .scan-frame .icon { display: none; }
.scanner.live .scan-frame::before { content: ""; width: 100%; height: 1px; background: var(--lime); box-shadow: 0 0 13px var(--lime); }
.button.scan-capture { display: none; }
@media (any-pointer: coarse) {
  .button.scan-capture { display: inline-flex; }
}
.scan-form { display: flex; align-items: end; gap: 8px; margin-top: 16px; }
.scan-form .field { flex: 1; }
.scan-result { margin-top: 14px; }
.match { display: flex; align-items: center; gap: 12px; padding: 8px; border: 1px solid var(--line-strong); margin-top: 7px; }
.match img { width: 75px; height: 51px; object-fit: cover; }
.match > div { flex: 1; min-width: 0; }
.match strong { display: block; overflow-wrap: anywhere; }
.match .button { min-height: 36px; padding-inline: 8px; }
.match .help { margin: 0; font-size: .75rem; }
.scan-catalog { margin-top: 13px; color: var(--muted); }
.scan-catalog summary { font: 500 .8rem var(--mono); cursor: pointer; }
.catalog-options { display: grid; gap: 6px; margin-top: 8px; }
.catalog-option { background: #11150e; color: var(--text); border: 1px solid var(--line); padding: 8px 10px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 5px 12px; text-align: left; font: 500 .8rem var(--mono); }
.catalog-option:hover { border-color: var(--lime); }
.catalog-option span { color: var(--muted); }
.detail-top { display: grid; grid-template-columns: minmax(140px, 30%) 1fr; gap: 16px; align-items: start; margin-bottom: 17px; }
.detail-top img { width: 100%; max-height: 145px; object-fit: cover; border: 1px solid var(--line); }
.detail-summary { display: grid; justify-items: start; gap: 8px; min-width: 0; }
.detail-summary .field { max-width: 100%; }
.estimates { display: flex; flex-wrap: wrap; gap: 7px 16px; color: var(--muted); font: 500 .78rem/1.4 var(--mono); }
.estimates .icon { width: 15px; height: 15px; color: var(--lime); }
.detail-section { padding-top: 13px; margin-top: 13px; border-top: 1px solid var(--line); }
.detail-section h3 { margin: 0 0 8px; font: 700 1.62rem/1 var(--display); }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 5px; }
.mini { display: grid; grid-template-columns: minmax(0,1fr) 132px auto; align-items: center; gap: 8px; padding: 6px 8px; background: #11150f; border: 1px solid var(--line); font-size: .88rem; }
.mini.active { border-color: #748c46; }
.mini span { overflow-wrap: anywhere; }
.mini select { width: 100%; background: #1a2017; border: 1px solid var(--line-strong); color: var(--text); padding: 5px; font: 500 .76rem/1.3 var(--mono); min-height: 34px; }
.mini .button { min-width: 36px; min-height: 34px; padding: 5px; }
.mini .button[aria-pressed="true"] { color: var(--lime); border-color: #748c46; }
.photo-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 10px 0; }
.photo-tile { position: relative; min-width: 0; }
.photo-tile > button:first-child { display: block; width: 100%; background: #0d100c; border: 1px solid var(--line); padding: 0; }
.photo-tile img { width: 100%; height: 115px; object-fit: cover; }
.photo-tile .remove-photo { position: absolute; top: 5px; right: 5px; padding: 4px; min-height: 29px; }
.lightbox-photo { max-height: 72dvh; margin: auto; object-fit: contain; }
.error { color: #ffb9a6; font-size: .88rem; }
.toast { position: fixed; z-index: 2; bottom: 16px; right: 16px; max-width: calc(100% - 32px); color: var(--text); background: #222b18; border: 1px solid #61763b; padding: 10px 13px; font: 500 .84rem/1.4 var(--mono); }
.toast:empty { display: none; }
@media (min-width: 1500px) { .hero { min-height: 360px; } }
@media (max-width: 1050px) {
  .top-inner, .shell { width: calc(100% - 48px); }
  .main-nav a { padding-inline: 12px; }
  .search-control input { width: 120px; }
  .sort-control select { width: 114px; }
  .stat { padding-inline: 11px; gap: 9px; }
}
@media (max-width: 780px) {
  .top-inner { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; min-height: 0; padding-top: 10px; }
  .main-nav { grid-row: 2; grid-column: 1/-1; justify-content: center; margin-top: 6px; }
  .main-nav a { min-height: 44px; flex: 1; padding-inline: 5px; }
  .hero { min-height: 285px; background-position: 60% center; }
  .hero-copy { padding-left: 24px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .stat { min-height: 72px; }
  .toolbar { align-items: stretch; flex-direction: column; gap: 9px; }
  .filters { flex-wrap: wrap; }
  .search-control { flex: 1; }
  .search-control input { width: 100%; }
  .cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
}
@media (max-width: 490px) {
  .top-inner, .shell { width: calc(100% - 24px); }
  .brand img { width: 33px; height: 33px; }
  .brand strong { font-size: 1.45rem; }
  .brand small { font-size: .57rem; }
  .nav-scan { min-height: 37px; padding-inline: 7px; font-size: .72rem; gap: 4px; }
  .nav-scan .icon { width: 16px; height: 16px; }
  .main-nav a { font-size: .72rem; gap: 4px; }
  .main-nav .icon { width: 15px; height: 15px; }
  .shell { padding-top: 14px; }
  .hero { min-height: 260px; background-position: 61% center; }
  .hero::before { background: linear-gradient(90deg,#10130fee,#10130f8c 64%,#10130f30); }
  .hero h1 { font-size: clamp(3.65rem,16vw,5rem); }
  .hero-copy { padding: 24px 12px 23px 15px; }
  .hero-copy > p:not(.eyebrow) { font-size: .9rem; }
  .stat-icon { width: 34px; height: 34px; flex-basis: 34px; }
  .stat-icon .icon { width: 18px; height: 18px; }
  .stat strong { font-size: 1.3rem; }
  .stat small { font-size: .68rem; }
  .collection { margin-top: 23px; }
  .collection-top { align-items: start; flex-direction: column; gap: 9px; }
  h2 { font-size: 2.6rem; }
  .add-manual { min-height: 36px; padding-inline: 9px; font-size: .75rem; }
  .filter { font-size: .73rem; padding-inline: 6px; }
  .filters { gap: 2px; }
  .cards { grid-template-columns: minmax(0,1fr); }
  .card-visual { height: 185px; }
  dialog { --pad: 12px; }
  .mini { grid-template-columns: minmax(0,1fr) 111px 35px; gap: 5px; }
  .photo-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .detail-top { grid-template-columns: 1fr; }
  .detail-top img { max-height: 125px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

.card-visual[data-catalog] {
  background: radial-gradient(ellipse at 54% 45%,#383d31,#22271f 47%,#171b15 100%);
  border-bottom: 1px solid #2c3426;
}
.card-visual[data-catalog] img { object-fit: contain; padding: 9px 12px 2px; filter: drop-shadow(0 9px 9px #080a08a0); }
.detail-cover[data-catalog] { background: radial-gradient(ellipse at center,#363b31,#20241c 75%); }
.detail-cover[data-catalog] img { object-fit: contain; }
.detail-cover .placeholder-art { min-height: 100px; background: #22281e; }
.card-active-mini .icon { width: 14px; height: 14px; color: var(--lime); }
body[data-view="exterminatus"] .hero h1 { font-size: clamp(3rem,9.2vw,7rem); }
body:not([data-view="marea-gris"]) .hero { min-height: 248px; }
body:not([data-view="marea-gris"]) .hero-copy > p:not(.eyebrow) { margin-bottom: 0; }
@media (max-width: 490px) {
  .scan-form { align-items: stretch; flex-direction: column; }
  .match { flex-wrap: wrap; }
}

.collection-actions { justify-content: flex-end; }
.catalog-search { display: grid; grid-template-columns: 3fr 2fr; gap: 10px; }
.catalog-results { display: grid; gap: 6px; margin: 10px 0; }
.catalog-option { width: 100%; align-items: center; }
.catalog-option strong { overflow-wrap: anywhere; }
.catalog-footer { margin-top: 12px; }
.match-cover { flex: 0 0 86px; width: 86px; height: 68px; background: #242820; }
.match .match-cover img { width: 100%; height: 100%; object-fit: contain; }
.match .match-cover .icon { width: 27px; height: 27px; }
.match .match-info { flex: 1 1 auto; }
.match .match-actions { flex: 0 1 auto; display: grid; justify-items: end; gap: 4px; }
.match-actions .text-button { font: 500 .74rem/1.3 var(--mono); }
.kit-groups { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 5px 18px; padding-left: 21px; color: var(--muted); font-size: .9rem; }
.kit-groups li { overflow-wrap: anywhere; }
@media (max-width: 490px) {
  .collection-actions { justify-content: start; }
  .collection-actions .button { min-height: 38px; padding-inline: 7px; font-size: .73rem; gap: 5px; }
  .catalog-search { grid-template-columns: 1fr; }
  .match .match-info { flex-basis: calc(100% - 100px); }
  .match .match-actions { width: 100%; grid-auto-flow: column; align-items: center; justify-content: start; gap: 12px; }
  .kit-groups { grid-template-columns: 1fr; }
}

.top-actions { display: flex; align-items: center; gap: 8px; }
.consent-field { padding: 12px; display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); background: #11150f; }
.consent-field input { margin: 4px 0 0; width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--lime); }
.consent-field strong { display: block; font: 600 .85rem/1.35 var(--mono); }
.consent-field small { display: block; margin-top: 5px; color: var(--muted); font-size: .82rem; }
.gallery-upload { align-items: end; }
.gallery-upload .field { width: min(100%, 245px); }
#archive-search-form { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) auto; align-items: end; }
.archive-images { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.archive-photo { min-width: 0; border: 1px solid var(--line); background: #11150f; }
.archive-thumbnail { display: block; height: 132px; background: #1b2118; }
.archive-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.archive-photo-caption { padding: 8px; overflow-wrap: anywhere; }
.archive-photo-caption .eyebrow { letter-spacing: .03em; }
.archive-photo-caption .help { font-size: .78rem; margin: 4px 0 0; }
.archive-pages { margin-top: 14px; }
@media (max-width: 920px) {
  .nav-account { min-width: 43px; padding-inline: 9px; }
  .nav-account span { display: none; }
}
@media (max-width: 490px) {
  .top-actions { gap: 4px; }
  .nav-account { min-width: 36px; min-height: 37px; padding-inline: 6px; }
  #archive-search-form { grid-template-columns: 1fr; }
  .archive-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 350px) {
  .nav-scan { min-width: 34px; }
  .nav-scan span { display: none; }
}

.social-shell { width: min(100%, 1024px); margin: 2px auto 44px; }
.feed-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 0 22px; padding: 14px 0 16px; border-bottom: 1px solid var(--line); }
.feed-heading h1 { font: 800 clamp(3rem, 6vw, 5rem)/.88 var(--display); margin: 8px 0 0; letter-spacing: .015em; }
.feed-heading .button { margin-bottom: 2px; }
.feed-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.feed-column, #social-posts { min-width: 0; }
.feed-sidebar { position: sticky; top: 18px; display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line); background: var(--panel); }
.feed-identity, .post-author { display: flex; align-items: center; min-width: 0; gap: 10px; color: var(--text); text-decoration: none; }
.feed-identity span:last-child, .post-author span:last-child { min-width: 0; overflow-wrap: anywhere; }
.feed-identity strong, .post-author strong { display: block; }
.feed-identity small, .post-author small { display: block; color: var(--muted); font: 500 .74rem/1.35 var(--mono); }
.feed-identity .icon { width: 32px; height: 32px; color: var(--lime); }
.feed-shortcut { border-top: 1px solid var(--line); padding: 9px 0 2px; display: flex; align-items: center; gap: 8px; font-size: .85rem; color: var(--muted); text-decoration: none; }
.feed-shortcut:hover { color: var(--lime); }
.social-avatar { display: inline-grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border: 1px solid #637937; color: var(--lime); background: #232c1a; font: 700 1rem var(--mono); }
.social-avatar.large { width: 64px; height: 64px; flex-basis: 64px; font-size: 1.5rem; }
.feed-empty { min-height: 320px; display: flex; align-items: end; border: 1px solid #3c492e; padding: 27px; background: linear-gradient(90deg, #10150e 1%, #11170de0 47%, #14170c48), url("./assets/taller.webp") 66% center/cover; }
.feed-empty h2 { font: 750 clamp(2.25rem, 5vw, 3.4rem)/.92 var(--display); margin: 5px 0 6px; }
.feed-empty p:not(.eyebrow) { color: #d4dbc8; margin: 12px 0 18px; }
.feed-post { border: 1px solid var(--line); background: var(--panel); margin: 0 0 18px; overflow: hidden; }
.post-header { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 11px 13px; }
.post-author:hover strong, .feed-identity:hover strong { color: var(--lime); }
.post-delete { min-width: 34px; min-height: 34px; padding: 4px; }
.post-image { display: block; width: 100%; border: 0; padding: 0; cursor: zoom-in; background: #0b0d0b; }
.post-image img { display: block; width: 100%; max-height: min(72vh, 690px); object-fit: contain; }
.post-image > .placeholder-art { min-height: 160px; }
.post-caption { padding: 11px 14px 15px; }
.post-caption h2 { margin: 2px 0 3px; font: 700 1.65rem/1 var(--display); overflow-wrap: anywhere; }
.post-caption p, .post-detail-description { margin: 6px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; color: #d6dbca; }
.like-button { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); background: transparent; border: 0; min-height: 32px; padding: 2px 5px 2px 0; font: 600 .8rem var(--mono); }
.like-button:hover, .like-button[aria-pressed="true"] { color: var(--lime); }
.like-button[aria-pressed="true"] .icon { fill: var(--lime); }
.social-more { margin-top: 8px; }
.public-profile-heading { display: flex; align-items: center; gap: 15px; padding: 10px 0 8px; }
.public-profile-heading h1 { font: 800 clamp(2.5rem, 6vw, 4.75rem)/.95 var(--display); margin: 0; min-width: 0; overflow-wrap: anywhere; }
.public-profile-heading .button { margin-left: auto; }
.public-profile-stats { margin-top: 18px; }
.profile-gallery { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 16px; }
.profile-gallery h2 { font-size: 2.1rem; margin: 0 0 10px; }
.profile-posts { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; }
.profile-post { padding: 0; min-width: 0; display: grid; width: 100%; border: 1px solid var(--line); background: var(--panel); color: var(--text); text-align: left; cursor: zoom-in; }
.profile-post:hover { border-color: #748a46; }
.profile-post img, .profile-post > .placeholder-art { aspect-ratio: 1; width: 100%; height: auto; object-fit: cover; }
.profile-post > span { min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 7px 8px; }
.profile-post strong { overflow-wrap: anywhere; }
.profile-post small { color: var(--muted); white-space: nowrap; }
.profile-post small .icon { width: 15px; height: 15px; }
.profile-empty { grid-column: 1/-1; border: 1px dashed var(--line); padding: 16px; color: var(--muted); }
.post-profile-link { display: inline-block; margin-top: 10px; color: var(--lime); text-underline-offset: 4px; }
.post-detail-actions { margin-top: 9px; justify-content: space-between; }
.publish-picker { min-height: 165px; display: grid; place-items: center; position: relative; border: 1px dashed #5b6843; background: #11150f; color: var(--lime); text-align: center; cursor: pointer; }
.publish-picker input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.publish-picker:focus-within { outline: 2px solid var(--lime); outline-offset: 2px; }
.publish-empty { display: grid; justify-items: center; gap: 5px; padding: 17px; }
.publish-empty .icon { width: 32px; height: 32px; }
.publish-empty small { color: var(--muted); }
.publish-picker:has(img:not([hidden])) .publish-empty { display: none; }
.publish-picker img { display: block; max-height: 275px; width: 100%; object-fit: contain; }
.security-options, .security-item { display: grid; gap: 9px; }
.security-item { justify-items: start; border: 1px solid var(--line); padding: 12px; }
.security-item .icon { color: var(--lime); }
.security-key { color: var(--text); }
.security-key p { margin: 0 0 8px; }
.security-key code, .recovery-codes code { display: block; padding: 9px; color: var(--lime); background: #11150f; overflow-wrap: anywhere; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; padding-left: 0; list-style: none; }
@media (max-width: 980px) {
  .top-inner { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; min-height: 0; padding-top: 10px; }
  .main-nav { grid-row: 2; grid-column: 1/-1; justify-content: center; margin-top: 6px; }
  .main-nav a { min-height: 44px; flex: 1; padding-inline: 5px; }
}
@media (max-width: 730px) {
  .feed-layout { grid-template-columns: minmax(0, 1fr); }
  .feed-sidebar { position: static; }
  .feed-heading { margin-bottom: 13px; }
}
@media (max-width: 490px) {
  .feed-heading h1 { font-size: 2.6rem; }
  .feed-heading .button { min-height: 36px; padding-inline: 6px; font-size: .73rem; }
  .feed-empty { min-height: 292px; padding: 15px; }
  .public-profile-heading { flex-wrap: wrap; gap: 8px; }
  .public-profile-heading .button { margin-left: 0; }
  .post-header, .post-caption { padding-inline: 8px; }
  .profile-posts { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .recovery-codes { grid-template-columns: 1fr; }
}
@media (max-width: 375px) {
  .main-nav .icon { display: none; }
  .main-nav a { padding-inline: 3px; font-size: .66rem; }
}

#photo-editor { width: min(680px, calc(100% - 24px)); background: #141711; border-color: #414b35; }
#photo-editor::backdrop { background: #080a06dd; }
.crop-header { display: grid; grid-template-columns: 64px minmax(0, 1fr) 80px; gap: 8px; align-items: center; padding: 11px 14px; text-align: center; border-bottom: 1px solid var(--line); }
.crop-header h2 { margin: 0; font-size: 2rem; line-height: .95; }
.crop-file { margin: 4px 0 0; color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crop-icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); color: var(--text); background: transparent; }
.crop-icon-button:hover { border-color: #748a46; color: var(--lime); }
.crop-apply { justify-self: end; }
.crop-viewport { display: grid; place-items: center; container-type: size; height: clamp(225px, 53dvh, 490px); padding: 10px; background: #090b08; }
.crop-frame { position: relative; width: min(100cqw, calc(100cqh * var(--crop-aspect))); aspect-ratio: var(--crop-aspect); box-shadow: 0 0 0 1px #69715c; touch-action: none; cursor: grab; }
.crop-frame canvas { display: block; width: 100%; height: 100%; }
.crop-frame.crop-moving { cursor: grabbing; }
.crop-grid { position: absolute; inset: 0; pointer-events: none; opacity: .24; border: 1px solid #fff; background:
  linear-gradient(to right, transparent calc(100% / 3 - .5px), #fff calc(100% / 3 - .5px) calc(100% / 3 + .5px), transparent calc(100% / 3 + .5px) calc(200% / 3 - .5px), #fff calc(200% / 3 - .5px) calc(200% / 3 + .5px), transparent calc(200% / 3 + .5px)),
  linear-gradient(to bottom, transparent calc(100% / 3 - .5px), #fff calc(100% / 3 - .5px) calc(100% / 3 + .5px), transparent calc(100% / 3 + .5px) calc(200% / 3 - .5px), #fff calc(200% / 3 - .5px) calc(200% / 3 + .5px), transparent calc(200% / 3 + .5px)); }
.crop-frame:is(.crop-moving, :focus-visible) .crop-grid { opacity: .68; }
.crop-tools { padding: 12px 14px 10px; border-top: 1px solid var(--line); }
.crop-formats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 7px; padding: 0; margin: 0 auto; border: 0; max-width: 384px; }
.crop-format { position: relative; cursor: pointer; }
.crop-format input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.crop-format-face { min-height: 45px; display: flex; gap: 6px; align-items: center; justify-content: center; padding: 4px; color: var(--muted); border: 1px solid var(--line); font: 600 .78rem var(--mono); }
.crop-format:hover .crop-format-face { border-color: #748a46; }
.crop-format input:checked + .crop-format-face { border-color: var(--lime); color: var(--lime); background: #232c18; }
.crop-format input:focus-visible + .crop-format-face { outline: 2px solid var(--lime); outline-offset: 2px; }
.crop-shape { display: inline-block; border: 1px solid currentColor; width: 17px; height: 10px; }
.crop-shape.vertical { width: 10px; height: 17px; }
.crop-shape.square { width: 13px; height: 13px; }
.crop-shape.original { width: 15px; height: 13px; border-style: dashed; }
.crop-adjustments { max-width: 384px; margin: 9px auto 0; }
.crop-adjustments summary { cursor: pointer; color: var(--muted); font: 500 .73rem var(--mono); }
.crop-adjustments[open] summary { margin-bottom: 7px; }
.crop-adjustments .field { font-size: .79rem; }
.crop-help, .crop-gesture-hint { color: var(--muted); font-size: .74rem; }
.crop-help { margin: 0 0 8px; }
.crop-gesture-hint { margin: 8px 0 0; text-align: center; }
.crop-touch-hint { display: none; }
.crop-range input[type="range"] { min-height: 36px; width: 100%; margin: 0; padding: 0; accent-color: var(--lime); }
.crop-range input[type="range"]:disabled { opacity: .45; }
.draft-photos { display: flex; flex-wrap: wrap; gap: 7px; }
.draft-photos img { width: 96px; height: 68px; object-fit: contain; background: #0b0d0a; border: 1px solid var(--line); }
[data-action="recrop-draft"] { justify-self: start; }
@media (max-width: 490px) {
  #photo-editor { width: calc(100% - 16px); }
  .crop-header { grid-template-columns: 61px minmax(0, 1fr) 61px; padding-inline: 9px; }
  .crop-header h2 { font-size: clamp(1.35rem, 6.4vw, 1.75rem); }
  .crop-apply { padding-inline: 8px; }
  .crop-viewport { height: clamp(200px, 54dvh, 490px); padding: 6px; }
  .crop-tools { padding-inline: 9px; }
  .crop-format-face { min-height: 44px; gap: 4px; font-size: .73rem; }
}
@media (max-width: 360px) {
  .crop-shape.original { display: none; }
}
@media (pointer: coarse) {
  .crop-touch-hint { display: inline; }
  .crop-desktop-hint { display: none; }
}
