@font-face {
  font-family: "Tiny5";
  src: url("/static/fonts/tiny5.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Press Start 2P";
  src: url("/static/fonts/press-start-2p.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #262425;
  --surface: #302d2e;
  --surface-light: #3b3738;
  --ink: #f1ede2;
  --muted: #b2aba6;
  --dim: #827b79;
  --line: #514b4c;
  --accent: #d1cc7e;
  --accent-2: #84c9b3;
  --accent-ink: #211f20;
  --danger: #d68e84;
  --shadow: #161415;
  --pixel: "Tiny5", monospace;
  --pixel-display: "Press Start 2P", "Tiny5", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 25px/1.5 var(--pixel);
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
figure, p { margin: 0; }
h1, h2, h3 { margin: 0; font-family: var(--pixel-display); font-weight: 400; }
:focus-visible { outline: 3px dashed var(--accent-2); outline-offset: 4px; }
.shell { width: min(calc(100% - 48px), 1000px); margin: 24px auto 0; }

.topbar {
  min-height: 76px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  padding: 13px 17px;
  background: var(--surface);
  border: 4px solid var(--accent);
  box-shadow: 6px 6px 0 var(--shadow);
}
.brand {
  width: max-content;
  color: var(--accent);
  font: 12px/1.7 var(--pixel-display);
  letter-spacing: .03em;
  text-shadow: 2px 2px 0 var(--shadow);
}
.public-nav, .admin-nav { display: flex; align-items: center; gap: 9px; }
.public-nav a, .admin-nav a, .header-link, .language-switch {
  color: var(--muted);
  font: 19px/1.2 var(--pixel);
}
.public-nav a, .admin-nav a { padding: 7px 9px; border: 2px solid transparent; }
.public-nav a:hover, .admin-nav a:hover { color: var(--accent-ink); background: var(--accent-2); border-color: var(--accent-2); }
.public-nav a.current { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; }
.header-actions form { margin: 0; }
.header-link, .language-switch { padding: 7px 5px; background: transparent; border: 0; cursor: pointer; }
.header-link:hover, .language-switch:hover { color: var(--accent-2); }
.language-switch { color: var(--accent); }

.box {
  background: var(--surface);
  border: 4px solid var(--accent);
  box-shadow: 6px 6px 0 var(--shadow);
  transition: transform .1s steps(1), box-shadow .1s steps(1), border-color .1s steps(1);
}
.box:hover { transform: translate(-2px, -2px); box-shadow: 8px 8px 0 var(--shadow); }
.hero {
  min-height: 310px;
  display: flex;
  align-items: center;
  gap: 40px;
  margin: 31px 0 35px;
  padding: 31px 35px;
}
.avatar {
  width: 160px;
  height: 160px;
  flex: 0 0 160px;
  padding: 0;
  overflow: hidden;
  background: #eee8d8;
  border: 4px solid var(--accent);
  box-shadow: 6px 6px 0 var(--shadow);
  image-rendering: pixelated;
  animation: pixel-breathe 3s steps(2, end) infinite;
}
.avatar img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.avatar:hover { border-color: var(--accent-2); }
.avatar-bounce { animation: avatar-bounce .28s steps(3, end); }
.intro { min-width: 0; }
.terminal-label, .page-index { color: var(--muted); font-size: 19px; }
.typing-text { min-height: 1.7em; margin: 16px 0 10px; color: var(--accent-2); font-size: 32px; line-height: 1.6; overflow-wrap: anywhere; }
.typing-text::after { content: "_"; color: var(--accent); animation: cursor-blink 1s step-end infinite; }
.welcome-text { color: var(--ink); font-size: 29px; }
.avatar-reply { min-height: 1.3em; margin: 2px 0 9px; color: var(--accent-2); font-size: 19px; }
.hero .button { margin-top: 10px; }

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  color: var(--accent);
  background: var(--bg);
  border: 4px solid var(--accent);
  box-shadow: 4px 4px 0 var(--shadow);
  font-size: 21px;
  line-height: 1.25;
  text-align: center;
  transition: transform .1s steps(1), box-shadow .1s steps(1), color .1s steps(1), background-color .1s steps(1);
}
.button:hover, .button.primary { color: var(--accent-ink); background: var(--accent); }
.button:active { transform: translate(4px, 4px); box-shadow: 0 0 0 var(--shadow); }
.button:disabled { color: var(--dim); border-color: var(--dim); cursor: not-allowed; }
.text-link { color: var(--accent); font-size: 20px; }
.text-link:hover { color: var(--accent-2); }

.recent-section { margin-bottom: 35px; padding: 20px 23px 11px; }
.log-box { border-color: var(--line); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 17px; }
.section-heading h2, .section-title { color: var(--muted); font-size: 16px; line-height: 1.8; }
.section-heading .button { min-height: 39px; padding: 5px 10px; font-size: 18px; }
.post-list { border-top: 4px dashed var(--line); }
.post-row { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 17px; padding: 18px 7px; border-bottom: 4px dashed var(--line); }
.post-row:last-child { border-bottom: 0; }
.post-date, .archive-date { color: var(--accent-2); font-size: 19px; line-height: 1.5; }
.post-date time, .archive-date time { display: block; color: var(--muted); }
.post-copy h3 { margin-bottom: 5px; color: var(--accent-2); font: 18px/1.6 var(--pixel-display); overflow-wrap: anywhere; }
.post-copy p { color: var(--ink); font-size: 22px; }
.empty-state { padding: 18px 7px; color: var(--muted); }
.continue-section { display: grid; justify-items: center; gap: 17px; margin: 42px 0 0; padding: 19px; text-align: center; }
.continue-section p { color: var(--muted); }

.page-heading { padding: 42px 18px 28px; border-bottom: 4px solid var(--line); }
.page-heading h1 { margin: 15px 0 9px; font-size: 25px; line-height: 1.8; overflow-wrap: anywhere; }
.page-summary { max-width: 740px; color: var(--muted); font-size: 25px; }
.about-story { display: grid; grid-template-columns: 215px minmax(0, 1fr); align-items: start; gap: 35px; margin: 29px 0 34px; padding: 24px; }
.about-portrait { width: 100%; padding: 9px; background: var(--surface-light); border: 4px solid var(--accent); box-shadow: 6px 6px 0 var(--shadow); }
.portrait-image { aspect-ratio: 1; overflow: hidden; background: #eee8d8; border: 4px solid var(--ink); image-rendering: pixelated; }
.portrait-image img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.about-portrait figcaption { padding: 8px 2px 0; color: var(--muted); font-size: 18px; }
.story-copy { display: grid; gap: 16px; color: var(--ink); font-size: 24px; line-height: 1.5; }
.story-copy h2 { color: var(--accent-2); font-size: 16px; line-height: 1.8; }
.story-copy .story-lead { color: var(--accent); font-size: 27px; }
.contact-section { padding: 15px 0 5px; scroll-margin-top: 20px; }
.section-title { margin: 0 0 18px 6px; color: var(--accent-2); }
.contact-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(240px, .8fr); align-items: start; gap: 24px; }
.contact-form { padding: 20px; }
.form-intro { margin-bottom: 15px; color: var(--muted); }
.contact-form label, .login-form label, .editor-form label { display: grid; gap: 6px; margin-bottom: 14px; color: var(--accent); font-size: 19px; }
.contact-form input, .contact-form textarea, .login-form input, .editor-form input, .editor-form textarea {
  width: 100%;
  min-height: 46px;
  padding: 8px 10px;
  color: var(--ink);
  background: #242122;
  border: 4px solid var(--line);
  border-radius: 0;
  outline: none;
  font: 23px/1.4 var(--pixel);
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus, .login-form input:focus, .editor-form input:focus, .editor-form textarea:focus { border-color: var(--accent-2); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--dim); }
.contact-links { display: grid; justify-items: start; gap: 13px; padding: 19px; color: var(--muted); overflow-wrap: anywhere; }
.contact-links > p:first-child { margin-bottom: 4px; color: var(--ink); }
.contact-links span { color: var(--accent-2); }
.contact-links a { color: var(--accent); }
.contact-links a:hover { color: var(--accent-2); }
.honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.news-heading { padding-bottom: 22px; }
.archive { margin: 27px 0 15px; padding: 3px 20px; }
.archive-post { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 17px; padding: 21px 6px; border-bottom: 4px dashed var(--line); }
.archive-post:last-child { border-bottom: 0; }
.archive-copy h2 { margin-bottom: 9px; color: var(--accent-2); font-size: 17px; line-height: 1.8; overflow-wrap: anywhere; }
.archive-summary, .post-body { color: var(--ink); }
.post-body { margin-top: 13px; padding-top: 12px; border-top: 2px dashed var(--line); }

.login-form { width: min(100%, 560px); margin: 30px 18px 45px; padding: 22px; border: 4px solid var(--accent); background: var(--surface); box-shadow: 6px 6px 0 var(--shadow); }
.login-form > * + * { margin-top: 16px; }
.login-form > p { color: var(--ink); }
.form-status { color: var(--muted) !important; }
.login-form .text-link { display: inline-block; margin-top: 15px; }

.admin-theme { background: #211f20; }
.admin-topbar { min-height: 76px; grid-template-columns: 1fr auto 1fr; padding: 0; background: transparent; border: 0; border-bottom: 2px solid var(--accent); box-shadow: none; }
.admin-topbar .brand { color: var(--accent); font-size: 11px; }
.admin-nav { gap: 17px; }
.admin-nav a { padding: 0; color: var(--muted); border: 0; background: transparent; }
.admin-nav a:hover { color: var(--accent); border: 0; background: transparent; }
.admin-nav a, .admin-topbar .header-link { font-size: 17px; }
.admin-main { margin-top: 22px; padding: 27px 28px 34px; background: var(--surface); border: 2px solid var(--line); }
.admin-intro { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 2px solid var(--accent); }
.admin-intro h1 { margin: 8px 0 7px; font-size: 21px; line-height: 1.8; }
.admin-intro > div:first-child > p:last-child { color: var(--muted); }
.admin-counts { display: flex; gap: 10px; }
.admin-count { min-width: 94px; padding: 8px 11px; border: 1px solid var(--line); text-align: center; }
.admin-count span { display: block; color: var(--muted); font-size: 16px; }
.admin-count strong { display: block; margin-top: 3px; color: var(--accent); font: 14px var(--pixel-display); }
.admin-security { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 0; border-bottom: 2px dashed var(--line); }
.admin-security-copy { max-width: 570px; flex: 1 1 300px; }
.admin-security-copy strong { display: block; color: var(--accent); font: 10px/1.8 var(--pixel-display); }
.admin-security-copy p { margin-top: 5px; color: var(--muted); }
.admin-security-copy .form-status { color: var(--dim) !important; font-size: 18px; }
.admin-security > .button { flex: 0 0 auto; }
.admin-workspace { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 32px; align-items: start; }
.admin-section { min-width: 0; margin-top: 26px; }
.admin-section .section-heading { margin-bottom: 14px; }
.admin-section .section-heading h2 { margin-top: 9px; font-size: 12px; line-height: 1.8; }
.editor-form { padding: 17px; border: 1px solid var(--line); background: #292627; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 13px; }
.form-grid label { min-width: 0; font-size: 16px; }
.form-grid label:has(textarea) { grid-column: span 2; }
.editor-form input, .editor-form textarea { min-height: 39px; padding: 7px; font-size: 21px; border-width: 2px; }
.admin-list { border-top: 1px solid var(--accent); }
.admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 13px 7px; border-bottom: 2px dashed var(--line); }
.admin-row > div { min-width: 0; }
.admin-row strong { display: block; color: var(--ink); font: 10px/1.8 var(--pixel-display); overflow-wrap: anywhere; }
.admin-row span, .admin-row a { display: block; color: var(--muted); font-size: 18px; overflow-wrap: anywhere; }
.admin-row details summary { padding: 5px 7px; color: var(--accent); border: 1px solid var(--line); cursor: pointer; font-size: 17px; list-style: none; }
.admin-row details summary::-webkit-details-marker { display: none; }
.admin-row details[open] { grid-column: 1 / -1; }
.admin-row details[open] summary { display: inline-block; margin: 7px 0 10px; }
.admin-row .editor-form { width: 100%; }
.admin-row .editor-form label { font-size: 15px; }
.admin-row .editor-form input, .admin-row .editor-form textarea { font-size: 19px; }
.inline-form { margin-top: 10px; }
.danger-link { padding: 5px 0; color: var(--danger); background: transparent; border: 0; font-size: 18px; }
.message-section { margin-top: 33px; padding-top: 24px; border-top: 2px solid var(--line); }
.message-row { grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
.message-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.message-actions form { margin: 0; }
.message-actions .danger-link { color: var(--danger); }
.message-row p { margin-top: 8px; color: #ded8cc; white-space: pre-wrap; overflow-wrap: anywhere; }
.unread { display: inline !important; margin-left: 7px; color: var(--accent-2) !important; font: 8px var(--pixel-display) !important; }
.admin-main .text-link { font-size: 17px; }
.admin-theme .button { min-height: 48px; padding: 8px 15px; border-width: 2px; font-size: 21px; }
.admin-theme .button:active { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.admin-theme .login-form { border-width: 2px; }
.admin-theme .login-form input { border-width: 2px; }

.notices { margin: 14px 0; }
.notice { padding: 8px 12px; border: 2px solid var(--line); }
.notice.success { color: var(--accent-2); border-color: var(--accent-2); }
.notice.error { color: var(--danger); border-color: var(--danger); }
.public-footer, .admin-footer { display: flex; justify-content: center; margin-top: 41px; padding: 15px 8px 20px; color: var(--dim); border-top: 2px solid var(--line); font-size: 18px; text-align: center; }
.admin-footer { justify-content: space-between; color: var(--dim); border-top-width: 1px; }

@keyframes cursor-blink { 50% { visibility: hidden; } }
@keyframes pixel-breathe { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes avatar-bounce { 0%, 100% { transform: translateY(0); } 35% { transform: translateY(-9px); } 70% { transform: translateY(2px); } }

@media (max-width: 800px) {
  .shell { width: min(calc(100% - 36px), 700px); }
  .topbar { grid-template-columns: 1fr auto; gap: 9px; padding: 11px 13px; }
  .public-nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; gap: 15px; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .hero { gap: 28px; padding: 26px; }
  .typing-text { font-size: 26px; }
  .welcome-text { font-size: 25px; }
  .recent-section { padding: 17px 18px 9px; }
  .about-story { grid-template-columns: 185px minmax(0, 1fr); gap: 25px; padding: 20px; }
  .story-copy { font-size: 22px; }
  .contact-layout { grid-template-columns: minmax(0, 1fr) minmax(200px, .8fr); gap: 17px; }
  .contact-form { padding: 16px; }
  .admin-main { padding: 21px 18px 27px; }
  .admin-topbar { grid-template-columns: 1fr auto; }
  .admin-nav { grid-row: 2; grid-column: 1 / -1; justify-content: center; }
  .admin-workspace { grid-template-columns: 1fr; gap: 0; }
}
@media (max-width: 560px) {
  body { font-size: 22px; }
  .shell { width: calc(100% - 28px); margin-top: 15px; }
  .topbar { padding: 10px; }
  .brand { font-size: 10px; }
  .public-nav { gap: 5px; }
  .public-nav a, .language-switch { font-size: 17px; }
  .public-nav a { padding: 6px 7px; }
  .hero { min-height: 0; flex-direction: column; gap: 19px; margin: 25px 0 28px; padding: 22px 17px; text-align: center; }
  .avatar { width: 120px; height: 120px; flex-basis: 120px; }
  .terminal-label, .page-index { font-size: 16px; }
  .typing-text { min-height: 1.7em; margin: 12px 0 5px; font-size: 20px; }
  .welcome-text { font-size: 23px; }
  .avatar-reply { font-size: 17px; }
  .button { min-height: 42px; padding: 7px 9px; font-size: 17px; }
  .recent-section { margin-bottom: 28px; padding: 14px 12px 7px; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .section-heading h2, .section-title { font-size: 12px; }
  .section-heading .button { align-self: start; }
  .post-row, .archive-post { grid-template-columns: 1fr; gap: 7px; padding: 14px 5px; }
  .post-date, .archive-date { font-size: 17px; }
  .post-date time, .archive-date time { display: inline; margin-left: 5px; }
  .post-copy h3 { font-size: 14px; }
  .post-copy p, .empty-state { font-size: 20px; }
  .continue-section { gap: 12px; margin-top: 32px; padding: 12px 3px; }
  .page-heading { padding: 30px 5px 20px; }
  .page-heading h1 { margin-top: 12px; font-size: 15px; line-height: 2; }
  .page-summary { font-size: 22px; }
  .about-story { grid-template-columns: 1fr; justify-items: center; gap: 18px; margin: 23px 0 28px; padding: 16px; }
  .about-portrait { width: min(100%, 170px); }
  .story-copy { font-size: 21px; }
  .story-copy h2 { font-size: 12px; }
  .story-copy .story-lead { font-size: 23px; }
  .contact-section { padding-top: 8px; }
  .section-title { margin-left: 0; }
  .contact-layout { grid-template-columns: 1fr; gap: 17px; }
  .contact-form { padding: 14px; }
  .contact-form input, .contact-form textarea { font-size: 21px; }
  .contact-links { padding: 15px; }
  .archive { margin-top: 21px; padding: 0 12px; }
  .archive-copy h2 { font-size: 13px; }
  .login-form { margin: 23px 0 35px; padding: 16px; }
  .admin-topbar { grid-template-columns: 1fr auto; }
  .admin-nav { gap: 5px; }
  .admin-nav a, .admin-topbar .header-link { font-size: 14px; }
  .admin-main { padding: 16px 12px 22px; }
  .admin-intro { align-items: start; flex-direction: column; }
  .admin-intro h1 { font-size: 17px; }
  .admin-count { min-width: 78px; }
  .admin-security { align-items: start; flex-direction: column; }
  .admin-security-copy { flex-basis: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid label:has(textarea) { grid-column: auto; }
  .message-row { grid-template-columns: 1fr; }
  .message-actions { flex-direction: row; align-items: center; }
  .public-footer, .admin-footer { margin-top: 30px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

/* The public pages feel more like a game menu than a log viewer. */
body { font-size: 21px; line-height: 1.55; background-color: var(--bg); }
.shell { width: min(calc(100% - 56px), 920px); margin-top: 30px; }
.topbar { min-height: 70px; padding: 10px 17px; }
.brand { font-size: 11px; }
.public-nav a { font-size: 18px; }
.header-actions { min-width: 42px; }
.language-switch { border: 2px solid var(--line); padding: 5px 9px; }
.language-switch:hover { color: var(--accent-ink); background: var(--accent-2); border-color: var(--accent-2); }
.public-main { position: relative; }
.hero { min-height: 285px; gap: 34px; margin: 32px 0 39px; padding: 34px 38px; border-color: var(--accent); }
.avatar { position: relative; width: 148px; height: 148px; flex-basis: 148px; }
.terminal-label { display: flex; align-items: center; gap: 10px; letter-spacing: .045em; }
.typing-text { min-height: 1.55em; margin: 8px 0; color: var(--accent); font-size: clamp(27px, 4vw, 35px); line-height: 1.5; }
.welcome-text { font-size: 25px; }
.avatar-reply { min-height: 1.2em; margin-top: 6px; color: var(--accent); }
.hero .button { margin-top: 14px; }
.button { min-height: 44px; padding: 7px 13px; box-shadow: 4px 4px 0 var(--shadow); font-size: 19px; }
.button:hover, .button.primary { color: var(--accent-ink); background: var(--accent); }
.button:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--shadow); }
.recent-section { margin-bottom: 30px; padding: 18px 21px 8px; }
.section-heading { align-items: center; margin-bottom: 12px; }
.section-heading h2, .section-title { color: var(--muted); font-size: 15px; }
.post-row { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; padding: 16px 5px; }
.post-date, .archive-date { font-size: 17px; }
.post-copy h3 { font-size: 16px; }
.post-copy p, .empty-state { font-size: 20px; }
.continue-section { position: relative; gap: 12px; margin: 34px 0 0; padding: 24px 15px; border-top: 2px dashed var(--line); border-bottom: 2px dashed var(--line); }
.page-heading { padding: 35px 12px 22px; }
.page-heading h1 { max-width: 760px; font-size: clamp(17px, 2.3vw, 22px); line-height: 1.9; }
.about-story { grid-template-columns: 185px minmax(0, 1fr); gap: 28px; margin: 26px 0 35px; padding: 22px; }
.story-copy { gap: 13px; font-size: 21px; }
.story-copy h2 { color: var(--accent-2); font-size: 15px; }
.story-copy .story-lead { font-size: 24px; }
.contact-section { padding-top: 8px; }
.section-title { margin: 0 0 14px 4px; }
.contact-layout { grid-template-columns: minmax(0, 1.2fr) minmax(220px, .8fr); }
.contact-form, .contact-links { padding: 17px; }
.contact-form label { font-size: 17px; }
.contact-form input, .contact-form textarea { font-size: 21px; }
.archive { margin: 24px 0 12px; padding: 3px 18px; }
.archive-post { grid-template-columns: 180px minmax(0, 1fr); gap: 18px; padding: 20px 4px; }
.archive-copy h2 { font-size: 16px; }
.archive-summary, .post-body { font-size: 21px; }
.public-footer { display: flex; align-items: center; gap: 17px; margin-top: 35px; padding: 15px 8px 22px; font-size: 16px; }
.realm-clock { display: inline-flex; align-items: center; gap: 6px; color: var(--accent-2); }
.realm-clock time { color: var(--muted); font-variant-numeric: tabular-nums; }
.secret-toast { position: fixed; z-index: 5; right: 22px; bottom: 22px; max-width: calc(100vw - 44px); padding: 12px 15px; color: var(--accent-ink); background: var(--accent-2); border: 4px solid var(--ink); box-shadow: 5px 5px 0 var(--shadow); font-size: 19px; visibility: hidden; transform: translateY(5px); }
.secret-toast.show { visibility: visible; transform: translateY(0); }
.secret-mode { --accent: #84c9b3; --accent-2: #d1cc7e; }
.secret-mode .topbar { border-color: var(--accent-2); }

/* Keep the personal address consistent with the other contact links. */
.story-copy a[href^="mailto:"] {
  color: var(--accent-2);
  overflow-wrap: anywhere;
}
.story-copy a[href^="mailto:"]:hover {
  color: var(--accent);
}
.story-copy a[href^="mailto:"]:focus-visible { outline-color: var(--accent-2); }

@media (max-width: 800px) {
  .shell { width: min(calc(100% - 38px), 700px); }
  .hero { gap: 26px; padding: 27px; }
  .typing-text { font-size: 27px; }
  .about-story { grid-template-columns: 160px minmax(0, 1fr); gap: 22px; }
  .contact-layout { grid-template-columns: minmax(0, 1fr) minmax(195px, .8fr); }
}
@media (max-width: 560px) {
  body { font-size: 20px; }
  .shell { width: calc(100% - 28px); margin-top: 16px; }
  .topbar { padding: 9px; }
  .public-nav { justify-content: start; gap: 3px; }
  .public-nav a, .language-switch { font-size: 16px; }
  .public-nav a { padding: 6px; }
  .hero { gap: 14px; margin: 24px 0 29px; padding: 20px 15px; }
  .avatar { width: 120px; height: 120px; flex-basis: 120px; }
  .terminal-label, .page-index { font-size: 15px; }
  .typing-text { min-height: 1.6em; margin: 7px 0; font-size: 22px; }
  .welcome-text { font-size: 22px; }
  .button { min-height: 41px; padding: 6px 8px; font-size: 16px; }
  .recent-section { padding: 13px 12px 5px; }
  .section-heading { align-items: start; }
  .section-heading h2, .section-title { font-size: 12px; }
  .post-row, .archive-post { grid-template-columns: 1fr; gap: 5px; padding: 13px 4px; }
  .post-date, .archive-date { font-size: 16px; }
  .post-copy h3, .archive-copy h2 { font-size: 14px; }
  .post-copy p, .empty-state, .archive-summary, .post-body { font-size: 19px; }
  .page-heading { padding: 27px 5px 18px; }
  .page-heading h1 { font-size: 15px; }
  .page-summary { font-size: 20px; }
  .about-story { grid-template-columns: 1fr; justify-items: center; gap: 14px; padding: 16px; }
  .about-portrait { width: min(100%, 160px); }
  .story-copy { font-size: 19px; }
  .story-copy h2 { font-size: 12px; }
  .story-copy .story-lead { font-size: 21px; }
  .contact-layout { grid-template-columns: 1fr; gap: 14px; }
  .contact-form input, .contact-form textarea { font-size: 19px; }
  .archive { padding: 0 12px; }
  .public-footer { flex-direction: column; gap: 5px; font-size: 14px; }
  .secret-toast { right: 14px; bottom: 14px; font-size: 16px; }
}

@media (max-width: 420px) {
  .shell { width: calc(100% - 20px); }
  .topbar { grid-template-columns: 1fr auto; gap: 5px 8px; }
  .brand { font-size: 10px; }
  .public-nav { grid-column: 1 / -1; grid-row: 2; justify-content: space-between; width: 100%; }
  .public-nav a { padding: 6px 8px; }
  .header-actions { grid-column: 2; grid-row: 1; }
  .about-story { padding: 13px; }
  .story-copy { width: 100%; min-width: 0; overflow-wrap: anywhere; }
  .story-copy a[href^="mailto:"] { max-width: 100%; font-size: 18px; }
  .contact-form, .contact-links { min-width: 0; padding: 13px; }
  .contact-form input, .contact-form textarea { min-width: 0; width: 100%; }
  .contact-links a { overflow-wrap: anywhere; }
}

/* Rate & State feature and game page */
.rate-teaser-section { margin: 0 0 34px; }
.rate-teaser {
  position: relative;
  min-height: 224px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .82fr);
  align-items: stretch;
  gap: 20px;
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  border-color: #66b926;
  background: #14200f;
}
.rate-teaser:hover { border-color: #a2ed54; }
.rate-teaser-copy { position: relative; z-index: 1; align-self: stretch; display: flex; flex-direction: column; justify-content: center; min-height: 224px; padding: 25px 128px 66px 28px; }
.rate-teaser-copy::after { content: ""; position: absolute; right: -20px; bottom: 0; left: 0; height: 5px; background: #86e342; box-shadow: 0 -2px 0 #4f9e22; }
.rate-kicker { color: #9ce646; font: 11px/1.8 var(--pixel-display); letter-spacing: .035em; }
.rate-teaser-copy h2 { margin: 12px 0 8px; color: #d5ffa2; font-size: clamp(18px, 2.6vw, 25px); line-height: 1.7; text-shadow: 3px 3px #28530f; }
.rate-teaser-copy > p:not(.rate-kicker) { max-width: 480px; color: #e3edda; font-size: 20px; }
.rate-teaser-action { display: flex; align-items: center; justify-content: center; width: max-content; max-width: 100%; min-height: 48px; margin-top: 13px; padding: 2px 11px; color: #f4f1e8; background: #3b3b3b url("/game-media/Button.png") center / 100% 100% no-repeat; border: 0; font-size: 15px; line-height: 1.2; image-rendering: pixelated; text-align: center; }
.rate-teaser:active .rate-teaser-action { background-image: url("/game-media/ButtonWhenPress.png"); }
.rate-teaser-scene { position: relative; min-height: 224px; overflow: hidden; background: #29421a; border-left: 3px solid #66b926; }
.rate-teaser-screen { display: block; width: 100%; height: 100%; min-height: 224px; object-fit: cover; object-position: 50% 45%; image-rendering: pixelated; }
.rate-teaser-daniil { position: absolute; z-index: 2; right: 23px; bottom: 5px; width: 96px; height: 96px; object-fit: contain; image-rendering: pixelated; }
.rate-teaser-corner { position: absolute; top: 13px; right: 15px; padding: 4px 7px; color: #d5ffa2; background: #10170ebf; border: 1px solid #9ce646; font: 10px var(--pixel-display); }

.rate-game { --game-green: #95e345; --game-green-dark: #234610; --game-wood: #4b3026; padding: 12px 0 0; }
.rate-back-link { display: inline-block; margin: 0 0 18px 3px; color: var(--muted); font-size: 16px; }
.rate-back-link:hover { color: var(--game-green); }
.rate-game-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(350px, .96fr); align-items: center; gap: 26px; padding: 29px; border: 4px solid var(--game-green); background-color: #182414; background-image: linear-gradient(#182414b8, #182414b8), url("/game-media/MainMenu.png"); background-position: center; background-size: auto, 640px 360px; background-repeat: repeat; box-shadow: 7px 7px 0 var(--shadow); }
.rate-game-intro { min-width: 0; padding: 18px; background: #111a0ff2; border: 3px solid #5d8d37; box-shadow: 4px 4px 0 #10150d; }
.rate-game-intro h1 { margin: 14px 0 5px; color: #f0ffdf; font-size: clamp(24px, 4vw, 36px); line-height: 1.55; text-shadow: 3px 3px #17250f; }
.rate-game-intro h1 span { color: #a5ec5c; }
.rate-game-lead { margin-bottom: 9px; color: #e1f2d4; font-size: 24px; }
.rate-game-description { max-width: 610px; color: #f5f7ef; font-size: 19px; line-height: 1.65; }
.rate-game-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.rate-steam-button { position: relative; width: min(100%, 390px); min-height: 60px; display: grid; place-items: center; padding: 0; color: #fff; background: #3b3b3b url("/game-media/Button.png") center / 100% 100% no-repeat; border: 0; box-shadow: none; font-size: 18px; line-height: 1.3; image-rendering: pixelated; text-align: center; }
.rate-buy-button { background-color: #496b28; }
.rate-steam-label { position: relative; display: block; width: 100%; padding: 0 34px; transform: translateY(-1px); text-align: center; }
.rate-steam-button:hover { color: #fff; filter: brightness(1.2); }
.rate-steam-button:active { background-image: url("/game-media/ButtonWhenPress.png"); transform: translateY(2px); filter: none; }
.rate-steam-icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); font-size: 20px; }
.rate-release-note { display: inline-block; padding: 3px 7px; color: #e1f2d4; background: #111a0ff2; border: 1px solid #638a3b; font-size: 14px; line-height: 1.45; }
.rate-game-cover { min-width: 0; padding: 8px; background: #19171a; border: 3px solid #77736d; box-shadow: 5px 5px 0 #10150d; transform: rotate(1deg); }
.rate-game-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; }
.rate-game-cover figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 4px 2px; color: #ccc5b3; font: 9px/1.8 var(--pixel-display); }
.rate-cover-led { color: #a5ec5c; font-size: 13px; }
.rate-game-features, .rate-screenshots { margin-top: 38px; }
.rate-section-heading { margin-bottom: 16px; padding: 0 5px 12px; border-bottom: 3px solid #46523a; }
.rate-section-heading h2, .rate-final-cta h2 { margin-top: 7px; color: #f0f5e8; font-size: clamp(17px, 2.4vw, 23px); line-height: 1.75; }
.rate-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.rate-feature-card { min-width: 0; padding: 16px 15px; background-color: #121a0f; background-image: linear-gradient(#121a0ff2, #121a0ff2), url("/game-media/MainMenu.png"); background-position: center; background-size: auto, 320px 180px; border: 3px solid #5d8f3b; box-shadow: 4px 4px 0 #161415; }
.rate-feature-index { color: #a5ec5c; font-size: 14px; }
.rate-feature-card h3 { margin: 10px 0 6px; color: #f0f5e8; font-size: 13px; line-height: 1.8; }
.rate-feature-card p { color: #d7e3cd; font-size: 17px; line-height: 1.5; }
.rate-gallery-heading { display: flex; align-items: end; justify-content: space-between; gap: 14px; }
.rate-gallery-heading > span { padding-bottom: 4px; color: #d2dfc7; font-size: 14px; }
.rate-screenshot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.rate-screenshot { min-width: 0; padding: 8px; background: #172311; border: 3px solid #628d3b; box-shadow: 5px 5px 0 #161415; }
.rate-screenshot-frame { overflow: hidden; background: #171316; border: 3px solid #171316; }
.rate-screenshot-open { display: block; width: 100%; padding: 0; overflow: hidden; cursor: zoom-in; background: #171316; border: 0; }
.rate-screenshot-open img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; image-rendering: pixelated; transition: transform .15s steps(2); }
.rate-screenshot-open:hover img { transform: scale(1.025); }
.rate-screenshot figcaption { display: flex; align-items: center; gap: 10px; padding: 9px 3px 1px; color: #f0e5d0; font-size: 17px; }
.rate-screenshot-number { color: #a5ec5c; font: 10px var(--pixel-display); }
.rate-advisor-panel { position: relative; display: grid; grid-template-columns: 144px minmax(0, 1fr); align-items: center; gap: 21px; margin-top: 38px; padding: 20px 24px; overflow: hidden; background: #151b13; border: 4px solid #95e345; box-shadow: 6px 6px 0 #161415; }
.rate-advisor-panel::before { content: ""; position: absolute; inset: 7px; border: 2px solid #527a34; pointer-events: none; }
.rate-advisor-character { z-index: 1; display: grid; width: 130px; height: 130px; place-items: center; background: #151b13; border: 3px solid #95e345; box-shadow: 4px 4px 0 #090d07; }
.rate-advisor-character img { display: block; max-width: 120px; max-height: 120px; image-rendering: pixelated; }
.rate-advisor-copy { z-index: 1; max-width: 660px; }
.rate-advisor-copy h2 { margin: 7px 0; color: #f0f5e8; font-size: 17px; line-height: 1.8; }
.rate-advisor-copy > p:last-child { color: #d7e3cd; font-size: 20px; }
.rate-advisor-note { position: absolute; right: 20px; bottom: 12px; color: #b9e894; font: 8px var(--pixel-display); }
.rate-final-cta { display: grid; justify-items: center; gap: 12px; margin: 37px 0 0; padding: 26px 15px; text-align: center; border-top: 3px dashed #46523a; border-bottom: 3px dashed #46523a; }
.rate-final-cta h2 { margin: 0 0 2px; }
.rate-final-cta .rate-back-link { margin: 8px 0 0; }

.rate-lightbox { position: fixed; inset: 0; width: min(92vw, 1280px); max-width: none; max-height: none; height: fit-content; margin: auto; padding: 18px; overflow: visible; color: var(--ink); background: linear-gradient(#111a0dec, #111a0dec), url("/game-media/MainMenu.png") center/160px; border: 4px solid #95e345; box-shadow: 7px 7px 0 #090d07; }
.rate-lightbox::backdrop { background: #080c09e8; }
.rate-lightbox-figure { display: grid; justify-items: center; gap: 10px; margin: 0; }
.rate-lightbox-figure img { display: block; max-width: 100%; max-height: 76vh; width: auto; height: auto; object-fit: contain; image-rendering: pixelated; }
.rate-lightbox-figure figcaption { color: #d8f4bd; font-size: 17px; text-align: center; }
.rate-lightbox-close { position: absolute; z-index: 1; top: 5px; right: 5px; display: grid; width: 45px; height: 42px; place-items: center; padding: 0 0 3px; color: #fff; background: #3b3b3b url("/game-media/Button.png") center / 100% 100% no-repeat; border: 0; font: 25px/1 var(--pixel); }
.rate-lightbox-close:active { background-image: url("/game-media/ButtonWhenPress.png"); }

/* Give the dedicated game page its own complete in-game shell. */
.rate-state-theme {
  --bg: #151b13;
  --surface: #1e2918;
  --surface-light: #2a3a20;
  --ink: #f1f1df;
  --muted: #c6cfb6;
  --dim: #95a287;
  --line: #526d3a;
  --accent: #95e345;
  --accent-2: #c5f68d;
  --accent-ink: #16210f;
  --shadow: #090d07;
  background-color: #382719;
  background-image: url("/game-media/Table.png");
  background-position: center center;
  background-repeat: no-repeat;
  background-size: max(108vw, 192vh) auto;
  background-attachment: fixed;
  image-rendering: pixelated;
}
.rate-state-theme .public-topbar { background-color: #172113; background-image: linear-gradient(#172113d9, #172113d9), url("/game-media/MainMenu.png"); background-position: center; background-size: auto, 180px auto; border-color: #95e345; }
.rate-state-theme .brand { color: #a5ec5c; }
.rate-state-theme .rate-game-topbar { grid-template-columns: minmax(0, 1fr) auto; min-height: 76px; padding: 9px 15px; background-color: #172113; background-image: linear-gradient(#172113d9, #172113d9), url("/game-media/MainMenu.png"); background-position: center; background-size: auto, 320px 180px; border-color: #95e345; }
.rate-state-theme .rate-game-brand { width: max-content; max-width: 100%; display: flex; align-items: center; gap: 12px; color: #d9ffb0; text-shadow: 3px 3px #13200d; }
.rate-state-theme .rate-game-brand img { display: block; width: 42px; height: 42px; object-fit: contain; image-rendering: pixelated; }
.rate-state-theme .rate-game-brand span { display: grid; gap: 5px; }
.rate-state-theme .rate-game-brand strong { color: #a5ec5c; font: 12px/1.5 var(--pixel-display); letter-spacing: .02em; }
.rate-state-theme .rate-game-brand small { color: #e1f2d4; font: 8px/1.5 var(--pixel-display); }
.rate-state-theme .rate-header-actions { min-width: 54px; }
.rate-state-theme .public-nav a { display: flex; align-items: center; justify-content: center; min-height: 42px; padding: 4px 8px; color: #fff; background: #3b3b3b url("/game-media/Button.png") center / 100% 100% no-repeat; border: 0; line-height: 1.2; text-align: center; }
.rate-state-theme .public-nav a:hover, .rate-state-theme .public-nav a:active { color: #fff; background-image: url("/game-media/ButtonWhenPress.png"); }
.rate-state-theme .public-nav a.current { color: #fff; background-image: url("/game-media/ButtonWhenPress.png"); }
.rate-state-theme .language-switch { min-width: 54px; min-height: 46px; display: grid; place-items: center; padding: 4px; color: #fff; background: #3b3b3b url("/game-media/Button.png") center / 100% 100% no-repeat; border: 0; line-height: 1.2; text-align: center; }
.rate-state-theme .language-switch:active { background-image: url("/game-media/ButtonWhenPress.png"); }
.rate-state-theme .public-footer { padding-top: 16px; color: #dce8ce; border-top: 3px dashed #648944; }
.rate-state-theme .realm-clock { color: #a5ec5c; }
.rate-state-theme .realm-clock time { color: #dce8ce; }

@media (max-width: 800px) {
  .rate-teaser { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .rate-teaser-copy { padding-right: 128px; padding-left: 20px; }
  .rate-teaser-scene { min-height: 190px; border-top: 3px solid #66b926; border-left: 0; }
  .rate-teaser-screen { min-height: 190px; }
  .rate-game-hero { grid-template-columns: minmax(0, 1fr) minmax(270px, .9fr); gap: 18px; padding: 21px; }
  .rate-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .rate-game-hero { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .rate-teaser { grid-template-columns: minmax(0, 1fr); min-height: 0; gap: 0; }
  .rate-teaser-copy { min-height: 225px; padding: 19px 20px 91px 14px; }
  .rate-teaser-copy .rate-kicker { font-size: 8px; }
  .rate-teaser-copy h2 { font-size: 16px; }
  .rate-teaser-copy > p:not(.rate-kicker) { font-size: 17px; }
  .rate-teaser-action { margin-top: 12px; font-size: 14px; }
  .rate-teaser-copy::after { right: 0; }
  .rate-teaser-daniil { right: 18%; bottom: 5px; width: 84px; height: 84px; }
  .rate-teaser-scene { min-height: 148px; border-top: 2px solid #66b926; border-left: 0; }
  .rate-teaser-screen { min-height: 148px; object-position: 50% center; }
  .rate-teaser-corner { top: 8px; right: 8px; font-size: 8px; }
  .rate-game { padding-top: 4px; }
  .rate-back-link { font-size: 14px; }
  .rate-game-hero { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px; }
  .rate-game-intro h1 { font-size: 25px; }
  .rate-game-lead { font-size: 21px; }
  .rate-game-description { font-size: 18px; }
  .rate-game-cover { width: min(100%, 500px); justify-self: center; transform: none; }
  .rate-game-cover figcaption { font-size: 8px; }
  .rate-steam-button { width: 100%; min-height: 52px; padding: 0; font-size: 15px; }
  .rate-steam-icon { left: 12px; font-size: 17px; }
  .rate-release-note { font-size: 13px; }
  .rate-game-features, .rate-screenshots, .rate-advisor-panel { margin-top: 29px; }
  .rate-section-heading h2, .rate-final-cta h2 { font-size: 17px; }
  .rate-feature-grid { gap: 9px; }
  .rate-feature-card { padding: 12px 10px; }
  .rate-feature-index { font-size: 12px; }
  .rate-feature-card h3 { font-size: 11px; }
  .rate-feature-card p { font-size: 16px; }
  .rate-gallery-heading { align-items: start; }
  .rate-gallery-heading > span { max-width: 110px; font-size: 11px; text-align: right; }
  .rate-screenshot-grid { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .rate-screenshot figcaption { font-size: 16px; }
  .rate-advisor-panel { grid-template-columns: 92px minmax(0, 1fr); gap: 13px; padding: 16px 12px; }
  .rate-advisor-character { width: 86px; height: 86px; }
  .rate-advisor-character img { max-width: 80px; max-height: 80px; }
  .rate-advisor-copy .rate-kicker { font-size: 9px; }
  .rate-advisor-copy h2 { font-size: 14px; }
  .rate-advisor-copy > p:last-child { font-size: 17px; }
  .rate-advisor-note { display: none; }
  .rate-lightbox { width: calc(100vw - 24px); padding: 12px; }
  .rate-lightbox-figure img { max-height: 70vh; }
  .rate-lightbox-figure figcaption { padding: 0 40px; font-size: 15px; }
}
@media (max-width: 360px) {
  .rate-teaser { grid-template-columns: minmax(0, 1fr); }
  .rate-teaser-copy { padding-left: 10px; }
  .rate-teaser-copy h2 { font-size: 14px; }
  .rate-teaser-copy > p:not(.rate-kicker) { font-size: 15px; }
  .rate-teaser-action { font-size: 12px; }
  .rate-teaser-daniil { right: 17%; width: 76px; height: 76px; }
  .rate-feature-grid { grid-template-columns: minmax(0, 1fr); }
}
