:root {
  --ink: #131313;
  --ink-soft: #333;
  --paper: #ece9e2;
  --paper-2: #d9d5cc;
  --paper-3: #c2bdb2;
  --night: #171717;
  --night-2: #242424;
  --night-3: #303030;
  --red: #cf2a1e;
  --red-dark: #8e1811;
  --red-bright: #f04435;
  --yellow: #ffce4f;
  --blue: #184e9e;
  --blue-bright: #2d6dc4;
  --green: #28a76e;
  --line: #161616;
  --muted: #6b665e;
  --font: Tahoma, Verdana, "Segoe UI", sans-serif;
  --pixel: "Courier New", "Lucida Console", monospace;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  line-height: 1.55;
  background-color: #1d1d1d;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.35) 1px, transparent 1px),
    linear-gradient(rgba(0, 0, 0, 0.35) 1px, transparent 1px);
  background-size: 4px 4px, 32px 32px, 32px 32px;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 22%, transparent 78%, rgba(0, 0, 0, 0.3));
  z-index: 20;
}

a { color: var(--blue); text-decoration: underline; }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 1px;
}

img, svg { max-width: 100%; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; }
ul, ol { margin: 0 0 12px; padding-left: 22px; }
hr { border: 0; border-top: 1px solid #a9a49b; border-bottom: 1px solid #fff; margin: 16px 0; }
small { font-size: 11px; }
strong { color: #111; }
code { font-family: var(--pixel); background: #d8d3c9; border: 1px solid #b7b1a7; padding: 1px 4px; font-size: 11px; }

::selection { background: var(--yellow); color: #111; }

.shell {
  width: min(1160px, calc(100% - 24px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--yellow);
  color: #111;
  padding: 6px 12px;
  z-index: 100;
}
.skip-link:focus { left: 8px; }

/* ---------------- Top strip and banner ---------------- */

.top-strip {
  background: linear-gradient(180deg, #0d0d0d, #050505);
  border-bottom: 1px solid #2a2a2a;
  color: #d8d5cd;
  font-size: 12px;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}
.top-strip-inner {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  min-height: 38px;
}
.top-meta {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  white-space: nowrap;
  font-family: var(--pixel);
  font-weight: 700;
}
.top-date { color: #f1eee7; }
.top-rule { width: 1px; height: 16px; background: #3a3a3a; }
.top-online { display: inline-flex; align-items: center; gap: 8px; color: #f1eee7; }
.top-online .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #37e07f;
  box-shadow: 0 0 9px #37e07f;
  animation: pulse 2s infinite;
}
.top-online strong { color: #fff; }

.banner {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(90% 150% at 6% 0%, rgba(207, 42, 30, 0.24), transparent 52%),
    radial-gradient(70% 120% at 88% 18%, rgba(255, 255, 255, 0.06), transparent 60%),
    linear-gradient(180deg, #191919 0%, #0c0c0c 58%, #050505 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), inset 0 -1px 0 #000;
}
.banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0, rgba(255, 255, 255, 0.035) 1px, transparent 1px, transparent 4px);
  opacity: 0.5;
  pointer-events: none;
}
.banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.96) 0%, rgba(5, 5, 5, 0.62) 48%, rgba(5, 5, 5, 0.1) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 180'%3E%3Cg fill='%23000'%3E%3Crect x='0' y='128' width='42' height='52'/%3E%3Crect x='42' y='104' width='30' height='76'/%3E%3Crect x='72' y='138' width='48' height='42'/%3E%3Crect x='120' y='112' width='26' height='68'/%3E%3Cpolygon points='146,180 146,84 158,64 170,84 170,180'/%3E%3Crect x='170' y='122' width='54' height='58'/%3E%3Crect x='224' y='92' width='32' height='88'/%3E%3Crect x='256' y='140' width='40' height='40'/%3E%3Crect x='296' y='114' width='28' height='66'/%3E%3Crect x='324' y='96' width='46' height='84'/%3E%3Crect x='370' y='132' width='34' height='48'/%3E%3Cpolygon points='404,180 404,72 414,54 424,72 424,180'/%3E%3Crect x='424' y='118' width='52' height='62'/%3E%3Crect x='476' y='102' width='30' height='78'/%3E%3Crect x='506' y='134' width='44' height='46'/%3E%3Crect x='550' y='110' width='26' height='70'/%3E%3Crect x='576' y='88' width='38' height='92'/%3E%3Crect x='614' y='126' width='26' height='54'/%3E%3C/g%3E%3C/svg%3E") repeat-x bottom center / auto 150px;
  opacity: 0.9;
  pointer-events: none;
}
.banner-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  min-height: 214px;
  padding: 26px 0 58px;
}
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: #fff; flex: 1; min-width: 0; }
.brand:hover { color: #fff; }
.brand-mark {
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: 27px;
  line-height: 1;
  letter-spacing: -3px;
  background: linear-gradient(135deg, var(--red-bright), var(--red-dark));
  border: 3px solid #080808;
  box-shadow: inset 3px 3px 0 rgba(255, 255, 255, 0.35), inset -3px -3px 0 rgba(0, 0, 0, 0.35), 4px 4px 0 rgba(0, 0, 0, 0.45);
  text-shadow: 2px 2px 0 #4a0e09;
  transform: rotate(-1.5deg);
}
.brand-text { min-width: 0; }
.brand-name {
  display: block;
  font-family: var(--pixel);
  font-weight: 700;
  font-size: clamp(28px, 4.8vw, 48px);
  line-height: 0.98;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #f5f1e7;
  text-shadow: 2px 2px 0 #000, 4px 4px 0 rgba(0, 0, 0, 0.55), 0 0 22px rgba(240, 68, 53, 0.2);
}
.brand-name .accent { color: var(--red-bright); }
.brand-tagline {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 7px;
  background: var(--yellow);
  color: #191919;
  border: 1px solid #000;
  font-family: var(--pixel);
  font-size: clamp(9px, 1.2vw, 11px);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.banner .brand {
  align-items: center;
  gap: 26px;
}
.banner .brand-mark {
  position: relative;
  overflow: hidden;
  width: 118px;
  height: 118px;
  font-size: 68px;
  letter-spacing: -5px;
  border: 3px solid #ff6e5c;
  border-radius: 4px;
  background: linear-gradient(145deg, #ff5544 0%, #d21d11 42%, #8b0f08 100%);
  box-shadow:
    0 0 0 3px #240503,
    0 0 34px rgba(240, 68, 53, 0.6),
    0 14px 26px rgba(0, 0, 0, 0.65),
    inset 0 0 0 4px rgba(255, 255, 255, 0.12),
    inset 0 -18px 30px rgba(0, 0, 0, 0.5);
  text-shadow: 0 3px 0 #5c0803, 0 0 18px rgba(255, 255, 255, 0.35);
  transform: rotate(-4deg);
}
.banner .brand-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.4) 0%, rgba(255, 255, 255, 0.05) 38%, transparent 60%);
  mix-blend-mode: screen;
  pointer-events: none;
}
.banner .brand-text { padding-bottom: 2px; }
.banner .brand-name {
  font-size: clamp(54px, 8.6vw, 108px);
  line-height: 0.84;
  letter-spacing: 1px;
  color: #f3efe4;
  text-shadow: 2px 2px 0 #000, 5px 5px 0 rgba(0, 0, 0, 0.6), 0 0 26px rgba(0, 0, 0, 0.9);
}
.banner .brand-dot {
  display: inline-block;
  width: 0.16em;
  height: 0.16em;
  margin: 0 0.04em;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 16px rgba(240, 68, 53, 0.95);
  vertical-align: baseline;
}
.banner .brand-name .accent {
  color: #dd2a1d;
  text-shadow: 2px 2px 0 #3a0704, 0 0 22px rgba(240, 68, 53, 0.5);
}
.banner .brand-tagline {
  position: relative;
  margin-top: 16px;
  margin-left: 5px;
  padding: 5px 18px;
  background: linear-gradient(180deg, #ffd85f 0%, #f5b81f 100%);
  border: 2px solid #080808;
  box-shadow: 0 4px 0 rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #151515;
  font-size: clamp(10px, 1.35vw, 16px);
  letter-spacing: clamp(1px, 0.3vw, 3px);
  transform: rotate(-1.2deg);
  white-space: nowrap;
}

.quickbar-wrap {
  position: relative;
  z-index: 5;
  margin-top: -22px;
  margin-bottom: 10px;
}
.quickbar {
  display: flex;
  width: min(580px, 100%);
  margin: 0;
  background: linear-gradient(180deg, #141414 0%, #080808 55%, #0d0d0d 100%);
  border: 1px solid #4a1712;
  border-left: 3px solid var(--red);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.7), 0 5px 14px rgba(0, 0, 0, 0.55), 0 0 14px rgba(207, 42, 30, 0.18);
}
.quickbar-inner {
  display: flex;
  flex: 1;
  align-items: stretch;
  min-width: 0;
}
.quickbar-link {
  position: relative;
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 8px;
  border-left: 1px solid rgba(255, 255, 255, 0.09);
  color: #ece8df;
  text-decoration: none;
  text-transform: uppercase;
  font-family: var(--pixel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  transition: background 0.15s, color 0.15s;
}
.quickbar-link:first-child { border-left: 0; }
.quickbar-link:hover,
.quickbar-link:focus-visible {
  color: #fff;
  background: rgba(240, 68, 53, 0.13);
}
.quickbar-link.is-active {
  color: #fff;
  background: linear-gradient(180deg, rgba(240, 68, 53, 0.22), rgba(240, 68, 53, 0.05));
}
.quickbar-link.is-active::after {
  content: "";
  position: absolute;
  left: 24%;
  right: 24%;
  bottom: 2px;
  height: 2px;
  background: var(--red-bright);
  box-shadow: 0 0 8px var(--red-bright);
}
.quickbar-icon {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
}
.quickbar-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quickbar-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 3px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: radial-gradient(circle at 35% 30%, #ff6a58 0%, #c01b10 62%, #8b0d07 100%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 0 8px rgba(240, 68, 53, 0.8), 0 1px 3px rgba(0, 0, 0, 0.8);
  color: #fff;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ---------------- Ticker ---------------- */

.ticker {
  background: #0b0b0b;
  border-bottom: 1px solid #3d3d3d;
  color: #d6d1c8;
  font-size: 11px;
  overflow: hidden;
  height: 26px;
  display: flex;
  align-items: center;
}
.ticker-label {
  flex: 0 0 auto;
  z-index: 2;
  align-self: stretch;
  display: flex;
  align-items: center;
  padding: 0 10px;
  background: var(--red);
  color: #fff;
  font-family: var(--pixel);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-decoration: none;
  border-right: 2px solid #000;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.25);
}
.ticker-label:hover { background: #c93428; }
.ticker-viewport { overflow: hidden; flex: 1; display: flex; align-items: center; gap: 7px; min-width: 0; }
.live-ticker-stage { position: relative; flex: 1; height: 26px; min-width: 0; }
.live-ticker-item {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity .45s ease, transform .45s ease;
  pointer-events: none;
}
.live-ticker-item.is-active { opacity: 1; transform: none; pointer-events: auto; }
.live-ticker-track { display: contents; }
.live-ticker-author { display: inline; flex: 0 0 auto; color: var(--yellow); font-weight: 700; }
.live-ticker-author .name-badges { margin-left: 2px; gap: 1px; vertical-align: -1px; }
.live-ticker-author .vip-star img, .live-ticker-author .admin-shield img { width: 10px; height: 10px; }
.live-ticker-sep { margin-left: 1px; color: #8f897e; font-weight: 400; }
.live-ticker-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-left: 3px; color: #d6d1c8; }
.live-ticker-empty { position: absolute; inset: 0; display: flex; align-items: center; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: #9d978c; }
.live-ticker-empty[hidden] { display: none; }
.live-ticker-empty a { color: var(--yellow); }
.live-ticker-write { flex: 0 0 auto; padding-left: 7px; border-left: 1px solid #3d3d3d; color: var(--yellow); font-family: var(--pixel); font-size: 8px; text-decoration: none; text-transform: uppercase; }
.live-ticker-write:hover { color: #fff; }

/* ---------------- Navigation ---------------- */

.primary-nav {
  background: linear-gradient(180deg, #3a3a3a, #1a1a1a 55%, #101010);
  border-bottom: 2px solid #000;
  box-shadow: inset 0 1px 0 #555;
}
.nav-inner {
  display: flex;
  align-items: stretch;
  gap: 1px;
  min-height: 39px;
  overflow-x: auto;
  scrollbar-width: none;
  background: linear-gradient(180deg, #303030, #1c1c1c 48%, #111);
  box-shadow: inset 0 1px 0 #575757;
}
.nav-inner::-webkit-scrollbar { display: none; }
.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  color: #e7e2d8;
  text-decoration: none;
  font-family: var(--pixel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  white-space: nowrap;
  border-left: 1px solid #3f3f3f;
  border-right: 1px solid #050505;
  text-shadow: 1px 1px 0 #000;
  position: relative;
}
.nav-link:first-child { border-left: 0; }
.nav-link:hover { color: #fff; background: #3d3d3d; }
.nav-link.is-active {
  color: #fff;
  background: linear-gradient(180deg, var(--red-bright), var(--red-dark));
  border-left-color: #ef8077;
  border-right-color: #4d0805;
  text-shadow: 1px 1px 0 #4d0805;
}
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 3px;
  background: var(--yellow);
}
.nav-spacer { flex: 1; min-width: 4px; }
.nav-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  display: inline-grid;
  place-items: center;
  background: var(--yellow);
  color: #111;
  border: 1px solid #000;
  font-family: var(--font);
  font-size: 9px;
  line-height: 1;
  border-radius: 8px;
}
.quickbar-badge[hidden],
.nav-badge[hidden],
.desktop-badge[hidden] { display: none; }
.nav-logout {
  background: transparent;
  border: 0;
  border-left: 1px solid #3f3f3f;
  border-right: 1px solid #050505;
  cursor: pointer;
  font: inherit;
  color: #e7e2d8;
  text-shadow: inherit;
  padding: 0 13px;
}
.nav-logout:hover { color: var(--yellow); background: #3d3d3d; }

.quicklinks {
  background: #dedbd3;
  border-bottom: 1px solid #8f8a80;
  box-shadow: inset 0 1px 0 #fff;
  font-size: 10px;
  color: #5e5950;
}
.quicklinks-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 12px;
  min-height: 27px;
  padding: 5px 0;
}
.quicklinks a { color: #3e3a33; text-decoration: none; text-transform: uppercase; letter-spacing: 0.3px; }
.quicklinks a:hover { color: var(--red); text-decoration: underline; }
.quicklinks .sep { color: #a09a8e; }
.quicklinks .active { color: var(--red); font-weight: 700; }

.ticker-label-short { display: none; }

/* Mobilversionen: snabblänksraden är redundant och Live-Mess kortas till Live. */
@media (max-width: 1023px) {
  .quicklinks { display: none; }
  .ticker-label-full { display: none; }
  .ticker-label-short { display: inline; }
}

/* ---------------- Layout ---------------- */

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: start;
  padding: 12px 0 22px;
}
.main-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.side-col { min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.page-grid.page-grid-wide { grid-template-columns: minmax(0, 1fr); }

/* ---------------- Windows and panels ---------------- */

.window {
  min-width: 0;
  background: var(--paper);
  border: 1px solid #0d0d0d;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15), var(--shadow);
}
.window-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  min-height: 29px;
  padding: 4px 8px;
  background: linear-gradient(180deg, #4b4b4b, #222 45%, #151515);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px 0 #737373;
  color: #f7f3e9;
  font-family: var(--pixel);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #000;
}
.window-title.red {
  background: linear-gradient(180deg, var(--red-bright), var(--red-dark) 55%, #6e100b);
  box-shadow: inset 0 1px 0 #f69288;
}
.window-title .title-right { display: flex; align-items: center; gap: 4px; }
.window-dots { display: flex; gap: 3px; }
.window-dots i { width: 8px; height: 8px; border: 1px solid #000; background: #bdbdbd; box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #666; }
.window-body { padding: 12px; }
.window-body.tight { padding: 8px; }
.window-body.flush { padding: 0; }

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: -1px -1px 10px;
  padding: 5px 9px;
  background: linear-gradient(180deg, #3b3b3b, #171717);
  border: 1px solid #000;
  box-shadow: inset 0 1px 0 #666;
  color: #fff;
  font-family: var(--pixel);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #000;
}
.panel-head.red {
  background: linear-gradient(180deg, var(--red-bright), var(--red-dark));
  box-shadow: inset 0 1px 0 #f08a82;
}
.panel-head a { color: var(--yellow); text-decoration: none; font-size: 9px; letter-spacing: 0.5px; }
.panel-head a:hover { text-decoration: underline; }

.pixel-title {
  font-family: var(--pixel);
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.18);
  line-height: 1.1;
}

.muted { color: var(--muted); }
.small { font-size: 11px; }
.mono { font-family: var(--pixel); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }
.right { text-align: right; }
.mt0 { margin-top: 0; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.mb8 { margin-bottom: 8px; }
.mb12 { margin-bottom: 12px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------------- Buttons and forms ---------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 29px;
  padding: 5px 12px;
  border: 1px solid #111;
  background: linear-gradient(180deg, #f4f2ec, #cfcac0);
  color: #171717;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  cursor: pointer;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #8d887e, 1px 1px 0 rgba(0, 0, 0, 0.35);
}
.btn:hover { background: linear-gradient(180deg, #fff, #ddd8ce); color: #000; }
.btn:active { box-shadow: inset 1px 1px 0 #777, inset -1px -1px 0 #fff; transform: translateY(1px); }
.btn-primary { background: linear-gradient(180deg, var(--red-bright), var(--red-dark)); color: #fff; text-shadow: 1px 1px 0 #580c08; box-shadow: inset 1px 1px 0 #ff9a91, inset -1px -1px 0 #570b07, 1px 1px 0 rgba(0, 0, 0, 0.4); }
.btn-primary:hover { background: linear-gradient(180deg, #ff5a4a, #a51c13); color: #fff; }
.btn-dark { background: linear-gradient(180deg, #565656, #222); color: #fff; box-shadow: inset 1px 1px 0 #888, inset -1px -1px 0 #000, 1px 1px 0 rgba(0, 0, 0, 0.4); }
.btn-dark:hover { background: linear-gradient(180deg, #666, #333); color: #fff; }
.btn-yellow { background: linear-gradient(180deg, #ffe180, #e8ad32); color: #211708; }
.btn-sm { min-height: 23px; padding: 2px 8px; font-size: 10px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn[hidden] { display: none; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; }
.form-grid .span-2 { grid-column: span 2; }
.field { display: flex; flex-direction: column; gap: 3px; }
.settings-grid [data-school-line-field][hidden] { display: none; }
.field > label, .label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #4c4841;
}
.field input, .field select, .field textarea, .input {
  width: 100%;
  border: 1px solid #777;
  border-top-color: #444;
  border-left-color: #444;
  background: #fffef9;
  color: #111;
  font-family: var(--font);
  font-size: 12px;
  padding: 6px 8px;
  box-shadow: inset 1px 1px 0 rgba(0, 0, 0, 0.12);
}
.field textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--blue); background: #fff; }
.field .hint { font-size: 10px; color: var(--muted); }
.fieldset { border: 1px solid #a8a297; border-top-color: #fff; background: #e2ded5; padding: 10px 12px 12px; margin: 0 0 14px; }
.fieldset legend { font-family: var(--pixel); font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; padding: 0 5px; }
.checkline { display: flex; gap: 7px; align-items: flex-start; font-size: 11px; }
.checkline input { margin-top: 2px; }

.flash { display: flex; gap: 9px; align-items: flex-start; padding: 8px 10px; border: 1px solid #111; font-size: 11px; font-weight: 700; box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.5); }
.flash-ok { background: #d9f3e3; color: #145c39; border-color: #2c7752; }
.flash-error { background: #f9d9d5; color: #7e180f; border-color: #a52a1c; }
.flash-icon { flex: 0 0 auto; width: 18px; height: 18px; display: grid; place-items: center; border: 1px solid currentColor; font-family: var(--pixel); font-size: 11px; }

.inline-form { display: inline; }
.link-button { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; }
.link-button:hover { color: var(--red); }
.danger { color: var(--red-dark); font-weight: 700; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border: 1px solid #9d968a; background: #ded9cf; color: #4b453b; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.tag-red { background: #f0d0cb; border-color: #ba655a; color: #7a1b12; }
.tag-yellow { background: #ffebae; border-color: #c69b2c; color: #5e4300; }
.tag-pro { background: #fff0b3; border-color: #c49a1f; color: #5a4100; }

/* VIP-stjärna och admin-sköld bredvid användarnamn */
.name-badges { display: inline-flex; align-items: center; gap: 2px; margin-left: 3px; vertical-align: -1px; line-height: 1; }
.vip-star, .admin-shield { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.vip-star img, .admin-shield img { display: block; width: 12px; height: 12px; shape-rendering: crispEdges; }
.vip-star { filter: drop-shadow(0 1px 0 rgba(90, 60, 0, .35)); }
.admin-shield img { width: 12px; height: 12px; }
.member-card-name .name-badges, .list-row-title .name-badges, .supporter-name .name-badges, .side-login-name .name-badges { margin-left: 2px; }
.member-card-name .vip-star img, .member-card-name .admin-shield img,
.list-row-title .vip-star img, .list-row-title .admin-shield img,
.supporter-name .vip-star img, .supporter-name .admin-shield img,
.side-login-name .vip-star img, .side-login-name .admin-shield img,
.visitor-card-name .vip-star img, .visitor-card-name .admin-shield img { width: 10px; height: 10px; }
@media (max-width: 700px) {
  .vip-star img, .admin-shield img { width: 11px; height: 11px; }
}

.tag-dark { background: #333; border-color: #000; color: #eee; }

/* ---------------- Footer ---------------- */

.site-footer {
  background: #0d0d0d;
  border-top: 3px solid var(--red);
  color: #8e8b84;
  font-size: 10px;
  padding: 18px 0 22px;
  margin-top: 8px;
}
.footer-inner { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.footer-links a { color: #c9c4ba; text-decoration: none; text-transform: uppercase; letter-spacing: 0.4px; }
.footer-links a:hover { color: var(--yellow); }
.footer-brand { font-family: var(--pixel); color: #ded9cf; font-size: 12px; letter-spacing: 1px; }
.footer-note { max-width: 480px; line-height: 1.6; }
.footer-small { margin-top: 5px; color: #666; }

/* ---------------- Public landing ---------------- */

.landing-page {
  min-height: 100vh;
  background-color: #171717;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.3) 0 1px, transparent 1px 7px),
    linear-gradient(180deg, #2b2b2b, #141414 45%, #0d0d0d);
  background-size: 4px 4px, auto, auto;
}
.landing-page::before { display: none; }
.landing-shell { width: min(1120px, calc(100% - 28px)); margin: 0 auto; position: relative; z-index: 2; }
.landing-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0 13px;
  border-bottom: 2px solid #3a3a3a;
}
.landing-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; }
.landing-brand:hover { color: #fff; }
.landing-brand .brand-mark { width: 42px; height: 42px; font-size: 16px; border-width: 2px; box-shadow: inset 2px 2px 0 rgba(255,255,255,.35), inset -2px -2px 0 rgba(0,0,0,.35), 2px 2px 0 rgba(0,0,0,.45); }
.landing-brand .brand-name { font-size: 24px; letter-spacing: 1px; text-shadow: 2px 2px 0 #000; }
.landing-brand .brand-name .accent { color: var(--red-bright); }
.landing-brand small { display: block; color: #8f8a80; font-family: var(--pixel); font-size: 8px; letter-spacing: 1.6px; text-transform: uppercase; margin-top: 2px; }
.landing-header-actions { display: flex; align-items: center; gap: 8px; }
.landing-header-actions .btn { min-height: 30px; }
.landing-header-actions .btn-ghost { background: transparent; color: #e9e4da; border-color: #5a5a5a; box-shadow: none; }
.landing-header-actions .btn-ghost:hover { background: #303030; color: #fff; border-color: #777; }

.hero { display: flex; flex-direction: column; gap: 14px; padding: 26px 0 22px; }
.hero-body { display: flex; flex-direction: column; align-items: flex-start; padding: 20px 20px 18px; }
.hero-body .hero-points { align-self: stretch; }
.auth-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: stretch; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 8px;
  background: #dfdad0;
  border: 1px solid #a8a297;
  color: #7a1b12;
  font-family: var(--pixel);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.hero-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: #1f8f56; box-shadow: 0 0 5px rgba(31, 143, 86, 0.7); }
.hero-title {
  font-family: var(--pixel);
  font-size: clamp(28px, 3.8vw, 42px);
  line-height: 1.08;
  color: #23201a;
  letter-spacing: -0.5px;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.65);
  margin-bottom: 12px;
}
.hero-title .red { color: var(--red); }
.hero-title .yellow { color: #a06a05; }
.hero-lead { max-width: 84ch; color: #55504a; font-size: 13px; line-height: 1.7; margin-bottom: 14px; }
.hero-points { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 6px 18px; margin: 0 0 16px; padding: 13px 0 0; border-top: 1px dashed #b3ada1; list-style: none; color: #4c4841; font-size: 11px; }
.hero-points li { display: flex; align-items: center; gap: 7px; }
.hero-points li::before { content: "✓"; color: var(--red); font-weight: 700; font-size: 12px; }
.hero-note { color: #6f6a61; font-size: 10px; margin-top: 11px; }
.hero-note a { color: #8e1811; text-decoration: none; border-bottom: 1px dotted #b0554a; }
.hero-note a:hover { color: var(--red); }

.auth-window { display: flex; flex-direction: column; min-width: 0; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 18px 40px rgba(0, 0, 0, 0.45); }
.auth-window .window-title { min-height: 31px; }
.auth-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 15px 15px 14px; }
.auth-body > * { width: 100%; }
.auth-heading { font-family: var(--pixel); font-size: 17px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; color: #22201b; margin-bottom: 3px; }
.auth-sub { font-size: 10px; color: #6b665e; margin-bottom: 13px; }
.auth-body .field { margin-bottom: 10px; }
.auth-body .field > label { display: inline-flex; align-items: center; gap: 5px; }
.auth-body .field input { padding: 8px 9px; font-size: 13px; }
.auth-submit { margin-top: 4px; min-height: 35px; font-size: 12px; }
.auth-links { text-align: center; font-size: 10px; margin-top: 11px; }
.auth-links a { color: #8e1811; }
.auth-divider { display: flex; align-items: center; gap: 8px; color: #777168; font-size: 9px; text-transform: uppercase; letter-spacing: 1px; margin: 13px 0 9px; }
.auth-divider::before, .auth-divider::after { content: ""; height: 1px; flex: 1; background: #ada79c; box-shadow: 0 1px 0 #fff; }
.demo-box { border: 1px dashed #8d877b; background: #f5f1e8; padding: 7px 9px; font-size: 10px; color: #514c43; line-height: 1.55; }
.demo-box b { font-family: var(--pixel); font-size: 11px; }
.auth-foot { padding: 7px 10px; background: #c9c4b9; border-top: 1px solid #a29c90; font-size: 9px; color: #5f5a51; text-align: center; }

/* Login page - window boxes */
.window-title .title-icon { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.window-title .title-icon svg { width: 13px; height: 13px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.field-icon { display: inline-flex; }
.field-icon svg { display: block; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 34px; }
.pw-toggle { position: absolute; top: 50%; right: 5px; transform: translateY(-50%); display: grid; place-items: center; width: 24px; height: 24px; padding: 0; border: 1px solid #a8a297; background: linear-gradient(180deg, #f2efe8, #d6d1c7); color: #45403a; cursor: pointer; }
.pw-toggle:hover { background: #fff; color: #111; }
.pw-toggle svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pw-toggle .pw-eye-off { display: none; }
.pw-toggle.is-on .pw-eye { display: none; }
.pw-toggle.is-on .pw-eye-off { display: block; }

.join-window { display: flex; flex-direction: column; min-width: 0; }
.join-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 15px 15px 15px; }
.join-body > * { width: 100%; }
.join-points { grid-template-columns: 1fr; margin-bottom: 14px; }
.join-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 11px; }
.join-icon { flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px; background: #ded9cf; border: 1px solid #a8a297; box-shadow: inset 1px 1px 0 #fff; color: #8e1811; }
.join-icon svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.join-body h3 { font-family: var(--pixel); font-size: 13px; letter-spacing: 0.4px; color: #23201a; margin: 1px 0 4px; }
.join-body p { color: #5d574e; font-size: 11px; line-height: 1.6; margin: 0; }
.join-body .btn { margin-top: 12px; }

/* ---------------- Registration ---------------- */
.auth-page { min-height: 100vh; background-color: #171717; background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(180deg, #2a2a2a, #111 55%); background-size: 4px 4px, auto; }
.auth-page::before { display: none; }
.auth-page-wrap { width: min(760px, calc(100% - 26px)); margin: 0 auto; padding: 34px 0 50px; position: relative; z-index: 2; }
.auth-page .landing-header { margin-bottom: 24px; }
.auth-page .brand-name { font-size: 24px; }
.auth-intro { color: #a7a198; font-size: 12px; line-height: 1.65; margin-bottom: 16px; }
.register-window { max-width: 620px; margin: 0 auto; background: var(--paper); border: 1px solid #0d0d0d; }
.register-window .auth-body { padding: 18px 20px 20px; }
.register-window .form-grid { gap: 11px 14px; }
.auth-links-simple { text-align: center; font-size: 11px; margin-top: 14px; color: #77736b; }
.auth-links-simple a { color: #d8d3c9; }
.auth-footer-links { max-width: 620px; margin: 14px auto 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 11px; }
.auth-footer-links a { color: #d8d3c9; text-decoration: none; }
.auth-footer-links a:hover { color: #fff; text-decoration: underline; }

/* ---------------- Avatars and badges ---------------- */

.avatar {
  display: inline-block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  overflow: hidden;
  background: #0d0d0d;
  border: 1px solid #111;
  box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.2), 2px 2px 0 rgba(0, 0, 0, 0.18);
}
.avatar-sm { width: 28px; height: 28px; }
.avatar-xs { width: 21px; height: 21px; }
.avatar-md { width: 52px; height: 52px; }
.avatar-lg { width: 88px; height: 88px; }
.avatar-xl { width: 112px; height: 112px; }
.pixel-avatar { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
.avatar > .avatar-photo, .avatar > canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.avatar-round { border-radius: 50%; }

.member-inline { display: inline-flex; align-items: center; gap: 7px; vertical-align: middle; }
.member-tag { color: #7a746a; font-size: 9px; font-family: var(--pixel); font-weight: 700; letter-spacing: 0.4px; white-space: nowrap; margin-left: 2px; }
.member-tag-pro { color: #9a6a00; background: #ffedb0; border: 1px solid #d1b258; padding: 0 4px; }
.pro-star { color: #b37c00; }

/* ---------------- Sidebar ---------------- */

.side-box { border: 1px solid #0c0c0c; background: var(--paper); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.28); }
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 25px;
  padding: 4px 8px;
  background: linear-gradient(180deg, #e84a3c, #a91e14 60%, #7f130c);
  border-bottom: 1px solid #3c0704;
  box-shadow: inset 0 1px 0 #ff9b92;
  color: #fff;
  font-family: var(--pixel);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #5a0b07;
}
.side-head a { color: var(--yellow); font-size: 8px; text-decoration: none; }
.side-body { padding: 8px; }
.side-box.dark { background: #1b1b1b; color: #ddd8ce; border-color: #060606; }
.side-box.dark .side-body { background: #1b1b1b; }
.side-box.dark .side-head { background: linear-gradient(180deg, #444, #1c1c1c); box-shadow: inset 0 1px 0 #777; }
.side-box.dark a { color: #b9d2ff; }
.side-box.dark a:hover { color: var(--yellow); }

.welcome-card { display: flex; gap: 9px; align-items: flex-start; }
.welcome-card .avatar { width: 46px; height: 46px; }
.welcome-name { font-family: var(--pixel); font-size: 13px; font-weight: 700; line-height: 1.2; color: #1c1a16; }
.welcome-name:hover { color: var(--red); }
.welcome-meta { font-size: 9px; color: #777168; margin-top: 2px; }
.welcome-mood { display: flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 10px; color: #554f46; }
.welcome-links { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 8px; font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; }
.welcome-links a { color: #4a453d; }

.poll-question { font-size: 11px; font-weight: 700; line-height: 1.4; color: #e8e2d7; margin-bottom: 7px; }
.poll-option { display: block; width: 100%; text-align: left; border: 0; background: transparent; color: #ccc6ba; font: inherit; font-size: 10px; padding: 3px 0; cursor: pointer; }
.poll-option:hover { color: var(--yellow); }
.poll-option .radio-dot { display: inline-block; width: 7px; height: 7px; border: 1px solid #8b857a; margin-right: 6px; background: #111; }
.poll-choice-form { margin: 0; }
.poll-choice { display: flex; align-items: center; gap: 7px; width: 100%; border: 1px solid #3d3d3d; background: #111; color: #d8d2c6; padding: 5px 6px; margin-bottom: 4px; font: inherit; font-size: 10px; text-align: left; cursor: pointer; }
.poll-choice:hover { border-color: #838383; color: #fff; background: #262626; }
.poll-choice span:first-child { width: 12px; height: 12px; flex: 0 0 auto; border: 1px solid #6f6a60; background: #0c0c0c; box-shadow: inset 1px 1px 0 rgba(255,255,255,.08); }
.poll-result { margin-bottom: 6px; }
.poll-result-top { display: flex; justify-content: space-between; gap: 5px; font-size: 9px; color: #c4beb3; margin-bottom: 2px; }
.poll-result-top strong { color: #fff; font-family: var(--pixel); font-size: 9px; }
.poll-bar { height: 7px; background: #0a0a0a; border: 1px solid #3a3a3a; box-shadow: inset 1px 1px 0 #000; }
.poll-bar i { display: block; height: 100%; background: linear-gradient(180deg, #ff715e, #b92517); border-right: 1px solid #ffb0a7; }
.poll-total { margin-top: 5px; font-size: 8px; text-transform: uppercase; letter-spacing: 0.7px; color: #706b62; }

.supporter-list { display: flex; flex-direction: column; gap: 7px; }
.supporter-row { display: flex; align-items: center; gap: 7px; }
.supporter-row .avatar { width: 26px; height: 26px; }
.supporter-name { font-size: 10px; font-weight: 700; color: #25221d; line-height: 1.1; }
.supporter-name .member-tag { font-size: 8px; color: #8a8175; }
.supporter-text { font-size: 8px; color: #7d756a; line-height: 1.2; margin-top: 1px; }
.side-pro-badge { font-family: var(--pixel); font-size: 7px; color: #7e5b05; background: #ffe9a0; border: 1px solid #cbae57; padding: 1px 3px; letter-spacing: 0.3px; }

.side-logins { display: flex; flex-direction: column; gap: 1px; }
.side-login-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid #303030; text-decoration: none; color: #d8d2c6; }
.side-login-row:last-child { border-bottom: 0; }
.side-login-row:hover { color: var(--yellow); }
.side-login-row .avatar { width: 22px; height: 22px; border-color: #000; }
.side-login-name { font-size: 10px; font-weight: 700; line-height: 1.1; }
.side-login-name .member-tag { font-size: 8px; color: #858075; }
.side-login-time { margin-left: auto; font-family: var(--pixel); font-size: 8px; color: #8e897f; white-space: nowrap; }
.side-footer-link { display: block; margin-top: 6px; font-size: 9px; text-align: right; text-transform: uppercase; letter-spacing: 0.4px; }

.side-tip { font-size: 10px; line-height: 1.6; color: #5e584e; }
.side-tip b { color: #27231d; }
.side-link-list { display: flex; flex-direction: column; gap: 4px; font-size: 10px; }
.side-link-list a { text-decoration: none; }
.side-link-list a:hover { text-decoration: underline; }

/* ---------------- Start page ---------------- */

.front-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; align-items: start; }
.front-grid .front-main { min-width: 0; }
.front-aside { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; min-width: 0; align-items: start; }

.lopsedel-window .window-body { padding: 14px 15px; }
.front-news { border-bottom: 1px solid #b8b2a7; padding-bottom: 13px; margin-bottom: 14px; }
.front-news:last-child { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.front-news h2 { font-family: var(--pixel); font-size: 17px; line-height: 1.25; letter-spacing: 0.2px; color: #1d1a15; margin-bottom: 3px; }
.front-news h2 a { color: #1d1a15; text-decoration: none; }
.front-news h2 a:hover { color: var(--red); }
.front-news .news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; color: #928b80; font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 7px; }
.front-news .news-meta .sep { color: #bbb5aa; }
.front-news .news-body { font-size: 12px; line-height: 1.65; color: #3d3931; }
.front-news .news-body p { margin-bottom: 8px; }
.front-news .news-body p:last-child { margin-bottom: 0; }
.news-tag { color: #9a2d22; font-weight: 700; font-size: 9px; text-transform: uppercase; }

.kort-gott { background: #1b1b1b; color: #d5cfc4; border: 1px solid #0a0a0a; }
.kort-gott .mini-head { display: flex; justify-content: space-between; background: #0b0b0b; border-bottom: 1px solid #333; padding: 5px 8px; font-family: var(--pixel); font-size: 9px; font-weight: 700; letter-spacing: 1px; color: var(--yellow); text-transform: uppercase; }
.kort-gott .mini-body { padding: 8px 9px; font-size: 10px; line-height: 1.65; }
.kort-gott .mini-body p { margin-bottom: 7px; }
.kort-gott .mini-body p:last-child { margin: 0; }
.kort-gott b { color: #fff; }

.mini-panel { border: 1px solid #171717; background: #e5e1d8; }
.mini-panel-head { padding: 5px 8px; background: #2b2b2b; color: #eee9dd; font-family: var(--pixel); font-size: 9px; text-transform: uppercase; letter-spacing: 0.8px; border-bottom: 1px solid #000; }
.mini-panel-body { padding: 7px 8px; }
.mini-panel-body p { font-size: 10px; line-height: 1.55; margin-bottom: 7px; }
.mini-panel-body p:last-child { margin-bottom: 0; }

.gallery-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.art-card { display: block; text-decoration: none; color: inherit; }
.art-card:hover { color: var(--red); }
.art-frame { position: relative; border: 2px solid #161616; background: #0b0b0b; box-shadow: 0 0 0 1px #b3ada2; overflow: hidden; }
.art-frame .pixel-art { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; image-rendering: pixelated; }
.art-caption { padding-top: 4px; font-size: 9px; font-weight: 700; line-height: 1.3; color: #3c3831; }
.art-caption span { display: block; font-weight: 400; color: #8a8277; font-size: 8px; text-transform: uppercase; }

.new-member-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.new-member { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 7px 3px; text-decoration: none; color: #3b3730; border: 1px solid #c8c2b7; background: #e1ddd4; }
.new-member:hover { background: #f0ece4; color: var(--red); border-color: #918a7f; }
.new-member .avatar { width: 36px; height: 36px; }
.new-member .name { font-size: 9px; font-weight: 700; text-align: center; line-height: 1.2; }
.new-member .new { font-family: var(--pixel); font-size: 7px; color: #a39049; background: #fff1b9; border: 1px solid #dcc470; padding: 0 3px; }

.diary-list { display: flex; flex-direction: column; }
.diary-row { display: flex; gap: 8px; padding: 8px 0; border-bottom: 1px solid #c6c0b5; }
.diary-row:last-child { border-bottom: 0; padding-bottom: 0; }
.diary-row .avatar { width: 28px; height: 28px; }
.diary-row h3 { font-size: 11px; line-height: 1.35; margin-bottom: 2px; }
.diary-row h3 a { color: #24211c; text-decoration: none; }
.diary-row h3 a:hover { color: var(--red); }
.diary-row .diary-meta { font-size: 8px; color: #8e877c; text-transform: uppercase; letter-spacing: 0.3px; }
.diary-row .diary-snippet { font-size: 9px; line-height: 1.45; color: #6b655b; margin-top: 2px; }

.diary-index-heading {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 126px 132px 96px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid #a8a297;
  background: #d9d5cc;
  color: #37332d;
  font-size: 10px;
  font-weight: 700;
}
.diary-index-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 8px;
  border: 1px solid #c9c3b8;
  border-top: 0;
  transition: background-color .15s ease;
}
.diary-index-link {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 126px 132px;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 10px;
  color: #35312a;
  text-decoration: none;
}
.diary-index-row:nth-child(even) { background: rgba(217, 213, 204, .42); }
.diary-index-row:hover { background: #e2ded5; }
.diary-index-link:focus-visible { outline: 2px solid var(--red); outline-offset: -2px; }
.diary-index-row > .diary-read-count { width: 88px; margin: 10px 10px 0 0; align-self: start; }
.item-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 7px; }
.diary-entry-meta .diary-read-count,
.item-head .diary-read-count { margin-left: auto; }
.diary-read-count { cursor: pointer; }
.diary-index-icon { display: grid; place-items: center; color: var(--red-dark); }
.diary-index-icon svg { width: 27px; height: 30px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.5; }
.diary-index-copy { display: block; min-width: 0; }
.diary-index-title { display: block; overflow: hidden; color: #24211c; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.diary-index-row:hover .diary-index-title { color: var(--red-dark); }
.diary-index-snippet { display: block; margin-top: 3px; overflow: hidden; color: #6b655b; font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.diary-index-date { color: #5e584e; font-size: 10px; white-space: nowrap; }
.diary-index-mood { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; color: #38342e; font-size: 10px; }
.diary-index-mood .tag { margin: 0; }
.diary-index-mobile-meta { display: none; }
.diary-entry-detail { padding-top: 4px; }
.diary-readers-dialog { width: min(460px, calc(100vw - 24px)); }
.diary-readers-summary { margin: 0 0 9px; color: #5e584e; font-size: 10px; line-height: 1.5; }
.diary-readers-list { display: flex; flex-direction: column; gap: 6px; max-height: min(52vh, 360px); overflow: auto; }
.diary-reader-row { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 6px; padding: 7px 8px; border: 1px solid #c9c3b8; background: #ebe7de; box-shadow: inset 1px 1px 0 #fff; color: #3e3a32; font-size: 10px; font-weight: 700; line-height: 1.5; }
.diary-reader-name,
.diary-reader-meta,
.diary-reader-time { color: inherit; font-family: var(--font); font-size: 10px; font-weight: 700; line-height: 1.5; }
.diary-reader-name { text-decoration: none; overflow-wrap: anywhere; }
.diary-reader-name:hover { color: var(--red-dark); }
.diary-reader-time { white-space: nowrap; }
.diary-reader-name .name-badges { margin-left: 3px; vertical-align: -1px; }
.diary-reader-name .vip-star img,
.diary-reader-name .admin-shield img { width: 11px; height: 11px; }
.diary-readers-empty { padding: 12px 10px; border: 1px dashed #b3ada1; background: #e4e0d7; color: #817a6e; font-size: 10px; text-align: center; }
.diary-back-link { margin-bottom: 14px; }
.diary-entry-meta { margin-bottom: 8px; }
.diary-entry-title { margin: 0 0 16px; color: #24211c; font-family: var(--pixel); font-size: 17px; line-height: 1.45; overflow-wrap: anywhere; }
.diary-entry-body { font-size: 13px; line-height: 1.8; }
.diary-entry-body p + p { margin-top: 12px; }

@media (max-width: 600px) {
  .diary-index-heading { display: none; }
  .diary-index-row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px; }
  .diary-index-link { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; min-height: 68px; padding: 9px 7px; }
  .diary-index-row > .diary-read-count { width: auto; margin: 8px 6px 0 0; min-height: 0; padding: 4px 0; font-size: 8px; gap: 3px; }
  .diary-index-row > .diary-read-count .help-shortcut-icon { display: none; }
  .diary-index-icon svg { width: 24px; height: 27px; }
  .diary-index-title { font-size: 12px; }
  .diary-index-snippet { white-space: normal; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .diary-index-date,
  .diary-index-mood { display: none; }
  .diary-index-mobile-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 5px; color: #827b70; font-size: 9px; }
  .diary-entry-title { font-size: 15px; }
  .diary-readers-dialog { width: calc(100vw - 16px); }
  .diary-readers-list { max-height: 50vh; }
}

/* ---------------- Generic lists and empty states ---------------- */

.empty { padding: 18px 10px; text-align: center; color: #817a6e; font-size: 11px; border: 1px dashed #b3ada1; background: #e4e0d7; }
.empty strong { display: block; font-family: var(--pixel); font-size: 12px; margin-bottom: 3px; color: #5e584d; }
.list-stack { display: flex; flex-direction: column; gap: 1px; }
.list-row { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid #c9c3b8; text-decoration: none; color: #35312a; }
.list-row:last-child { border-bottom: 0; }
.list-row:hover { background: #e3dfd6; }
.list-row .avatar { width: 30px; height: 30px; }
.list-row-main { flex: 1; min-width: 0; }
.list-row-title { display: block; font-size: 11px; font-weight: 700; color: #24211c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visitor-name-location { margin-left: 4px; color: #777166; font-family: var(--font); font-size: 9px; font-weight: 400; }
.list-row-title a { color: inherit; text-decoration: none; }
.list-row-title a:hover { color: var(--red); }
.list-row-sub { display: block; font-size: 9px; color: #8b8377; margin-top: 1px; }
.list-row-time { font-family: var(--pixel); font-size: 8px; color: #8e877c; white-space: nowrap; }

.friend-request { display: flex; align-items: center; gap: 9px; padding: 9px 0; border-bottom: 1px solid #c9c3b8; }
.friend-request:first-of-type { padding-top: 0; }
.friend-request:last-child { border-bottom: 0; padding-bottom: 0; }
.friend-request .avatar { width: 34px; height: 34px; flex: 0 0 auto; }
.friend-request-main { flex: 1; min-width: 0; }
.friend-request-name { display: block; color: #24211c; font-size: 12px; font-weight: 700; text-decoration: none; }
.friend-request-name:hover { color: var(--red); }
.friend-request-meta { margin-top: 2px; color: #8b8377; font-size: 9px; }
.friend-request-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 5px; }
.friend-request-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.friend-tag { display: inline-block; padding: 1px 5px; border: 1px solid #b3ada1; background: #ded9cf; color: #5e584e; font-size: 8px; line-height: 1.5; letter-spacing: 0.2px; text-transform: uppercase; }
.friend-tag.is-irl { border-color: #8fb98f; background: #dff0df; color: #2f6b3f; }
.friendship-meta { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 8px; }
.friend-request-form .field { margin: 0 0 7px; }
.friend-request-form select { width: 100%; }
.friend-irl { display: flex; align-items: flex-start; gap: 6px; margin: 0 0 8px; padding: 5px 6px; background: #e4e0d7; border: 1px solid #c9c3b8; color: #5e584e; cursor: pointer; }
.friend-irl input { flex: 0 0 auto; margin: 2px 0 0; accent-color: var(--red); }
.friend-irl b { display: block; font-size: 10px; color: #3e3a33; }
.friend-irl small { display: block; margin-top: 1px; font-size: 8px; color: #8b8377; }
.friend-dialog-intro { margin: 0 0 10px; font-size: 10px; line-height: 1.6; color: #5e584e; }
.friend-dialog select { width: 100%; }
.friend-dialog .field { margin: 0 0 8px; }
.friend-dialog .friend-irl { margin-bottom: 0; }
.friend-table { border: 1px solid #c0baaf; background: #ebe7de; box-shadow: inset 1px 1px 0 #faf7f0; }
.friend-table-head { display: grid; grid-template-columns: minmax(0, 1fr) 150px 82px 40px 96px; gap: 8px; align-items: center; padding: 5px 8px; background: #e0dcd2; border-bottom: 1px solid #bdb7ab; }
.friend-mobile-head { display: none; }
.friend-table-head span { font-family: var(--pixel); font-size: 8px; letter-spacing: 0.5px; text-transform: uppercase; color: #7d7568; }
.friend-table-head .friend-irl-head { text-align: center; }
.friend-table.is-readonly .friend-table-head,
.friend-table.is-readonly .friend-row { grid-template-columns: minmax(0, 1fr) 150px 82px 40px; }
.friend-table.is-readonly .friend-table-head span:last-child { display: none; }
.friend-group { background: #ebe7de; }
.friend-group.is-shaded { background: #dfdbd1; }
.friend-group + .friend-group { border-top: 1px solid #b8b2a6; }
.friend-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 8px; background: #d9d4ca; border-bottom: 1px solid #bdb7ab; }
.friend-group.is-shaded .friend-group-head { background: #cec8bc; }
.friend-group-head h2 { margin: 0; font-family: var(--pixel); font-size: 9px; line-height: 1.4; letter-spacing: 0.5px; text-transform: uppercase; color: #5a5348; }
.friend-group-head span { font-family: var(--pixel); font-size: 8px; color: #857d70; white-space: nowrap; }
.friend-irl-mark { color: #2f6b3f; font-weight: 700; }
.friend-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.friend-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px 82px 40px 96px; align-items: center; gap: 8px; padding: 6px 8px; border-bottom: 1px solid #d3cdc2; }
.friend-facts { display: contents; }
.friend-place { min-width: 0; font-size: 10px; line-height: 1.35; color: #4a453d; }
.friend-place span { display: block; overflow-wrap: anywhere; }
.friend-place small { display: block; font-size: 8px; line-height: 1.35; color: #8b8377; overflow-wrap: anywhere; }
.friend-place-empty { color: #a39b8e; font-style: italic; }
.friend-status { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; letter-spacing: 0.2px; white-space: nowrap; }
.friend-status-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: currentColor; box-shadow: 0 0 3px rgba(0, 0, 0, 0.25); }
.friend-status.is-online { color: #2f7a3f; }
.friend-status.is-offline { color: #a8483b; }
.friend-irl-cell { text-align: center; }
.friend-irl-check { display: inline-block; font-size: 13px; font-weight: 700; line-height: 1; color: #2f7a3f; }
.friend-irl-none { display: inline-block; font-size: 12px; line-height: 1; color: #a39b8e; }
.friend-group .friend-row:last-child { border-bottom: 0; }
.friend-row:hover { background: #f3efe7; }
.friend-name { min-width: 0; font-family: var(--pixel); font-weight: 700; font-size: 12px; line-height: 1.3; color: #28241e; text-decoration: none; overflow-wrap: anywhere; }
.friend-name:hover { color: var(--red); }
.friend-row-action { flex: 0 0 auto; margin: 0; }
.friend-remove { display: inline-flex; align-items: center; gap: 4px; padding: 3px 6px; font-family: inherit; font-size: 9px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.2px; color: #8a3a30; background: #ded9cf; border: 1px solid #b3ada1; cursor: pointer; }
.friend-remove svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.friend-remove:hover { color: #fff; background: var(--red); border-color: #7d1f16; }
.friend-remove:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
@media (max-width: 760px) {
  .friend-table-head { display: none; }
  .friend-mobile-head,
  .friend-table .friend-row,
  .friend-table.is-readonly .friend-row {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr) minmax(0, 1fr) 24px 24px 24px;
    gap: 4px;
    align-items: center;
  }
  .friend-mobile-head { padding: 5px 8px; background: #e0dcd2; border-bottom: 1px solid #bdb7ab; }
  .friend-mobile-head span { min-width: 0; font-family: var(--pixel); font-size: 7px; letter-spacing: .3px; text-transform: uppercase; color: #7d7568; }
  .friend-table .friend-row { padding: 6px 8px; }
  .friend-facts, .friend-place { display: contents; }
  .friend-name { min-width: 0; font-size: 10px; overflow-wrap: anywhere; }
  .friend-place span, .friend-place small { display: block; min-width: 0; font-size: 8px; line-height: 1.25; overflow-wrap: anywhere; }
  .friend-place small::before { content: none; }
  .friend-status { justify-content: center; gap: 0; font-size: 0; letter-spacing: 0; }
  .friend-status-text { display: none; }
  .friend-irl-cell { display: block; text-align: center; }
  .friend-irl-none { display: none; }
  .friend-row-action { display: flex; min-width: 0; margin: 0; align-items: center; justify-content: center; }
  .friend-remove { width: 24px; height: 24px; justify-content: center; padding: 0; gap: 0; }
  .friend-remove span { display: none; }
}
@media (max-width: 420px) {
  .friend-mobile-head,
  .friend-table .friend-row,
  .friend-table.is-readonly .friend-row {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, .8fr) 24px 20px 24px;
  }
  .friend-mobile-head span:nth-child(3),
  .friend-place .friend-county { display: none; }
  .friend-name { font-size: 9px; white-space: nowrap; }
  .friend-status-dot { width: 8px; height: 8px; }
}
@media (max-width: 560px) {
  .friend-remove span { display: none; }
  .friend-remove { width: 24px; height: 24px; padding: 0; gap: 0; }
  .friend-remove svg { width: 12px; height: 12px; }
}
@media (max-width: 700px) {
  .friend-request { flex-wrap: wrap; }
  .friend-request-actions { width: 100%; justify-content: flex-start; padding-left: 43px; }
}

.item { display: flex; gap: 9px; padding: 10px 0; border-bottom: 1px solid #c3bdb2; }
.item:first-child { padding-top: 0; }
.item:last-child { border-bottom: 0; padding-bottom: 0; }
.item-avatar { flex: 0 0 auto; }
.guestbook-list .item-avatar { width: 52px; height: 52px; }
.item-main { min-width: 0; flex: 1; }
.guestbook-list .item-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 3px; }
.guestbook-author-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 3px 6px; width: 100%; min-width: 0; font-weight: 700; }
.guestbook-author-line .item-author { font-family: var(--font); font-size: 9px; line-height: 1.4; }
.guestbook-author-line .item-author .member-tag { color: inherit; font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: normal; margin-left: 0; }
.item-author { font-family: var(--pixel); font-size: 11px; font-weight: 700; color: #2a2620; text-decoration: none; }
.item-author:hover { color: var(--red); }
.item-time { color: #8f887d; font-size: 9px; }
.guestbook-location { color: #777166; font-size: 9px; }
.item-body { font-size: 11px; line-height: 1.6; color: #3e3a32; }
.item-body p { margin-bottom: 6px; }
.item-body p:last-child { margin-bottom: 0; }
.item-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 5px; font-size: 9px; }
.guestbook-actions { gap: 4px; margin-top: 6px; }
.guestbook-actions .gb-btn { min-height: 20px; padding: 1px 5px; gap: 3px; font-size: 8px; letter-spacing: 0.1px; }
.guestbook-actions .gb-btn svg { width: 8px; height: 8px; }
.guestbook-actions .guestbook-delete { width: 20px; min-height: 20px; padding: 1px; cursor: pointer; }
.guestbook-actions .guestbook-delete svg { width: 10px; height: 10px; }
.guestbook-actions { align-items: center; }
.guestbook-secret-badge { display: inline-flex; align-items: center; width: fit-content; margin: 3px 0 5px; padding: 2px 6px; border: 1px solid #9a6c22; background: #fff0c5; color: #61440f; font-size: 9px; font-weight: 700; line-height: 1.35; }
.guestbook-secret-placeholder { color: #71695d; font-style: italic; }
.guestbook-unread-label { margin-left: auto; color: #9a2d22; font-size: 9px; font-weight: 700; white-space: nowrap; }
.guestbook-vip-options { margin-top: 8px; padding: 7px; border: 1px solid #c5b887; background: #f2eedf; }
.guestbook-secret-toggle { display: flex; align-items: center; gap: 6px; color: #463a22; font-size: 10px; font-weight: 700; cursor: pointer; }
.guestbook-secret-toggle input { margin: 0; accent-color: #9a6c22; }
.guestbook-vip-toolbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 7px; margin-top: 7px; }
.guestbook-vip-format-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.guestbook-vip-format-buttons .btn { min-width: 27px; min-height: 24px; padding: 2px 6px; }
.guestbook-vip-color-label { display: inline-flex; align-items: center; gap: 4px; color: #5d5548; font-size: 9px; }
.guestbook-vip-color-label select { max-width: 88px; min-height: 24px; padding: 2px 4px; font-size: 9px; }
.guestbook-vip-info { position: relative; flex: 0 0 auto; }
.guestbook-vip-info summary { list-style: none; cursor: pointer; }
.guestbook-vip-info summary::-webkit-details-marker { display: none; }
.guestbook-vip-info-text { position: absolute; z-index: 5; top: calc(100% + 5px); right: 0; width: min(250px, calc(100vw - 48px)); padding: 8px; border: 1px solid #9e978a; background: #fffdf8; color: #49443b; font-size: 10px; line-height: 1.5; box-shadow: 0 3px 10px rgba(0,0,0,.18); }
.gb-btn { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 8px; border: 1px solid #8d887e; background: linear-gradient(180deg, #f7f5ef, #d8d3c9); color: #3a352d; font-size: 9px; font-weight: 700; line-height: 1.4; text-transform: uppercase; letter-spacing: 0.35px; text-decoration: none; box-shadow: inset 1px 1px 0 #fff, 1px 1px 0 rgba(0, 0, 0, 0.18); }
.gb-btn svg { width: 10px; height: 10px; display: block; flex: 0 0 auto; }
.gb-btn:hover { background: linear-gradient(180deg, #fff, #e6e1d7); border-color: #6f6a61; color: #000; }
.gb-btn:active { box-shadow: inset 1px 1px 0 #a29c91; transform: translateY(1px); }
.gb-btn-primary { border-color: #5c0f0a; background: linear-gradient(180deg, var(--red-bright), var(--red-dark)); color: #fff; text-shadow: 1px 1px 0 #580c08; box-shadow: inset 1px 1px 0 #ff9a91, 1px 1px 0 rgba(0, 0, 0, 0.3); }
.gb-btn-primary:hover { border-color: #4c0b07; background: linear-gradient(180deg, #ff5a4a, #a51c13); color: #fff; }
.item.is-new { background: #e2dfd3; box-shadow: inset 3px 0 0 #a9a28f; padding: 10px 9px; margin: 0 -9px; }
.item.is-new:first-child { padding-top: 10px; }
.item.is-new:last-child { padding-bottom: 10px; }

.gb-dialog { width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; border: 0; background: transparent; color: var(--ink); }
.gb-dialog::backdrop { background: rgba(8, 8, 10, 0.68); backdrop-filter: blur(1px); }
.gb-dialog-card { max-height: calc(100vh - 24px); overflow: auto; border: 1px solid #080808; background: var(--paper); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 8px 9px 0 rgba(0, 0, 0, 0.35), 0 24px 70px rgba(0, 0, 0, 0.55); }
.gb-dialog-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 33px; padding: 0 10px; border-bottom: 1px solid #000; background: linear-gradient(180deg, #3a3a3a, #1e1e1e 55%, #0c0c0c); color: #f5f0e6; font-family: var(--pixel); font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; text-shadow: 1px 1px 0 #000; }
.gb-dialog-close { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 20px; border: 1px solid #000; background: linear-gradient(180deg, #5b5b5b, #242424); color: #fff; font-size: 15px; line-height: 1; cursor: pointer; box-shadow: inset 1px 1px 0 #8a8a8a; }
.gb-dialog-close:hover { background: var(--red); }
.gb-dialog-body { padding: 12px; }
.gb-quote-slot:empty { display: none; }
.gb-quote { margin-bottom: 11px; padding: 8px 9px; border: 1px solid #b8b1a5; background: #e3dfd5; box-shadow: inset 1px 1px 0 #fff; }
.gb-quote-head { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 7px; margin-bottom: 5px; }
.gb-quote-avatar { width: 24px; height: 24px; flex: 0 0 auto; }
.gb-quote-name { font-family: var(--pixel); font-size: 10px; font-weight: 700; color: #2a2620; }
.gb-quote-time { font-size: 8px; color: #8b8377; letter-spacing: 0.2px; text-transform: uppercase; }
.gb-quote-body { max-height: 120px; overflow: auto; font-size: 10px; line-height: 1.55; color: #3e3a32; overflow-wrap: anywhere; }
.gb-dialog .field { margin: 0; }
.gb-dialog .field textarea { min-height: 104px; }
.gb-dialog-actions { display: flex; justify-content: flex-end; gap: 6px; padding: 0 12px 12px; }

@media (max-width: 520px) {
  .gb-dialog { width: calc(100vw - 16px); }
  .gb-dialog-body { padding: 10px; }
  .gb-dialog-actions { padding: 0 10px 10px; }
  .gb-quote-body { max-height: 96px; }
}

/* ---------------- Profile ---------------- */

.profile-hero { position: relative; background: #202020; border: 1px solid #0a0a0a; box-shadow: 0 0 0 1px rgba(255,255,255,.12), var(--shadow); overflow: hidden; }
.profile-hero.has-custom-bg { background-size: cover; background-position: center; background-repeat: no-repeat; }
.profile-hero.has-custom-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(7, 8, 10, 0.06) 0%, rgba(7, 8, 10, 0.32) 44%, rgba(7, 8, 10, 0.8) 100%);
}
.profile-hero.has-custom-bg > * { position: relative; z-index: 1; }
.profile-hero.has-custom-bg .profile-cover { background: transparent; border-bottom-color: transparent; }
.profile-cover { height: 92px; position: relative; background: linear-gradient(90deg, #1f2b3a, #34263f 45%, #4a221c); border-bottom: 1px solid #000; overflow: hidden; }
.profile-cover .pixel-art { width: 100%; height: 100%; opacity: 0.7; image-rendering: pixelated; }
.profile-cover::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0,0,0,.18) 0 1px, transparent 1px 3px); }
.profile-identity { display: flex; gap: 14px; align-items: flex-end; padding: 0 14px 13px; margin-top: -38px; position: relative; }
.profile-avatar-column { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 6px; }
.profile-avatar { padding: 4px; background: #dcd7cc; border: 2px solid #080808; box-shadow: 0 3px 0 rgba(0,0,0,.35); flex: 0 0 auto; }
.profile-avatar-open { display: block; padding: 0; border: 0; background: transparent; line-height: 0; cursor: zoom-in; }
.profile-avatar-open:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.profile-avatar .avatar { width: 96px; height: 96px; }
.profile-title { flex: 1; min-width: 0; padding-bottom: 4px; }
.profile-title h1 { font-family: var(--pixel); color: #f5f0e6; font-size: clamp(21px, 3vw, 30px); line-height: 1.05; letter-spacing: 0.5px; text-shadow: 2px 2px 0 #000; }
.profile-role-badges { display: flex; flex-direction: column; align-items: stretch; gap: 4px; width: 100%; }
.profile-role-badge { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 22px; padding: 3px 5px; border: 1px solid #090909; border-radius: 3px; background: linear-gradient(180deg, #424242, #1e1e1e); color: #f4f0e8; font-size: 8px; font-weight: 700; line-height: 1.2; white-space: nowrap; box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 1px 2px rgba(0,0,0,.3); }
.profile-role-badge img { display: block; width: 12px; height: 12px; flex: 0 0 12px; object-fit: contain; }
.profile-role-admin { border-color: #52463d; }
.profile-role-vip { border-color: #907027; color: #ffe5a0; background: linear-gradient(180deg, #453714, #211b0d); }
.profile-owner-actions { display: flex; flex-direction: column; gap: 4px; width: 136px; }
.profile-owner-actions .btn { display: inline-flex; align-items: center; justify-content: center; gap: 3px; min-height: 24px; padding: 3px 5px; font-size: 8px; line-height: 1.2; text-align: center; }
.profile-hero-main .profile-cover { height: 48px; }
.profile-hero-main .profile-identity { margin-top: -20px; padding-bottom: 8px; }
.profile-hero-main .profile-avatar { padding: 2px; }
.profile-hero-main .profile-avatar .avatar { width: 54px; height: 54px; }
.profile-hero-main .profile-title h1 { font-size: 18px; }
.profile-title h1 .member-tag { color: inherit; font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; vertical-align: baseline; margin-left: 4px; }
.profile-title h1 .name-badges { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; vertical-align: -0.04em; line-height: 1; }
.profile-title h1 .vip-star, .profile-title h1 .admin-shield { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.profile-title h1 .vip-star img, .profile-title h1 .admin-shield img { width: 0.86em; height: 0.86em; }
.profile-sub { color: #a7a198; font-size: 10px; margin-top: 4px; line-height: 1.6; }
.profile-sub a { color: #d3cec3; }
.profile-mobile-meta { display: none; }
.profile-button-icon { display: none; }
.profile-actions { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 4px; }
.profile-tabs.profile-tabs-top { display: flex; }
.profile-stats { display: flex; flex-wrap: wrap; background: #e0dcd3; border-top: 1px solid #fff; font-size: 9px; }
.profile-stats span { padding: 5px 10px; border-right: 1px solid #bdb7ac; color: #625b51; }
.profile-stats b { color: #211e19; font-family: var(--pixel); }
.profile-stats.profile-motto-bar { align-items: center; justify-content: center; min-height: 30px; padding: 6px 12px; text-align: center; font-size: 11px; font-weight: 700; }
.profile-stats.profile-motto-bar .profile-motto { width: 100%; padding: 0; border-right: 0; color: #35312a; font-weight: 700; line-height: 1.5; text-align: center; overflow-wrap: anywhere; }

.profile-actions-rich { flex-direction: column; align-items: flex-end; justify-content: space-between; align-self: stretch; gap: 6px; width: 292px; flex: 0 0 auto; }
.profile-score-bare { --score-size: 42px; display: flex; align-items: flex-end; justify-content: flex-end; margin-top: 8px; line-height: 0; text-decoration: none; }
.profile-score-bare:hover { filter: brightness(1.08); }
.profile-score-bare:focus-visible { outline: 2px solid var(--yellow); outline-offset: 4px; }
.profile-buttons { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

/* Desktopprofil: bred header med personlig bakgrund och dynamiska medlemsuppgifter. */
@media (min-width: 901px) {
  .profile-hero-main .profile-cover { height: 236px; }
  .profile-hero-main .profile-identity {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) minmax(300px, 38%);
    grid-template-rows: minmax(0, 1fr) auto;
    grid-template-areas: "avatar title actions" ". badges actions";
    align-items: end;
    column-gap: 14px;
    row-gap: 9px;
    min-height: 234px;
    margin-top: -234px;
    padding: 16px;
  }
  .profile-hero-main .profile-avatar-column { display: contents; }
  .profile-hero-main .profile-avatar { grid-area: avatar; align-self: end; justify-self: center; width: 140px; height: 140px; }
  .profile-hero-main .profile-avatar {
    padding: 4px;
    border: 2px solid #d9dee7;
    outline: 2px solid #090a0d;
    outline-offset: 2px;
    background: rgba(8, 10, 15, .92);
    box-shadow: inset 0 0 0 2px #d12b25, 0 0 0 5px rgba(6, 7, 10, .88), 0 0 13px rgba(229, 35, 29, .6);
  }
  .profile-hero-main .profile-avatar .avatar { width: 128px; height: 128px; }
  .profile-hero-main .profile-role-badges { grid-area: badges; flex-direction: row; flex-wrap: wrap; align-items: center; justify-self: start; gap: 6px; width: auto; max-width: 100%; }
  .profile-hero-main .profile-role-badge { min-height: 30px; padding: 5px 9px; gap: 7px; border-radius: 5px; font-size: 11px; text-shadow: 0 1px 2px #000; }
  .profile-hero-main .profile-role-badge img { width: 17px; height: 17px; flex-basis: 17px; }
  .profile-hero-main .profile-title { grid-area: title; align-self: end; min-width: 0; padding: 8px 0; }
  .profile-hero-main .profile-title h1 {
    margin: 0 0 13px;
    padding: 0 0 10px;
    border-bottom: 2px solid rgba(228, 38, 31, .88);
    color: #fff;
    font-family: var(--font);
    font-size: clamp(26px, 2.6vw, 36px);
    line-height: 1.15;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    text-shadow: 0 2px 4px #000, 1px 1px 0 #000;
  }
  .profile-hero-main .profile-title h1 .member-tag { margin-left: 0; font-family: inherit; font-size: inherit; font-weight: inherit; letter-spacing: inherit; }
  .profile-hero-main .profile-occupation { margin: -7px 0 9px; color: #e1ded8; font-size: 10px; font-weight: 600; line-height: 1.3; text-shadow: 0 1px 2px #000; }
  .profile-hero-main .profile-meta { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 6px 9px; }
  .profile-hero-main .profile-meta-item {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    min-height: 30px;
    padding: 4px 7px;
    border: 1px solid rgba(201, 211, 225, .45);
    border-radius: 8px;
    background: rgba(5, 9, 16, .72);
    color: #f4f3f0;
    font-size: 9px;
    font-weight: 600;
    line-height: 1.35;
    text-shadow: 0 1px 2px #000;
    white-space: nowrap;
    overflow: hidden;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  }
  .profile-hero-main .profile-meta-item svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: #f3f0e8; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 1px #000); }
  .profile-hero-main .profile-meta-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .profile-hero-main .profile-actions-rich { grid-area: actions; position: relative; align-self: stretch; justify-content: flex-end; gap: 12px; width: auto; min-width: 0; padding: 0 0 2px; }
  .profile-hero-main .profile-score-bare { position: absolute; top: 0; right: 0; --score-size: 48px; margin: 0; }
  .profile-hero-main .profile-buttons { width: 100%; flex-wrap: nowrap; justify-content: flex-end; align-items: flex-end; gap: 6px; }
  .profile-hero-main .profile-buttons > a,
  .profile-hero-main .profile-buttons > form { min-width: 0; white-space: nowrap; }
  .profile-hero-main .profile-motto-bar { border-top: 1px solid #fff; background: #e0dcd3; }
  .profile-hero-main .profile-motto-bar .profile-motto { color: #35312a; text-shadow: none; }
}

.score-digits { display: inline-flex; align-items: flex-end; gap: 0; line-height: 0; }
.score-digit { display: block; flex: 0 0 auto; height: var(--score-size, 36px); width: auto; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, 0.55)) drop-shadow(0 0 6px rgba(255, 45, 30, 0.28)); }
.score-gap { display: block; flex: 0 0 auto; width: calc(var(--score-size, 36px) * 0.22); }
.score-comma {
  display: block; align-self: flex-end; flex: 0 0 auto;
  width: calc(var(--score-size, 36px) * 0.13);
  height: calc(var(--score-size, 36px) * 0.26);
  margin: 0 calc(var(--score-size, 36px) * 0.05) calc(var(--score-size, 36px) * 0.04) calc(var(--score-size, 36px) * 0.02);
  background: linear-gradient(180deg, #ff7a66, #e02618 55%, #650b06);
  border-radius: 45% 45% 60% 45%;
  box-shadow: 0 0 7px rgba(255, 50, 35, 0.75), 1px 1px 0 #000;
  transform: skewX(-14deg) rotate(8deg);
}
.score-char { font-family: var(--pixel); font-weight: 700; font-size: calc(var(--score-size, 36px) * 0.5); color: #ff6252; }

.fact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 18px; }
.fact { min-width: 0; padding: 0; background: transparent; border: 0; font-size: 9px; }
.fact span { display: block; color: #837c70; text-transform: uppercase; font-size: 8px; letter-spacing: 0.4px; }
.fact strong { font-size: 10px; color: #332f28; }


.visitor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.visitor-card { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 7px 8px; border: 1px solid #c8c2b7; background: #e4e0d7; color: #35312a; text-decoration: none; }
.visitor-card:hover { background: #f0ece4; border-color: #918a7f; color: var(--red); }
.visitor-card .avatar { width: 34px; height: 34px; }
.visitor-card-main { flex: 1; min-width: 0; }
.visitor-card-name { display: block; font-family: var(--pixel); font-size: 11px; font-weight: 700; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.visitor-card-name .member-tag { font-size: 8px; color: #8b8377; }
.visitor-card-meta { display: block; margin-top: 1px; font-size: 9px; color: #8b8377; }
.visitor-card-time { flex: 0 0 auto; font-family: var(--pixel); font-size: 8px; color: #8e877c; white-space: nowrap; }
@media (max-width: 700px) { .visitor-grid { grid-template-columns: 1fr; } }

.profile-columns { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(0, 0.85fr); gap: 12px; align-items: start; }
.profile-side { display: flex; flex-direction: column; gap: 12px; }
.profile-side .window-body { padding: 9px; }

.contact-list { display: flex; flex-direction: column; gap: 5px; font-size: 10px; }
.contact-list .row { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dotted #b7b1a6; padding-bottom: 4px; }
.contact-list .row:last-child { border: 0; padding: 0; }
.contact-list dt, .contact-list .key { color: #817a6e; text-transform: uppercase; font-size: 8px; letter-spacing: 0.3px; }
.contact-list dd, .contact-list .val { margin: 0; text-align: right; color: #37332c; font-weight: 700; }
.contact-list .val a { font-weight: 400; }

.answer-list { display: flex; flex-direction: column; gap: 0; }
.answer { padding: 8px 0; border-bottom: 1px solid #c5bfb4; }
.answer:last-child { border-bottom: 0; padding-bottom: 0; }
.answer .q { font-family: var(--pixel); font-size: 10px; font-weight: 700; color: #3f3a32; margin-bottom: 2px; }
.answer .a { font-size: 10px; line-height: 1.55; color: #635d53; }

/* ---------------- Forum ---------------- */

.forum-stats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.forum-stat { flex: 1; min-width: 100px; background: #dfdbd2; border: 1px solid #b8b2a7; padding: 6px 8px; }
.forum-stat b { display: block; font-family: var(--pixel); font-size: 15px; color: #2d2923; line-height: 1; }
.forum-stat span { display: block; color: #817a6e; font-size: 8px; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 3px; }
.forum-cat { display: flex; gap: 9px; padding: 9px 0; border-bottom: 1px solid #c3bdb2; align-items: flex-start; }
.forum-cat:last-child { border-bottom: 0; }
.forum-cat-icon { width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center; background: #2b2b2b; border: 1px solid #000; color: var(--yellow); font-family: var(--pixel); font-size: 13px; box-shadow: inset 1px 1px 0 #5a5a5a; }
.forum-cat-main { flex: 1; min-width: 0; }
.forum-cat-main h3 { font-family: var(--pixel); font-size: 12px; margin-bottom: 1px; }
.forum-cat-main h3 a { color: #26221d; text-decoration: none; }
.forum-cat-main h3 a:hover { color: var(--red); }
.forum-cat-main p { font-size: 9px; color: #7b7468; margin: 0 0 2px; }
.forum-cat-main .latest { font-size: 8px; color: #9a9387; }
.forum-cat-main .latest a { color: #4e4942; }
.forum-numbers { flex: 0 0 auto; display: flex; gap: 10px; text-align: right; font-size: 8px; color: #8d867a; }
.forum-numbers b { display: block; font-family: var(--pixel); color: #3d3830; font-size: 11px; }

.thread-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.thread-table th { background: #2b2b2b; color: #eee9dd; text-align: left; font-family: var(--pixel); font-size: 8px; letter-spacing: 0.6px; text-transform: uppercase; padding: 5px 6px; border: 1px solid #111; font-weight: 400; }
.thread-table td { border-bottom: 1px solid #c7c1b6; padding: 7px 6px; vertical-align: middle; }
.thread-table tr:nth-child(even) td { background: #e3dfd6; }
.thread-table .thread-name a { font-weight: 700; color: #28241e; text-decoration: none; font-size: 11px; }
.thread-table .thread-name a:hover { color: var(--red); }
.thread-table .thread-meta { color: #8c8579; font-size: 8px; text-transform: uppercase; }
.thread-table .author-cell { white-space: nowrap; }
.thread-table .author-cell a { font-family: var(--pixel); font-size: 9px; color: #37332c; text-decoration: none; }
.thread-table .num { font-family: var(--pixel); font-size: 10px; text-align: right; }

.post { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid #bdb7ac; }
.post:last-of-type { border-bottom: 0; }
.post-side { flex: 0 0 104px; text-align: center; }
.post-side .avatar { width: 50px; height: 50px; }
.post-side .post-author { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; margin-top: 5px; font-family: var(--pixel); font-size: 10px; font-weight: 700; color: #2d2923; text-decoration: none; line-height: 1.2; }
.post-side .post-author:hover { color: var(--red); }
.post-side .member-tag { display: inline; margin-left: 2px; }
.post-side .post-date { font-size: 8px; color: #918a7e; margin-top: 3px; }
.post-body { flex: 1; min-width: 0; background: #f4f1ea; border: 1px solid #b9b3a7; padding: 9px 10px; position: relative; }
.post-body::before { content: ""; position: absolute; left: -6px; top: 14px; width: 9px; height: 9px; background: #f4f1ea; border-left: 1px solid #b9b3a7; border-bottom: 1px solid #b9b3a7; transform: rotate(45deg); }
.post-body .post-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 8px; color: #978f83; text-transform: uppercase; letter-spacing: 0.3px; margin-bottom: 5px; padding-bottom: 4px; border-bottom: 1px dotted #c8c2b7; }
.post-text { font-size: 11px; line-height: 1.65; color: #3c3831; }
.post-text p { margin-bottom: 7px; }
.post-text p:last-child { margin-bottom: 0; }
.thread-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.thread-head h1 { font-family: var(--pixel); font-size: 19px; line-height: 1.2; color: #24201a; }
.thread-head .sub { font-size: 9px; color: #857e72; margin-top: 3px; }
.reply-box { margin-top: 12px; padding-top: 12px; border-top: 2px solid #b9b3a7; }
.reply-box h2 { font-family: var(--pixel); font-size: 13px; margin-bottom: 7px; }
.new-thread-box { margin-top: 12px; border: 1px solid #b3ada1; background: #dfdbd2; }
.new-thread-box summary { cursor: pointer; padding: 7px 9px; font-family: var(--pixel); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.new-thread-box[open] summary { border-bottom: 1px solid #b3ada1; background: #d5d0c6; }
.new-thread-inner { padding: 10px; }

/* ---------------- Klotter ---------------- */

.wall-form textarea { min-height: 74px; }
.wall-feed { display: flex; flex-direction: column; }
.wall-post { display: flex; gap: 9px; padding: 11px 0; border-bottom: 1px solid #c2bcb1; }
.wall-post:first-child { padding-top: 0; }
.wall-post:last-child { border-bottom: 0; }
.wall-post .avatar { width: 36px; height: 36px; }
.wall-board .wall-post .avatar { width: 48px; height: 48px; flex-shrink: 0; }
.wall-post-main { flex: 1; min-width: 0; }
.wall-post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 5px 8px; margin-bottom: 3px; }
.wall-post-author { font-family: var(--pixel); font-size: 11px; font-weight: 700; color: #29251f; text-decoration: none; }
.wall-post-author:hover { color: var(--red); }
.wall-post-time { font-size: 8px; color: #948d81; text-transform: uppercase; letter-spacing: 0.3px; }
.wall-post-body { font-size: 12px; line-height: 1.6; color: #3b3730; }
.wall-board .wall-post-time { display: block; margin-bottom: 4px; text-transform: none; }
.wall-board .wall-post-head { gap: 4px; font-family: var(--font); font-size: 11px; font-weight: 700; color: #29251f; }
.wall-board .wall-post-author,
.wall-board .wall-post-author .member-tag,
.wall-board .wall-post-location { font-family: inherit; font-size: inherit; font-weight: inherit; color: inherit; letter-spacing: normal; }
.wall-board .wall-post-author .member-tag { margin-left: .25em; }
.wall-board .wall-post-author:hover { color: var(--red); }
@media (max-width: 700px) {
  .wall-board .wall-post-head { flex-wrap: nowrap; gap: 3px; font-size: 9px; }
  .wall-board .wall-post .avatar { width: 40px; height: 40px; }
  .wall-board .wall-post-author { flex: 0 1 auto; min-width: 0; max-width: 65%; }
  .wall-board .wall-post-location { flex: 0 1 auto; min-width: 0; }
  .wall-board .wall-post-author,
  .wall-board .wall-post-location { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.wall-post-foot { margin-top: 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.wall-post-foot .gb-btn { min-height: 18px; padding: 1px 6px; gap: 4px; font-size: 8px; letter-spacing: 0.25px; }
.wall-post-foot .gb-btn svg { width: 8px; height: 8px; }

/* Live-Mess */
.live-textarea { min-height: 92px; }
.live-quota { display: flex; align-items: baseline; gap: 5px; }
.live-quota b { font-family: var(--pixel); font-size: 30px; line-height: 1; color: var(--red); }
.live-quota span { font-size: 9px; color: #6b6459; text-transform: uppercase; letter-spacing: 0.4px; }

/* ---------------- Mejl ---------------- */

.mail-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.mail-nav a { padding: 4px 8px; border: 1px solid #aaa499; background: #dedad1; color: #403c34; text-decoration: none; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.mail-nav a:hover { background: #eeeae1; }
.mail-nav a.active { background: #2d2d2d; color: #fff; border-color: #000; }
.mail-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.mail-table th { background: #d4cfc5; border-bottom: 1px solid #9d978c; border-top: 1px solid #fff; text-align: left; padding: 5px 6px; font-size: 8px; text-transform: uppercase; letter-spacing: 0.4px; color: #5e584e; }
.mail-table td { padding: 6px; border-bottom: 1px solid #c7c1b6; vertical-align: middle; }
.mail-table tr:hover td { background: #e4e0d7; }
.mail-table tr.unread td { background: #f2ead9; font-weight: 700; }
.mail-subject a { color: #25211b; text-decoration: none; }
.mail-subject a:hover { color: var(--red); }
.mail-from { color: #4f4a42; }
.mail-from a { color: inherit; text-decoration: none; font-weight: 700; }
.mail-status { display: inline-flex; width: 13px; height: 13px; margin-right: 4px; vertical-align: -2px; }
.mail-status svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.mail-status-new { color: var(--red); }
.mail-status-read { color: #777166; }
.mail-status-replied { color: #4d7650; }
.mail-date { white-space: nowrap; color: #8b8478; font-family: var(--pixel); font-size: 8px; text-align: right; }
.mail-row-actions { white-space: nowrap; text-align: right; }
.mail-row-actions .mail-date { display: inline-block; margin-right: 6px; vertical-align: middle; }
.mail-row-actions .mail-open { color: #4b453b; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; text-decoration: none; }
.mail-row-actions .mail-open:hover { color: var(--red); }
.mail-del { display: inline-flex; align-items: center; justify-content: center; width: 21px; height: 21px; margin-left: 7px; padding: 0; vertical-align: middle; border: 1px solid #b3ada2; background: #eae6dd; color: #7c7468; cursor: pointer; box-shadow: inset 1px 1px 0 #fff; }
.mail-del:hover, .mail-del:focus-visible { border-color: var(--red); background: #f6dbd6; color: var(--red); }
.mail-del svg { display: block; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.unread-pill { display: inline-block; min-width: 17px; padding: 0 4px; background: var(--red); color: #fff; font-size: 8px; font-family: var(--pixel); text-align: center; border: 1px solid #7d150d; }

.message-card { border: 1px solid #b0aa9f; background: #f5f2eb; }
.message-card-head { display: flex; align-items: center; gap: 9px; padding: 9px; border-bottom: 1px solid #c6c0b5; background: #e5e1d8; }
.message-card-head .avatar { width: 42px; height: 42px; }
.message-card-head h1 { font-family: var(--pixel); font-size: 15px; line-height: 1.2; }
.message-card-head .meta { font-size: 9px; color: #827b6f; margin-top: 2px; }
.message-body { padding: 12px; font-size: 12px; line-height: 1.7; color: #36322b; }
.message-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 9px; border-top: 1px solid #c6c0b5; background: #e8e4db; }

/* ---------------- Small helpers ---------------- */

.stat-inline { display: inline-flex; align-items: baseline; gap: 4px; color: #716a5f; font-size: 9px; text-transform: uppercase; letter-spacing: 0.3px; }
.stat-inline b { font-family: var(--pixel); font-size: 11px; color: #2e2a24; }
.badge-dot { display: inline-block; width: 6px; height: 6px; background: var(--green); border-radius: 50%; box-shadow: 0 0 4px var(--green); margin-right: 3px; }
.divider { height: 1px; background: #b7b1a6; box-shadow: 0 1px 0 #fff; margin: 10px 0; }
.page-title { font-family: var(--pixel); font-size: 22px; line-height: 1.15; color: #1f1c17; margin-bottom: 2px; }
.page-intro { font-size: 10px; color: #7c7569; margin-bottom: 10px; }
.count-label { font-family: var(--pixel); font-size: 9px; color: #8b8478; text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------------- Members ---------------- */

.search-bar { display: flex; gap: 6px; flex-wrap: wrap; align-items: flex-end; }
.search-bar .field { flex: 1; min-width: 140px; }
.search-bar .btn { flex: 0 0 auto; }
.member-page-info-list { display: flex; flex-direction: column; }
.member-page-info-list a { display: block; padding: 8px 2px; border-bottom: 1px solid #c9c3b8; color: #37332d; text-decoration: none; }
.member-page-info-list a:last-child { border-bottom: 0; }
.member-page-info-list a:hover b { color: var(--red-dark); text-decoration: underline; }
.member-page-info-list b,
.member-page-info-list span { display: block; }
.member-page-info-list b { font-size: 10px; }
.member-page-info-list span { margin-top: 2px; color: #777166; font-size: 9px; line-height: 1.45; }
.member-random-card { display: flex; align-items: center; gap: 16px; padding: 16px; border: 1px solid #b8b2a7; background: #e3dfd6; }
.member-random-card > .avatar { width: 96px; height: 96px; flex: 0 0 auto; }
.member-random-main { min-width: 0; }
.member-random-main h2 { margin-bottom: 5px; color: #24211c; font-family: var(--font); font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.member-random-main h2 .member-tag,
.member-random-main h2 .member-random-location { font-family: inherit; font-size: inherit; font-weight: inherit; color: inherit; letter-spacing: normal; }
.member-random-main h2 .member-tag { margin-left: .25em; }
.member-random-main p { margin: 2px 0 8px; color: #70695e; font-size: 10px; }
.member-random-again { margin-top: 10px; }
.filter-tabs { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 8px; }
.filter-tabs a { border: 1px solid #aaa499; background: #dfdbd2; color: #4b463e; padding: 3px 7px; font-size: 9px; text-decoration: none; text-transform: uppercase; letter-spacing: 0.2px; }
.filter-tabs a:hover { background: #eeeae1; }
.filter-tabs a.active { background: #2d2d2d; border-color: #000; color: #fff; }
.member-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.member-card { display: flex; gap: 8px; align-items: flex-start; padding: 8px; background: #e5e1d8; border: 1px solid #c0baaf; box-shadow: inset 1px 1px 0 #faf7f0; text-decoration: none; color: #38342d; }
.member-card:hover { background: #f0ece4; border-color: #a7a095; color: #38342d; }
.member-card .avatar { width: 44px; height: 44px; }
.member-card-main { min-width: 0; flex: 1; }
.member-card-name { display: block; font-family: var(--pixel); font-weight: 700; font-size: 12px; line-height: 1.2; color: #28241e; }
.member-card-name .member-tag { font-size: 8px; color: #857d70; }
.member-card-meta { display: block; font-size: 9px; color: #7b7468; margin-top: 2px; }
.member-card-sign { display: block; font-size: 9px; color: #989083; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-card-online { display: inline-flex; align-items: center; gap: 3px; color: #287a54; font-size: 8px; font-weight: 700; text-transform: uppercase; margin-top: 3px; }
.birthday-cake-wrap { display: flex; justify-content: center; }
.birthday-cake { display: block; width: 100%; max-width: 260px; height: auto; margin: 0 auto; }

/* ---------------- Settings ---------------- */

.settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 214px; gap: 12px; align-items: start; }
.settings-side { display: flex; flex-direction: column; gap: 12px; }
.settings-guide { display: flex; flex-direction: column; gap: 8px; }
.settings-info-card {
  display: block;
  min-width: 0;
  padding: 8px 9px 9px;
  border: 1px solid #37332e;
  background: #1b1917;
  color: #d0cbc1;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 6px rgba(0, 0, 0, 0.18);
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.settings-info-card:hover { border-color: #c8362a; background: #241b18; }
.settings-info-card.is-active {
  border-color: #d94838;
  background: linear-gradient(180deg, #2a1714, #1b1110);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 10px rgba(200, 45, 35, 0.22);
}
.settings-info-card:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.settings-info-card-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.settings-info-card-name {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  color: #f0e7db;
  font-family: var(--pixel);
  font-size: 9px;
  letter-spacing: 0.4px;
  line-height: 1.25;
  text-transform: uppercase;
}
.settings-info-card-num { flex: 0 0 auto; color: #d94838; font-size: 8px; }
.settings-info-card-state { flex: 0 0 auto; color: #8f8577; font-family: var(--pixel); font-size: 8px; text-transform: uppercase; }
.settings-info-card.is-active .settings-info-card-num,
.settings-info-card.is-active .settings-info-card-state { color: var(--yellow); }
.settings-info-card-desc { display: block; margin-top: 4px; color: #9f978a; font-size: 9px; line-height: 1.5; }
.settings-info-card.is-active .settings-info-card-desc { color: #d9c6bd; }
.settings-section-title { font-family: var(--pixel); font-size: 12px; text-transform: uppercase; letter-spacing: 0.6px; margin: 4px 0 8px; padding-bottom: 4px; border-bottom: 1px solid #b8b2a7; }
.avatar-picker { display: grid; grid-template-columns: repeat(8, 1fr); gap: 5px; }
.avatar-option { position: relative; cursor: pointer; }
.avatar-option input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-option .avatar { width: 100%; height: auto; aspect-ratio: 1; border-width: 2px; }
.avatar-option input:checked + .avatar { border-color: var(--red); box-shadow: 0 0 0 2px var(--yellow), 2px 2px 0 rgba(0,0,0,.3); }
.avatar-option:hover .avatar { border-color: var(--blue); }
.avatar-settings { border: 1px solid #c4beb3; background: #eeeae1; padding: 10px; margin-bottom: 12px; }
.avatar-settings-row { display: flex; gap: 12px; align-items: flex-start; }
.avatar-settings-row .avatar-xl { width: 96px; height: 96px; }
.avatar-settings-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.avatar-settings-meta strong { font-family: var(--pixel); font-size: 12px; color: #2d2923; }
.avatar-settings-meta .small { margin: 0; line-height: 1.55; color: #5d564c; }
.avatar-status { display: inline-block; padding: 1px 6px; border: 1px solid currentColor; font-family: var(--pixel); font-size: 8px; letter-spacing: 0.4px; text-transform: uppercase; }
.avatar-status.is-pending { color: #7d5c00; background: #fff0b8; }
.avatar-status.is-approved { color: #1c6a46; background: #d9f3e3; }
.avatar-status.is-rejected { color: #8e2019; background: #ffe0dc; }
.avatar-pending-row { display: flex; align-items: center; gap: 9px; margin-top: 10px; padding: 8px; border: 1px dashed #b9a67a; background: #fff7df; }
.avatar-pending-thumb { width: 58px; height: 58px; object-fit: cover; border: 2px solid #111; flex: 0 0 auto; }
.avatar-mode-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 10px; }
.avatar-mode-option { display: flex; align-items: center; gap: 8px; border: 1px solid #bdb6aa; background: #f5f2eb; padding: 7px; cursor: pointer; }
.avatar-mode-option input { accent-color: var(--red); flex: 0 0 auto; }
.avatar-mode-option b { display: block; font-size: 10px; }
.avatar-mode-option small { display: block; font-size: 9px; color: #7d7467; margin-top: 1px; line-height: 1.3; }
.avatar-mode-option:has(input:checked) { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--yellow); }
.avatar-mode-option.is-disabled { opacity: 0.55; }
.avatar-rules { margin: 8px 0 0 !important; line-height: 1.55; }

.profile-bg-preview {
  position: relative;
  height: 112px;
  border: 2px solid #111;
  background: linear-gradient(90deg, #1f2b3a, #34263f 45%, #4a221c);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}
.profile-bg-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.14) 0 1px, transparent 1px 3px);
}
.profile-bg-placeholder { position: absolute; inset: 0; }
.profile-bg-placeholder .pixel-art { width: 100%; height: 100%; opacity: 0.7; image-rendering: pixelated; }
.profile-bg-placeholder span {
  position: absolute;
  left: 9px;
  bottom: 7px;
  color: #f1eadf;
  font-family: var(--pixel);
  font-size: 8px;
  letter-spacing: 0.5px;
  text-shadow: 1px 1px 0 #000;
  text-transform: uppercase;
}
.profile-bg-hint { margin: 6px 0 0 !important; line-height: 1.55; }
.profile-bg-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 8px; }
.profile-bg-error { margin-top: 8px; padding: 7px 8px; border: 1px solid #9c342e; background: #4a1613; color: #ffd8d4; font-size: 10px; line-height: 1.5; }
.profile-bg-locked { display: flex; align-items: flex-start; gap: 9px; padding: 9px; border: 1px dashed #b9a67a; background: #fff7df; }
.profile-bg-locked-star { flex: 0 0 auto; color: #b8860b; font-size: 22px; line-height: 1; text-shadow: 0 1px 0 #fff; }
.profile-bg-locked b { display: block; color: #3c352b; font-family: var(--pixel); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; }
.profile-bg-locked p { margin: 3px 0 0; color: #5d564c; font-size: 10px; line-height: 1.55; }
.vip-chip {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 5px;
  border: 1px solid #7a5100;
  background: linear-gradient(180deg, #f6c944, #c99516);
  color: #3a2600;
  font-family: var(--pixel);
  font-size: 7px;
  letter-spacing: 0.7px;
  vertical-align: middle;
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.avatar-modal[hidden] { display: none; }
body.avatar-modal-open { overflow: hidden; }
.avatar-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 16px; }
.avatar-modal-backdrop { position: absolute; inset: 0; background: rgba(7, 7, 7, 0.86); }
.avatar-modal-card { position: relative; width: min(430px, 100%); max-height: calc(100vh - 24px); overflow: auto; background: #1b1916; color: #e9e2d7; border: 2px solid #000; box-shadow: 0 0 0 1px #574b3b, 0 22px 60px rgba(0, 0, 0, 0.65); padding: 14px; }
.avatar-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.avatar-modal-kicker { font-family: var(--pixel); font-size: 8px; letter-spacing: 1px; text-transform: uppercase; color: var(--yellow); }
.avatar-modal-head h2 { margin: 2px 0 0; font-family: var(--pixel); font-size: 15px; color: #fff; }
.avatar-modal-close { width: 28px; height: 28px; background: #111; border: 1px solid #4f4639; color: #f4efe4; font-size: 18px; line-height: 1; cursor: pointer; }
.avatar-modal-close:hover { background: var(--red); border-color: #000; }
.avatar-modal-help { margin: 8px 0; font-size: 10px; line-height: 1.55; color: #a9a195; }
.avatar-stage { position: relative; width: 100%; max-width: 340px; aspect-ratio: 1; margin: 0 auto; overflow: hidden; background: #0b0b0b; border: 2px solid #000; box-shadow: inset 0 0 0 1px #4a3c2e; cursor: grab; touch-action: none; }
.avatar-stage.is-dragging { cursor: grabbing; }
.avatar-stage img { position: absolute; left: 50%; top: 50%; max-width: none; user-select: none; pointer-events: none; transform: translate(-50%, -50%); }
.avatar-stage-grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(to right, transparent 33.2%, rgba(255,255,255,.18) 33.3%, transparent 33.5%, transparent 66.2%, rgba(255,255,255,.18) 66.4%, transparent 66.6%), linear-gradient(to bottom, transparent 33.2%, rgba(255,255,255,.18) 33.3%, transparent 33.5%, transparent 66.2%, rgba(255,255,255,.18) 66.4%, transparent 66.6%); }
.avatar-zoom-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 9px; color: #b9b0a3; }
.avatar-zoom-row input { flex: 1; accent-color: var(--red); }
.avatar-zoom-reset { border: 1px solid #4f4639; background: #111; color: #d8d0c4; font-size: 9px; padding: 3px 6px; cursor: pointer; }
.avatar-crop-result { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 8px; background: #111; border: 1px solid #3b342b; }
.avatar-crop-result .small { color: #a8a094; line-height: 1.5; }
.avatar-crop-result .avatar { border-color: #000; flex: 0 0 auto; }
.avatar-modal-error { margin-top: 8px; padding: 7px 8px; background: #4a1613; border: 1px solid #9c342e; color: #ffd8d4; font-size: 10px; line-height: 1.5; }
.avatar-modal-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 12px; }
.account-box { background: #1d1d1d; border: 1px solid #000; color: #d0cbc1; }
.account-box .head { padding: 5px 8px; background: #0c0c0c; border-bottom: 1px solid #333; color: var(--yellow); font-family: var(--pixel); font-size: 9px; text-transform: uppercase; letter-spacing: 0.7px; }
.account-box .body { padding: 8px; font-size: 9px; line-height: 1.6; }
.account-box b { color: #fff; }

/* ---------------- Fun, quiz and 100 words ---------------- */

.fun-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fun-tips-empty { min-height: 190px; }
.member-search-filter { min-width: 0; margin: 0 0 12px; padding: 0; border: 0; }
.member-search-filter legend { font-weight: 700; margin-bottom: 5px; }
.member-search-filter label { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 11px; }
.member-search-filter input { width: auto; flex: 0 0 auto; margin: 0; }
.fun-recommendations .fun-card { min-width: 0; }
.fun-site-logo { display: flex; align-items: center; justify-content: center; height: 112px; margin-bottom: 12px; }
.fun-site-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.fun-recommendations .btn { max-width: 100%; white-space: normal; }
.fun-card { display: flex; flex-direction: column; border: 1px solid #b6b0a5; background: #e5e1d8; padding: 12px; }
.fun-card-icon { font-size: 28px; line-height: 1; margin-bottom: 7px; }
.fun-card h2 { font-family: var(--pixel); font-size: 16px; margin-bottom: 4px; }
.fun-card h2 a { color: #29251f; text-decoration: none; }
.fun-card h2 a:hover { color: var(--red); }
.fun-card p { font-size: 10px; line-height: 1.6; color: #6b6459; margin-bottom: 9px; }
.fun-card .btn { align-self: flex-start; margin-top: auto; }
.quiz-list { display: flex; flex-direction: column; gap: 8px; }
.quiz-row { display: flex; align-items: center; gap: 10px; padding: 9px; background: #e5e1d8; border: 1px solid #c0baaf; }
.quiz-row-main { flex: 1; }
.quiz-row h3 { font-family: var(--pixel); font-size: 13px; }
.quiz-row h3 a { color: #2a261f; text-decoration: none; }
.quiz-row h3 a:hover { color: var(--red); }
.quiz-row p { font-size: 9px; color: #837b6f; margin: 2px 0 0; }
.quiz-meta { font-size: 8px; text-transform: uppercase; color: #91897d; letter-spacing: 0.4px; }
.quiz-question { padding: 12px 0; border-bottom: 1px solid #bfb9ae; }
.quiz-question:last-child { border-bottom: 0; }
.quiz-question h3 { font-size: 12px; margin-bottom: 7px; }
.quiz-question .num { font-family: var(--pixel); color: var(--red-dark); margin-right: 5px; }
.quiz-options { display: grid; gap: 4px; }
.quiz-option { display: flex; gap: 7px; align-items: center; border: 1px solid #c6c0b5; background: #efebe3; padding: 6px 8px; cursor: pointer; font-size: 11px; transition: background 0.12s; }
.quiz-option:hover { background: #f9f6ef; border-color: #9e978b; }
.quiz-option input { accent-color: var(--red); }
.quiz-result { background: #fff1c4; border: 2px solid #c9a735; padding: 14px; text-align: center; margin-bottom: 12px; box-shadow: inset 2px 2px 0 rgba(255,255,255,.5); }
.quiz-result .score { font-family: var(--pixel); font-size: 30px; line-height: 1; color: #5c4300; text-shadow: 1px 1px 0 #fff; }
.quiz-result h2 { font-family: var(--pixel); font-size: 15px; margin: 4px 0 2px; }
.quiz-result p { font-size: 10px; color: #7a5f1c; margin: 0; }
.hundred-form textarea { min-height: 180px; font-size: 12px; line-height: 1.7; }
.word-meter { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #d9d4ca; border: 1px solid #aaa499; padding: 5px 8px; margin-top: 6px; }
.word-meter span { font-family: var(--pixel); font-size: 10px; color: #635d53; }
.word-meter strong { color: #392f1a; }
.word-meter .ok { color: #1e724b; }
.hundred-entry { padding: 10px 0; border-bottom: 1px solid #c5bfb4; }
.hundred-entry:last-child { border-bottom: 0; }
.hundred-entry-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 4px; }
.hundred-entry-body { font-size: 11px; line-height: 1.65; color: #4f4a42; }
.word-badge { background: #2d2d2d; color: #f1ecdf; font-family: var(--pixel); font-size: 8px; padding: 1px 5px; border: 1px solid #000; }
.leaderboard { display: flex; flex-direction: column; gap: 1px; }
.leaderboard-row { display: flex; align-items: center; gap: 7px; padding: 5px 3px; border-bottom: 1px solid #c8c2b7; font-size: 10px; }
.leaderboard-row:last-child { border-bottom: 0; }
.leaderboard-rank { font-family: var(--pixel); font-size: 10px; color: #8c8478; width: 17px; }
.leaderboard-name { font-weight: 700; flex: 1; }
.leaderboard-score { font-family: var(--pixel); font-size: 10px; color: #35312a; }

/* ---------------- Vykort ---------------- */

.postcard-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.postcard-choice { display: block; cursor: pointer; }
.postcard-choice input { position: absolute; opacity: 0; pointer-events: none; }
.postcard-choice .art-frame { transition: border-color 0.12s, box-shadow 0.12s; }
.postcard-choice input:checked + .art-frame { border-color: var(--red); box-shadow: 0 0 0 2px var(--yellow), 2px 2px 0 rgba(0,0,0,.4); }
.postcard-choice .pc-title { display: block; margin-top: 4px; font-family: var(--pixel); font-size: 10px; font-weight: 700; text-align: center; color: #3b362f; }
.postcard-choice:hover .pc-title { color: var(--red); }
.received-card { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px solid #c6c0b5; }
.received-card:last-child { border-bottom: 0; }
.received-art { flex: 0 0 94px; border: 2px solid #171717; background: #111; }
.received-art .pixel-art { display: block; width: 100%; height: 54px; image-rendering: pixelated; }
.received-main { flex: 1; min-width: 0; }
.received-main .from { font-family: var(--pixel); font-size: 11px; font-weight: 700; }
.received-main .from a { color: #2c2822; text-decoration: none; }
.received-main .msg { font-size: 10px; color: #5b554c; line-height: 1.5; margin-top: 2px; }
.received-main .time { font-size: 8px; color: #958d80; margin-top: 3px; text-transform: uppercase; }

/* ---------------- Help and status ---------------- */

.faq-item { border-bottom: 1px solid #c2bcb1; padding: 9px 0; }
.faq-item:first-child { padding-top: 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 11px; color: #2f2b24; padding: 2px 0; }
.faq-item summary:hover { color: var(--red); }
.faq-item p { margin: 5px 0 0; font-size: 11px; line-height: 1.65; color: #5d574e; }
.rules-list { counter-reset: rule; list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.rules-list li { counter-increment: rule; display: flex; gap: 8px; font-size: 11px; line-height: 1.55; color: #4f4a41; }
.rules-list li::before { content: counter(rule); font-family: var(--pixel); font-size: 10px; font-weight: 700; color: #fff; background: #35312a; width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #000; }
.contact-box { background: #1d1d1d; border: 1px solid #000; color: #cbc5ba; padding: 10px; }
.contact-box h3 { color: var(--yellow); font-family: var(--pixel); font-size: 12px; margin-bottom: 5px; }
.contact-box p { font-size: 10px; line-height: 1.6; color: #9d978c; }
.contact-box .field > label { color: #9d978c; }
.contact-box .field input, .contact-box .field textarea { background: #0d0d0d; border-color: #3b3b3b; color: #e3ded4; }
.contact-box .field input:focus, .contact-box .field textarea:focus { border-color: var(--yellow); background: #111; }

.help-shortcuts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 900px;
  margin: 0 0 10px;
}
.help-shortcut {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #3d3a34;
  border-radius: 0;
  background: linear-gradient(180deg, #23211e, #121110);
  color: #d8d2c7;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.settings-shortcuts .settings-menu-toggle { display: none; }
@media (max-width: 1023px) {
  .settings-grid > .settings-side { display: none; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-shortcuts.is-collapsible { flex-direction: column; gap: 0; width: 100%; }
  .settings-shortcuts.is-collapsible .settings-menu-toggle {
    display: flex; justify-content: space-between; width: 100%; min-height: 36px;
    padding: 8px 10px; border-bottom: 2px solid var(--red); cursor: pointer;
  }
  .settings-shortcuts.is-collapsible > a.help-shortcut { display: none; }
  .settings-shortcuts.is-collapsible.is-open > a.help-shortcut {
    display: flex; justify-content: flex-start; width: 100%; min-height: 36px;
    padding: 8px 10px; white-space: normal; text-align: left;
  }
  .settings-shortcuts .settings-menu-toggle:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
}
.help-shortcut-icon { display: inline-flex; flex: 0 0 auto; }
.help-shortcut-icon svg {
  width: 13px;
  height: 13px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.help-shortcut:hover {
  border-color: #c8362a;
  background: linear-gradient(180deg, #35201d, #1a1210);
  color: #fff;
}
.help-shortcut.is-active {
  border-color: #d94838;
  background: linear-gradient(180deg, #b7281f, #7c120c);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 0 10px rgba(200, 45, 35, 0.28);
}
.help-shortcut.diary-read-count {
  min-height: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #5f5a50;
  box-shadow: none;
}
.help-shortcut.diary-read-count:hover {
  border-color: transparent;
  background: transparent;
  color: var(--red-dark);
  box-shadow: none;
}
.help-shortcut.diary-read-count:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
.help-jump { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0 4px; }
.help-jump a { font-family: var(--pixel); font-size: 8px; letter-spacing: 0.2px; text-transform: uppercase; color: #4f4a41; background: #e8e3d9; border: 1px solid #b8b2a7; padding: 3px 7px; text-decoration: none; }
.help-jump a:hover { background: #35312a; border-color: #000; color: var(--yellow); }
.faq-group { margin-top: 18px; scroll-margin-top: 10px; }
.faq-group-title { font-family: var(--pixel); font-size: 12px; color: #2f2b24; border-bottom: 2px solid #35312a; padding-bottom: 4px; margin-bottom: 2px; }
.faq-link { display: inline-block; margin-top: 5px; font-size: 10px; font-weight: 700; color: var(--blue); }
.faq-link:hover { color: var(--red); }
.faq-item p + .faq-link { margin-top: 4px; }
.legal-meta { font-size: 8px; text-transform: uppercase; letter-spacing: 0.5px; color: #8a8175; margin: 4px 0 2px; }
.legal-heading { font-family: var(--pixel); font-size: 12px; color: #2f2b24; margin: 16px 0 5px; }
.legal-heading:first-of-type { margin-top: 10px; }
.legal-text { font-size: 11px; line-height: 1.7; color: #4f4a41; margin: 0 0 6px; }
.contact-options { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 4px; }
.contact-option { display: flex; align-items: flex-start; gap: 8px; padding: 8px; background: #efebe2; border: 1px solid #c2bcb1; }
.contact-option-icon { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; background: #35312a; color: var(--yellow); font-size: 13px; border: 1px solid #000; }
.contact-option h3 { font-family: var(--pixel); font-size: 9px; color: #2f2b24; margin: 0 0 2px; }
.contact-option p { font-size: 9px; line-height: 1.5; color: #6a645a; margin: 0; }
.adminer-summary { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.adminer-summary-item { display: flex; align-items: center; gap: 7px; background: #efebe2; border: 1px solid #bdb7ac; padding: 5px 8px; color: #3a352e; text-decoration: none; }
.adminer-summary-item:hover { background: #35312a; border-color: #000; color: var(--yellow); }
.adminer-summary-icon { width: 22px; height: 22px; display: grid; place-items: center; background: #35312a; color: var(--yellow); font-size: 11px; border: 1px solid #000; }
.adminer-summary-item:hover .adminer-summary-icon { background: var(--yellow); color: #201d18; }
.adminer-summary-item b { display: block; font-family: var(--pixel); font-size: 9px; line-height: 1.2; }
.adminer-summary-item small { display: block; font-size: 8px; color: #857d70; margin-top: 1px; }
.adminer-summary-item:hover small { color: #d8d2c6; }
.adminer-layout { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(0, 0.85fr); gap: 12px; align-items: start; margin-top: 12px; }
.adminer-main, .adminer-side { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.adminer-main { grid-column: 1; grid-row: 1; }
.adminer-side { grid-column: 2; grid-row: 1; }
.adminer-column { scroll-margin-top: 10px; }
.adminer-role-desc { font-size: 10px; line-height: 1.6; color: #5d574e; margin: 0; }
/* Max tre adminer per rad – fler radbryts under. */
.adminer-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.adminer-card { position: relative; display: flex; align-items: flex-start; gap: 8px; padding: 8px; border: 1px solid #c2bcb1; background: #eae6dd; }
.adminer-card .avatar { width: 52px; height: 52px; flex: 0 0 auto; }
.adminer-card-main { min-width: 0; flex: 1; padding-right: 38px; }
.adminer-card-name { font-family: inherit; font-size: 12px; font-weight: 700; color: #28241e; text-decoration: none; }
.adminer-card-name .member-tag { font-family: inherit; color: inherit; font-weight: 700; }
.adminer-card-name .name-badges { display: none; }
.adminer-card-name:hover { color: var(--red); }
.adminer-card-meta { display: flex; flex-wrap: wrap; gap: 3px 6px; font-size: 9px; color: #847c70; margin-top: 2px; }
.adminer-presence { position: absolute; top: 6px; right: 6px; display: inline-flex; align-items: center; padding: 1px 5px; border: 1px solid currentColor; background: #f3f0e8; font-size: 8px; font-weight: 700; line-height: 1.3; }
.adminer-presence.is-active { color: #287a3f; }
.adminer-presence.is-away { color: #a3332d; }
.adminer-card-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.adminer-card-actions .btn {
  min-height: 0;
  padding: 1px 5px;
  font-size: 7px;
  line-height: 1.6;
  letter-spacing: 0.2px;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 #b6b1a7;
}

.status-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 12px; }
.status-tile { background: #e1ddd4; border: 1px solid #b8b2a7; padding: 7px; text-align: center; }
.status-tile b { display: block; font-family: var(--pixel); font-size: 18px; line-height: 1; color: #2d2923; }
.status-tile span { display: block; font-size: 8px; color: #847c70; text-transform: uppercase; letter-spacing: 0.4px; margin-top: 3px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-row { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dotted #b9b3a8; font-size: 10px; color: #504b43; }
.timeline-row:last-child { border-bottom: 0; }
.timeline-time { flex: 0 0 130px; font-family: var(--pixel); font-size: 9px; color: #8b8478; }
.profile-login-window .timeline-row,
.profile-login-window .timeline-time,
.profile-login-window .small.muted { color: #000; font-weight: 700; }

/* ---------------- Tables and misc ---------------- */

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 10px; }
.data-table th { background: #d2cdc3; border: 1px solid #aaa499; padding: 4px 6px; text-align: left; text-transform: uppercase; font-size: 8px; letter-spacing: 0.4px; color: #575147; }
.data-table td { border: 1px solid #c3bdb2; padding: 5px 6px; }
.data-table tr:nth-child(even) td { background: #e5e1d8; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.hint-box { border: 1px solid #c2bcb1; background: #e9e5dc; padding: 8px 9px; font-size: 10px; line-height: 1.55; color: #665f55; }
.hint-box b { color: #35312a; }
.start-contact-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 2px solid #b7281f;
  background: linear-gradient(180deg, #fff5c9, #f7e6a2);
  color: #2f2b24;
  font-size: 11px;
  line-height: 1.45;
  text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 3px 10px rgba(0, 0, 0, 0.12);
}
.start-contact-alert:hover,
.start-contact-alert:focus-visible {
  border-color: #7c120c;
  background: linear-gradient(180deg, #ffecad, #f2d77d);
}
.start-contact-alert-title {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px;
  font-family: var(--pixel);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.start-contact-count { color: #7c120c; white-space: nowrap; }
.start-contact-count-number {
  display: inline-block;
  font-weight: 700;
  animation: pulse 1.1s ease-in-out infinite;
}
.start-contact-alert-action {
  color: #7c120c;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .start-contact-alert { flex-direction: column; align-items: flex-start; gap: 3px; padding: 8px 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .start-contact-count-number { animation: none; }
}
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.two-col.split { grid-template-columns: minmax(0, 2.25fr) minmax(0, 0.85fr); }
.two-col.split-wide { grid-template-columns: minmax(0, 2.2fr) minmax(0, 0.8fr); }
.guestbook-layout { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(0, 0.85fr); grid-template-areas: "list compose"; gap: 12px; align-items: start; }
.guestbook-list { grid-area: list; }
.guestbook-compose { grid-area: compose; }
.guestbook-pagination { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 9px; border-top: 1px solid #c8c1b5; }
.guestbook-pagination-status { color: #746c60; font-size: 9px; white-space: nowrap; }
@media (max-width: 700px) {
  .member-pagination { gap: 4px; flex-wrap: wrap; }
  .member-pagination .btn { min-height: 23px; padding: 2px 5px; font-size: 9px; }
}
.gallery-strip.cols-2 { grid-template-columns: 1fr 1fr; }
.gallery-strip.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sidebar-window .window-body { padding: 9px; }

/* ---------------- Status page ---------------- */

.status-breakdown { border: 1px solid #b9b2a5; background: #eee9df; }
.status-point-head, .status-point-row { display: grid; grid-template-columns: minmax(0, 1fr) 52px 62px 82px; gap: 5px; align-items: center; padding: 6px 8px; }
.status-point-head { background: #302c26; color: #f2ede2; font-family: var(--pixel); font-size: 8px; text-transform: uppercase; letter-spacing: 0.5px; text-align: right; }
.status-point-head span:first-child { text-align: left; }
.status-point-row { border-top: 1px solid #d1cabe; font-size: 10px; }
.status-point-row:nth-child(even) { background: #e3ded4; }
.status-point-name { color: #3e3931; line-height: 1.3; min-width: 0; }
.status-point-name small { display: block; font-size: 8px; color: #8a8276; margin-top: 1px; }
.status-point-count { text-align: right; font-family: var(--pixel); font-size: 10px; color: #5b554b; }
.status-point-rate { text-align: right; font-size: 9px; color: #7d7569; white-space: nowrap; }
.status-point-value { text-align: right; font-weight: 700; color: #29251f; white-space: nowrap; }
.status-point-total { display: flex; justify-content: space-between; align-items: center; padding: 8px 9px; background: #2f2b25; border-top: 2px solid #000; color: #eee8dd; font-family: var(--pixel); font-size: 10px; text-transform: uppercase; letter-spacing: 0.6px; }
.status-point-total b { color: #ffd35e; font-size: 14px; text-shadow: 2px 2px 0 #000; }

@media (max-width: 700px) {
  .profile-actions-rich { align-items: flex-start; justify-content: flex-start; align-self: auto; width: 100%; }
  .profile-score-bare { --score-size: 36px; margin-top: 0; }
  .profile-buttons { justify-content: flex-start; }
  .status-point-head, .status-point-row { grid-template-columns: minmax(0, 1fr) 42px 56px 74px; gap: 4px; padding: 6px; }
  .status-point-rate { font-size: 8px; }
  .status-point-value { font-size: 10px; }
}

/* ---------------- Responsive ---------------- */

@media (max-width: 1020px) {
  .page-grid { grid-template-columns: minmax(0, 1fr) 204px; }
  .new-member-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (max-width: 900px) {
  .page-grid { grid-template-columns: 1fr; }
  .side-col { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
  .side-col .side-box:first-child { grid-column: span 2; }
  .banner-inner { min-height: 190px; padding-bottom: 52px; }
  .quickbar-wrap { margin-top: -20px; }
  .quickbar-link { gap: 6px; }
  .auth-row { grid-template-columns: 1fr; }
  .front-grid { grid-template-columns: 1fr; }
  .front-aside { display: grid; grid-template-columns: 1fr 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-side { display: grid; grid-template-columns: 1fr 1fr; }
  .settings-guide { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .profile-columns { grid-template-columns: 1fr; }
  .profile-side { display: grid; grid-template-columns: 1fr 1fr; }
  .adminer-layout { display: flex; flex-direction: column; gap: 12px; }
  .adminer-list { grid-template-columns: 1fr 1fr; }
  .adminer-side { display: contents; }
  .adminer-main { order: 0; }
  .adminer-intro { order: -1; }
  .adminer-contact, .adminer-note { order: 1; }
}

@media (max-width: 700px) {
  .shell { width: calc(100% - 14px); }
  .top-strip-inner { min-height: 32px; font-size: 9px; letter-spacing: 0.8px; gap: 8px; }
  .top-meta { gap: 9px; }
  .top-rule { height: 12px; }
  .top-online { gap: 6px; }
  .top-online .dot { width: 7px; height: 7px; }
  .banner-inner { min-height: 90px; padding: 10px 0 12px; }
  .banner::after { background-size: 100% 100%, auto 78px; }
  .banner .brand { gap: 10px; }
  .banner .brand-mark {
    width: 42px;
    height: 42px;
    font-size: 23px;
    letter-spacing: -2px;
    border-width: 2px;
    border-radius: 3px;
    box-shadow:
      0 0 0 2px #240503,
      0 0 14px rgba(240, 68, 53, 0.5),
      0 5px 10px rgba(0, 0, 0, 0.6),
      inset 0 0 0 2px rgba(255, 255, 255, 0.1),
      inset 0 -7px 12px rgba(0, 0, 0, 0.45);
  }
  .banner .brand-name { font-size: clamp(21px, 6.4vw, 26px); line-height: 0.9; letter-spacing: 0.5px; }
  .banner .brand-tagline { display: none; }
  .quickbar-wrap { margin-top: -16px; margin-bottom: 8px; }
  .quickbar { border-left-width: 2px; }
  .quickbar-link { min-height: 36px; gap: 5px; padding: 0 3px; font-size: 10px; letter-spacing: 0.3px; }
  .quickbar-link.is-active::after { bottom: 1px; height: 1px; }
  .quickbar-icon svg { width: 17px; height: 17px; }
  .quickbar-badge { min-width: 14px; height: 14px; padding: 0 2px; font-size: 8px; top: -5px; right: -6px; }
  .nav-inner { flex-wrap: wrap; overflow-x: visible; }
  .nav-link { min-height: 31px; padding: 0 9px; font-size: 9px; }
  .nav-spacer { display: none; }
  .nav-logout { padding: 0 10px; }
  .quicklinks-inner { gap: 3px 8px; font-size: 9px; }
  .window-title { flex-wrap: wrap; row-gap: 2px; }
  .window-title .title-right { font-size: 8px; }
  .ticker { height: 24px; }
  .ticker-label { padding: 0 7px; font-size: 8px; }
  .live-ticker-stage { height: 24px; }
  .live-ticker-author .vip-star img, .live-ticker-author .admin-shield img { width: 9px; height: 9px; }
  .live-ticker-empty { font-size: 9px; }
  .live-ticker-write { padding-left: 5px; font-size: 7px; }
  .page-grid { padding-top: 8px; gap: 8px; }
  .side-col { grid-template-columns: 1fr; }
  .side-col .side-box:first-child { grid-column: span 1; }
  .front-aside { grid-template-columns: 1fr; }
  .member-card-grid { grid-template-columns: 1fr; }
  .two-col.split, .two-col.split-wide { grid-template-columns: 1fr; }
  .gallery-strip.cols-3 { grid-template-columns: 1fr 1fr; }
  .fun-grid { grid-template-columns: 1fr; }
  .postcard-grid { grid-template-columns: 1fr 1fr; }
  .profile-identity { align-items: flex-start; flex-wrap: wrap; }
  .profile-avatar .avatar { width: 76px; height: 76px; }
  .profile-title { flex-basis: calc(100% - 100px); }
  .profile-actions { flex-basis: 100%; padding-left: 0; }
  /* Mobil: kompakta textknappar som radbryts vid behov. */
  .profile-tabs.profile-tabs-top { display: flex; margin-bottom: 6px; }
  /* Mobil: namn och P41 överst, bild vänster, info höger och knappar under bilden. */
  .profile-hero-main .profile-identity {
    display: grid;
    grid-template-columns: minmax(104px, 32%) minmax(0, 1fr);
    grid-template-areas:
      "heading heading"
      "avatar details"
      "actions actions";
    align-items: start;
    gap: 7px 10px;
    margin-top: -40px;
    padding: 8px 10px 12px;
  }
  .profile-hero-main .profile-title { display: contents; }
  .profile-hero-main .profile-title h1 { grid-area: heading; padding-right: 78px; overflow-wrap: anywhere; }
  .profile-hero-main .profile-title h1 .member-tag { margin-left: 2px; }
  .profile-hero-main .profile-meta { display: none; }
  .profile-hero-main .profile-mobile-meta { grid-area: details; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
  .profile-mobile-meta-row { display: flex; align-items: center; gap: 5px; min-height: 24px; min-width: 0; padding: 3px 5px; border: 1px solid rgba(210, 215, 223, 0.2); border-radius: 7px; background: rgba(7, 10, 15, 0.74); color: #f2f3f5; font-size: 9px; font-weight: 600; line-height: 1.2; overflow-wrap: anywhere; }
  .profile-mobile-meta-row span { min-width: 0; }
  .profile-mobile-meta-row svg { width: 15px; height: 15px; flex: 0 0 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .profile-hero-main .profile-avatar-column { grid-area: avatar; }
  .profile-hero-main .profile-owner-actions { width: 100%; }
  .profile-hero-main .profile-avatar .avatar {
    width: 92px;
    height: 92px;
  }
  .profile-hero-main .profile-actions-rich {
    grid-area: actions;
    width: 100%;
    min-width: 0;
    align-items: flex-end;
    justify-content: flex-end;
  }
  .profile-hero-main .profile-buttons { display: flex; flex-wrap: wrap; width: 100%; justify-content: flex-end; gap: 4px; }
  .profile-hero-main .profile-buttons > a,
  .profile-hero-main .profile-buttons > form { width: auto; min-width: 0; min-height: 23px; justify-content: center; text-align: center; }
  .profile-hero-main .profile-buttons > form { display: flex; align-items: stretch; }
  .profile-hero-main .profile-buttons > a { width: auto; min-width: 0; min-height: 23px; justify-content: center; text-align: center; display: inline-flex; align-items: center; gap: 2px; padding: 1px 4px; font-size: 7px; letter-spacing: 0; white-space: nowrap; }
  .profile-hero-main .profile-buttons > form > button { width: auto; min-height: 23px; justify-content: center; font-size: 7px; letter-spacing: 0; padding: 1px 4px; }
  .profile-hero-main .profile-button-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
  .profile-hero-main .profile-button-icon svg { width: 10px; height: 10px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
  .profile-hero-main .profile-score-bare {
    position: absolute;
    top: 8px;
    right: 6px;
    z-index: 3;
    --score-size: 22px;
    margin-top: 0;
  }
  .profile-tabs.help-shortcuts { gap: 3px; }
  .profile-tabs .help-shortcut { min-height: 26px; padding: 3px 4px; gap: 0; font-size: 8px; letter-spacing: 0; }
  .profile-tabs .help-shortcut-icon { display: none; }
  .fact-grid { grid-template-columns: 1fr 1fr; }
  .profile-side { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .landing-shell { width: calc(100% - 18px); }
  .landing-header { align-items: flex-start; }
  .landing-header-actions .btn { min-height: 27px; font-size: 9px; padding: 4px 8px; }
  .landing-brand small { display: none; }
  .landing-brand .brand-mark { width: 35px; height: 35px; font-size: 13px; }
  .landing-brand .brand-name { font-size: 19px; }
  .hero { padding-top: 16px; }
  .hero-body { padding: 14px 13px 13px; }
  .hero-title { font-size: 26px; }
  .hero-lead { font-size: 12px; }
  .hero-points { grid-template-columns: 1fr; gap: 5px; }
  .new-member-grid { grid-template-columns: repeat(4, 1fr); }
  .gallery-strip { grid-template-columns: 1fr 1fr; }
  .post { gap: 6px; }
  .post-side { flex-basis: 74px; }
  .post-side .avatar { width: 38px; height: 38px; }
  .post-body::before { display: none; }
  .forum-numbers { display: none; }
  .thread-table th:nth-child(2), .thread-table td:nth-child(2) { display: none; }
  .mail-table .mail-subject a { display: block; overflow-wrap: anywhere; }
  .mail-table .mail-from { overflow-wrap: anywhere; }
  .mail-folder-inbox .mail-date { display: none; }
  .status-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .guestbook-layout { grid-template-columns: 1fr; grid-template-areas: "compose" "list"; }
  .guestbook-layout-self { grid-template-areas: "list"; }
  .guestbook-layout-self .guestbook-compose { display: none; }
  .profile-sub-layout { margin-top: 12px; }
  .profile-head-responsive { display: none; }
  .contact-options { grid-template-columns: 1fr; }
  .adminer-list { grid-template-columns: 1fr; }
  .settings-side { grid-template-columns: 1fr; }
  .settings-guide { grid-template-columns: 1fr; }
  .avatar-picker { grid-template-columns: repeat(4, 1fr); }
  .profile-bg-preview { height: 96px; }
  .site-footer { font-size: 9px; }
  .footer-inner { flex-direction: column; gap: 10px; }
  .message-body { padding: 10px; font-size: 11px; }
  .wall-post .avatar { width: 30px; height: 30px; }
}

@media (max-width: 420px) {
  .banner .brand { gap: 9px; }
  .banner .brand-mark { width: 39px; height: 39px; font-size: 22px; letter-spacing: -1.5px; }
  .banner .brand-name { font-size: 22px; letter-spacing: 0.3px; }
  .quickbar-link { gap: 4px; padding: 0 2px; font-size: 9px; letter-spacing: 0; }
  .quickbar-icon svg { width: 15px; height: 15px; }
  .quickbar-badge { min-width: 13px; height: 13px; padding: 0 2px; font-size: 7px; top: -5px; right: -5px; }
  .top-strip-inner { font-size: 9px; letter-spacing: 0.5px; }
  .postcard-grid { grid-template-columns: 1fr; }
  .new-member-grid { grid-template-columns: repeat(3, 1fr); }
  .post-side { flex-basis: 62px; }
  .post-side .avatar { width: 32px; height: 32px; }
  .post-side .post-author { font-size: 9px; }
  .mail-folder-inbox .mail-date { display: none; }
  .quiz-option { font-size: 10px; }
}

@media (max-width: 600px) {
  .avatar-settings-row { flex-direction: column; }
  .avatar-mode-grid { grid-template-columns: 1fr; }
  .avatar-modal { padding: 8px; }
  .avatar-modal-card { padding: 11px; }
  .avatar-stage { max-width: 100%; }
}

@media (max-width: 700px) {
  .start-hero-title {
    font-size: clamp(17px, 5vw, 20px);
    line-height: 1.25;
    overflow-wrap: anywhere;
  }
  .start-vision-title {
    font-family: var(--font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
  }

  .member-shortcuts { gap: 4px; }
  .member-shortcuts .help-shortcut { min-height: 30px; gap: 3px; padding: 4px 6px; font-size: 8px; letter-spacing: 0; }
  .member-shortcuts .help-shortcut-icon svg { width: 11px; height: 11px; }
  .member-random-card { align-items: flex-start; gap: 10px; padding: 10px; }
  .member-random-card > .avatar { width: 68px; height: 68px; }
  .member-random-main h2 { font-size: 13px; }
}

@media (max-width: 380px) {
  .member-shortcuts .help-shortcut-icon { display: none; }
}

/* ---------------- Mobile dock ---------------- */

.mobile-dock,
.mobile-menu-panel,
.mobile-menu-backdrop,
.mobile-header-btn,
.mobile-head-nav { display: none; }

@media (max-width: 700px) {
  .landing-page { padding-bottom: 18px; }
  html.mobile-menu-open,
  body.mobile-menu-open { overflow: hidden; }
  .primary-nav { display: none; }

  /* Mobil header: hamburgare, logga, sociala genvägar och sök i samma rad */
  .banner-inner {
    min-height: 64px;
    padding: 7px 0;
    justify-content: flex-start;
    align-items: center;
    gap: 4px;
  }
  .mobile-header-btn {
    position: static;
    z-index: 2;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    color: #f3efe4;
    text-decoration: none;
    cursor: pointer;
    transform: none;
  }
  .mobile-header-btn:hover,
  .mobile-header-btn:focus-visible { color: #fff; background: none; }
  .mobile-header-btn svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .banner .brand {
    flex: 0 1 auto;
    min-width: 0;
    justify-content: flex-start;
    gap: 5px;
    padding: 0;
  }
  .banner .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 15px;
    letter-spacing: -1.5px;
    border-width: 2px;
    border-radius: 3px;
    transform: rotate(-3deg);
    box-shadow:
      0 0 0 2px #240503,
      0 0 14px rgba(240, 68, 53, 0.55),
      0 4px 9px rgba(0, 0, 0, 0.6),
      inset 0 0 0 2px rgba(255, 255, 255, 0.1),
      inset 0 -5px 9px rgba(0, 0, 0, 0.45);
  }
  .banner .brand-name {
    font-size: clamp(12px, 4vw, 17px);
    line-height: 1;
    letter-spacing: 0.4px;
    text-shadow: 1px 1px 0 #000, 2px 2px 0 rgba(0, 0, 0, 0.55);
  }
  .mobile-head-nav {
    display: flex;
    align-items: center;
    gap: 1px;
    margin-left: auto;
    flex: 0 0 auto;
  }
  .mobile-head-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 39px;
    min-height: 44px;
    padding: 2px 0;
    color: #d3cdc1;
    font-family: var(--pixel);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    text-shadow: 0 1px 0 #000;
  }
  .mobile-head-link:hover,
  .mobile-head-link:focus-visible { color: #fff; }
  .mobile-head-link.is-active { color: #fff; }
  .mobile-head-label { position: relative; }
  .mobile-head-link.is-active .mobile-head-label::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -3px;
    height: 2px;
    background: var(--red-bright);
    box-shadow: 0 0 7px var(--red-bright);
  }
  .mobile-head-icon { position: relative; display: inline-flex; }
  .mobile-head-link svg {
    display: block;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
  }
  .mobile-head-icon .quickbar-badge {
    top: -5px;
    right: -7px;
    min-width: 13px;
    height: 13px;
    padding: 0 2px;
    border-color: #280b07;
    font-family: var(--font);
    font-size: 7px;
    box-shadow: 0 0 0 2px rgba(16, 16, 18, 0.9), 0 0 7px rgba(240, 68, 53, 0.5);
  }
  .mobile-header-search { margin-left: 2px; }

  /* Den gamla snabblisten ersätts av genvägarna i headern på mobilen */
  .quickbar-wrap { display: none; }

  .mobile-dock {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: calc(6px + env(safe-area-inset-bottom));
    z-index: 60;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    align-items: stretch;
    min-height: 50px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 15px;
    background:
      linear-gradient(180deg, rgba(52, 51, 54, 0.97), rgba(13, 13, 15, 0.99));
    box-shadow:
      0 16px 38px rgba(0, 0, 0, 0.72),
      0 2px 0 rgba(0, 0, 0, 0.6),
      inset 0 1px 0 rgba(255, 255, 255, 0.17);
    backdrop-filter: blur(16px) saturate(1.2);
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
  }
  .mobile-dock::before {
    content: "";
    position: absolute;
    left: 20%;
    right: 20%;
    top: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(240, 68, 53, 0.9), transparent);
    pointer-events: none;
  }
  .mobile-dock-primary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    min-width: 0;
  }
  .mobile-dock-link {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    padding: 2px 1px;
    border-radius: 12px;
    color: #a8a198;
    font-family: var(--pixel);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.2px;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 0 #000;
    text-transform: uppercase;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
  }
  .mobile-dock-link:hover,
  .mobile-dock-link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.055);
  }
  .mobile-dock-link:active { transform: scale(0.96); }
  .mobile-dock-link.is-active {
    color: #fff;
    background: linear-gradient(180deg, rgba(240, 68, 53, 0.18), rgba(240, 68, 53, 0.045));
  }
  .mobile-dock-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 21px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.045);
    color: #d6d0c5;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  }
  .mobile-dock-icon svg {
    display: block;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
  }
  .mobile-dock-link.is-active .mobile-dock-icon {
    border-color: rgba(255, 255, 255, 0.22);
    background: linear-gradient(180deg, #f04435, #991b11);
    color: #fff;
    box-shadow:
      0 5px 14px rgba(240, 68, 53, 0.32),
      inset 0 1px 0 rgba(255, 255, 255, 0.34);
  }
  .mobile-dock-icon .quickbar-badge {
    top: -5px;
    right: -7px;
    min-width: 13px;
    height: 13px;
    padding: 0 2px;
    border-color: #280b07;
    font-family: var(--font);
    font-size: 7px;
    box-shadow: 0 0 0 2px rgba(16, 16, 18, 0.92), 0 0 8px rgba(240, 68, 53, 0.55);
  }
  .mobile-dock-link.is-active .quickbar-badge {
    border-color: #4c3300;
    background: linear-gradient(180deg, #ffe08a, #e0a51e);
    color: #231600;
    box-shadow: 0 0 0 2px rgba(120, 20, 12, 0.72), 0 0 10px rgba(255, 206, 79, 0.4);
  }
  .mobile-dock-label { white-space: nowrap; }
  .mobile-dock-menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-height: 44px;
    margin-left: 2px;
    padding: 2px 1px;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 12px 12px 0;
    background: transparent;
    color: #c8c1b4;
    font-family: var(--pixel);
    font-size: 7px;
    font-weight: 700;
    letter-spacing: 0.4px;
    line-height: 1;
    text-shadow: 0 1px 0 #000;
    text-transform: uppercase;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease;
  }
  .mobile-dock-menu-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 21px;
    border: 1px solid rgba(255, 206, 79, 0.18);
    border-radius: 7px;
    background: rgba(255, 206, 79, 0.06);
    color: var(--yellow);
    transition: background 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
  }
  .mobile-dock-menu svg {
    display: block;
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }
  .mobile-dock-menu:hover { color: #fff; background: rgba(255, 255, 255, 0.045); }
  .mobile-dock-menu:hover .mobile-dock-menu-icon { border-color: rgba(255, 206, 79, 0.4); background: rgba(255, 206, 79, 0.12); }
  .mobile-dock-menu.is-active { color: var(--yellow); }
  .mobile-dock-menu.is-active .mobile-dock-menu-icon {
    border-color: rgba(255, 206, 79, 0.5);
    background: rgba(255, 206, 79, 0.13);
    box-shadow: 0 0 12px rgba(255, 206, 79, 0.14);
  }
  .mobile-dock-menu.is-open {
    color: #fff;
    background: linear-gradient(180deg, rgba(240, 68, 53, 0.18), rgba(240, 68, 53, 0.04));
  }
  .mobile-dock-menu.is-open .mobile-dock-menu-icon {
    border-color: rgba(255, 255, 255, 0.22);
    background: linear-gradient(180deg, #f04435, #991b11);
    color: #fff;
    box-shadow: 0 5px 14px rgba(240, 68, 53, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  }

  .mobile-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 58;
    background:
      radial-gradient(ellipse at 50% 100%, rgba(207, 42, 30, 0.14), transparent 55%),
      rgba(4, 4, 5, 0.72);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, visibility 0.24s;
  }
  .mobile-menu-backdrop.is-open { opacity: 1; visibility: visible; }
  .mobile-menu-panel {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    z-index: 59;
    width: min(322px, 86vw);
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-bottom: env(safe-area-inset-bottom);
    overflow: hidden;
    border: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0 18px 18px 0;
    background:
      radial-gradient(ellipse at 0 0, rgba(240, 68, 53, 0.13), transparent 46%),
      linear-gradient(180deg, #242120 0%, #151414 46%, #0d0d0e 100%);
    box-shadow:
      18px 0 48px rgba(0, 0, 0, 0.74),
      inset -1px 0 0 rgba(255, 255, 255, 0.06);
    visibility: hidden;
    transform: translateX(-104%);
    transition: transform 0.3s cubic-bezier(0.22, 0.75, 0.2, 1), visibility 0.3s;
  }
  .mobile-menu-panel.is-open { visibility: visible; transform: translateX(0); }
  .mobile-menu-scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2px 0 4px;
    scrollbar-width: thin;
    scrollbar-color: #4a463f transparent;
  }
  .mobile-menu-scroll::-webkit-scrollbar { width: 6px; }
  .mobile-menu-scroll::-webkit-scrollbar-thumb { background: #4a463f; border-radius: 999px; }
  .mobile-menu-head {
    position: relative;
    flex: 0 0 auto;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 13px 14px 10px;
    background: linear-gradient(180deg, rgba(34, 31, 30, 0.99) 0%, rgba(34, 31, 30, 0.94) 72%, rgba(34, 31, 30, 0) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  .mobile-menu-heading { display: flex; flex-direction: column; gap: 2px; }
  .mobile-menu-eyebrow {
    color: var(--red-bright);
    font-family: var(--pixel);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 2.2px;
    line-height: 1;
    text-transform: uppercase;
  }
  .mobile-menu-title {
    color: #f6f1e6;
    font-family: var(--pixel);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 1.6px;
    line-height: 1.1;
    text-shadow: 0 2px 0 #000;
    text-transform: uppercase;
  }
  .mobile-menu-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    color: #d8d2c7;
    cursor: pointer;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  }
  .mobile-menu-close svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.9;
  }
  .mobile-menu-close:hover,
  .mobile-menu-close:focus-visible {
    border-color: rgba(255, 255, 255, 0.22);
    background: rgba(240, 68, 53, 0.9);
    color: #fff;
  }
  .mobile-menu-profile {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 10px;
    margin: 0 12px 14px;
    padding: 6px 2px 12px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    background: none;
    box-shadow: none;
  }
  .mobile-menu-profile .avatar {
    width: 40px;
    height: 40px;
    border-color: rgba(255, 255, 255, 0.16);
    border-radius: 11px;
    box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.24), 0 2px 6px rgba(0, 0, 0, 0.4);
  }
  .mobile-menu-profile-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
  }
  .mobile-menu-profile-name {
    overflow: hidden;
    color: #f4efe5;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .mobile-menu-profile-name .name-badges { display: inline-flex; margin-left: 3px; vertical-align: -2px; }
  .mobile-menu-profile-meta {
    overflow: hidden;
    color: #928b80;
    font-family: var(--pixel);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.7px;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
  }
  .mobile-menu-group { padding: 0 12px 16px; }
  .mobile-menu-group-title {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0 2px 8px;
    color: #928b80;
    font-family: var(--pixel);
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 1.5px;
    line-height: 1;
    text-transform: uppercase;
  }
  .mobile-menu-group-title::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
  }  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
  }
  .mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    padding: 7px 2px;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.065);
    border-radius: 0;
    background: none;
    color: #d7d1c6;
    font-family: var(--pixel);
    font-size: 9.5px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.16s ease, background 0.16s ease, padding-left 0.16s ease, box-shadow 0.16s ease;
  }
  .mobile-menu-link:last-child { border-bottom: 0; }
  .mobile-menu-link:hover,
  .mobile-menu-link:focus-visible {
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    padding-left: 7px;
  }
  .mobile-menu-link.is-active {
    background: linear-gradient(90deg, rgba(240, 68, 53, 0.2), rgba(240, 68, 53, 0) 82%);
    box-shadow: inset 2px 0 0 var(--red-bright);
    color: #fff;
    padding-left: 8px;
    text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
  }

  .mobile-menu-icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #bcb4a7;
    transition: color 0.16s ease;
  }
  .mobile-menu-icon svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
  }
  .mobile-menu-link:hover .mobile-menu-icon,
  .mobile-menu-link:focus-visible .mobile-menu-icon,
  .mobile-menu-link.is-active .mobile-menu-icon { color: #fff; }
  .mobile-menu-admin { color: var(--yellow); }
  .mobile-menu-admin .mobile-menu-icon { color: var(--yellow); }
  .mobile-menu-admin.is-active {
    background: linear-gradient(90deg, rgba(255, 206, 79, 0.14), rgba(255, 206, 79, 0) 82%);
    box-shadow: inset 2px 0 0 var(--yellow);
    color: var(--yellow);
  }
  .mobile-menu-admin.is-active .mobile-menu-icon { color: var(--yellow); }
  .mobile-menu-logout-form { margin: 0 12px 12px; }
  .mobile-menu-logout-link {
    width: 100%;
    text-align: left;
    appearance: none;
    cursor: pointer;
  }
  .mobile-menu-logout-link .mobile-menu-icon { color: #ff9a8e; }
  .mobile-menu-logout-link:hover .mobile-menu-icon,
  .mobile-menu-logout-link:focus-visible .mobile-menu-icon { color: #fff; }
}

@media (max-width: 380px) {
  .banner-inner { gap: 3px; }
  .mobile-header-btn { width: 28px; }
  .banner .brand { gap: 4px; }
  .banner .brand-mark { width: 26px; height: 26px; font-size: 14px; }
  .banner .brand-name { font-size: 13px; letter-spacing: 0.3px; }
  .mobile-head-link { width: 36px; font-size: 7.5px; }
  .mobile-head-link svg { width: 19px; height: 19px; }
}

@media (max-width: 360px) {
  .mobile-dock { left: 6px; right: 6px; }
  .mobile-dock-link { gap: 2px; font-size: 7px; }
  .mobile-dock-icon { width: 24px; height: 20px; }
  .mobile-dock-menu-icon { width: 24px; height: 20px; }
  .mobile-menu-link { gap: 8px; padding: 6px 2px; font-size: 8.5px; }
  .mobile-menu-icon { width: 20px; height: 20px; }

  /* Extra tight header on narrow phones */
  .banner-inner { gap: 3px; padding: 6px 0; }
  .mobile-header-btn { width: 28px; }
  .mobile-header-btn svg { width: 20px; height: 20px; }
  .banner .brand { gap: 4px; }
  .banner .brand-mark { width: 25px; height: 25px; font-size: 14px; }
  .banner .brand-name { font-size: 11px; letter-spacing: 0.2px; }
  .mobile-head-nav { gap: 0; }
  .mobile-head-link { width: 34px; font-size: 6.5px; }
  .mobile-head-link svg { width: 19px; height: 19px; }
}

@media (max-width: 340px) {
  .banner .brand-name { font-size: 10.5px; }
  .mobile-head-link { width: 32px; font-size: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .live-ticker-item { transition: none; }
}

@media print {
  .banner, .quickbar-wrap, .primary-nav, .quicklinks, .ticker, .side-col, .site-footer, .top-strip, .mobile-dock, .mobile-menu-panel, .mobile-menu-backdrop, .profile-actions, .window-title { display: none !important; }
  body { background: #fff; }
  .shell { width: 100%; }
}

/* ---------------- VIP i inställningarna ---------------- */

.vip-page { display: flex; flex-direction: column; }
.vip-status {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px;
  border: 2px solid #111;
  background: linear-gradient(135deg, #221d18, #2f2620 58%, #3a2a1d);
  color: #efe7d9;
  box-shadow: inset 0 0 0 1px #6b5a44;
}
.vip-status.is-active { border-color: #b8860b; box-shadow: inset 0 0 0 1px #7a5100, 0 0 14px rgba(246, 201, 68, 0.18); }
.vip-status-mark {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid #7a5100;
  background: linear-gradient(180deg, #f6c944, #c99516);
  color: #3a2600;
  font-size: 18px;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.vip-status-main { flex: 1; min-width: 0; }
.vip-status-title { font-family: var(--pixel); font-size: 13px; letter-spacing: 0.6px; text-transform: uppercase; color: #fff; }
.vip-status-meta { margin-top: 3px; font-size: 10px; line-height: 1.55; color: #cfc4b3; }
.vip-status-meta strong { color: var(--yellow); }
.vip-status-warn { margin-top: 5px; padding: 3px 6px; border: 1px solid #a8641e; background: #3d2611; color: #ffd9a8; font-size: 9px; }
.vip-status-actions { display: flex; flex-direction: column; gap: 5px; flex: 0 0 auto; }
.vip-status-actions form { margin: 0; }
.vip-status-actions .btn { white-space: nowrap; }

.vip-note { margin-top: 9px; padding: 8px 9px; border: 1px solid #c3b48d; background: #f7f1df; color: #5d564c; font-size: 10px; line-height: 1.55; }
.vip-note b { color: #3c352b; }
.vip-note-demo { border-color: #b08e2c; background: #fbf3d8; }

.vip-plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 4px; }
.vip-plan { display: flex; flex-direction: column; gap: 6px; padding: 9px; border: 1px solid #b8b2a7; background: #ebe7de; }
.vip-plan.is-featured { border-color: #b8860b; background: linear-gradient(180deg, #fff7df, #f0e7cf); box-shadow: inset 0 0 0 1px #e0c37a; }
.vip-plan-head { display: flex; align-items: center; justify-content: space-between; gap: 5px; }
.vip-plan-name { font-family: var(--pixel); font-size: 12px; color: #2d2923; }
.vip-plan-tag { flex: 0 0 auto; padding: 1px 4px; border: 1px solid #000; background: #35312a; color: var(--yellow); font-family: var(--pixel); font-size: 7px; letter-spacing: 0.5px; text-transform: uppercase; }
.vip-plan-price { display: flex; align-items: baseline; gap: 5px; }
.vip-plan-amount { font-family: var(--pixel); font-size: 18px; color: #1f1c17; }
.vip-plan-per { font-size: 9px; color: #7d7467; }
.vip-plan-desc { margin: 0; font-size: 9px; line-height: 1.5; color: #6a6459; }
.vip-plan-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; font-size: 9px; color: #5b554c; }
.vip-plan-list li::before { content: "★"; margin-right: 4px; color: #b8860b; font-size: 8px; }
.vip-plan .btn { margin-top: auto; }
.vip-plan .btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.vip-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.vip-col { padding: 9px; border: 1px solid #c2bcb1; background: #efebe2; }
.vip-col-title { margin: 0 0 5px; font-family: var(--pixel); font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: #2f2b24; }
.vip-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 10px; line-height: 1.5; color: #4f4a41; }
.vip-check-list li { display: flex; gap: 6px; }
.vip-check-list li::before { content: "✓"; flex: 0 0 auto; color: #2f7d57; font-weight: 700; }
.vip-check-list.is-muted li::before { content: "·"; color: #8a8175; }

.vip-orders { border: 1px solid #b8b2a7; background: #f4f1ea; }
.vip-order-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 74px 84px; gap: 6px; align-items: center; padding: 5px 8px; border-top: 1px solid #ded9d0; font-size: 10px; color: #464139; }
.vip-order-row:first-child { border-top: none; }
.vip-order-row.is-head { background: #35312a; color: var(--yellow); font-family: var(--pixel); font-size: 8px; letter-spacing: 0.5px; text-transform: uppercase; }
.vip-order-plan { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vip-order-status { justify-self: start; padding: 1px 5px; border: 1px solid currentColor; font-family: var(--pixel); font-size: 7px; letter-spacing: 0.4px; text-transform: uppercase; }
.vip-order-status.is-paid { color: #1c6a46; background: #d9f3e3; }
.vip-order-status.is-pending { color: #7d5c00; background: #fff0b8; }
.vip-order-status.is-failed { color: #8e2019; background: #ffe0dc; }
.vip-order-status.is-cancelled,
.vip-order-status.is-refunded { color: #5d564c; background: #e5e1d8; }
.vip-empty { padding: 10px; border: 1px dashed #b9a67a; background: #fff7df; color: #6a6459; font-size: 10px; }

@media (max-width: 860px) {
  .vip-plan-grid { grid-template-columns: 1fr; }
  .vip-cols { grid-template-columns: 1fr; }
  .vip-status { flex-wrap: wrap; }
  .vip-status-actions { flex-direction: row; width: 100%; }
  .vip-order-row { grid-template-columns: 70px minmax(0, 1fr) 66px; }
  .vip-order-row.is-head span:nth-child(3) { display: none; }
  .vip-order-amount { display: none; }
}

/* ---------------- Om Natten – resan ---------------- */

.about-road { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }
.about-step { display: flex; gap: 10px; padding: 8px 0; border-top: 1px dotted #b7b1a6; }
.about-step:first-child { border-top: 0; }
.about-step-date {
  flex: 0 0 108px;
  font-family: var(--pixel);
  font-size: 9px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #5b554b;
  padding-top: 1px;
}
.about-step-body { min-width: 0; }
.about-step-body b { display: block; font-family: var(--pixel); font-size: 11px; color: #2f2b24; }
.about-step-body span { display: block; margin-top: 2px; font-size: 11px; line-height: 1.6; color: #4f4a41; }
.about-step.is-today .about-step-date { color: #8e2019; }
.about-step.is-today .about-step-body b { color: #8e2019; }

@media (max-width: 600px) {
  .about-step { flex-direction: column; gap: 2px; }
  .about-step-date { flex: 0 0 auto; }
}

/* ---------------- Galleri ---------------- */

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; }
.gallery-item { position: relative; }
.gallery-thumb { display: block; width: 100%; padding: 0; border: 0; background: none; text-align: left; cursor: zoom-in; }
.gallery-frame { display: block; border: 2px solid #101010; background: #0d0d0d; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); overflow: hidden; }
.gallery-frame, .gallery-frame .gallery-media { aspect-ratio: 4 / 3; }
.gallery-media { display: block; width: 100%; height: 100%; }
.gallery-frame .gallery-media > * { display: block; width: 100%; height: 100%; object-fit: cover; }
.gallery-frame .gallery-media .pixel-art { image-rendering: pixelated; }
.gallery-thumb:hover .gallery-frame { border-color: #8e1811; }
.gallery-caption { display: block; margin-top: 4px; font-family: var(--pixel); font-size: 10px; letter-spacing: 0.3px; color: #2f2b24; }
.gallery-caption span { display: block; font-family: var(--font); font-size: 9px; color: #7b7468; }
.gallery-remove { margin-top: 4px; }
.gallery-remove .btn { min-height: 19px; padding: 1px 6px; font-size: 9px; }

.gallery-pick-row { display: flex; flex-wrap: wrap; gap: 6px; }
.gallery-preview { margin-top: 7px; border: 1px solid #a8a297; background: #dcd7cd; padding: 4px; }
.gallery-preview img { display: block; width: 100%; max-height: 190px; object-fit: contain; background: #0d0d0d; }

.lightbox { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lightbox[hidden], .lightbox .btn[hidden], .lightbox-desc[hidden], .flash[hidden], .gallery-preview[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(6, 6, 8, 0.82); }
.lightbox-card { position: relative; width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border: 1px solid #0d0d0d; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.18), 0 22px 50px rgba(0, 0, 0, 0.6); }
.lightbox-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 11px; background: linear-gradient(180deg, var(--red-bright), var(--red-dark) 55%, #6e100b); border-bottom: 1px solid #000; box-shadow: inset 0 1px 0 #f69288; }
.lightbox-title { font-family: var(--pixel); font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #f7f3e9; text-shadow: 1px 1px 0 #000; }
.lightbox-meta { margin-top: 2px; font-size: 9px; color: #ffd9d4; }
.lightbox-close { flex: 0 0 auto; width: 24px; height: 24px; padding: 0; border: 1px solid #2b0705; background: linear-gradient(180deg, #f2efe8, #d6d1c7); color: #6e100b; font-size: 15px; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: #fff; }
.lightbox-stage { display: flex; align-items: center; justify-content: center; padding: 11px; background: #121212; }
.lightbox-stage > * { display: block; width: 100%; max-height: min(62vh, 420px); }
.lightbox-stage img { width: 100%; max-height: min(62vh, 420px); object-fit: contain; }
.lightbox-stage svg { width: 100%; height: auto; max-height: min(62vh, 420px); object-fit: contain; image-rendering: pixelated; }
.lightbox-desc { margin: 0; padding: 10px 12px 0; font-size: 11px; line-height: 1.6; color: #4f4a41; }
.lightbox-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 11px 12px 12px; }
.lightbox-actions .btn { min-height: 24px; font-size: 10px; }
body.lightbox-open { overflow: hidden; }

@media (max-width: 700px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .lightbox-card { width: 100%; }
  .lightbox-stage img, .lightbox-stage > * { max-height: 54vh; }
}

/* ---------------- Presentation med BB-koder ---------------- */

.bb-content { font-size: 12px; line-height: 1.7; color: #3e3a33; }
.bb-content strong { color: #262218; }
.bb-content em { color: #3e3a33; }
.bb-content .bb-big { font-size: 15px; font-weight: 700; color: #262218; }
.bb-content .bb-center { text-align: center; }
.bb-content .bb-left { text-align: left; }
.bb-content .bb-right { text-align: right; }
.bb-content .bb-h { font-family: var(--pixel); font-weight: 700; line-height: 1.2; color: #262218; }
.bb-content .bb-h1 { font-size: 21px; }
.bb-content .bb-h2 { font-size: 18px; }
.bb-content .bb-h3 { font-size: 16px; }
.bb-content .bb-h4 { font-size: 14px; }
.bb-content .bb-h5 { font-size: 13px; }
.bb-content .bb-hr, .bb-content hr.bb-hr { border: 0; border-top: 1px dashed #b3ada1; margin: 10px 0; }

.bb-help { margin-top: 14px; border: 1px solid #a8a297; border-top-color: #fff; background: #e2ded5; padding: 10px 12px 12px; }
.bb-help-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 9px; }
.bb-help-title { font-family: var(--pixel); font-size: 10px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: #2f2b24; }
.bb-help-note { font-size: 9px; color: #6b665e; }
.bb-help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 11px 16px; }
.bb-help-group > b { display: block; font-family: var(--pixel); font-size: 9px; font-weight: 700; letter-spacing: 0.7px; text-transform: uppercase; color: #8e1811; margin-bottom: 5px; }
.bb-help-list { display: flex; flex-wrap: wrap; gap: 4px; }
.bb-code { padding: 2px 6px; border: 1px solid #a8a297; background: #f4f1ea; color: #3f3a33; font-family: var(--pixel); font-size: 9px; line-height: 1.5; text-align: left; cursor: pointer; }
.bb-code:hover { background: #fff; border-color: #7d776c; color: #000; }
.bb-code:active { transform: translateY(1px); }
.bb-help-foot { margin: 11px 0 0; padding-top: 9px; border-top: 1px dotted #b7b1a6; font-size: 10px; line-height: 1.6; color: #5b554b; }
.bb-help-foot code { font-family: var(--pixel); font-size: 9px; background: #f4f1ea; border: 1px solid #c2bcb1; padding: 0 3px; color: #2f2b24; }

@media (max-width: 700px) {
  .bb-help-grid { grid-template-columns: 1fr; }
  .bb-content .bb-h1 { font-size: 18px; }
  .bb-content .bb-h2 { font-size: 16px; }
  .bb-content .bb-h3 { font-size: 15px; }
}

@media (max-width: 700px) {
  .mail-page .mail-nav { gap: 3px; }
  .mail-page .mail-nav a { min-height: 21px; padding: 3px 5px; font-size: 7px; letter-spacing: 0.1px; }
  .mail-page .mail-row-actions .mail-del { width: 18px; height: 18px; margin-left: 3px; }
  .mail-page .mail-row-actions .mail-del svg { width: 10px; height: 10px; }
  .mail-page > aside .btn-block { display: inline-flex; width: auto; min-height: 25px; padding: 4px 8px; font-size: 9px; }
}

.ticker-label-icon { display: none; }


@media screen {
  body .live-ticker {
    position: relative; isolation: isolate; height: 28px;
    padding: 0;
    border-top: 1px solid #da3028; border-bottom: 1px solid #a71d17;
    background: #090909;
    box-shadow: inset 0 1px 3px #6c100d, inset 0 -1px 3px #6c100d, 0 1px 6px #8a171766;
  }
  body .live-ticker::after {
    content: ""; position: absolute; z-index: -1;
    right: max(24px, calc((100vw - 1600px) / 2)); top: 1px; bottom: 1px; width: 240px;
    background: url('/images/live-mess-right.webp') no-repeat right center / auto 100%;
    mask-image: linear-gradient(to right, transparent, #000 14%);
    pointer-events: none;
  }
  body .live-ticker .ticker-label {
    position: relative; flex: 0 0 auto; gap: 6px; margin: 2px 0; padding: 0 10px 0 6px;
    border: 1px solid #c7362b; border-radius: 5px;
    background: linear-gradient(110deg, #62150f, #260706);
    box-shadow: inset 0 0 7px #ab1b1266, 0 0 5px #b31c1577;
    color: #fff; font: 700 12px/1 Georgia, serif; letter-spacing: .1px;
    text-shadow: 0 0 3px #e28a7c;
  }
  body .live-ticker .ticker-label:hover { background: #64140f; }
  body .live-ticker .ticker-label::after {
    content: "❯❯❯"; position: absolute; left: calc(100% + 4px);
    color: #bb3026; font: 700 19px/1 Arial, sans-serif; letter-spacing: -3px;
    text-shadow: 0 0 4px #9b1717; pointer-events: none;
  }
  body .live-ticker .ticker-label-full { display: inline; }
  body .live-ticker .ticker-label-short { display: none; }
  body .live-ticker .ticker-label-icon {
    display: block; width: 17px; height: 17px; fill: none; stroke: #f3b5aa;
    stroke-width: 1.6; stroke-linejoin: round;
  }
  body .live-ticker .ticker-viewport { padding: 0 245px 0 40px; gap: 8px; }
  body .live-ticker .live-ticker-stage { height: 26px; }
  body .live-ticker .live-ticker-empty { gap: 9px; color: #d8d8d8; font-size: 11px; }
  body .live-ticker .live-ticker-empty::before {
    content: "i"; display: inline-flex; flex: 0 0 14px; height: 14px;
    align-items: center; justify-content: center; border: 1px solid #aaa;
    border-radius: 50%; color: #ccc; font: 700 11px/1 Georgia, serif;
  }
  body .live-ticker .live-ticker-empty a {
    padding-left: 9px; border-left: 1px solid #777; color: #ed4036; font-weight: 700;
    text-decoration: underline; text-underline-offset: 2px;
  }
}

@media (min-width: 1024px) {
  body .live-ticker { position: sticky; }
}

@media (max-width: 1023px) {
  body .live-ticker { height: 24px; }
  body .live-ticker::after { right: 0; width: 65px; opacity: .25; }
  body .live-ticker .ticker-label { gap: 4px; padding: 0 5px; font-size: 10px; }
  body .live-ticker .ticker-label-full { display: none; }
  body .live-ticker .ticker-label-short { display: inline; }
  body .live-ticker .ticker-label-icon { width: 14px; height: 14px; }
  body .live-ticker .ticker-label::after { left: calc(100% + 2px); font-size: 14px; letter-spacing: -3px; }
  body .live-ticker .ticker-viewport { padding: 0 4px 0 24px; gap: 4px; }
  body .live-ticker .live-ticker-stage { height: 22px; }
  body .live-ticker .live-ticker-empty { gap: 4px; font-size: 9px; }
  body .live-ticker .live-ticker-empty::before { flex-basis: 11px; height: 11px; font-size: 9px; }
  body .live-ticker .live-ticker-empty a { padding-left: 4px; }
  body .live-ticker .live-ticker-item { transform: none; transition: opacity .45s ease; }
  body .live-ticker .live-ticker-track {
    display: inline-flex; align-items: center; flex: 0 0 auto; width: max-content;
    white-space: nowrap;
  }
  body .live-ticker .live-ticker-track .live-ticker-text { flex: 0 0 auto; overflow: visible; }
  body .live-ticker .is-active .live-ticker-track {
    animation: live-ticker-mobile-scroll 10s linear infinite;
  }
  body .live-ticker .live-ticker-item:not(.is-active) .live-ticker-track {
    animation: live-ticker-mobile-scroll 10s linear infinite;
    animation-play-state: paused;
  }
}

@keyframes live-ticker-mobile-scroll {
  from { transform: translateX(var(--live-ticker-width, 100vw)); }
  to { transform: translateX(-100%); }
}

@media (max-width: 1023px) and (prefers-reduced-motion: reduce) {
  body .live-ticker .live-ticker-item { transition: none; }
  body .live-ticker .live-ticker-track,
  body .live-ticker .is-active .live-ticker-track,
  body .live-ticker .live-ticker-item:not(.is-active) .live-ticker-track {
    animation: none; width: 100%; min-width: 0;
  }
  body .live-ticker .live-ticker-track .live-ticker-text {
    flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis;
  }
}

/* ---------------- Etapp 3: mobil tryckyta ---------------- */

/* Mobilen behåller den kompakta knappstilen. Den interaktiva ytan utökas
   osynligt bara där den inte kan överlappa ett annat klickbart element.
   Profilflikarna behåller sin kompakta textstil enligt designstandarden. */
@media (max-width: 700px) {
  /* Adminpanelens kontaktkort: kompakta knappar med något större träffyta. */
  .adminer-card-main { padding-right: 0; }
  .adminer-card-name { padding-right: 46px; }
  .adminer-card-actions { gap: 5px; margin-top: 7px; }
  .adminer-card-actions .btn {
    position: relative;
    flex: 0 0 auto;
    min-height: 27px;
    padding: 3px 7px;
    font-size: 9px;
    white-space: nowrap;
  }
  .adminer-card-actions .btn::after {
    content: "";
    position: absolute;
    inset: -6px 0;
  }

  /* Adminer-sidan: kompakta knappar även i mobilen. */
  .adminer-page .help-shortcuts { gap: 4px; }
  .adminer-page .help-shortcuts:not(.profile-tabs) .help-shortcut {
    position: relative;
    gap: 4px;
    min-height: 24px;
    padding: 3px 7px;
    font-size: 8px;
    letter-spacing: 0.2px;
  }
  .adminer-page .help-shortcuts:not(.profile-tabs) .help-shortcut::after {
    content: "";
    position: absolute;
    inset: -4px 0;
  }
  .adminer-page .help-shortcut-icon svg { width: 11px; height: 11px; }
  .adminer-page .adminer-summary { gap: 4px; }
  .adminer-page .adminer-summary-item { gap: 4px; padding: 3px 5px; }
  .adminer-page .adminer-summary-item b { line-height: 1.1; }
  .adminer-page .adminer-summary-item small { line-height: 1.1; margin-top: 0; }
  .adminer-page .adminer-summary-icon { width: 18px; height: 18px; font-size: 9px; }
  .adminer-page .adminer-card-actions { gap: 4px; margin-top: 5px; }
  .adminer-page .adminer-card-actions .btn {
    min-height: 21px;
    padding: 1px 5px;
    font-size: 8px;
    letter-spacing: 0.2px;
  }
  .adminer-page .adminer-card-actions .btn::after { inset: -5px -2px; }
  .adminer-page .adminer-contact .form-actions { gap: 4px; }
  .adminer-page .adminer-contact .btn {
    min-height: 21px;
    padding: 1px 6px;
    font-size: 8px;
  }

  /* Navigeringschips i Hjälp, Medlemmar, Inställningar och Snabbval. */
  .help-shortcuts:not(.profile-tabs) .help-shortcut { min-height: 28px; }
  .settings-shortcuts.is-collapsible.is-open > a.help-shortcut { min-height: 32px; padding: 6px 9px; }

  /* Mejl: flikar, radering och återställning. */
  .mail-page .mail-nav { gap: 4px; }
  .mail-page .mail-nav a { min-height: 26px; padding: 4px 7px; font-size: 8px; letter-spacing: 0.2px; }
  .mail-page .mail-row-actions .mail-del { position: relative; width: 28px; height: 28px; margin-left: 0; }
  .mail-page .mail-row-actions .mail-del svg { width: 13px; height: 13px; }
  .mail-page .mail-row-actions .mail-del::after { content: ""; position: absolute; inset: 0 0 0 -8px; }
  .mail-page .mail-table { table-layout: fixed; }
  .mail-page .mail-table th:first-child,
  .mail-page .mail-table td:first-child { width: 34%; }
  .mail-page .mail-table th:last-child,
  .mail-page .mail-table td:last-child { width: 48px; }
  .mail-page .mail-table td { padding: 3px 4px; }
  .mail-page .inline-form { display: inline-flex; align-items: center; min-height: 28px; }
  .mail-page .link-button { padding: 4px 6px; }

  /* Sidindelning. */
  .member-pagination .btn,
  .guestbook-pagination .btn { min-height: 26px; padding: 3px 8px; font-size: 9px; }

  /* FAQ-rader, genvägar och bildrutan. */
  .faq-item summary { padding: 5px 0; }
  .help-jump a { min-height: 26px; padding: 4px 8px; }
  .lightbox-close { width: 28px; height: 28px; }
  .gb-btn { min-height: 24px; padding: 3px 7px; }
}
