:root {
  --lw-bg: #0a0a0b;
  --lw-surface: rgba(22, 22, 26, 0.88);
  --lw-surface-2: #1a1a1f;
  --lw-line: rgba(255, 255, 255, 0.08);
  --lw-line-2: rgba(255, 255, 255, 0.14);
  --lw-text: #f4f1ec;
  --lw-text-2: #c8c2b8;
  --lw-muted: #8a847a;
  --lw-accent: #e81c5a;
  --lw-accent-soft: rgba(232, 28, 90, 0.16);
  --lw-accent-glow: rgba(232, 28, 90, 0.35);
  --lw-warn: #f0c14d;
  --lw-display: Syne, "Segoe UI", sans-serif;
  --lw-sans: Outfit, "Segoe UI", sans-serif;
  --lw-ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.lw-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--lw-sans);
  color: var(--lw-text);
  background: var(--lw-bg);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

.lw-ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 10% 0%, rgba(232, 28, 90, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 35% at 90% 10%, rgba(240, 193, 77, 0.06), transparent 50%),
    linear-gradient(180deg, #0c0b10 0%, #0a0a0b 45%, #09090c 100%);
}
.lw-orb,
.lw-grid {
  display: none;
}

.lw-top {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 10, 11, 0.94);
  border-bottom: 1px solid var(--lw-line);
}
.lw-top-inner {
  max-width: 1600px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.lw-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.lw-brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--lw-accent-soft);
  color: var(--lw-accent);
  border: 1px solid rgba(232, 28, 90, 0.28);
  flex-shrink: 0;
}
.lw-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  min-width: 0;
}
.lw-brand-text strong {
  font-family: var(--lw-display);
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: 0.06em;
}
.lw-brand-text em {
  font-style: normal;
  font-size: 0.72rem;
  color: var(--lw-muted);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lw-top-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.lw-search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  max-width: 280px;
  width: 32vw;
  padding: 0 12px;
  height: 40px;
  border-radius: 10px;
  background: var(--lw-surface-2);
  border: 1px solid var(--lw-line);
  transition: border-color 0.2s ease, background 0.2s ease;
}
.lw-search:focus-within {
  border-color: rgba(232, 28, 90, 0.45);
  background: #1e1e24;
}
.lw-search i { color: var(--lw-muted); font-size: 0.85rem; }
.lw-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--lw-text);
}
.lw-search input::placeholder { color: var(--lw-muted); }

.lw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  height: 44px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--lw-line-2);
  background: var(--lw-surface-2);
  color: var(--lw-text);
  font-weight: 650;
  font-size: 0.9rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.lw-btn:hover { background: #222228; border-color: rgba(255, 255, 255, 0.2); }
.lw-btn:focus-visible { outline: 2px solid var(--lw-accent); outline-offset: 2px; }
.lw-btn--accent {
  background: var(--lw-accent);
  border-color: transparent;
  color: #fff;
}
.lw-btn--accent:hover { background: #f02966; }
.lw-btn--discord {
  height: 44px;
  padding: 0 14px 0 8px;
  gap: 10px;
  border: 1px solid rgba(88, 101, 242, 0.45);
  background:
    linear-gradient(135deg, rgba(88, 101, 242, 0.95) 0%, rgba(71, 82, 196, 0.95) 55%, rgba(232, 28, 90, 0.55) 140%);
  color: #fff;
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.28);
}
.lw-btn--discord:hover {
  border-color: rgba(88, 101, 242, 0.7);
  background:
    linear-gradient(135deg, rgba(99, 112, 255, 0.98) 0%, rgba(71, 82, 196, 0.98) 55%, rgba(240, 41, 102, 0.65) 140%);
  color: #fff;
  box-shadow: 0 10px 26px rgba(88, 101, 242, 0.38);
}
.lw-discord-ico {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.14);
  font-size: 1rem;
  flex-shrink: 0;
}
.lw-discord-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.05;
  gap: 2px;
}
.lw-discord-text strong {
  font-size: 0.9rem;
  font-weight: 750;
  letter-spacing: 0.02em;
}
.lw-discord-text em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.82;
}
.lw-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 160px;
  height: 40px;
  padding: 0 10px 0 6px;
  border-radius: 10px;
  border: 1px solid var(--lw-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--lw-text-2);
  font-size: 0.84rem;
  font-weight: 600;
}
.lw-user-chip img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}
.lw-user-chip em {
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lw-btn[hidden],
#lwSaveBtn[hidden] {
  display: none !important;
}
.lw-btn[aria-pressed="true"],
.lw-menu.is-open > .lw-btn {
  background: var(--lw-accent-soft);
  border-color: rgba(232, 28, 90, 0.4);
  color: #ff8fb0;
}
.lw-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--lw-line);
  background: transparent;
  color: var(--lw-text-2);
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.lw-icon-btn:hover { background: rgba(255, 255, 255, 0.06); color: var(--lw-text); }

