@font-face {
  font-family: 'Mojangles';
  font-weight: 100 500;
  font-display: swap;
  src: url('/fonts/Mojangles-Regular.ttf') format('truetype');
}
@font-face {
  font-family: 'Mojangles';
  font-weight: 600 900;
  font-display: swap;
  src: url('/fonts/Mojangles-Bold.ttf') format('truetype');
}

:root {
  --bg: #0b0c0b;
  --bg-2: #111311;
  --surface: #171a17;
  --surface-2: #1e221e;
  --surface-3: #262b26;
  --border: #2d332d;
  --border-strong: #3b433b;
  --text: #e7ece7;
  --muted: #98a298;
  --faint: #6b746b;
  --green: #5dbb3c;
  --green-bright: #7ad957;
  --green-dark: #3e8a26;
  --green-deep: #1d3a14;
  --dirt: #795432;
  --danger: #e0574f;
  --yellow: #e8c547;
  --blue: #4fa3e0;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: 'Mojangles', 'Pixelify Sans', system-ui, sans-serif;
  --pixel: 'Mojangles', 'Pixelify Sans', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 500px at 50% -200px, rgba(93, 187, 60, .10), transparent 70%),
    var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  letter-spacing: .02em;
  word-spacing: .3em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--green-bright); }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; word-spacing: inherit; letter-spacing: inherit; }
[hidden] { display: none !important; }


.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: auto minmax(max-content, 1fr) auto minmax(max-content, 1fr) auto;
  grid-template-areas: "brand navl center navr account";
  align-items: center;
  gap: 0 18px;
  padding: 14px 24px;
  background: rgba(11, 12, 11, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.brand {
  grid-area: brand;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
}
.brand-block {
  width: 26px; height: 26px;
  background:
    linear-gradient(var(--green) 0 34%, transparent 34%),
    linear-gradient(90deg, transparent 0 20%, var(--green) 20% 32%, transparent 32% 60%, var(--green) 60% 70%, transparent 70%) 0 34% / 100% 14% no-repeat,
    var(--dirt);
  box-shadow: inset -3px -3px 0 rgba(0,0,0,.25), inset 3px 3px 0 rgba(255,255,255,.08);
  image-rendering: pixelated;
}
.nav { display: flex; gap: 6px; align-items: center; }
.nav-left { grid-area: navl; justify-self: end; }
.nav-right { grid-area: navr; justify-self: start; }
.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  padding: 7px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav-current {
  grid-area: center;
  margin: 0;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.1;
  color: var(--green-bright);
  text-shadow: 0 3px 0 var(--green-deep), 0 0 24px rgba(93, 187, 60, .25);
  text-align: center;
  white-space: nowrap;
  animation: pop .25s ease-out;
}
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.97); } }

.account { grid-area: account; justify-self: end; position: relative; }
.account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
}
.account-btn:hover { border-color: var(--green); }
.account-btn.logged { border-color: var(--green-dark); }
.account-btn .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.popover {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  z-index: 60;
}
.popover h3 { margin: 0 0 4px; font-family: var(--pixel); font-size: 20px; color: var(--green-bright); }
.popover .sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }

