@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("assets/fonts/cormorant-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "PT Serif";
  src: url("assets/fonts/pt-serif-400-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Serif";
  src: url("assets/fonts/pt-serif-400-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "PT Serif";
  src: url("assets/fonts/pt-serif-700-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "PT Serif";
  src: url("assets/fonts/pt-serif-700-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Yeseva One";
  src: url("assets/fonts/yeseva-cyrillic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Yeseva One";
  src: url("assets/fonts/yeseva-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --blood: #8f0d1b;
  --blood-bright: #c01b2d;
  --ink: #1c1917;
  --paper: #e9dcc0;
  --paper-muted: #756958;
  --bone: #eee7da;
  --line: rgba(68, 49, 33, 0.2);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: hidden;
  background: #090a0b url("assets/death-note-bg-v2.webp") center 58px / cover fixed no-repeat;
  color: var(--bone);
  font: 16px/1.55 "PT Serif", Georgia, serif;
  font-kerning: normal;
  font-synthesis: none;
  text-rendering: auto;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a, input, textarea, select { outline-offset: 4px; }
button { cursor: pointer; }

.site-header {
  position: relative;
  z-index: 10;
  min-height: 58px;
  background: rgba(8, 9, 10, 0.96);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
.nav-shell {
  width: min(1360px, 92vw);
  min-height: 58px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
}
.brand { display: inline-flex; align-items: baseline; gap: 9px; white-space: nowrap; font-family: "Cormorant Garamond", Georgia, serif; font-size: 24px; font-weight: 600; }
.brand strong { color: #c5182b; font-weight: 700; letter-spacing: .5px; }
.brand span { color: #eee9df; font-weight: 600; }
nav { display: flex; align-self: stretch; }
nav a { min-width: 108px; display: grid; place-items: center; position: relative; color: #c9c2b7; font-size: 15px; letter-spacing: .25px; }
nav a:hover, nav a:focus-visible, nav a.active { color: #fff; }
nav a.active::after { content: ""; position: absolute; left: 22px; right: 22px; bottom: 0; height: 4px; background: var(--blood-bright); }
.primary {
  border: 1px solid #a52230;
  background: var(--blood);
  color: #fff5ed;
  padding: 13px 24px;
  border-radius: 3px;
  font-family: "PT Serif", Georgia, serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .2px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
}
.primary:hover { background: #a71323; }
.primary:disabled { opacity: .5; cursor: wait; }
.header-cta { justify-self: end; min-width: 176px; }

main { min-height: calc(100vh - 116px); }
.hero { min-height: 280px; display: grid; place-items: center; padding: 34px 20px 52px; text-align: center; }
.hero-copy { max-width: 760px; }
.eyebrow { margin: 0; color: #c6beb1; font: 700 11px/1.45 "PT Serif", Georgia, serif; letter-spacing: 4px; }
h1 { margin: 8px 0 0; color: #f5efe4; font-family: "Cormorant Garamond", Georgia, serif; font-size: clamp(68px, 7.2vw, 118px); line-height: .88; font-weight: 700; letter-spacing: .03em; font-kerning: normal; text-shadow: 0 5px 28px #000; }
.title-brush { display: block; width: min(560px, 78%); height: 24px; margin: -2px auto 2px; object-fit: fill; }
.subtitle { margin: 1px 0 0; font-size: 27px; letter-spacing: 3px; }
.lead { margin: 9px 0 0; color: #d1c8bb; font-size: 16px; letter-spacing: .1px; }

.archive-shell {
  width: min(1450px, 94vw);
  margin: 0 auto 22px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 24px;
  align-items: stretch;
}
.notebook {
  position: relative;
  min-height: 590px;
  margin-left: 30px;
  padding: 28px 36px 22px 66px;
  color: var(--ink);
  background: var(--paper) url("assets/death-note-paper-v2.webp") center / cover no-repeat;
  border: 1px solid #98836d;
  border-radius: 5px 14px 14px 5px;
  box-shadow: 0 18px 45px rgba(0,0,0,.72), inset 0 0 36px rgba(63,43,25,.13);
}
.binding {
  position: absolute;
  z-index: 2;
  left: -37px;
  top: 26px;
  width: 74px;
  height: calc(100% - 52px);
  object-fit: fill;
  filter: drop-shadow(4px 5px 3px rgba(0,0,0,.6));
  pointer-events: none;
}
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; padding-bottom: 15px; border-bottom: 2px solid rgba(115,16,26,.75); }
.page-kicker { margin: 0 0 6px; color: #766a59; font-size: 10px; font-weight: 700; letter-spacing: 2.4px; }
h2 { margin: 0; font-family: "Cormorant Garamond", Georgia, serif; font-size: 38px; line-height: 1; font-weight: 600; }
.notebook h2 { font-family: "Yeseva One", "PT Serif", Georgia, serif; font-size: clamp(38px, 3.5vw, 54px); line-height: 1.08; font-weight: 400; letter-spacing: -.015em; color: #17120f; }
.server-mark { min-width: 84px; padding: 7px 8px 6px; color: #9c1624; border: 2px solid #a72732; text-align: center; transform: rotate(-2deg); line-height: .95; }
.server-mark span, .server-mark strong { display: block; }
.server-mark span { font-size: 13px; letter-spacing: 3px; }
.server-mark strong { margin-top: 4px; font-size: 21px; letter-spacing: 1px; }

.tools-row { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 18px 0; }
.search-wrap { flex: 1; max-width: 580px; }
.search-wrap label { display: block; margin-bottom: 6px; color: #6d6152; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; text-transform: uppercase; }
input, textarea, select { width: 100%; border: 1px solid rgba(92,75,57,.42); border-radius: 3px; padding: 11px 13px; background: rgba(255,255,255,.28); color: inherit; }
input:focus, textarea:focus, select:focus { outline: 2px solid #9c2631; border-color: transparent; }
input::placeholder, textarea::placeholder { color: #766c5e; }
#entry-count { color: #7b6b5b; font-size: 12px; font-weight: 700; letter-spacing: 2px; padding-bottom: 10px; }
.entry-columns, .entry {
  display: grid;
  grid-template-columns: minmax(84px, .48fr) minmax(150px, .85fr) minmax(260px, 1.8fr);
  gap: 24px;
}
.entry-columns { padding: 11px 16px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); color: #4d443a; font-size: 11px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; }
#list-status { margin: 0; padding: 55px 16px; color: var(--paper-muted); text-align: center; }
.entry { align-items: start; padding: 20px 16px; border-bottom: 1px solid var(--line); }
.entry-cell { min-width: 0; overflow-wrap: anywhere; }
.entry-label { display: none; }
.entry-value { display: block; }
.entry-clan { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.entry-clan-crest { width: 32px; height: 24px; object-fit: contain; filter: drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.entry-clan-name { color: #665a4c; font-size: 11px; font-weight: 700; line-height: 1.15; }
.entry-clan.no-crest { padding-top: 3px; }
.entry-nick .entry-value { font-family: "Cormorant Garamond", Georgia, serif; font-size: 25px; font-weight: 700; line-height: 1.05; }
.entry-reason .entry-value { font-size: 15px; line-height: 1.48; white-space: pre-wrap; }
.pagination {
  align-self: auto;
  min-height: 42px;
  margin-top: 22px;
  padding-top: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  border-top: 1px solid var(--line);
}
.pagination[hidden] { display: none; }
.pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid rgba(86, 71, 56, .42);
  border-radius: 2px;
  background: rgba(255, 252, 240, .3);
  color: #41372d;
  font-family: "PT Serif", Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 4px rgba(70, 49, 33, .08);
}
.pagination button:hover:not(:disabled), .pagination button:focus-visible { border-color: #8e1722; color: #8e1722; }
.pagination .page-number[aria-current="page"] { border-color: #8f101c; background: #8f101c; color: #fff8ed; box-shadow: 0 3px 9px rgba(105, 5, 16, .22); }
.pagination button:disabled:not([aria-current="page"]) { opacity: .38; cursor: default; }
.page-gap { min-width: 20px; color: #766958; text-align: center; }
.page-arrow { min-width: 82px !important; }
.page-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 30px; color: #766958; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }

.rules-card { padding: 30px 26px; background: rgba(9,10,11,.94); border: 1px solid rgba(255,255,255,.18); box-shadow: 0 18px 45px rgba(0,0,0,.62); }
.rules-card .eyebrow { color: #9e1825; letter-spacing: 3px; }
.rules-card h2 { margin-top: 9px; font-family: "Yeseva One", "PT Serif", Georgia, serif; font-size: 30px; line-height: 1.2; font-weight: 400; letter-spacing: .8px; text-transform: uppercase; }
.rules-card ol { list-style: none; padding: 0; margin: 23px 0 0; }
.rules-card li { display: grid; grid-template-columns: 42px 1fr; gap: 12px; padding: 17px 0; border-top: 1px solid rgba(255,255,255,.14); }
.rules-card li > span { color: #a19a91; font-size: 28px; line-height: 1; }
.rules-card strong { font-size: 17px; font-weight: 700; }
.rules-card li p { margin: 5px 0 0; color: #bcb4aa; font-size: 13px; line-height: 1.55; }
.moderation-note { margin: 20px 0 0; padding-top: 18px; border-top: 1px solid #7b1721; color: #9f968b; font-size: 13px; }

footer { min-height: 58px; padding: 17px max(4vw, 24px); display: flex; justify-content: space-between; align-items: center; gap: 18px; background: rgba(8,9,10,.97); border-top: 1px solid rgba(255,255,255,.12); color: #8e8881; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; }
.text-button { padding: 0; border: 0; background: none; color: #bdb4aa; text-decoration: underline; }

dialog { width: min(560px, calc(100% - 24px)); max-height: 92vh; padding: 0; border: 1px solid #63554a; background: #151414 url("assets/death-note-bg-v2.webp") center / cover no-repeat; color: #eee5d9; box-shadow: 0 22px 80px #000; }
dialog::backdrop { background: rgba(0,0,0,.82); backdrop-filter: blur(4px); }
dialog form, .admin-body { padding: 32px; background: rgba(12,12,13,.92); }
.admin-body form { padding: 0; background: transparent; }
dialog h2 { margin: 8px 0 14px; font-family: "Yeseva One", "PT Serif", Georgia, serif; font-size: 34px; line-height: 1.1; font-weight: 400; }
dialog p { color: #bdb4a9; }
dialog label { display: block; margin: 18px 0; color: #d6cabd; font-size: 14px; }
dialog input, dialog textarea { display: block; margin-top: 7px; background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.2); }
.clan-select-row { display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 9px; margin-top: 7px; }
.clan-crest-frame { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.2); border-radius: 3px; background: rgba(255,255,255,.045); box-shadow: inset 0 0 18px rgba(0,0,0,.45); }
.clan-crest-frame img { image-rendering: pixelated; filter: drop-shadow(0 2px 3px #000); }
.clan-crest-frame img:not([src]) { visibility: hidden; }
dialog select { min-width: 0; appearance: none; padding: 11px 42px 11px 13px; border-color: rgba(255,255,255,.2); color: #eee4da; background-color: rgba(255,255,255,.07); background-image: linear-gradient(45deg, transparent 50%, #a69a8e 50%), linear-gradient(135deg, #a69a8e 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; background-size: 6px 6px, 6px 6px; background-repeat: no-repeat; }
dialog select option { color: #211b17; background: #e8dcc7; }
.close { float: right; margin: -13px -8px 0 12px; border: 0; background: none; color: #c9bfb5; font-size: 28px; }
.trap { position: absolute; left: -10000px; }
#request-status, #admin-status { min-height: 22px; color: #d8b6a6; }
.admin-section { margin-top: 25px; }
.admin-section > h3 { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 8px; color: #cbbfb3; font-size: 14px; letter-spacing: 1.2px; text-transform: uppercase; }
.admin-section > h3 span { color: #9d8d7f; }
.admin-empty { margin: 0; padding: 14px 0; border-top: 1px solid rgba(255,255,255,.16); }
.pending-entry, .published-entry { padding: 20px 0; border-top: 1px solid rgba(255,255,255,.16); }
.pending-entry h3, .published-entry h3 { margin-bottom: 8px; overflow-wrap: anywhere; }
.pending-entry p, .published-entry p { margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; gap: 12px; margin-top: 15px; }
.actions button { padding: 10px 14px; border: 1px solid #a05259; background: #6c1821; color: #fff; }
.actions .secondary-button { background: transparent; }
.actions .danger-button { background: #7d101c; border-color: #c34752; }
.actions button:disabled { opacity: .4; }

@media (max-width: 1050px) {
  .archive-shell { grid-template-columns: 1fr; }
  .rules-card { margin-left: 30px; }
  .rules-card ol { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .rules-card li { grid-template-columns: 38px 1fr; }
  .moderation-note { text-align: center; }
}

@media (max-width: 760px) {
  body { background-position: center 54px; background-size: auto 760px; background-attachment: scroll; }
  .nav-shell { min-height: 54px; grid-template-columns: 1fr auto; }
  nav { display: none; }
  .brand { gap: 5px; font-size: 16px; }
  .header-cta { min-width: 0; padding: 10px 14px; }
  .hero { min-height: 255px; padding-bottom: 34px; }
  h1 { font-size: clamp(52px, 15vw, 82px); }
  .subtitle { font-size: 25px; }
  .lead { font-size: 16px; }
  .archive-shell { width: min(94vw, 650px); gap: 18px; }
  .notebook { margin-left: 14px; padding: 24px 18px 18px 30px; }
  .binding { left: -24px; width: 48px; }
  .notebook h2 { font-size: 42px; }
  .server-mark { min-width: 68px; }
  .tools-row { align-items: stretch; flex-direction: column; gap: 8px; }
  #entry-count { padding: 0; }
  .entry-columns { display: none; }
  .entry { grid-template-columns: 46px minmax(0, 1fr); column-gap: 13px; row-gap: 14px; padding: 19px 8px; }
  .entry-label { display: block; margin-bottom: 2px; color: #766958; font-size: 10px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
  .entry-clan { grid-column: 1; grid-row: 1; align-items: center; text-align: center; }
  .entry-clan .entry-label { display: none; }
  .entry-clan-name { max-width: 62px; font-size: 9px; overflow-wrap: anywhere; }
  .entry-nick { grid-column: 2; grid-row: 1; align-self: center; }
  .entry-reason { grid-column: 1 / -1; grid-row: 2; }
  .entry-nick .entry-value { font-size: 23px; }
  .pagination { gap: 5px; }
  .pagination button { min-width: 34px; height: 36px; padding-inline: 9px; }
  .page-arrow { min-width: 70px !important; }
  .rules-card { margin-left: 14px; padding: 25px 22px; }
  .rules-card ol { grid-template-columns: 1fr; gap: 0; }
  footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .eyebrow { letter-spacing: 3px; }
  .hero { padding-inline: 10px; }
  .page-heading { align-items: start; }
  .notebook h2 { font-size: 36px; }
  .server-mark { display: none; }
  dialog form, .admin-body { padding: 25px 22px; }
}