.lw-menu { position: relative; }
.lw-menu-drop {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 50;
  min-width: 240px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--lw-line-2);
  background: #15151b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  display: none;
  gap: 2px;
}
.lw-menu-drop.is-open {
  display: grid;
}
.lw-menu-drop[hidden] {
  display: none !important;
}
.lw-menu-sep {
  height: 1px;
  margin: 4px 6px;
  background: var(--lw-line);
}
.lw-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--lw-text);
  font-weight: 600;
  font-size: 0.9rem;
  text-align: left;
  transition: background 0.15s ease;
}
.lw-menu-item i {
  width: 1em;
  color: var(--lw-muted);
}
.lw-menu-item:hover { background: rgba(255, 255, 255, 0.06); }
.lw-menu-item--danger { color: #fecaca; }
.lw-menu-item--danger i { color: #f87171; }
.lw-menu-item--accent { color: #ff8fb0; }
.lw-menu-item--accent i { color: var(--lw-accent); }
.lw-menu-item[hidden] { display: none !important; }

.lw-main {
  position: relative;
  z-index: 1;
  max-width: 1600px;
  margin: 0 auto;
  padding: 28px 24px 80px;
}

.lw-hero {
  margin-bottom: 24px;
}
.lw-eyebrow {
  margin: 0 0 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lw-accent);
}
.lw-hero-title {
  margin: 0;
  font-family: var(--lw-display);
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.lw-hero-sub {
  margin: 12px 0 0;
  max-width: 34rem;
  color: var(--lw-text-2);
  font-size: 1.02rem;
  line-height: 1.55;
}
.lw-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--lw-text-2);
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.lw-meta i {
  color: var(--lw-accent);
  font-size: 0.9rem;
  opacity: 0.9;
}
.lw-meta-label {
  color: var(--lw-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.lw-meta time {
  color: var(--lw-text);
  font-variant-numeric: tabular-nums;
}

.lw-layout {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.lw-rail {
  position: sticky;
  top: 84px;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--lw-line);
  background: #141418;
  contain: layout paint;
  min-width: 0;
}
.lw-rail-label {
  margin: 0 0 10px;
  padding: 0 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lw-muted);
}
.lw-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.lw-nav-group {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.lw-tab {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--lw-text-2);
  font-weight: 650;
  font-size: 0.95rem;
  text-align: left;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.lw-tab > span {
  flex: 1;
  min-width: 0;
  line-height: 1.25;
}
.lw-tab > i:first-child { width: 1.1em; font-size: 0.9rem; opacity: 0.9; flex-shrink: 0; }
.lw-tab-count {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--lw-muted);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
  min-width: 1.4em;
  padding: 2px 7px;
  text-align: center;
  flex-shrink: 0;
}
.lw-tab-chevron {
  font-size: 0.68rem !important;
  opacity: 0.45;
  transition: transform 0.2s ease, opacity 0.2s ease;
  flex-shrink: 0;
}
.lw-nav-group.is-open .lw-tab-chevron {
  transform: rotate(180deg);
  opacity: 0.85;
}
.lw-tab.is-active .lw-tab-count {
  color: rgba(255, 255, 255, 0.85);
  background: rgba(255, 255, 255, 0.18);
}
.lw-tab:hover {
  color: var(--lw-text);
  background: rgba(255, 255, 255, 0.04);
}
.lw-tab.is-active {
  color: #fff;
  background: var(--lw-accent);
}
.lw-tab.is-active:hover {
  background: var(--lw-accent);
  color: #fff;
}
.lw-tab:focus-visible { outline: 2px solid var(--lw-accent); outline-offset: 2px; }

.lw-chapter-nav {
  display: none;
  flex-direction: column;
  gap: 2px;
  padding: 2px 0 6px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  margin-left: 18px;
}
.lw-nav-group.is-open .lw-chapter-nav {
  display: flex;
}
.lw-chapter-nav-empty {
  margin: 0;
  padding: 6px 10px;
  color: var(--lw-muted);
  font-size: 0.82rem;
}
.lw-chapter-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--lw-text-2);
  text-align: left;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.lw-chapter-link:hover {
  color: var(--lw-text);
  background: rgba(232, 28, 90, 0.08);
}
.lw-chapter-link.is-active {
  color: #ffb3c9;
  background: rgba(232, 28, 90, 0.14);
}
.lw-chapter-link-num {
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.lw-chapter-link-name {
  font-size: 0.78rem;
  color: var(--lw-muted);
  line-height: 1.35;
}
.lw-chapter-link.is-active .lw-chapter-link-name {
  color: rgba(255, 179, 201, 0.75);
}
.lw-chapter {
  scroll-margin-top: 88px;
}
.lw-chapter.is-active .lw-chapter-num {
  color: #ff6b9a;
}

.lw-panel {
  border: 1px solid var(--lw-line);
  border-radius: 18px;
  background: #141418;
  padding: 22px;
  min-height: 320px;
  width: 100%;
  contain: layout paint;
}
.lw-articles {
  display: grid;
  gap: 28px;
}
.lw-chapter {
  min-width: 0;
}
.lw-chapter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 4px 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.lw-chapter-title {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  font-family: var(--lw-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.35;
  text-transform: none;
  color: var(--lw-text);
}
.lw-chapter-num {
  color: var(--lw-accent);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.lw-chapter-name {
  color: rgba(244, 241, 236, 0.88);
  font-weight: 600;
}
.lw-chapter-empty {
  margin: 8px 4px 4px;
  color: var(--lw-muted);
  font-size: 0.88rem;
}
.lw-hint {
  margin: 0 0 12px;
  color: var(--lw-muted);
  font-size: 0.86rem;
  line-height: 1.45;
}
.lw-hint strong {
  color: #e6dfd4;
  font-weight: 600;
}
.lw-chapter-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}
.lw-chapter-articles {
  display: grid;
  gap: 0;
}
.lw-article {
  position: relative;
  padding: 14px 4px 18px;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  background: transparent;
  scroll-margin-top: 88px;
}
.lw-article:hover,
.lw-article:focus,
.lw-article:focus-within {
  background: transparent;
  outline: none;
  box-shadow: none;
  filter: none;
}
.lw-article:last-child {
  border-bottom-color: transparent;
}
.lw-article-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.lw-article-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.lw-article-id {
  flex-shrink: 0;
  min-width: 3.2rem;
  color: var(--lw-accent);
  font-size: 0.9rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.lw-article-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--lw-sans);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
  color: #f4f1ec;
}
.lw-article-tools {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  opacity: 0.35;
  transition: opacity 0.15s ease;
}
.lw-article:hover .lw-article-tools,
.lw-article:focus-within .lw-article-tools,
body.is-editing .lw-article-tools {
  opacity: 1;
}
.lw-tool,
.lw-article-tools .lw-mini,
.lw-chapter-tools .lw-mini {
  width: 32px;
  height: 32px;
  min-width: 32px;
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.lw-tool:hover,
.lw-article-tools .lw-mini:hover,
.lw-chapter-tools .lw-mini:hover {
  background: rgba(232, 28, 90, 0.12);
  color: #fff;
}
.lw-article-tools .lw-mini--danger:hover,
.lw-chapter-tools .lw-mini--danger:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
}
.lw-article-text {
  margin: 8px 0 0 3.2rem;
  color: #9a948a;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
}
.lw-article-penalty {
  margin: 10px 0 0 3.2rem;
  color: #c9b27a;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.45;
}
.lw-punishments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.lw-chip {
  display: inline-block;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(240, 193, 77, 0.08);
  border: 1px solid rgba(240, 193, 77, 0.16);
  color: #d8d0c2;
  font-size: 0.84rem;
  line-height: 1.35;
}
.lw-chip strong {
  color: #f0c14d;
  font-weight: 700;
}
.lw-article mark,
.lw-search-hit mark {
  background: var(--lw-accent-soft);
  color: #ffb3c9;
  padding: 0 2px;
  border-radius: 3px;
}
.lw-search-results {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}
.lw-search-results[hidden] {
  display: none !important;
}
.lw-search-list {
  display: grid;
  gap: 6px;
}
.lw-search-empty {
  margin: 0;
  padding: 18px 12px;
  text-align: center;
  color: var(--lw-muted);
  font-weight: 600;
}
.lw-search-hit {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) auto minmax(0, 1.6fr);
  gap: 10px 12px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--lw-line);
  background: rgba(255, 255, 255, 0.02);
  color: var(--lw-text);
  text-align: left;
  cursor: pointer;
}
.lw-search-hit:hover {
  border-color: rgba(232, 28, 90, 0.3);
  background: transparent;
}
.lw-search-hit:focus-visible {
  outline: 2px solid var(--lw-accent);
  outline-offset: 2px;
}
.lw-search-hit-section {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lw-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lw-search-hit-num {
  font-size: 0.8rem;
  font-weight: 800;
  color: #ff8fb0;
  white-space: nowrap;
}
.lw-search-hit-title {
  font-weight: 650;
  font-size: 0.95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lw-print-all[hidden] {
  display: none !important;
}

.lw-mini {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  border: 1px solid var(--lw-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--lw-text-2);
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  flex-shrink: 0;
}
.lw-mini:hover {
  background: rgba(255, 255, 255, 0.07);
  color: var(--lw-text);
  border-color: var(--lw-line-2);
}
.lw-mini--copy:hover {
  border-color: rgba(232, 28, 90, 0.35);
  color: #ff8fb0;
  background: var(--lw-accent-soft);
}
.lw-mini--danger:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.3);
}

.lw-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--lw-muted);
}
.lw-empty i {
  font-size: 1.8rem;
  margin-bottom: 10px;
  color: var(--lw-accent);
  opacity: 0.8;
}
.lw-empty p { margin: 0; font-weight: 600; }

