:root {
  color-scheme: light;
  --ink: #192824;
  --subtle: #52635c;
  --line: #dce4dd;
  --paper: #f3f6f2;
  --surface: #fff;
  --accent: #185540;
  --accent-dark: #103d2e;
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: var(--accent); text-underline-offset: .2em; }
:focus-visible { outline: 3px solid #347a65; outline-offset: 3px; }
h1, h2, h3, p, dl { margin: 0; }
h1, h2, h3 { line-height: 1.15; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); font-weight: 740; letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: 1.26rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
form { margin: 0; }
.topbar { color: #f7fbf7; background: #15392d; }
.topbar-inner { max-width: 1200px; margin: auto; padding: 0 28px; min-height: 68px; display: flex; gap: 8px 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.topbar nav { display: flex; align-items: center; flex-wrap: wrap; column-gap: 18px; }
.topbar a, .plain { color: inherit; text-decoration: none; }
.topbar a:hover, .plain:hover { text-decoration: underline; }
.topbar nav a, .plain { min-height: 44px; display: inline-flex; align-items: center; font-size: .9rem; }
.brand { display: inline-flex; align-items: center; min-height: 44px; gap: 10px; font-weight: 750; }
.mark { display: inline-flex; gap: 3px; align-items: end; padding: 7px; border: 1px solid #528470; border-radius: 7px; }
.mark i { height: 6px; width: 3px; background: #b9e3cb; border-radius: 2px; }
.mark i:nth-child(2) { height: 10px; }
.mark i:nth-child(3) { height: 14px; }
.shell { max-width: 1200px; margin: auto; padding: 42px 28px 76px; }
.heading { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.heading > * { min-width: 0; }
.identity, .muted, time { color: var(--subtle); }
.identity { overflow-wrap: anywhere; }
.code { color: var(--accent); font-family: ui-monospace, monospace; font-size: .83rem; font-weight: 700; letter-spacing: .055em; }
button, .button, .primary { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 7px; border: 1px solid #a9bcb0; background: var(--surface); color: var(--ink); font: inherit; font-weight: 620; cursor: pointer; text-decoration: none; }
button:hover, .button:hover { background: #e9f0ea; }
.primary { background: var(--accent); color: white; border-color: var(--accent); }
.primary:hover { background: var(--accent-dark); }
.plain { background: transparent; border: 0; padding-inline: 0; }
.plain:hover { background: transparent; }
.panel, .issue-list { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); min-width: 0; }
.stack { display: grid; align-items: start; gap: 14px; min-width: 0; }
.stack > button { justify-self: start; }
.stack.panel { padding: 22px; }
label { display: block; margin-bottom: 5px; font-size: .87rem; font-weight: 650; }
input:not([type=hidden]), select, textarea { width: 100%; min-width: 0; min-height: 44px; background: #fff; color: inherit; border: 1px solid #aabbb0; border-radius: 7px; padding: 9px 11px; font: inherit; }
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin: 0; min-width: 0; }
legend { padding-inline: 6px; font-weight: 650; }
.errorlist { margin: 0 0 6px; padding-left: 20px; color: #a12626; }
.helptext { color: var(--subtle); font-size: .85rem; }
.auth { max-width: 420px; margin: clamp(5px, 6vh, 65px) auto 0; display: grid; gap: 16px; }
.auth .primary { width: 100%; }
.auth-link { font-size: .95rem; }
.projects { padding: 0; list-style: none; margin: 0; }
.projects li + li { border-top: 1px solid var(--line); }
.projects a { min-height: 60px; padding: 14px 20px; display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.projects a:hover { background: #f6f9f6; }
.arrow { margin-left: auto; color: var(--accent); }
.empty { padding: 26px; color: var(--subtle); }
.empty h2 { color: var(--ink); margin-bottom: 8px; }
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 8px; }
.filters { padding: 12px 14px; margin-bottom: 18px; }
.search-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: end; max-width: 590px; }
.advanced-filters { margin-top: 6px; }
.advanced-filters summary { width: fit-content; min-height: 44px; padding-block: 10px; color: var(--accent); cursor: pointer; font-weight: 650; }
.filter-options { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)) auto auto; gap: 8px; align-items: end; }
.issue-list { overflow: hidden; }
.issue-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, .65fr) minmax(0, 1fr) minmax(0, .95fr) minmax(0, 1.25fr); align-items: center; font-size: .91rem; gap: 12px; padding: 12px 16px; overflow-wrap: anywhere; }
.issue-row + .issue-row { border-top: 1px solid var(--line); }
.issue-head { color: var(--subtle); background: #ebf1eb; font-size: .82rem; font-weight: 650; }
.issue-name a { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 9px; font-weight: 700; text-decoration: none; color: var(--ink); min-height: 30px; }
.issue-name a:hover { text-decoration: underline; }
.badge { display: inline-block; border-radius: 6px; padding: 2px 7px; background: #eaf0eb; color: #34493c; font-size: .8rem; }
.status-active { background: #e1edf8; color: #224c72; }
.status-review { background: #f7ecd7; color: #694810; }
.status-closed { background: #dff0e5; color: #1f5742; }
.priority-high, .priority-critical { color: #9a2924; font-weight: 650; }
.mobile-label { display: none; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 14px; padding: 16px 0; }
.detail-grid, .admin-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.admin-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 22px; }
.detail, .properties { padding: 22px; overflow-wrap: anywhere; }
.detail > * + * { margin-top: 13px; }
.properties { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; }
.properties dt { color: var(--subtle); }
.properties dd { margin: 0; }
.prose { white-space: pre-wrap; }
.activity { margin-top: 16px; }
.entry { border-top: 1px solid var(--line); padding-top: 12px; font-size: .93rem; }
.entry p { margin-top: 4px; }
.entry time { font-size: .81rem; }
.form-width { max-width: 800px; margin-top: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.form-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.compact { padding-left: 18px; }
.compact li + li { margin-top: 8px; }
.project-admin { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; }
.admin-form { padding-top: 16px; border-top: 1px solid var(--line); }
.messages { background: #e4f1e7; border: 1px solid #bdd8c7; border-radius: 8px; padding: 10px 14px; margin-bottom: 20px; }
.screenshots { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(145px, 100%), 1fr)); list-style: none; padding: 0; gap: 12px; }
.screenshots a { display: grid; height: 100%; padding: 8px; gap: 8px; border: 1px solid var(--line); border-radius: 8px; align-content: start; }
.screenshots img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; background: var(--paper); border-radius: 4px; }
.screenshot-form { max-width: 420px; }
.screenshot-form input[type=file]::file-selector-button { font: inherit; }
@media (max-width: 900px) {
  .filter-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .topbar-inner { padding: 4px 16px; }
  .shell { padding: 26px 16px 46px; }
  .detail-grid, .admin-grid, .form-grid, .form-grid.two { grid-template-columns: minmax(0, 1fr); }
  .issue-list { display: grid; gap: 9px; background: none; border: 0; overflow: visible; }
  .issue-row.issue-head { display: none; }
  .issue-row, .issue-row + .issue-row { grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; background: white; }
  .issue-name { grid-column: 1 / -1; border-bottom: 1px solid var(--line); }
  .issue-name a { min-height: 44px; align-items: center; }
  .mobile-label { display: block; font-size: .75rem; color: var(--subtle); }
  .detail, .properties, .stack.panel { padding: 15px; }
}
.gallery {
  width: min(94vw, 900px);
  max-height: 94dvh;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
}
.gallery::backdrop { background: rgb(10 23 18 / 75%); }
.gallery-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.gallery-name { overflow-wrap: anywhere; }
.gallery-stage { display: grid; place-items: center; margin: 10px 0; background: var(--paper); touch-action: pan-y pinch-zoom; }
.gallery-stage img { display: block; max-width: 100%; height: auto; max-height: 68dvh; object-fit: contain; }
.gallery-navigation { justify-content: center; }
.gallery-navigation button[hidden] { display: none; }