.grass-strip {
  height: 6px;
  background:
    repeating-linear-gradient(90deg, var(--green) 0 12px, var(--green-dark) 12px 20px, var(--green) 20px 28px, #4aa32f 28px 36px);
  box-shadow: 0 2px 0 var(--dirt);
}

.subnav {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 18px 16px 0;
  flex-wrap: wrap;
}
.subnav a {
  text-decoration: none;
  color: var(--muted);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
}
.subnav a:hover { color: var(--text); border-color: var(--border-strong); }
.subnav a.active { color: #0b0c0b; background: var(--green); border-color: var(--green); }


.view { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 26px 24px 48px; }
.site-footer { text-align: center; color: var(--faint); font-size: 13px; padding: 20px 16px 28px; border-top: 1px solid var(--border); }

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar h2 { margin: 0; font-family: var(--pixel); font-size: 24px; }
.toolbar .info { color: var(--muted); font-size: 14px; margin: 0; }
.toolbar .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { border-color: var(--green); background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--green);
  border-color: var(--green);
  color: #0b140b;
  box-shadow: inset 0 -3px 0 var(--green-dark);
}
.btn-primary:hover { background: var(--green-bright); border-color: var(--green-bright); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { border-color: var(--danger); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--border); }
.btn.on { border-color: var(--green); color: var(--green-bright); background: var(--green-deep); }
.btn-block { width: 100%; }

.icon-btn {
  width: 30px; height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.icon-btn:hover { color: var(--text); border-color: var(--green); }
.icon-btn.danger:hover { color: var(--danger); border-color: var(--danger); }
.icon-btn:disabled { opacity: .35; cursor: default; border-color: var(--border); color: var(--muted); }
.muted { color: var(--muted); }

.admin-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; color: var(--green-bright);
  background: var(--green-deep); border: 1px solid var(--green-dark);
  padding: 3px 9px; border-radius: 999px;
}

.empty {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  background: repeating-linear-gradient(45deg, transparent 0 14px, rgba(255,255,255,.012) 14px 28px);
}
.empty strong { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }


.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span, .field-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field small { color: var(--faint); font-size: 12px; }
.input, .textarea, .select {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.textarea { resize: vertical; min-height: 110px; }
.input:focus, .textarea:focus, .select:focus, .tag-input:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(93, 187, 60, .18);
}
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 0 0 8px; }
.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.tag-input {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  min-height: 42px;
  cursor: text;
}
.tag-input input { flex: 1; min-width: 120px; border: 0; background: none; outline: none; padding: 4px; }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600;
  color: var(--green-bright);
  background: var(--green-deep);
  border: 1px solid rgba(93, 187, 60, .35);
  border-radius: 999px;
  padding: 2px 10px;
  text-decoration: none;
  cursor: pointer;
}
.tag:hover { border-color: var(--green); }
.tag.active { background: var(--green); color: #0b140b; }
.tag .x { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 0 0 2px; font-size: 14px; line-height: 1; }

.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px;
  text-align: center;
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 28px 16px;
  cursor: pointer;
  background: var(--bg-2);
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.over { border-color: var(--green); background: rgba(93, 187, 60, .07); }
.dropzone .dz-icon {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 10px; background: var(--green-deep); color: var(--green-bright);
  font-size: 22px; margin-bottom: 6px;
}
.dropzone .dz-text { font-weight: 600; }
.dropzone .dz-hint { color: var(--faint); font-size: 13px; }

.progress { height: 8px; background: var(--bg-2); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--green-dark), var(--green-bright)); transition: width .15s; }

.preview-img { position: relative; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); }
.preview-img img { width: 100%; max-height: 220px; object-fit: cover; }
.preview-img .icon-btn { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.7); }


.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0, 0, 0, .7);
  display: grid; place-items: center;
  padding: 20px;
  overflow-y: auto;
  animation: fade .15s ease-out;
}
@keyframes fade { from { opacity: 0; } }
.modal {
  width: 100%; max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  box-shadow: var(--shadow);
  animation: rise .18s ease-out;
}
.modal.wide { max-width: 720px; }
@keyframes rise { from { transform: translateY(10px); opacity: 0; } }
.modal-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { margin: 0; font-family: var(--pixel); font-size: 22px; color: var(--green-bright); }
.modal-body { padding: 20px; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg-2);
  border-radius: 0 0 14px 14px;
}
.modal-foot .spacer { flex: 1; }

.step {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px 6px;
  margin-bottom: 14px;
  background: var(--bg-2);
}
.step-title { display: flex; align-items: center; gap: 10px; font-weight: 700; margin-bottom: 10px; }
.step-num {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: var(--green); color: #0b140b; border-radius: 6px;
  font-family: var(--pixel); font-size: 15px;
  box-shadow: inset 0 -3px 0 var(--green-dark);
}
.step-title small { font-weight: 400; color: var(--faint); margin-left: auto; font-size: 12px; }