.lw-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  z-index: 80;
  padding: 12px 18px;
  border-radius: 12px;
  background: #1c1c22;
  border: 1px solid var(--lw-line-2);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
  font-weight: 650;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s var(--lw-ease);
  pointer-events: none;
}
.lw-toast.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.lw-toast.is-ok { border-color: rgba(52, 211, 153, 0.35); color: #a7f3d0; }
.lw-toast.is-err { border-color: rgba(248, 113, 113, 0.35); color: #fecaca; }

.lw-dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: calc(100vw - 28px);
  width: 760px;
}
.lw-dialog::backdrop {
  background: rgba(5, 5, 7, 0.78);
}
.lw-dialog-card {
  margin: 0;
  border-radius: 18px;
  border: 1px solid var(--lw-line-2);
  background: #15151a;
  overflow: hidden;
}
.lw-dialog-head,
.lw-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--lw-line);
}
.lw-dialog-foot {
  border-bottom: 0;
  border-top: 1px solid var(--lw-line);
  justify-content: flex-end;
}
.lw-dialog-head h3 {
  margin: 0;
  font-family: var(--lw-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.lw-dialog-body {
  padding: 20px;
  display: grid;
  gap: 16px;
  max-height: min(70vh, 640px);
  overflow: auto;
}
.lw-field { display: grid; gap: 8px; }
.lw-field-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 14px;
}
.lw-field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lw-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.lw-field input,
.lw-field textarea,
.lw-field select {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--lw-line);
  background: #0f0f13;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s ease;
}
.lw-field input:focus,
.lw-field textarea:focus,
.lw-field select:focus {
  border-color: rgba(232, 28, 90, 0.45);
}
.lw-field textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.5;
}
.lw-icon-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.lw-icon-opt {
  height: 48px;
  border-radius: 10px;
  border: 1px solid var(--lw-line);
  background: #0f0f13;
  color: var(--lw-text-2);
  display: grid;
  place-items: center;
  font-size: 1.05rem;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.lw-icon-opt:hover {
  border-color: var(--lw-line-2);
  color: var(--lw-text);
}
.lw-icon-opt.is-active {
  border-color: rgba(232, 28, 90, 0.55);
  background: var(--lw-accent-soft);
  color: #ff8fb0;
}
.lw-punish-editor { display: grid; gap: 10px; }
.lw-punish-row {
  display: grid;
  grid-template-columns: 1fr 1.4fr auto;
  gap: 10px;
  align-items: center;
}
.lw-punish-row input {
  border-radius: 10px;
  border: 1px solid var(--lw-line);
  background: #0f0f13;
  padding: 12px 14px;
  outline: none;
  width: 100%;
}
.lw-punish-row input:focus {
  border-color: rgba(232, 28, 90, 0.45);
}
.lw-add-punish {
  justify-self: start;
}

body.is-editing .lw-panel {
  outline: 1px solid rgba(232, 28, 90, 0.22);
  outline-offset: -1px;
}

@media (max-width: 900px) {
  .lw-layout { grid-template-columns: 1fr; }
  .lw-rail {
    position: static;
    padding: 10px;
  }
  .lw-tabs {
    flex-direction: column;
    overflow: visible;
    gap: 8px;
  }
  .lw-tab {
    width: 100%;
    min-height: 44px;
    border-radius: 999px;
    border-color: var(--lw-line);
    background: rgba(255, 255, 255, 0.03);
  }
  .lw-tab.is-active {
    border-color: transparent;
    background: var(--lw-accent);
  }
  .lw-chapter-nav {
    margin-left: 12px;
    padding-left: 8px;
  }
  .lw-search-hit {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .lw-field-row { grid-template-columns: 1fr; }
  .lw-icon-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media print {
  .no-print,
  .lw-ambient,
  .lw-top,
  .lw-top-tools,
  .lw-rail,
  .lw-search-results,
  .lw-articles,
  .lw-empty,
  .lw-toast,
  .lw-dialog {
    display: none !important;
  }
  body.lw-body {
    background: #fff !important;
    color: #000 !important;
  }
  .lw-main {
    max-width: none;
    padding: 0;
  }
  .lw-hero {
    margin-bottom: 16px;
  }
  .lw-hero-title,
  .lw-print-title {
    color: #000 !important;
  }
  .lw-hero-sub,
  .lw-meta,
  .lw-print-meta {
    color: #333 !important;
  }
  .lw-panel {
    border: 0;
    background: transparent;
    padding: 0;
    min-height: 0;
  }
  .lw-print-all,
  .lw-print-all:not([hidden]) {
    display: block !important;
  }
  .lw-print-section {
    break-inside: avoid;
    margin: 0 0 22px;
  }
  .lw-print-section h2 {
    margin: 0 0 10px;
    font-family: var(--lw-display);
    font-size: 1.25rem;
    color: #000;
    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;
  }
  .lw-print-article,
  .lw-article {
    display: block;
    break-inside: avoid;
    page-break-inside: avoid;
    border: 0;
    border-bottom: 1px solid #ddd;
    border-radius: 0;
    background: #fff;
    color: #000;
    margin-bottom: 0;
    padding: 12px 0;
  }
  .lw-chapter-head {
    border-bottom-color: #ccc;
  }
  .lw-chapter-title {
    color: #555 !important;
  }
  .lw-article-id {
    color: #b00030 !important;
  }
  .lw-article-title,
  .lw-article-text {
    color: #000 !important;
  }
  .lw-article-penalty {
    color: #6b5420 !important;
  }
  .lw-chip,
  .lw-chip strong {
    color: #000 !important;
  }
  .lw-chip {
    background: #f5f5f5;
    border-color: #ccc;
  }
}

@media (max-width: 720px) {
  .lw-top-inner { flex-direction: column; align-items: stretch; }
  .lw-top-tools { justify-content: stretch; }
  .lw-search { width: 100%; max-width: none; }
  .lw-btn span { display: none; }
  .lw-btn--discord .lw-discord-ico { display: grid; }
  .lw-btn--discord .lw-discord-text { display: none; }
  .lw-btn--discord { padding: 0 12px; }
  .lw-menu-item span { display: inline; }
  .lw-punish-row { grid-template-columns: 1fr; }
  .lw-main { padding-top: 20px; }
  .lw-panel { padding: 14px; }
  .lw-article {
    padding: 14px 0 16px;
  }
  .lw-article-text,
  .lw-article-penalty {
    margin-left: 0;
  }
  .lw-article-tools {
    opacity: 1;
  }
  .lw-article-title {
    font-size: 1.02rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lw-toast { transition: none; }
}
