@font-face {
  font-family: 'JMH Typewriter';
  src: url('/assets/fonts/JMH%20Typewriter-Thin.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JMH Typewriter';
  src: url('/assets/fonts/JMH%20Typewriter.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JMH Typewriter';
  src: url('/assets/fonts/JMH%20Typewriter-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'JMH Typewriter';
  src: url('/assets/fonts/JMH%20Typewriter-Black.ttf') format('truetype');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-chrome:  "JMH Typewriter", Tahoma, Verdana, "Segoe UI", Arial, sans-serif;
  --font-content: "JMH Typewriter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono:    "JMH Typewriter", "JetBrains Mono", "Cascadia Mono", "Consolas", "Courier New", monospace;
}

:root {
  --cur-arrow:  url("/assets/cursors/konata_01.png") 0 28, default;
  --cur-link:   url("/assets/cursors/konata_link.png") 0 24, pointer;
  --cur-text:   url("/assets/cursors/konata_font.png") 2 27, text;
  --cur-help:   url("/assets/cursors/konata_help.png") 0 28, help;
  --cur-no:     url("/assets/cursors/konata_no.png") 0 28, not-allowed;
  --cur-grab:   url("/assets/cursors/konata_02.png") 0 28, grab;
  --cur-grabby: url("/assets/cursors/konata_02.png") 0 28, grabbing;
  --cur-wait:   url("/assets/cursors/konata_wait01.png") 0 28, wait;
  --cur-busy:   url("/assets/cursors/konata_wait02.png") 0 28, progress;
  --cur-ns:     url("/assets/cursors/konata_size01.png") 3 24, ns-resize;
  --cur-ew:     url("/assets/cursors/konata_size02.png") 11 27, ew-resize;
  --cur-nwse:   url("/assets/cursors/konata_size03.png") 12 21, nwse-resize;
  --cur-nesw:   url("/assets/cursors/konata_size04.png") 19 21, nesw-resize;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
* { -webkit-tap-highlight-color: transparent; }

body {
  background: var(--page);
  font-family: var(--font-chrome);
  font-size: 12px;
  line-height: 1.55;
  min-height: 100vh;
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a             { color: #006618; }
a:hover       { color: #cc0000; }
a:visited     { color: #551a8b; }
img           { display: block; }

* { scrollbar-width: none; scrollbar-color: #d4d0c8 #808080; }
::-webkit-scrollbar       { width: 0; height: 0; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: transparent; }
::-webkit-scrollbar-button { display: none; }

#entrance {
  position: fixed; inset: 0;
  background: var(--counter-bg);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; cursor: var(--cur-link);
  flex-direction: column; gap: 0;
  transition: opacity 0.4s;
}
#entrance.out { opacity: 0; pointer-events: none; }
#entrance-gif { width: 260px; height: auto; margin-bottom: 20px; image-rendering: pixelated; }
.e-name   { font-family: var(--font-chrome); font-size: 18px; color: #c0c0c0; margin-bottom: 10px; letter-spacing: 3px; }
.e-prompt { font-family: var(--font-mono); font-size: 11px; color: #555; letter-spacing: 0.05em; animation: blink 1.2s step-end infinite; }

#content { display: none; padding: 12px; min-height: 100vh; }
#content.show { display: block; }

.win-app {
  max-width: 1240px;
  margin: 0 auto;
  background: rgba(212, 208, 200, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 2px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  box-shadow: 4px 4px 16px rgba(0,0,0,0.75);
}

.win-titlebar {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  padding: 3px 5px 3px 7px;
  display: flex; align-items: center; justify-content: space-between;
  user-select: none; gap: 4px;
}
.win-title-left { display: flex; align-items: center; gap: 5px; }
.win-title-text { color: #fff; font-size: 11px; font-weight: bold; }
.win-title-btns { display: flex; gap: 2px; }
.win-btn {
  width: 16px; height: 14px;
  background: var(--surface-raised);
  border: 2px solid; border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  font-size: 9px; font-weight: bold; font-family: Tahoma, sans-serif;
  cursor: var(--cur-link); padding: 0; color: var(--text);
  display: flex; align-items: center; justify-content: center; line-height: 1;
}
.win-btn:active { border-color: #808080 #fff #fff #808080; }

.top-nav {
  background: var(--surface-panel);
  border-bottom: 2px solid var(--bevel-lo);
  display: flex; align-items: flex-end;
  padding: 4px 6px 0; gap: 2px;
  flex-wrap: wrap; overflow-x: hidden;
}
.nav-tab {
  padding: 3px 12px 4px;
  font-size: 11px; font-family: Tahoma, sans-serif;
  color: var(--text); text-decoration: none;
  background: var(--surface-panel);
  border: 2px solid; border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  border-bottom: none;
  position: relative; top: 2px; white-space: nowrap;
}
.nav-tab:hover  { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.nav-tab:active { background: var(--surface-hover); top: 3px; }
.nav-tab.active { background: var(--surface-raised); border-bottom: 2px solid var(--surface-raised); z-index: 1; font-weight: bold; }

.main-body { padding: 6px; }
.main-grid {
  display: grid;
  grid-template-columns: 210px 1fr;
  grid-template-rows: auto auto auto;
  grid-template-areas:
    "sidebar welcome"
    "sidebar lower-a"
    "sidebar recent";
  gap: 6px;
}
.col-sidebar  { grid-area: sidebar; display: flex; flex-direction: column; gap: 6px; }
.area-welcome { grid-area: welcome; }
.area-lower-a { grid-area: lower-a; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.area-recent  { grid-area: recent; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
@media (max-width: 800px) { .area-recent { grid-template-columns: 1fr; } }

.main-grid > *,
.area-lower-a > *,
.area-recent > *,
.col-sidebar > *,
.panel { min-width: 0; }

.panel {
  background: rgba(212, 208, 200, 0.80);
  border: 2px solid; border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
.panel-header {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  padding: 2px 6px;
  display: flex; align-items: center; justify-content: space-between;
}
.panel-header h2, .panel-header span {
  color: #fff; font-size: 11px; font-weight: bold; font-family: Tahoma, sans-serif;
}
.panel-mini-btns { display: flex; gap: 2px; }
.pmb {
  width: 13px; height: 11px;
  background: var(--surface-raised);
  border: 1px solid; border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  font-size: 8px; cursor: var(--cur-link);
  display: flex; align-items: center; justify-content: center;
  font-family: Tahoma; font-weight: bold; color: var(--text); padding: 0;
}
.panel-body { padding: 7px; }
.panel-body.tight { padding: 5px; }
.panel-body.scroll {
  height: 160px; overflow-y: scroll;
  background: var(--surface-inset);
  border: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  padding: 6px;
}

.inset {
  background: var(--surface-inset);
  border: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  padding: 6px 8px;
  font-family: var(--font-content);
  line-height: 1.7;
  letter-spacing: 0.005em;
}
.inset p + p { margin-top: 6px; }

.about-2up {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px; margin-bottom: 8px;
}

.fl-wrap {
  background: var(--surface-inset);
  border: 2px solid;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
}
.file-list { width: 100%; border-collapse: collapse; font-size: 11px; }
.file-list th {
  text-align: left; font-weight: normal;
  font-size: 10px; color: var(--text-muted);
  padding: 2px 6px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--bevel-lo);
}
.file-list td { padding: 3px 6px; vertical-align: middle; }
.file-list tbody tr:nth-child(even) { background: var(--surface-raised); }
.fl-icon { width: 32px; padding-right: 0 !important; }
.fl-icon img {
  width: 32px; height: 32px; display: block;
  object-fit: cover;
  border: 2px solid;
  border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
}
.fl-type { color: var(--text-muted); white-space: nowrap; width: 1%; }
.fl-name { font-family: var(--font-content); }

.nav-list { list-style: none; }
.nav-list li { margin: 1px 0; }
.nav-list a  { display: block; padding: 3px 6px; font-size: 12px; color: var(--text); text-decoration: none; }
.nav-list a::before { content: "> "; color: var(--text-muted); font-size: 10px; }
.nav-list a:hover   { background: var(--accent-deep); color: var(--text); text-decoration: none; }
.nav-list a:hover::before { color: #aad; }

.chk-row { display: flex; align-items: center; gap: 5px; margin: 3px 0; font-size: 11px; cursor: var(--cur-link); }
.chk-row input { cursor: var(--cur-link); }

.counter-box { text-align: center; }
.counter-digits {
  font-family: var(--font-mono); font-size: 18px; font-weight: 500;
  background: var(--counter-bg); color: var(--counter-fg); padding: 4px 10px;
  border: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  letter-spacing: 2px; display: inline-block;
}
.counter-label { font-size: 10px; color: var(--text-muted); margin-top: 3px; letter-spacing: 0.04em; }

.img-ph {
  background: repeating-linear-gradient(45deg, #c8c4bc, #c8c4bc 2px, #d4d0c8 2px, #d4d0c8 12px);
  border: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 4px;
  color: var(--text-muted); font-size: 11px; text-align: center;
}

.welcome-grid {
  display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: start;
}

.discord-av-wrap {
  position: relative; width: 90px; height: 90px;
  margin: 0 auto; flex-shrink: 0;
}
.discord-av {
  width: 90px; height: 90px;
  border-radius: 50%;
  object-fit: cover; background: #888; display: block;
}
.discord-dec {
  position: absolute;
  top: -10%; left: -10%;
  width: 120%; height: 120%;
  pointer-events: none; z-index: 2;
}

.status-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 11px; }
.sdot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.sdot.online  { background: #43b581; }
.sdot.idle    { background: #faa61a; }
.sdot.dnd     { background: #f04747; }
.sdot.offline { background: #747f8d; }

.pres-entry { display: flex; gap: 8px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dotted var(--border-soft); }
.pres-entry:last-child { margin-bottom: 0; padding-bottom: 0; border-bottom: none; }
.pres-art {
  width: 56px; height: 56px; flex-shrink: 0;
  border: 3px solid; border-color: var(--accent) var(--bevel-lo) var(--bevel-lo) var(--accent);
  outline: 1px solid var(--bevel-hi);
  box-shadow: 0 0 10px rgba(74,222,128,0.45), 2px 2px 4px rgba(0,0,0,0.6);
  background: #888; object-fit: cover; position: relative;
  image-rendering: auto;
}
.pres-art-small {
  width: 20px; height: 20px; position: absolute; bottom: -4px; right: -4px;
  border: 1px solid var(--bevel-lo); background: #888; object-fit: cover;
}
.pres-info   { flex: 1; min-width: 0; }
.pres-type   { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2px; }
.pres-name   { font-size: 12px; font-weight: bold; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pres-detail { font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pres-state  { font-size: 10px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pres-link   { font-size: 10px; color: #006618; text-decoration: none; display: inline-block; margin-top: 2px; }
.pres-link:hover { color: #cc0000; }
.prog-outer  { background: #808080; border: 1px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo); height: 7px; position: relative; margin-top: 4px; }
.prog-inner  { height: 100%; background: var(--accent-deep); width: 0; transition: width 1s linear; }
.prog-times  { display: flex; justify-content: space-between; font-size: 9px; color: var(--text-muted); margin-top: 1px; }
.no-act      { font-size: 11px; color: var(--text-muted); padding: 10px 0; text-align: center; }

.blog-list { list-style: none; }
.blog-list li { padding: 5px 0; border-bottom: 1px dotted var(--border-soft); }
.blog-list li:last-child { border-bottom: none; }
.blog-title { font-family: var(--font-content); font-weight: 600; font-size: 12px; line-height: 1.4; letter-spacing: -0.005em; }
.blog-date  { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); letter-spacing: 0.02em; }
.blog-blurb { font-family: var(--font-content); font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.55; }
.blog-tag   { font-family: var(--font-mono); font-size: 9px; border: 1px solid var(--border-soft); padding: 1px 5px; color: var(--text-dim); margin-right: 4px; display: inline-block; letter-spacing: 0.03em; }

.blog-post-row { padding: 20px 18px; }
.blog-post-row + .blog-post-row { border-top: 1px solid var(--bevel-hi); }
.blog-post-img {
  display: block;
  max-width: 320px;
  width: 100%;
  height: auto;
  margin: 8px 0;
  border: 1px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
}
@media (max-width: 600px) {
  .blog-post-img { max-width: 100%; }
}
.blog-post-date {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.blog-post-title {
  font-family: var(--font-content);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.blog-post-body {
  font-family: var(--font-content);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.75;
  color: var(--text-dim);
  max-width: none;
  margin-bottom: 12px;
  word-wrap: break-word;
  overflow-wrap: break-word;
}
.blog-post-body p + p { margin-top: 12px; }
.blog-post-body + .blog-post-tags { margin-top: 10px; }

.cl-entry { padding: 4px 0; border-bottom: 1px dotted var(--border-soft); font-size: 11px; font-family: var(--font-content); line-height: 1.5; letter-spacing: 0.005em; }
.cl-entry:last-child { border-bottom: none; }
.cl-date { font-family: var(--font-mono); font-weight: 500; font-size: 10px; display: block; margin-bottom: 2px; letter-spacing: 0.03em; }

.tracks-row { display: grid; grid-template-columns: repeat(10, 1fr); gap: 4px; }
.t-item { text-align: center; }
.t-art {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border: 1px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  background: #888; image-rendering: pixelated;
}
.t-name   { font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.t-artist { font-size: 8px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.np-dot {
  display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: var(--accent-deep);
  animation: blink 1s step-end infinite;
  margin-right: 2px; vertical-align: middle;
}

.utterances-wrap { padding: 4px; min-height: 60px; }
.utterances-wrap .utterances { max-width: 100%; margin: 0; }

.win-footer {
  border-top: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi);
  padding: 4px 8px;
  font-size: 10px; color: var(--text-muted);
  display: flex; justify-content: space-between;
  background: var(--surface-panel);
  flex-wrap: wrap; gap: 4px;
}
.status-bar-seg {
  border: 1px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  padding: 1px 6px; font-size: 10px; color: var(--text-muted);
}
.footer-link {
  font-size: 10px;
  text-decoration: underline;
  text-underline-offset: 2px;
  align-self: center;
}

.win-app { overflow-x: hidden; }

.btn98 {
  background: var(--surface-raised);
  border: 2px solid; border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  padding: 3px 12px; font-size: 12px; font-family: Tahoma, sans-serif;
  cursor: var(--cur-link); text-decoration: none; color: var(--text); display: inline-block;
}
.btn98:hover  { background: var(--surface-hover); color: var(--text); text-decoration: none; }
.btn98:active { border-color: #808080 #fff #fff #808080; }

.btns88 { display: flex; flex-wrap: wrap; gap: 4px; }
.b88 {
  width: 88px; height: 31px;
  border: 1px solid var(--bevel-lo);
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; text-align: center; overflow: hidden;
  cursor: var(--cur-link); text-decoration: none;
  background: var(--surface-raised); color: var(--text); line-height: 1.1;
}
.b88 { transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.b88:hover { border-color: var(--accent-deep); box-shadow: 0 0 0 1px var(--accent-deep); transform: scale(1.5); position: relative; z-index: 5; }
.b88:active { border-color: var(--accent-deep); box-shadow: 0 0 0 1px var(--accent-deep); }
.b88.ph    { border-style: dashed; color: var(--text-muted); font-style: italic; cursor: var(--cur-arrow); }
.b88 img   { width: 88px; height: 31px; object-fit: cover; }

.lfm-profile-box { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.lfm-av  { width: 64px; height: 64px; border: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo); background: #888; object-fit: cover; }
.lfm-name { font-size: 18px; font-weight: bold; }
.lfm-stats { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.lfm-stats span { margin-right: 12px; }
.lfm-stat-n { font-weight: bold; color: var(--text); }
.track-list { border-collapse: collapse; width: 100%; font-size: 11px; }
.track-list th { background: rgba(212,208,200,0.90); border-bottom: 2px solid var(--bevel-lo); padding: 4px 6px; text-align: left; font-size: 11px; }
.track-list td { padding: 3px 6px; border-bottom: 1px solid #e0dcd4; vertical-align: middle; }
.track-list tr:hover td { background: rgba(232,228,220,0.80); }
.track-list .tl-art { width: 32px; height: 32px; border: 1px solid var(--bevel-lo); object-fit: cover; background: #888; image-rendering: pixelated; position: relative; transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease; }
.track-list .tl-art:hover { transform: scale(1.5); border-color: var(--accent-deep); box-shadow: 0 0 0 1px var(--accent-deep); z-index: 5; }
.tl-num { color: #808080; width: 24px; }
.tl-now { color: var(--accent-deep); font-weight: bold; }

#world-map { width: 100%; display: block; cursor: var(--cur-grab); }
#world-map:active { cursor: var(--cur-grabby); }
.country-path {
  fill: rgba(0,0,0,0.01);
  stroke: var(--text); stroke-width: 0.9;
  vector-effect: non-scaling-stroke;
  cursor: var(--cur-link); pointer-events: all;
}
.country-path.v1 { fill: var(--map-v1); stroke: var(--accent-deep); }
.country-path.v2 { fill: var(--map-v2); stroke: var(--accent-deep); }
.country-path.v3 { fill: var(--map-v3); stroke: var(--accent-deep); }
.country-path.v4 { fill: var(--map-v4); stroke: var(--accent-deep); }
.country-path.v5 { fill: var(--map-v5); stroke: var(--accent-deep); }
.country-path:hover {
  fill: var(--map-hover);
  stroke: var(--map-hover-stroke); stroke-width: 2;
}

.map-legend {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 6px; font-size: 10px; color: var(--text-muted);
}
.map-legend .lg-label { letter-spacing: 0.04em; }
.map-legend .lg-item { display: flex; align-items: center; gap: 3px; }
.map-legend .lg-sw {
  width: 12px; height: 10px; display: block;
  border: 1px solid var(--accent-deep);
}
.map-legend .lg-sw.v1 { background: var(--map-v1); }
.map-legend .lg-sw.v2 { background: var(--map-v2); }
.map-legend .lg-sw.v3 { background: var(--map-v3); }
.map-legend .lg-sw.v4 { background: var(--map-v4); }
.map-legend .lg-sw.v5 { background: var(--map-v5); }
.map-tip {
  position: fixed;
  background: rgba(212,208,200,0.96);
  border: 2px solid; border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  padding: 5px 10px; font-size: 11px;
  pointer-events: none; display: none; z-index: 500;
  box-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}
.map-tip.show { display: block; }
.map-tip strong { display: block; color: var(--accent-deep); font-size: 12px; }
.map-zoom-btns { display: flex; gap: 4px; margin-top: 4px; }

.socials-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; }
.social-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.80);
  border: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  text-decoration: none; color: var(--text); font-size: 12px;
  font-family: var(--font-content);
}
.social-link:hover { background: rgba(232,228,220,0.90); color: var(--text); }
.social-ico    { width: 22px; height: 22px; flex-shrink: 0; }
.social-name   { font-weight: 600; font-size: 12px; letter-spacing: -0.005em; }
.social-handle { font-family: var(--font-mono); font-size: 10px; color: var(--text-muted); letter-spacing: 0.02em; }

.sub-body { padding: 6px; }
.sub-header { border-bottom: 2px solid #808080; padding: 5px 4px 8px; margin-bottom: 6px; }
.sub-header h1 { font-family: var(--font-content); font-size: 16px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; }
.sub-header p  { font-family: var(--font-content); font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }

@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

#pet-sprite { image-rendering: pixelated; }

.blinkie-marquee {
  margin-bottom: 6px;
  overflow: hidden;
  background: var(--surface-panel);
  border: 2px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  padding: 3px 0;
}
.blinkie-track {
  display: flex; gap: 8px; width: max-content;
  animation: blinkie-scroll 40s linear infinite;
}
.blinkie-track:hover { animation-play-state: paused; }
.blinkie-track img {
  height: 20px; width: auto;
  flex-shrink: 0;
  image-rendering: pixelated;
  display: block;
}
@keyframes blinkie-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.tl-play {
  background: none; border: 1px solid var(--bevel-lo);
  width: 20px; height: 20px;
  font-size: 9px; cursor: var(--cur-link);
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.tl-play:hover { background: #d4d0c8; }

.pres-art-wrap { flex-shrink: 0; position: relative; }

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(67,181,129,0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(67,181,129,0); }
}
@keyframes slideRight {
  from { transform: translateX(-6px); opacity: 0; }
  to   { transform: translateX(0);    opacity: 1; }
}

.iris-overlay {
  position: fixed;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 200vmax #000;
  transform: translate(-50%, -50%);
  z-index: 99999;
  pointer-events: none;
  transition: width 0.55s cubic-bezier(0.65, 0, 0.35, 1),
              height 0.55s cubic-bezier(0.65, 0, 0.35, 1);
  will-change: width, height;
}
.iris-overlay.open {
  width: 300vmax;
  height: 300vmax;
}

.panel {
  animation: panelIn 0.3s cubic-bezier(0.22,1,0.36,1) both;
  transition: box-shadow 0.2s ease, transform 0.15s ease;
}
.panel:hover {
  transform: translateY(-1px);
  box-shadow: 3px 5px 14px rgba(0,0,0,0.28);
}

.col-sidebar .panel:nth-child(1) { animation-delay: 0.04s; }
.col-sidebar .panel:nth-child(2) { animation-delay: 0.08s; }
.col-sidebar .panel:nth-child(3) { animation-delay: 0.12s; }
.col-sidebar .panel:nth-child(4) { animation-delay: 0.16s; }
.col-sidebar .panel:nth-child(5) { animation-delay: 0.20s; }
.col-sidebar .panel:nth-child(6) { animation-delay: 0.24s; }
.col-sidebar .panel:nth-child(7) { animation-delay: 0.28s; }
.area-welcome .panel             { animation-delay: 0.06s; }
.area-lower-a .panel:nth-child(1){ animation-delay: 0.10s; }
.area-lower-a .panel:nth-child(2){ animation-delay: 0.16s; }

.nav-tab { transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease; }

.social-link { transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease; }
.social-link:hover { transform: translateX(3px); }

.pres-entry { animation: panelIn 0.25s ease both; }

.blog-list li { animation: slideRight 0.3s ease both; }
.blog-list li:nth-child(1) { animation-delay: 0.05s; }
.blog-list li:nth-child(2) { animation-delay: 0.10s; }
.blog-list li:nth-child(3) { animation-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
  .win-app, .panel, .pres-entry, .blog-list li { animation: none !important; }
  .nav-tab, .social-link, .panel { transition: none !important; }
}

@media (max-width: 800px) {
  #content { padding: 4px; }
  .main-grid {
    grid-template-columns: 1fr;
    grid-template-areas: "sidebar" "welcome" "lower-a" "recent";
  }
  .area-lower-a { grid-template-columns: 1fr; }
  .tracks-row   { grid-template-columns: repeat(5, 1fr); }
  .top-nav      { flex-direction: row; flex-wrap: wrap; }
  .nav-tab      { font-size: 10px; padding: 3px 2px 4px; flex: 1 1 18%; min-width: 0; text-align: center; }
  #changelog-panel, #calendar-panel { display: none; }
  .welcome-grid { grid-template-columns: 1fr; }
  .welcome-grid > div:first-child { display: none; }
  .discord-av-wrap { margin-bottom: 8px; }
  .socials-grid { grid-template-columns: 1fr; }
  .about-2up { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .tracks-row { grid-template-columns: repeat(4, 1fr); }
  .area-lower-a { gap: 4px; }
  .win-app { box-shadow: none; }
}

.recent-sub {
  padding: 4px 8px;
  font-size: 10px; color: var(--text-muted);
  border-bottom: 1px dotted var(--border-soft);
  letter-spacing: 0.03em;
}
.recent-list { display: flex; flex-direction: column; }
.recent-entry {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 10px;
  border-bottom: 1px dotted var(--border-soft);
  background: rgba(255,255,255,0.04);
}
.recent-entry:last-child { border-bottom: none; }
.recent-entry:hover { background: var(--panel-glow); }
.recent-art {
  width: 52px; height: 52px; flex-shrink: 0;
  border: 2px solid; border-color: var(--accent) var(--bevel-lo) var(--bevel-lo) var(--accent);
  outline: 1px solid var(--bevel-hi);
  background: #1a1630; object-fit: cover;
  image-rendering: auto;
}
.recent-art-ph {
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text-muted);
}
.recent-info  { flex: 1; min-width: 0; }
.recent-name  { font-size: 13px; font-weight: bold; color: var(--text); }
.recent-detail{ font-size: 11px; color: var(--text-dim); margin-top: 1px; }
.recent-state { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.recent-meta  {
  display: flex; align-items: center; gap: 6px;
  font-size: 10px; color: var(--text-muted); margin-top: 4px;
}
.recent-ico   { font-size: 11px; }
.recent-time  { font-family: var(--font-mono); }

.recent-comments { display: flex; flex-direction: column; }
.recent-cmt {
  padding: 8px 10px;
  border-bottom: 1px solid;
  border-bottom-color: var(--bevel-hi);
}
.recent-cmt:last-child { border-bottom: none; }
.recent-cmt-head {
  display: flex; align-items: baseline; gap: 8px;
  font-size: 11px; margin-bottom: 3px;
}
.recent-cmt-name { font-weight: bold; color: var(--text); }
.recent-cmt-when { font-size: 10px; color: var(--text-muted); }
.recent-cmt-msg  { font-size: 11px; color: var(--text-dim); line-height: 1.45; word-break: break-word; }
.recent-cmt-more {
  display: block; text-align: center;
  padding: 8px; font-size: 11px;
  color: var(--accent); text-decoration: none;
}
.recent-cmt-more:hover { text-decoration: underline; }

.gb-form { display: flex; flex-direction: column; gap: 8px; }
.gb-label {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 11px; color: var(--text-dim);
  font-family: var(--font-content);
  letter-spacing: 0.02em;
}
.gb-opt { color: var(--text-muted); font-size: 10px; margin-left: 4px; }
.gb-input {
  font-family: var(--font-content);
  font-size: 12px; line-height: 1.5;
  background: rgba(255,255,255,0.92);
  color: var(--page);
  border: 2px solid; border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo);
  padding: 4px 6px;
  outline: none;
}
.gb-input:focus { border-color: var(--accent-deep) var(--accent) var(--accent) var(--accent-deep); }
.gb-textarea   { resize: vertical; min-height: 70px; }
.gb-count {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--text-muted);
  align-self: flex-end;
}
.gb-actions {
  display: flex; align-items: center; gap: 10px;
}
.gb-status {
  font-size: 11px; color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.gb-list { display: flex; flex-direction: column; }
.gb-entry {
  padding: 8px 10px;
  border-bottom: 1px dotted var(--border-soft);
}
.gb-entry:last-child { border-bottom: none; }
.gb-head {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 11px; margin-bottom: 4px;
}
.gb-name { font-weight: bold; color: var(--text); font-size: 12px; }
.gb-name a { color: var(--accent); }
.gb-when { color: var(--text-muted); font-family: var(--font-mono); font-size: 10px; }
.gb-code {
  margin-left: auto;
  color: var(--text-muted); font-family: var(--font-mono); font-size: 10px;
  letter-spacing: 0.04em;
}
.gb-msg {
  font-family: var(--font-content);
  font-size: 12px; line-height: 1.6;
  color: var(--text-dim);
  white-space: pre-wrap; word-wrap: break-word;
}
.gb-reply {
  margin-top: 6px; margin-left: 14px;
  padding: 5px 8px;
  background: rgba(74,222,128,0.05);
  border-left: 2px solid var(--accent);
  font-size: 11px;
}
.gb-reply-who { color: var(--accent); font-weight: bold; }
.gb-reply-when { color: var(--text-muted); font-family: var(--font-mono); font-size: 10px; margin-left: 6px; }
.gb-reply-msg { color: var(--text); margin-top: 2px; white-space: pre-wrap; word-wrap: break-word; }

.gb-md-code {
  font-family: var(--font-mono); font-size: 11px;
  padding: 0 3px;
  background: rgba(128,128,128,0.18);
  border: 1px solid rgba(128,128,128,0.25);
}
.gb-fmt-btn b { font-weight: 700; }
.gb-fmt-btn i { font-style: italic; }

.gb-emoji {
  height: 18px; width: auto;
  vertical-align: -4px;
  display: inline;
  image-rendering: auto;
}
.gb-emoji-picker {
  margin-top: 2px;
  max-height: 180px;
  overflow-y: auto;
  background: var(--surface-inset);
  border: 2px solid;
  border-color: var(--border-soft) var(--bevel-hi) var(--bevel-hi) var(--border-soft);
  padding: 6px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
  gap: 3px;
}
.gb-emoji-picker[hidden] { display: none; }
.gb-emoji-btn {
  width: 100%; aspect-ratio: 1;
  padding: 2px;
  background: rgba(255,255,255,0.04);
  border: 1px solid transparent;
  cursor: var(--cur-link);
  display: flex; align-items: center; justify-content: center;
}
.gb-emoji-btn:hover {
  background: var(--panel-glow);
  border-color: var(--accent);
}
.gb-emoji-btn img {
  width: 24px; height: 24px;
  object-fit: contain;
  image-rendering: auto;
}

.gb-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-top: 1px dotted var(--border-soft);
}
.gb-page-btn { padding: 2px 12px; font-size: 11px; }
.gb-page-btn[disabled],
.btn98[disabled] {
  opacity: 0.4; cursor: var(--cur-no);
}
.gb-page-info {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
}

.gb-url-row { padding: 0 0 4px; }
.gb-url {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #006618;
  word-break: break-all;
}
.gb-url:hover { color: #cc0000; text-decoration: underline; }

.gb-actions-row { margin-top: 4px; }
.gb-reply-btn {
  background: none; border: none; padding: 0;
  font-size: 10px; color: var(--text-muted); cursor: var(--cur-link);
  font-family: var(--font-mono);
}
.gb-reply-btn:hover { color: var(--accent); text-decoration: underline; }
.gb-reply { margin-left: 18px; padding-top: 6px; border-left: 2px solid var(--border-soft); padding-left: 8px; }
.gb-reply-owner { border-left-color: var(--accent); }
.gb-reply-head { display: flex; align-items: baseline; gap: 8px; font-size: 11px; }
.gb-reply-form {
  margin-top: 6px; padding: 6px; display: flex; flex-direction: column; gap: 4px;
  background: var(--surface-hover);
  border: 1px solid var(--border-soft);
}
.gb-reply-cancel { padding: 2px 10px; font-size: 11px; }
.gb-reply-send   { padding: 2px 10px; font-size: 11px; }
.gb-reply-status { font-size: 10px; color: var(--text-muted); align-self: center; }

.link-warn-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 10000; padding: 16px;
}
.link-warn-box {
  width: min(340px, 100%);
  background: var(--page);
  border: 2px solid; border-color: var(--accent) var(--bevel-lo) var(--bevel-lo) var(--accent);
  box-shadow: 0 0 16px rgba(74,222,128,0.35), 4px 4px 14px rgba(0,0,0,0.75);
  font-family: var(--font-chrome);
}
.link-warn-titlebar {
  background: linear-gradient(90deg, var(--accent-deep), var(--accent));
  padding: 3px 7px;
  font-size: 11px; font-weight: bold; color: var(--text);
  letter-spacing: 0.02em;
}
.link-warn-body {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 12px 10px;
}
.link-warn-icon { flex-shrink: 0; margin-top: 1px; }
.link-warn-msg {
  font-size: 12px; line-height: 1.5; color: var(--text);
}
.link-warn-url {
  display: block; margin-top: 6px;
  font-family: var(--font-mono); font-size: 10px;
  color: var(--text-muted); word-break: break-all;
}
.link-warn-btns {
  display: flex; justify-content: flex-end; gap: 6px;
  padding: 0 12px 12px;
}
.link-warn-btn {
  background: var(--surface-panel);
  border: 2px solid; border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  padding: 4px 14px; font-size: 11px; font-family: Tahoma, sans-serif;
  cursor: var(--cur-link); color: var(--text-dim);
}
.link-warn-btn:hover { background: var(--surface-hover); color: var(--text); }
.link-warn-btn:active { border-color: var(--bevel-lo) var(--bevel-hi) var(--bevel-hi) var(--bevel-lo); }
.link-warn-continue { color: var(--accent); }
.link-warn-continue:hover { color: var(--accent-visited); }

.gb-reply-owner-row { display: flex; align-items: flex-start; gap: 8px; }
.gb-reply-owner-main { flex: 1; min-width: 0; }
.gb-owner-av {
  width: 40px; height: 40px; flex-shrink: 0;
  object-fit: cover; display: block;
  border: 1px solid var(--bevel-hi); background: var(--bevel-lo);
  image-rendering: auto;
}

.poll-q {
  font-size: 12px; color: var(--text); font-weight: bold;
  line-height: 1.4; margin-bottom: 8px; word-wrap: break-word;
}
.poll-opts { display: flex; flex-direction: column; gap: 5px; max-height: 220px; overflow-y: auto; }
.poll-opt {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--text-dim); cursor: var(--cur-link);
  padding: 5px 7px;
  background: var(--surface-inset);
  border: 1px solid var(--border-soft);
}
.poll-opt:hover { border-color: var(--bevel-hi); background: var(--surface-hover); }
.poll-opt input { accent-color: var(--accent); margin: 0; flex-shrink: 0; }
.poll-opt span { line-height: 1.3; word-break: break-word; }
.poll-actions { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.poll-vote-btn { padding: 2px 16px; font-size: 12px; }
.poll-meta { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.poll-hint { font-size: 10px; color: var(--text-muted); margin-top: 4px; }
.poll-status { font-size: 10px; color: var(--accent); min-height: 12px; margin-top: 4px; }
.poll-results { display: flex; flex-direction: column; gap: 7px; max-height: 240px; overflow-y: auto; }
.poll-res { font-size: 11px; }
.poll-res-top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; margin-bottom: 3px; }
.poll-res-label { color: var(--text-dim); word-break: break-word; }
.poll-res-pct { color: var(--accent); font-family: var(--font-mono); flex-shrink: 0; }
.poll-res-bar {
  height: 10px; overflow: hidden;
  background: var(--surface-inset); border: 1px solid var(--border-soft);
}
.poll-res-fill { height: 100%; background: var(--accent); transition: width 0.4s ease; }
.poll-dates { font-size: 9px; color: var(--text-muted); font-family: var(--font-mono); margin-top: 4px; word-break: break-word; }

.saya-top {
  position: fixed;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: block;
  border: none;
  padding: 0;
  background: none;
  cursor: var(--cur-link);
  opacity: 0;
  transform: translateX(110%);
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.saya-top.is-in {
  opacity: 0.5;
  transform: translateX(0);
}

@media (hover: hover) {
  .saya-top.is-in:hover { opacity: 1; }
}

@media (hover: none) {
  .saya-top.is-in { opacity: 1; }
}

.saya-top.is-in:focus-visible {
  opacity: 1;
}

.saya-top.is-out {
  opacity: 0;
  transform: translateX(110%);
  pointer-events: none;
}

.saya-img {
  display: block;
  width: 200px;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.saya-tip {
  position: absolute;
  right: 100%;
  bottom: 130px;
  margin-right: 6px;
  padding: 4px 9px;
  border: 1px solid;
  border-color: var(--bevel-hi) var(--bevel-lo) var(--bevel-lo) var(--bevel-hi);
  background: var(--surface-solid);
  color: var(--text);
  font-family: var(--font-chrome);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(6px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .saya-top.is-in:hover .saya-tip {
    opacity: 1;
    transform: translateX(0);
  }
}

.saya-top.is-in:focus-visible .saya-tip {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 640px) {
  .saya-img { width: 132px; }
  .saya-tip { bottom: 86px; font-size: 10px; }
  body.has-saya #content { padding-bottom: 170px; }
}

@media (max-width: 380px) {
  .saya-img { width: 104px; }
  .saya-tip { bottom: 68px; }
  body.has-saya #content { padding-bottom: 140px; }
}

@media (prefers-reduced-motion: reduce) {
  .saya-top { transition: opacity 0.2s ease; transform: none; }
  .saya-top.is-in { transform: none; }
  .saya-top.is-out { transform: none; }
  .saya-tip { transition: opacity 0.2s ease; transform: none; }
}

body { cursor: var(--cur-arrow); }
a, button, summary, select, [role="button"], area, img[usemap],
input[type="checkbox"], input[type="radio"], input[type="submit"], input[type="button"] {
  cursor: var(--cur-link);
}
input[type="text"], input[type="url"], input[type="email"], textarea { cursor: var(--cur-text); }
abbr[title], [data-help] { cursor: var(--cur-help); }
body.is-wait, body.is-wait * { cursor: var(--cur-wait); }
body.is-busy, body.is-busy * { cursor: var(--cur-busy); }
.rs-ns { cursor: var(--cur-ns); }
.rs-ew { cursor: var(--cur-ew); }
.rs-nwse { cursor: var(--cur-nwse); }
.rs-nesw { cursor: var(--cur-nesw); }

@media (hover: none) {
  body, body * { cursor: auto; }
}

.cal-body { padding: 6px; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  font-size: 10px;
  text-align: center;
}

.cal-dow {
  font-weight: bold;
  color: var(--text-muted);
  padding: 2px 0 3px;
}

.cal-day {
  padding: 2px 0;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.cal-day.is-pad { color: transparent; }

.cal-day.is-today {
  background: var(--accent-deep);
  color: #fff;
  font-weight: bold;
}

#calendar-panel,
#changelog-panel {
  animation: none;
  opacity: 1;
}

.blog-post-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.blog-post-head .blog-post-title { margin-bottom: 0; }
.blog-copy { font-size: 10px; padding: 1px 6px; }
/* Music page: playlists get their own full-width row so the grid can grow right
   instead of being trapped in the left half of the two-column music grid. */
.playlist-panel { grid-column: 1 / -1; }

.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 160px);
  gap: 10px;
  padding: 10px;
  justify-content: start;
}

/* The hitbox is the artwork, nothing more: no padding, no full-width block. */
.playlist-art {
  display: block;
  width: 160px;
  padding: 0;
  line-height: 0;
}

.playlist-art img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  border-radius: 3px;
  transition: transform 0.2s ease;
}

.playlist-art:hover img { transform: scale(1.12); }