.seg { display: inline-flex; background: var(--bg-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px; margin-bottom: 14px; }
.seg button { background: none; border: 0; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; }
.seg button.active { background: var(--green); color: #0b140b; }

.swatches { display: flex; gap: 8px; }
.swatches label { cursor: pointer; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches span { display: block; width: 28px; height: 28px; border-radius: 50%; border: 3px solid transparent; outline: 1px solid var(--border-strong); }
.swatches input:checked + span { border-color: var(--text); }
.swatches input:focus-visible + span { outline: 2px solid var(--green); }


.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.tile {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.tile--third { grid-column: span 1; }
.tile--two-thirds { grid-column: span 2; }
.tile--full { grid-column: 1 / -1; }
.tile-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.tile-head h2 { margin: 0; font-family: var(--pixel); font-size: 20px; font-weight: 700; }
.tile-head h2::before { content: ''; display: inline-block; width: 10px; height: 10px; background: var(--green); margin-right: 10px; vertical-align: 2px; box-shadow: 2px 2px 0 var(--green-dark); }
.tile-tools { display: flex; gap: 4px; }
.tile-body { padding: 16px 18px 18px; flex: 1; }
.tile-type-panorama .tile-body { padding: 0; }
.panorama-img { width: 100%; max-height: 460px; object-fit: cover; cursor: zoom-in; }
.tile-type-panorama .empty { margin: 16px; }
.tile-text { white-space: pre-wrap; color: var(--text); margin: 0; }
.tile-more { display: inline-block; margin-top: 12px; font-weight: 600; text-decoration: none; }
.tile-more:hover { text-decoration: underline; }

.tile-add {
  border: 2px dashed var(--border-strong);
  background: transparent;
  border-radius: 14px;
  color: var(--muted);
  min-height: 120px;
  cursor: pointer;
  font-weight: 600;
  display: grid; place-items: center;
}
.tile-add:hover { border-color: var(--green); color: var(--green-bright); background: rgba(93, 187, 60, .05); }

.links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.link-item {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-2);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  transition: border-color .15s, transform .1s;
}
a.link-item:hover { border-color: var(--green); transform: translateX(2px); }
.link-item .ico { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); flex-shrink: 0; }
.link-item .ico.wa { background: #1b8f4c; }
.link-item .ico svg { width: 20px; height: 20px; }
.link-item .meta { display: flex; flex-direction: column; min-width: 0; }
.link-item .meta small { color: var(--faint); font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.link-item.disabled { opacity: .6; }

.link-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.link-row { display: grid; grid-template-columns: 1fr 1.6fr auto; gap: 8px; }


.news-list { display: flex; flex-direction: column; gap: 14px; }
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--green);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.tile .news-card { background: var(--bg-2); padding: 12px 14px; }
.news-content { white-space: pre-wrap; word-wrap: break-word; margin: 0 0 10px; }
.news-card.compact .news-content { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.news-foot { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.news-author { color: var(--text); font-weight: 600; font-style: italic; }
.news-exp { color: var(--faint); }
.news-exp.soon { color: var(--yellow); }
.news-foot .tools { margin-left: auto; display: flex; gap: 4px; }
.filter-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 18px; }
.filter-bar .label { color: var(--muted); font-size: 13px; margin-right: 4px; }


.map-frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
}
.map-stage { position: relative; user-select: none; border-radius: 8px; overflow: visible; }
.map-stage img { width: 100%; border-radius: 8px; image-rendering: auto; -webkit-user-drag: none; }
.map-stage.editing { cursor: crosshair; outline: 2px dashed var(--green); outline-offset: 4px; }
.map-hint { font-size: 13px; color: var(--green-bright); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.map-meta { color: var(--faint); font-size: 13px; margin-top: 10px; }

.pin {
  position: absolute;
  width: 0; height: 0;
  border: 0; padding: 0; background: none;
  cursor: pointer;
  z-index: 2;
}
.pin:hover, .pin:focus-visible, .pin.hl { z-index: 5; }
.pin-mark {
  position: absolute;
  left: -13px; top: -32px;
  width: 26px; height: 32px;
  filter: drop-shadow(0 3px 3px rgba(0,0,0,.6));
  transition: transform .12s;
  transform-origin: 50% 100%;
}
.pin:hover .pin-mark, .pin.hl .pin-mark, .pin:focus-visible .pin-mark { transform: scale(1.2); }
.pin-mark svg { width: 100%; height: 100%; }
.pin.dragging { cursor: grabbing; }
.pin.dragging .pin-mark { transform: scale(1.3); }
.pin-label {
  position: absolute; left: 50%; top: 4px; transform: translateX(-50%);
  font-size: 11px; font-weight: 700; white-space: nowrap;
  background: rgba(0,0,0,.72); color: #fff; padding: 1px 6px; border-radius: 4px;
  pointer-events: none;
}
.pin-tip {
  position: absolute;
  left: 50%; bottom: 40px;
  transform: translateX(-50%);
  width: 240px;
  background: rgba(17, 19, 17, .97);
  border: 1px solid var(--green-dark);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  text-align: left;
  color: var(--text);
  font-size: 13px;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition: opacity .12s, visibility .12s;
}
.pin:hover .pin-tip, .pin:focus-visible .pin-tip, .pin.hl .pin-tip { opacity: 1; visibility: visible; }
.pin.dragging .pin-tip { opacity: 0; visibility: hidden; }
.pin-tip.below { bottom: auto; top: 14px; }
.pin-tip.left { left: auto; right: -14px; transform: none; }
.pin-tip.right { left: -14px; transform: none; }
.pin-tip strong { display: block; font-size: 14px; color: var(--green-bright); margin-bottom: 2px; }
.pin-tip p { margin: 0; white-space: pre-wrap; color: var(--muted); }
.pin-tip img { margin-top: 8px; border-radius: 6px; width: 100%; max-height: 150px; object-fit: cover; }

.wp-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.wp-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px 5px 8px;
  font-size: 13px; font-weight: 600; cursor: default;
}
.wp-chip:hover { border-color: var(--green); }
.wp-chip i { width: 12px; height: 12px; border-radius: 50%; }
.c-green { background: var(--green); }
.c-yellow { background: var(--yellow); }
.c-red { background: var(--danger); }
.c-blue { background: var(--blue); }


.photo-grid { columns: 3 260px; column-gap: 14px; }
.photo {
  position: relative;
  break-inside: avoid;
  margin: 0 0 14px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: zoom-in;
}
.photo img { width: 100%; transition: transform .25s; }
.photo:hover img { transform: scale(1.03); }
.photo figcaption { padding: 8px 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }
.photo .icon-btn, .video-card .del { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,.75); z-index: 2; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.video-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.video-card .frame { aspect-ratio: 16 / 9; background: #000; }
.video-card video, .video-card iframe { width: 100%; height: 100%; border: 0; display: block; }
.video-card .info { padding: 10px 14px; }
.video-card .info strong { display: block; }
.video-card .info small { color: var(--faint); }

.upload-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.upload-item { display: grid; grid-template-columns: 48px 1fr; gap: 10px; align-items: center; font-size: 13px; }
.upload-item img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; }
.upload-item .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 4px; }
.upload-item.done .name { color: var(--green-bright); }
.upload-item.fail .name { color: var(--danger); }


.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, .95);
  display: flex; align-items: center; justify-content: center;
  animation: fade .15s ease-out;
}
.lb-figure { margin: 0; max-width: 100vw; max-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 56px 72px 24px; }
.lb-img { max-width: calc(100vw - 144px); max-height: calc(100vh - 120px); object-fit: contain; border-radius: 4px; }
.lb-caption { color: var(--muted); margin-top: 12px; text-align: center; min-height: 1em; }
.lb-close {
  position: fixed; top: 14px; right: 18px;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--border-strong); background: rgba(30, 34, 30, .9);
  color: #fff; font-size: 30px; line-height: 1; cursor: pointer;
}
.lb-close:hover { background: var(--danger); border-color: var(--danger); }
.lb-nav {
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 48px; height: 64px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(30, 34, 30, .8);
  color: #fff; font-size: 38px; line-height: 1; cursor: pointer;
}
.lb-nav:hover { border-color: var(--green); color: var(--green-bright); }
.lb-prev { left: 12px; }
.lb-next { right: 12px; }


.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 300;
  transform: translate(-50%, 20px);
  background: var(--surface-2); border: 1px solid var(--green-dark); color: var(--text);
  padding: 10px 18px; border-radius: 999px; box-shadow: var(--shadow);
  font-weight: 600; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.error { border-color: var(--danger); color: #ffb3ae; }

/* ---------- Archiwum nowości ---------- */

.archive {
  margin-top: 28px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 12px 16px;
  background: var(--bg-2);
}
.archive summary { cursor: pointer; color: var(--muted); font-weight: 600; }
.archive[open] summary { margin-bottom: 14px; }
.archive .news-card { opacity: .75; border-left-color: var(--faint); }

/* ---------- Pomysły ---------- */

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 999px;
  background: var(--surface-3); color: var(--muted); border: 1px solid var(--border-strong);
  white-space: nowrap;
}
.badge.star { background: rgba(232, 197, 71, .12); color: var(--yellow); border-color: rgba(232, 197, 71, .4); }
.badge.new { background: var(--green-deep); color: var(--green-bright); border-color: var(--green-dark); }
.badge.lock { font-weight: 500; }

.topic-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.topic-card {
  display: flex; flex-direction: column; gap: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; text-decoration: none; color: var(--text);
  transition: border-color .15s, transform .1s;
}
.topic-card:hover { border-color: var(--green); transform: translateY(-2px); }
.topic-card.closed { opacity: .7; }
.topic-card p { margin: 0; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.topic-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.topic-head h2, .topic-head h3 { margin: 0; font-family: var(--pixel); }
.topic-head h3 { font-size: 19px; }
.topic-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.topic-meta { display: flex; align-items: center; gap: 6px 14px; flex-wrap: wrap; font-size: 13px; color: var(--faint); margin-top: auto; }
.topic-meta .go { margin-left: auto; color: var(--green-bright); font-weight: 600; }

.back { display: inline-block; margin-bottom: 14px; text-decoration: none; font-weight: 600; }
.back:hover { text-decoration: underline; }
.topic-hero {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--green);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 20px;
}
.topic-hero h2 { font-size: 26px; color: var(--green-bright); }
.topic-hero p { margin: 10px 0 0; color: var(--muted); white-space: pre-wrap; }

.ideas-grid { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 22px; align-items: start; }
.section-title { font-family: var(--pixel); font-size: 19px; margin: 0 0 12px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.idea-form { position: sticky; top: 110px; }
.idea-form h3 { margin: 0 0 14px; font-family: var(--pixel); font-size: 20px; color: var(--green-bright); }
.closed-note strong { display: block; margin-bottom: 4px; }
.closed-note p { margin: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; font-size: 14px; cursor: pointer; color: var(--muted); }
.check input { accent-color: var(--green); width: 17px; height: 17px; margin: 2px 0 0; flex-shrink: 0; }
.check:hover { color: var(--text); }
.form-note { font-size: 13px; color: var(--faint); margin: 6px 0 8px; }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.idea-list { display: flex; flex-direction: column; gap: 12px; }
.idea-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.idea-card.featured { border-color: rgba(232, 197, 71, .45); box-shadow: inset 4px 0 0 var(--yellow); }
.idea-head { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; color: var(--faint); margin-bottom: 8px; }
.idea-nick { color: var(--text); font-weight: 700; font-size: 14px; }
.idea-topic { color: var(--green-bright); }
.idea-content { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.idea-reply { margin-top: 12px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--green-deep); border: 1px solid var(--green-dark); }
.idea-reply strong { display: block; font-size: 13px; color: var(--green-bright); margin-bottom: 4px; }
.idea-reply p { margin: 0; white-space: pre-wrap; }
.idea-flags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.idea-tools { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.idea-tools .btn { padding: 6px 12px; font-size: 13px; }
.idea-quote { background: var(--bg-2); border-left: 3px solid var(--border-strong); padding: 10px 12px; border-radius: 4px; margin-bottom: 14px; color: var(--muted); white-space: pre-wrap; max-height: 180px; overflow: auto; }
.admin-box { margin-top: 28px; padding-top: 20px; border-top: 1px dashed var(--border-strong); }
button.tag { font: inherit; font-size: 13px; font-weight: 600; }


@media (max-width: 1380px) {
  .topbar {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "brand account" "center center" "navl navr";
    gap: 8px 6px;
    padding: 12px 16px;
  }
  .brand { grid-area: brand; }
  .account { grid-area: account; }
  .nav-current { grid-area: center; padding: 4px 0; }
  .nav-left { grid-area: navl; }
  .nav-right { grid-area: navr; }
}
@media (max-width: 1080px) {
  .ideas-grid { grid-template-columns: 1fr; }
  .idea-form { position: static; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tile--two-thirds, .tile--full { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .view { padding: 18px 16px 40px; }
  .topbar { grid-template-columns: 1fr auto; grid-template-areas: "brand account" "center center" "navl navl" "navr navr"; }
  .nav-left, .nav-right { justify-self: center; flex-wrap: wrap; justify-content: center; }
  .nav a { font-size: 13px; padding: 6px 10px; }
  .brand-name { max-width: 40vw; overflow: hidden; text-overflow: ellipsis; }
  .popover { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; }
  .tiles { grid-template-columns: 1fr; }
  .tile--third { grid-column: 1 / -1; }
  .video-grid { grid-template-columns: 1fr; }
  .link-row { grid-template-columns: 1fr auto; }
  .link-row .input:first-child { grid-column: 1 / -1; }
  .lb-figure { padding: 64px 8px 16px; }
  .lb-img { max-width: calc(100vw - 16px); }
  .lb-nav { top: auto; bottom: 16px; transform: none; }
  .pin-tip { width: 190px; }
}
