/* =========================================================
   Web Bitoi — Shared Stylesheet (Vintage Retro Pixel)
   Palette: Warm RPG Paper + Slate Teal (#3E6B7E)
   Fonts: VT323 (Display), Space Mono (UI/Meta), Patrick Hand (Body)
   Prototype Layout: Ref/Welcome first.png + Ref/Menu_v2.png
   ========================================================= */

:root {
  --bg-paper: #EDE0C8;
  --paper-dot: rgba(59, 40, 30, 0.14);
  --surface-card: #FBF5E6;
  --surface-sidebar: #DFCCA8;
  --border-pixel: #3B281E;
  --shadow-color: #3B281E;
  --text-main: #2B1D14;
  --text-muted: #665040;
  --accent-primary: #C85A32;
  --accent-primary-hover: #B44E29;
  --on-primary: #FFF8EE;
  --accent-secondary: #3E6B7E;
  --accent-secondary-hover: #325868;
  --on-secondary: #FFF8EE;
  --pin-note: #F7E396;
  --on-pin: #2B1D14;
  --pin-muted: #665040;
  --pin-accent: #C85A32;
  --pin-bevel-light: #FFF8D4;
  --pin-bevel-dark: #DFC364;
  --input-bg: #FFFDF7;
  --nav-hover-bg: #FFFDF7;
  --title-shadow: rgba(251, 245, 230, 0.9);
  --dashed-divider: rgba(59, 40, 30, 0.35);
  --wood-hole-rim: #B0865B;
  --wood-hole-mid: #6D4528;
  --wood-hole-edge: #3B2314;
  --wood-rivet: #D8B563;
  --scroll-track: #E5D4B5;
  --scroll-track-dot: rgba(90, 55, 30, 0.22);
  --scroll-thumb: #A57247;
  --scroll-thumb-hi: #CFA070;
  --scroll-thumb-shadow: #6E4526;
  --scroll-thumb-hover: #C85A32;
  --scroll-thumb-hover-hi: #E38660;
  --scroll-btn-bg: #DFCCA8;
  --scroll-btn-hover: #FBF5E6;

  --font-display: 'VT323', monospace;
  --font-ui: 'Space Mono', monospace;
  --font-body: 'Patrick Hand', cursive, sans-serif;

  --shadow-pixel: 4px 4px 0 var(--shadow-color);
  --shadow-btn: 3px 3px 0 var(--shadow-color);
  --radius-pixel: 2px;
}

/* Demo Dark Mode Palette: Candlelit RPG Study */
[data-theme="dark"] {
  --bg-paper: #1E1815;
  --paper-dot: rgba(239, 227, 206, 0.08);
  --surface-card: #29211C;
  --surface-sidebar: #231C18;
  --border-pixel: #5C493C;
  --shadow-color: #0D0907;
  --text-main: #EFE3CE;
  --text-muted: #B5A38F;
  --accent-primary: #D96B42;
  --accent-primary-hover: #C45D37;
  --on-primary: #FFF8EE;
  --accent-secondary: #548CA3;
  --accent-secondary-hover: #46788D;
  --on-secondary: #FFF8EE;
  --pin-note: #DFC97B;
  --on-pin: #231811;
  --pin-muted: #5A452C;
  --pin-accent: #9C3A1B;
  --pin-bevel-light: #F3E29F;
  --pin-bevel-dark: #BC9F4E;
  --input-bg: #1B1512;
  --nav-hover-bg: #342A23;
  --title-shadow: rgba(13, 9, 7, 0.85);
  --dashed-divider: rgba(239, 227, 206, 0.22);
  --wood-hole-rim: #593E2F;
  --wood-hole-mid: #2C1B12;
  --wood-hole-edge: #160C07;
  --wood-rivet: #A88747;
  --scroll-track: #1A1411;
  --scroll-track-dot: rgba(174, 124, 82, 0.18);
  --scroll-thumb: #784E32;
  --scroll-thumb-hi: #A3724D;
  --scroll-thumb-shadow: #422717;
  --scroll-thumb-hover: #D96B42;
  --scroll-thumb-hover-hi: #EE926C;
  --scroll-btn-bg: #2E231D;
  --scroll-btn-hover: #3D2E26;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg-paper);
  background-image: radial-gradient(var(--paper-dot) 1px, transparent 1px);
  background-size: 16px 16px;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.is-modal-open {
  overflow: hidden;
}

a {
  color: var(--accent-secondary);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-primary);
}

:focus-visible {
  outline: 3px dashed var(--accent-secondary);
  outline-offset: 2px;
}

/* ---------- Vintage Retro Pixel Primitives ---------- */

.pixel-box {
  border: 2px solid var(--border-pixel);
  border-radius: var(--radius-pixel);
  box-shadow: var(--shadow-pixel);
  background-color: var(--surface-card);
}

.pixel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;
  border: 2px solid var(--border-pixel);
  border-radius: var(--radius-pixel);
  box-shadow: var(--shadow-btn);
  background-color: var(--surface-sidebar);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.12s ease;
}

.pixel-btn:hover {
  background-color: var(--surface-card);
  color: var(--text-main);
}

.pixel-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow-color);
}

.pixel-btn--primary {
  background-color: var(--accent-primary);
  color: var(--on-primary);
}

.pixel-btn--primary:hover {
  background-color: var(--accent-primary-hover);
  color: var(--on-primary);
}

.pixel-btn--secondary {
  background-color: var(--accent-secondary);
  color: var(--on-secondary);
}

.pixel-btn--secondary:hover {
  background-color: var(--accent-secondary-hover);
  color: var(--on-secondary);
}

.tag-pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1.5px solid var(--border-pixel);
  border-radius: var(--radius-pixel);
  background-color: var(--accent-secondary);
  color: var(--on-secondary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 34px;
  line-height: 1;
  letter-spacing: 0.04em;
  color: var(--text-main);
}

/* =========================================================
   Welcome Entry Gate (Ref/Welcome first.png)
   ========================================================= */

.welcome-gate {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: var(--bg-paper);
  background-image: radial-gradient(var(--paper-dot) 1px, transparent 1px);
  background-size: 16px 16px;
}

.welcome-gate[hidden] {
  display: none;
}

.welcome-gate__card {
  width: 100%;
  max-width: 720px;
  min-height: 430px;
  padding: 34px 36px 26px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--surface-card);
  border-width: 3px;
  box-shadow: 8px 8px 0 var(--shadow-color);
}

.welcome-gate__title {
  margin: 0 0 18px;
  text-align: center;
  font-family: var(--font-display);
  font-size: 56px;
  line-height: 0.95;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  text-shadow: 2px 2px 0 var(--shadow-color);
}

.welcome-gate__copy {
  max-width: 48ch;
  margin: 0 auto 24px;
  text-align: center;
  font-size: 20px;
  line-height: 1.7;
}

.welcome-gate__copy p {
  margin: 0 0 12px;
}

.welcome-gate__copy p:last-child {
  margin-bottom: 0;
}

.welcome-gate__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  padding-top: 12px;
}

.welcome-deco {
  flex-shrink: 0;
  width: 68px;
  height: 68px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.welcome-deco svg,
.welcome-deco img {
  display: block;
  width: 64px;
  height: 64px;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 rgba(59, 40, 30, 0.35));
  animation: deco-idle 0.9s steps(2) infinite;
}

@keyframes deco-idle {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
  100% { transform: translateY(0); }
}

.welcome-gate__form {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.welcome-gate__field {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 380px;
}

.welcome-gate__label {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  color: var(--text-main);
}

.welcome-gate__input {
  flex: 1;
  min-width: 120px;
  padding: 4px 6px;
  border: none;
  border-bottom: 3px solid var(--border-pixel);
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 22px;
  outline: none;
}

.welcome-gate__input:focus {
  border-bottom-color: var(--accent-primary);
}

.welcome-gate__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

/* =========================================================
   Left-Flush Framed Shell Layout (Ref/Menu_v2.png)
   ========================================================= */

.site-shell {
  width: 100%;
  height: 100vh;
  overflow: hidden;
  max-width: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  gap: 0;
  align-items: stretch;
}

/* Left Sidebar: Flush to left viewport edge */
.left-sidebar {
  position: relative;
  height: 100vh;
  overflow-y: auto;
  padding: 18px 14px 16px;
  background-color: var(--surface-sidebar);
  border-right: 2px solid var(--border-pixel);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.site-logo {
  display: block;
  padding: 10px 12px;
  background-color: var(--accent-primary);
  color: var(--on-primary);
  font-family: var(--font-display);
  font-size: 46px;
  line-height: 0.95;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
  text-shadow: 2px 2px 0 var(--shadow-color);
}

.site-logo:hover {
  color: var(--on-primary);
  background-color: var(--accent-primary-hover);
}

.site-logo--image {
  padding: 6px;
  background-color: var(--surface-card);
  text-shadow: none;
}

.site-logo--image:hover {
  background-color: var(--surface-card);
}

.site-logo__img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 13px;
  border: 2px solid var(--border-pixel);
  border-radius: var(--radius-pixel);
  box-shadow: var(--shadow-btn);
  background-color: var(--surface-card);
  color: var(--text-main);
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: transform 0.08s ease, box-shadow 0.08s ease, background-color 0.12s ease;
}

.nav-link:hover {
  background-color: var(--nav-hover-bg);
  color: var(--text-main);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--shadow-color);
}

.nav-link:active {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px 0 var(--shadow-color);
}

.nav-link.is-active {
  background-color: var(--nav-hover-bg);
  color: var(--accent-primary);
  border-left-width: 6px;
}

.nav-link.is-active::after {
  content: "◀";
  font-family: var(--font-ui);
  font-size: 12px;
  color: var(--accent-primary);
}

/* Bottom Left Sidebar: 3x2 Social Icon Buttons */
.sidebar-social {
  margin-top: auto;
  padding-top: 14px;
  border-top: 2px dashed var(--dashed-divider);
}

.sidebar-social__label {
  display: block;
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-align: center;
}

.social-icon-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.social-icon-btn {
  padding: 8px 0;
  min-height: 40px;
}

.social-icon-btn svg {
  display: block;
  width: 20px;
  height: 20px;
  image-rendering: pixelated;
}

[data-theme="dark"] .social-icon-btn rect[fill="#FBF5E6"] {
  fill: var(--surface-sidebar);
}

/* Right Workspace: Fixed Top Banner + Split-Scroll Content Grid + Fixed Footer */
.workspace-col {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  min-width: 0;
  gap: 0;
}

/* Top Framed Banner (Hướng 1: Antique Wood Rail + Asymmetric Sprouts) */
.news-banner {
  position: relative;
  z-index: 20;
  flex-shrink: 0;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 3px solid var(--border-pixel);
  background-color: #825A38;
  background-size: 192px 40px;
  background-repeat: repeat;
  image-rendering: pixelated;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 20' shape-rendering='crispEdges'%3E%3Crect width='96' height='20' fill='%23825A38'/%3E%3Crect x='0' y='0' width='96' height='1' fill='%239C7049'/%3E%3Crect x='0' y='19' width='96' height='1' fill='%234A2E1A'/%3E%3Crect x='8' y='5' width='18' height='1' fill='%236B4628'/%3E%3Crect x='46' y='13' width='22' height='1' fill='%236B4628'/%3E%3Crect x='78' y='4' width='12' height='1' fill='%236B4628'/%3E%3Crect x='24' y='8' width='12' height='1' fill='%23926844'/%3E%3Crect x='64' y='6' width='10' height='1' fill='%23926844'/%3E%3Crect x='14' y='15' width='11' height='1' fill='%23926844'/%3E%3Crect x='34' y='15' width='6' height='1' fill='%233B2314'/%3E%3Crect x='84' y='11' width='5' height='1' fill='%233B2314'/%3E%3C/svg%3E");
  box-shadow:
    inset 0 2px 0 #A57850,
    inset 0 -3px 0 #4B2F1B;
}

[data-theme="dark"] .news-banner {
  background-color: #362319;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 20' shape-rendering='crispEdges'%3E%3Crect width='96' height='20' fill='%23362319'/%3E%3Crect x='0' y='0' width='96' height='1' fill='%234D3526'/%3E%3Crect x='0' y='19' width='96' height='1' fill='%231C100A'/%3E%3Crect x='8' y='5' width='18' height='1' fill='%23281911'/%3E%3Crect x='46' y='13' width='22' height='1' fill='%23281911'/%3E%3Crect x='78' y='4' width='12' height='1' fill='%23281911'/%3E%3Crect x='24' y='8' width='12' height='1' fill='%23442E21'/%3E%3Crect x='64' y='6' width='10' height='1' fill='%23442E21'/%3E%3Crect x='14' y='15' width='11' height='1' fill='%23442E21'/%3E%3Crect x='34' y='15' width='6' height='1' fill='%23150B06'/%3E%3Crect x='84' y='11' width='5' height='1' fill='%23150B06'/%3E%3C/svg%3E");
  box-shadow:
    inset 0 2px 0 #503728,
    inset 0 -3px 0 #1B100A;
}

/* Brass corner rivets on wood rails */
.wood-rivet {
  position: absolute;
  width: 5px;
  height: 5px;
  background-color: var(--wood-rivet);
  border: 1px solid #2A1910;
  pointer-events: none;
  z-index: 2;
}

.wood-rivet--tl { top: 4px; left: 5px; }
.wood-rivet--tr { top: 4px; right: 5px; }
.wood-rivet--bl { bottom: 4px; left: 5px; }
.wood-rivet--br { bottom: 4px; right: 5px; }

/* Asymmetric pixel sprouts emerging from wood rails */
.wood-sprout {
  position: absolute;
  pointer-events: none;
  z-index: 22;
  image-rendering: pixelated;
  filter: drop-shadow(1px 2px 0 rgba(59, 40, 30, 0.35));
}

.wood-sprout svg {
  display: block;
  width: 100%;
  height: 100%;
}

[data-theme="dark"] .wood-sprout {
  filter: brightness(0.86) drop-shadow(1px 2px 0 rgba(10, 6, 4, 0.55));
}

.wood-sprout--top-left {
  left: 19%;
  bottom: -14px;
  width: 28px;
  height: 22px;
  transform-origin: top center;
  animation: sprout-sway 2.6s steps(2, end) infinite;
}

.wood-sprout--top-right {
  left: 63%;
  bottom: -11px;
  width: 22px;
  height: 18px;
  transform-origin: top center;
  animation: sprout-sway 3.3s steps(2, end) infinite reverse;
}

.wood-sprout--bot-left {
  left: 13%;
  top: -22px;
  width: 30px;
  height: 26px;
  transform-origin: bottom center;
  animation: sprout-sway 2.8s steps(2, end) infinite;
}

.wood-sprout--bot-right {
  left: 56%;
  top: -18px;
  width: 26px;
  height: 22px;
  transform-origin: bottom center;
  animation: sprout-sway 3.4s steps(2, end) infinite reverse;
}

@keyframes sprout-sway {
  0% { transform: translateX(0); }
  50% { transform: translateX(1px); }
  100% { transform: translateX(0); }
}

.news-track {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.news-badge {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 2px solid #2A1910;
  box-shadow: 2px 2px 0 rgba(28, 15, 8, 0.65);
  background-color: var(--accent-primary);
  color: var(--on-primary);
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.news-marquee {
  position: relative;
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.news-text {
  display: inline-block;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 700;
  color: #FFF8EE;
  text-shadow: 1.5px 1.5px 0 #2B170C;
  white-space: nowrap;
  will-change: transform;
}

[data-theme="dark"] .news-text {
  color: #F4E9D6;
  text-shadow: 1.5px 1.5px 0 #120905;
}

.news-marquee.is-scrolling .news-text {
  animation: news-ticker var(--marquee-duration, 14s) linear infinite;
}

.news-marquee.is-scrolling:hover .news-text {
  animation-play-state: paused;
}

@keyframes news-ticker {
  0% { transform: translateX(var(--marquee-start, 100%)); }
  100% { transform: translateX(-100%); }
}

.banner-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.banner-log-btn {
  padding: 5px 10px;
  font-size: 12px;
}

/* Far-right Nickname / Account Status Box */
.nickname-box {
  position: relative;
  flex-shrink: 0;
}

.nickname-trigger {
  padding: 5px 10px;
  background-color: var(--accent-secondary);
  color: var(--on-secondary);
  font-size: 12px;
}

.nickname-trigger:hover {
  background-color: var(--accent-secondary-hover);
  color: var(--on-secondary);
}

.nickname-trigger.is-admin {
  background-color: var(--accent-primary);
  color: var(--on-primary);
}

.nickname-trigger.is-admin:hover {
  background-color: var(--accent-primary-hover);
  color: var(--on-primary);
}

.nickname-status-dot {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--border-pixel);
  background-color: var(--pin-note);
  display: inline-block;
}

.nickname-trigger.is-anon .nickname-status-dot {
  background-color: #9EE37D;
}

.nickname-trigger.is-member .nickname-status-dot {
  background-color: #77D4FC;
}

.nickname-trigger.is-admin .nickname-status-dot {
  background-color: #FFE066;
}

.nickname-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  width: 280px;
  padding: 14px;
  background-color: var(--surface-card);
}

.nickname-popover[hidden] {
  display: none;
}

.popover-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  color: var(--text-main);
}

.popover-hint {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.45;
  color: var(--text-muted);
}

.nickname-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pixel-input {
  width: 100%;
  padding: 7px 9px;
  border: 2px solid var(--border-pixel);
  border-radius: var(--radius-pixel);
  background-color: var(--input-bg);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 13px;
}

.popover-actions {
  display: flex;
  gap: 8px;
}

.popover-actions .pixel-btn {
  flex: 1;
  font-size: 12px;
  padding: 6px 8px;
}

/* Middle Content Grid: Split-Scroll Open Center Canvas + Right Wood Board */
.content-grid {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 0;
  align-items: stretch;
}

.main-column {
  position: relative;
  z-index: 1;
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  padding: 38px 44px 40px;
  min-width: 0;
}

/* Shared Day/Night Pixel Sky across all pages */
.page-sky {
  position: absolute;
  top: 12px;
  left: 0;
  right: 304px;
  height: 108px;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sky-night {
  display: none;
}

[data-theme="dark"] .sky-day {
  display: none;
}

[data-theme="dark"] .sky-night {
  display: block;
}

.sky-cloud-sleepy {
  position: absolute;
  top: 6px;
  right: 26px;
  width: 132px;
  height: 72px;
  image-rendering: pixelated;
  animation: sky-bob 3.2s steps(2, end) infinite;
}

.sky-cloud-small {
  position: absolute;
  top: 34px;
  right: 176px;
  width: 54px;
  height: 27px;
  image-rendering: pixelated;
  opacity: 0.92;
  animation: sky-bob 4.2s steps(2, end) infinite reverse;
}

.sky-moon {
  position: absolute;
  top: 8px;
  right: 34px;
  width: 66px;
  height: 66px;
  image-rendering: pixelated;
  filter: drop-shadow(0 0 8px rgba(247, 227, 150, 0.35));
  animation: sky-bob 3.8s steps(2, end) infinite;
}

.sky-stars {
  position: absolute;
  top: 6px;
  right: 108px;
  width: 168px;
  height: 78px;
  image-rendering: pixelated;
  animation: sky-twinkle 2.6s steps(2, end) infinite;
}

@keyframes sky-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

@keyframes sky-twinkle {
  0%, 100% { opacity: 0.95; }
  50% { opacity: 0.55; }
}

/* Unboxed Open Welcome directly on paper background */
.home-welcome {
  background: transparent;
  border: none;
  box-shadow: none;
}

.home-welcome__title {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 0.98;
  letter-spacing: 0.05em;
  color: var(--text-main);
  text-shadow: 2px 2px 0 var(--title-shadow);
}

.home-welcome__rule {
  width: 96px;
  height: 4px;
  margin-bottom: 18px;
  background: repeating-linear-gradient(
    to right,
    var(--accent-primary) 0 8px,
    transparent 8px 12px
  );
}

.home-welcome p {
  margin: 0 0 14px;
  max-width: 58ch;
  font-size: 20px;
  line-height: 1.7;
}

.home-welcome p:last-child {
  margin-bottom: 0;
}

/* Home Open Pixel Playground (Lower part of Center Area) */
.home-playground {
  position: relative;
  flex: 1 0 210px;
  min-height: 210px;
  margin-top: 12px;
  overflow: hidden;
}

.home-playground.is-hidden {
  display: none;
}

/* Right Framed Column: Antique Cracked Pixel Wood Board + Pin Posts */
.pin-column {
  height: 100%;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 28px 24px 28px;
  border-left: 3px solid var(--border-pixel);
  background-color: #966E47;
  background-size: 256px 192px;
  background-repeat: repeat;
  image-rendering: pixelated;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 96' shape-rendering='crispEdges'%3E%3Crect x='0' y='1' width='128' height='22' fill='%239D744C'/%3E%3Crect x='0' y='0' width='128' height='1' fill='%23AE845A'/%3E%3Crect x='0' y='23' width='128' height='1' fill='%2354351E'/%3E%3Crect x='18' y='23' width='3' height='1' fill='%233B2314'/%3E%3Crect x='64' y='22' width='2' height='2' fill='%233B2314'/%3E%3Crect x='108' y='23' width='4' height='1' fill='%233B2314'/%3E%3Crect x='22' y='1' width='1' height='22' fill='%2354351E'/%3E%3Crect x='23' y='1' width='1' height='22' fill='%23AE845A'/%3E%3Crect x='20' y='4' width='1' height='1' fill='%23352013'/%3E%3Crect x='19' y='4' width='1' height='1' fill='%238A6B4F'/%3E%3Crect x='20' y='19' width='1' height='1' fill='%23352013'/%3E%3Crect x='19' y='19' width='1' height='1' fill='%238A6B4F'/%3E%3Crect x='24' y='4' width='1' height='1' fill='%23352013'/%3E%3Crect x='24' y='19' width='1' height='1' fill='%23352013'/%3E%3Crect x='4' y='6' width='12' height='1' fill='%23835D3A'/%3E%3Crect x='6' y='15' width='9' height='1' fill='%23A98056'/%3E%3Crect x='62' y='5' width='14' height='1' fill='%23835D3A'/%3E%3Crect x='98' y='8' width='16' height='1' fill='%23835D3A'/%3E%3Crect x='95' y='17' width='18' height='1' fill='%23A98056'/%3E%3Crect x='37' y='8' width='4' height='1' fill='%23B0865B'/%3E%3Crect x='47' y='10' width='6' height='1' fill='%23B0865B'/%3E%3Crect x='36' y='9' width='5' height='1' fill='%233B2314'/%3E%3Crect x='41' y='10' width='6' height='1' fill='%233B2314'/%3E%3Crect x='47' y='11' width='7' height='1' fill='%233B2314'/%3E%3Crect x='54' y='10' width='4' height='1' fill='%233B2314'/%3E%3Crect x='45' y='12' width='4' height='1' fill='%233B2314'/%3E%3Crect x='49' y='13' width='3' height='1' fill='%233B2314'/%3E%3Crect x='83' y='10' width='6' height='1' fill='%237C5634'/%3E%3Crect x='83' y='14' width='6' height='1' fill='%237C5634'/%3E%3Crect x='84' y='11' width='4' height='3' fill='%235A3921'/%3E%3Crect x='85' y='12' width='2' height='1' fill='%23422816'/%3E%3Crect x='0' y='25' width='128' height='22' fill='%23936B45'/%3E%3Crect x='0' y='24' width='128' height='1' fill='%23A57C53'/%3E%3Crect x='0' y='47' width='128' height='1' fill='%2354351E'/%3E%3Crect x='40' y='47' width='4' height='1' fill='%233B2314'/%3E%3Crect x='94' y='46' width='2' height='2' fill='%233B2314'/%3E%3Crect x='94' y='25' width='1' height='22' fill='%2354351E'/%3E%3Crect x='95' y='25' width='1' height='22' fill='%23A57C53'/%3E%3Crect x='92' y='28' width='1' height='1' fill='%23352013'/%3E%3Crect x='91' y='28' width='1' height='1' fill='%238A6B4F'/%3E%3Crect x='92' y='43' width='1' height='1' fill='%23352013'/%3E%3Crect x='91' y='43' width='1' height='1' fill='%238A6B4F'/%3E%3Crect x='96' y='28' width='1' height='1' fill='%23352013'/%3E%3Crect x='96' y='43' width='1' height='1' fill='%23352013'/%3E%3Crect x='44' y='30' width='18' height='1' fill='%237D5835'/%3E%3Crect x='58' y='39' width='16' height='1' fill='%23A27A52'/%3E%3Crect x='74' y='32' width='11' height='1' fill='%237D5835'/%3E%3Crect x='8' y='34' width='5' height='1' fill='%23B0865B'/%3E%3Crect x='19' y='34' width='6' height='1' fill='%23B0865B'/%3E%3Crect x='8' y='35' width='6' height='1' fill='%233B2314'/%3E%3Crect x='14' y='34' width='5' height='1' fill='%233B2314'/%3E%3Crect x='19' y='35' width='7' height='1' fill='%233B2314'/%3E%3Crect x='26' y='36' width='5' height='1' fill='%233B2314'/%3E%3Crect x='18' y='36' width='3' height='1' fill='%233B2314'/%3E%3Crect x='21' y='37' width='4' height='1' fill='%233B2314'/%3E%3Crect x='109' y='31' width='5' height='1' fill='%23B0865B'/%3E%3Crect x='104' y='33' width='5' height='1' fill='%233B2314'/%3E%3Crect x='109' y='32' width='6' height='1' fill='%233B2314'/%3E%3Crect x='115' y='31' width='4' height='1' fill='%233B2314'/%3E%3Crect x='0' y='49' width='128' height='22' fill='%23997049'/%3E%3Crect x='0' y='48' width='128' height='1' fill='%23AA8056'/%3E%3Crect x='0' y='71' width='128' height='1' fill='%2354351E'/%3E%3Crect x='12' y='71' width='3' height='1' fill='%233B2314'/%3E%3Crect x='82' y='70' width='3' height='2' fill='%233B2314'/%3E%3Crect x='54' y='49' width='1' height='22' fill='%2354351E'/%3E%3Crect x='55' y='49' width='1' height='22' fill='%23AA8056'/%3E%3Crect x='52' y='52' width='1' height='1' fill='%23352013'/%3E%3Crect x='51' y='52' width='1' height='1' fill='%238A6B4F'/%3E%3Crect x='52' y='67' width='1' height='1' fill='%23352013'/%3E%3Crect x='51' y='67' width='1' height='1' fill='%238A6B4F'/%3E%3Crect x='56' y='52' width='1' height='1' fill='%23352013'/%3E%3Crect x='56' y='67' width='1' height='1' fill='%23352013'/%3E%3Crect x='8' y='54' width='14' height='1' fill='%23835D3A'/%3E%3Crect x='12' y='64' width='12' height='1' fill='%23A98056'/%3E%3Crect x='62' y='64' width='12' height='1' fill='%23835D3A'/%3E%3Crect x='108' y='54' width='14' height='1' fill='%23A98056'/%3E%3Crect x='30' y='58' width='6' height='1' fill='%237C5634'/%3E%3Crect x='30' y='62' width='6' height='1' fill='%237C5634'/%3E%3Crect x='31' y='59' width='4' height='3' fill='%235A3921'/%3E%3Crect x='32' y='60' width='2' height='1' fill='%23422816'/%3E%3Crect x='77' y='57' width='6' height='1' fill='%23B0865B'/%3E%3Crect x='84' y='58' width='7' height='1' fill='%23B0865B'/%3E%3Crect x='76' y='58' width='7' height='1' fill='%233B2314'/%3E%3Crect x='83' y='59' width='8' height='1' fill='%233B2314'/%3E%3Crect x='91' y='60' width='7' height='1' fill='%233B2314'/%3E%3Crect x='98' y='59' width='5' height='1' fill='%233B2314'/%3E%3Crect x='86' y='61' width='5' height='1' fill='%233B2314'/%3E%3Crect x='91' y='62' width='3' height='1' fill='%233B2314'/%3E%3Crect x='0' y='73' width='128' height='22' fill='%238E6742'/%3E%3Crect x='0' y='72' width='128' height='1' fill='%23A0774F'/%3E%3Crect x='0' y='95' width='128' height='1' fill='%2354351E'/%3E%3Crect x='28' y='95' width='3' height='1' fill='%233B2314'/%3E%3Crect x='72' y='94' width='2' height='2' fill='%233B2314'/%3E%3Crect x='112' y='73' width='1' height='22' fill='%2354351E'/%3E%3Crect x='113' y='73' width='1' height='22' fill='%23A0774F'/%3E%3Crect x='110' y='76' width='1' height='1' fill='%23352013'/%3E%3Crect x='109' y='76' width='1' height='1' fill='%238A6B4F'/%3E%3Crect x='110' y='91' width='1' height='1' fill='%23352013'/%3E%3Crect x='109' y='91' width='1' height='1' fill='%238A6B4F'/%3E%3Crect x='114' y='76' width='1' height='1' fill='%23352013'/%3E%3Crect x='114' y='91' width='1' height='1' fill='%23352013'/%3E%3Crect x='10' y='78' width='18' height='1' fill='%23795432'/%3E%3Crect x='16' y='88' width='14' height='1' fill='%239E764E'/%3E%3Crect x='78' y='79' width='16' height='1' fill='%23795432'/%3E%3Crect x='84' y='89' width='15' height='1' fill='%239E764E'/%3E%3Crect x='43' y='81' width='5' height='1' fill='%23B0865B'/%3E%3Crect x='48' y='82' width='7' height='1' fill='%23B0865B'/%3E%3Crect x='42' y='82' width='6' height='1' fill='%233B2314'/%3E%3Crect x='48' y='83' width='8' height='1' fill='%233B2314'/%3E%3Crect x='56' y='84' width='6' height='1' fill='%233B2314'/%3E%3Crect x='62' y='83' width='5' height='1' fill='%233B2314'/%3E%3Crect x='51' y='85' width='4' height='1' fill='%233B2314'/%3E%3C/svg%3E");
  box-shadow:
    inset 6px 0 0 #6B4428,
    inset -6px 0 0 #52321C,
    inset 0 6px 0 #784D2E,
    inset 0 -6px 0 #442815;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

[data-theme="dark"] .pin-column {
  background-color: #3F2B1F;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 128 96' shape-rendering='crispEdges'%3E%3Crect x='0' y='1' width='128' height='22' fill='%23422E22'/%3E%3Crect x='0' y='0' width='128' height='1' fill='%23523A2B'/%3E%3Crect x='0' y='23' width='128' height='1' fill='%2321140D'/%3E%3Crect x='18' y='23' width='3' height='1' fill='%23160C07'/%3E%3Crect x='64' y='22' width='2' height='2' fill='%23160C07'/%3E%3Crect x='108' y='23' width='4' height='1' fill='%23160C07'/%3E%3Crect x='22' y='1' width='1' height='22' fill='%2321140D'/%3E%3Crect x='23' y='1' width='1' height='22' fill='%23523A2B'/%3E%3Crect x='20' y='4' width='1' height='1' fill='%23140B06'/%3E%3Crect x='19' y='4' width='1' height='1' fill='%237D614D'/%3E%3Crect x='20' y='19' width='1' height='1' fill='%23140B06'/%3E%3Crect x='19' y='19' width='1' height='1' fill='%237D614D'/%3E%3Crect x='24' y='4' width='1' height='1' fill='%23140B06'/%3E%3Crect x='24' y='19' width='1' height='1' fill='%23140B06'/%3E%3Crect x='4' y='6' width='12' height='1' fill='%23332118'/%3E%3Crect x='6' y='15' width='9' height='1' fill='%234E3729'/%3E%3Crect x='62' y='5' width='14' height='1' fill='%23332118'/%3E%3Crect x='98' y='8' width='16' height='1' fill='%23332118'/%3E%3Crect x='95' y='17' width='18' height='1' fill='%234E3729'/%3E%3Crect x='37' y='8' width='4' height='1' fill='%235A4131'/%3E%3Crect x='47' y='10' width='6' height='1' fill='%235A4131'/%3E%3Crect x='36' y='9' width='5' height='1' fill='%23160C07'/%3E%3Crect x='41' y='10' width='6' height='1' fill='%23160C07'/%3E%3Crect x='47' y='11' width='7' height='1' fill='%23160C07'/%3E%3Crect x='54' y='10' width='4' height='1' fill='%23160C07'/%3E%3Crect x='45' y='12' width='4' height='1' fill='%23160C07'/%3E%3Crect x='49' y='13' width='3' height='1' fill='%23160C07'/%3E%3Crect x='83' y='10' width='6' height='1' fill='%23311F16'/%3E%3Crect x='83' y='14' width='6' height='1' fill='%23311F16'/%3E%3Crect x='84' y='11' width='4' height='3' fill='%23281810'/%3E%3Crect x='85' y='12' width='2' height='1' fill='%231D100A'/%3E%3Crect x='0' y='25' width='128' height='22' fill='%233C291E'/%3E%3Crect x='0' y='24' width='128' height='1' fill='%234D3628'/%3E%3Crect x='0' y='47' width='128' height='1' fill='%2321140D'/%3E%3Crect x='40' y='47' width='4' height='1' fill='%23160C07'/%3E%3Crect x='94' y='46' width='2' height='2' fill='%23160C07'/%3E%3Crect x='94' y='25' width='1' height='22' fill='%2321140D'/%3E%3Crect x='95' y='25' width='1' height='22' fill='%234D3628'/%3E%3Crect x='92' y='28' width='1' height='1' fill='%23140B06'/%3E%3Crect x='91' y='28' width='1' height='1' fill='%237D614D'/%3E%3Crect x='92' y='43' width='1' height='1' fill='%23140B06'/%3E%3Crect x='91' y='43' width='1' height='1' fill='%237D614D'/%3E%3Crect x='96' y='28' width='1' height='1' fill='%23140B06'/%3E%3Crect x='96' y='43' width='1' height='1' fill='%23140B06'/%3E%3Crect x='44' y='30' width='18' height='1' fill='%232E1D14'/%3E%3Crect x='58' y='39' width='16' height='1' fill='%234A3426'/%3E%3Crect x='74' y='32' width='11' height='1' fill='%232E1D14'/%3E%3Crect x='8' y='34' width='5' height='1' fill='%235A4131'/%3E%3Crect x='19' y='34' width='6' height='1' fill='%235A4131'/%3E%3Crect x='8' y='35' width='6' height='1' fill='%23160C07'/%3E%3Crect x='14' y='34' width='5' height='1' fill='%23160C07'/%3E%3Crect x='19' y='35' width='7' height='1' fill='%23160C07'/%3E%3Crect x='26' y='36' width='5' height='1' fill='%23160C07'/%3E%3Crect x='18' y='36' width='3' height='1' fill='%23160C07'/%3E%3Crect x='21' y='37' width='4' height='1' fill='%23160C07'/%3E%3Crect x='109' y='31' width='5' height='1' fill='%235A4131'/%3E%3Crect x='104' y='33' width='5' height='1' fill='%23160C07'/%3E%3Crect x='109' y='32' width='6' height='1' fill='%23160C07'/%3E%3Crect x='115' y='31' width='4' height='1' fill='%23160C07'/%3E%3Crect x='0' y='49' width='128' height='22' fill='%23402C20'/%3E%3Crect x='0' y='48' width='128' height='1' fill='%23523A2B'/%3E%3Crect x='0' y='71' width='128' height='1' fill='%2321140D'/%3E%3Crect x='12' y='71' width='3' height='1' fill='%23160C07'/%3E%3Crect x='82' y='70' width='3' height='2' fill='%23160C07'/%3E%3Crect x='54' y='49' width='1' height='22' fill='%2321140D'/%3E%3Crect x='55' y='49' width='1' height='22' fill='%23523A2B'/%3E%3Crect x='52' y='52' width='1' height='1' fill='%23140B06'/%3E%3Crect x='51' y='52' width='1' height='1' fill='%237D614D'/%3E%3Crect x='52' y='67' width='1' height='1' fill='%23140B06'/%3E%3Crect x='51' y='67' width='1' height='1' fill='%237D614D'/%3E%3Crect x='56' y='52' width='1' height='1' fill='%23140B06'/%3E%3Crect x='56' y='67' width='1' height='1' fill='%23140B06'/%3E%3Crect x='8' y='54' width='14' height='1' fill='%23332118'/%3E%3Crect x='12' y='64' width='12' height='1' fill='%234E3729'/%3E%3Crect x='62' y='64' width='12' height='1' fill='%23332118'/%3E%3Crect x='108' y='54' width='14' height='1' fill='%234E3729'/%3E%3Crect x='30' y='58' width='6' height='1' fill='%23311F16'/%3E%3Crect x='30' y='62' width='6' height='1' fill='%23311F16'/%3E%3Crect x='31' y='59' width='4' height='3' fill='%23281810'/%3E%3Crect x='32' y='60' width='2' height='1' fill='%231D100A'/%3E%3Crect x='77' y='57' width='6' height='1' fill='%235A4131'/%3E%3Crect x='84' y='58' width='7' height='1' fill='%235A4131'/%3E%3Crect x='76' y='58' width='7' height='1' fill='%23160C07'/%3E%3Crect x='83' y='59' width='8' height='1' fill='%23160C07'/%3E%3Crect x='91' y='60' width='7' height='1' fill='%23160C07'/%3E%3Crect x='98' y='59' width='5' height='1' fill='%23160C07'/%3E%3Crect x='86' y='61' width='5' height='1' fill='%23160C07'/%3E%3Crect x='91' y='62' width='3' height='1' fill='%23160C07'/%3E%3Crect x='0' y='73' width='128' height='22' fill='%2338261C'/%3E%3Crect x='0' y='72' width='128' height='1' fill='%23483225'/%3E%3Crect x='0' y='95' width='128' height='1' fill='%2321140D'/%3E%3Crect x='28' y='95' width='3' height='1' fill='%23160C07'/%3E%3Crect x='72' y='94' width='2' height='2' fill='%23160C07'/%3E%3Crect x='112' y='73' width='1' height='22' fill='%2321140D'/%3E%3Crect x='113' y='73' width='1' height='22' fill='%23483225'/%3E%3Crect x='110' y='76' width='1' height='1' fill='%23140B06'/%3E%3Crect x='109' y='76' width='1' height='1' fill='%237D614D'/%3E%3Crect x='110' y='91' width='1' height='1' fill='%23140B06'/%3E%3Crect x='109' y='91' width='1' height='1' fill='%237D614D'/%3E%3Crect x='114' y='76' width='1' height='1' fill='%23140B06'/%3E%3Crect x='114' y='91' width='1' height='1' fill='%23140B06'/%3E%3Crect x='10' y='78' width='18' height='1' fill='%232A1A12'/%3E%3Crect x='16' y='88' width='14' height='1' fill='%23473124'/%3E%3Crect x='78' y='79' width='16' height='1' fill='%232A1A12'/%3E%3Crect x='84' y='89' width='15' height='1' fill='%23473124'/%3E%3Crect x='43' y='81' width='5' height='1' fill='%235A4131'/%3E%3Crect x='48' y='82' width='7' height='1' fill='%235A4131'/%3E%3Crect x='42' y='82' width='6' height='1' fill='%23160C07'/%3E%3Crect x='48' y='83' width='8' height='1' fill='%23160C07'/%3E%3Crect x='56' y='84' width='6' height='1' fill='%23160C07'/%3E%3Crect x='62' y='83' width='5' height='1' fill='%23160C07'/%3E%3Crect x='51' y='85' width='4' height='1' fill='%23160C07'/%3E%3C/svg%3E");
  box-shadow:
    inset 6px 0 0 #352319,
    inset -6px 0 0 #261810,
    inset 0 6px 0 #3F2A1E,
    inset 0 -6px 0 #1E120C;
}

.pin-note {
  position: relative;
  padding: 20px 16px 18px;
  border-color: #3B281E;
  background-color: var(--pin-note);
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 24px,
    rgba(59, 40, 30, 0.1) 24px,
    rgba(59, 40, 30, 0.1) 26px
  );
  color: var(--on-pin);
  border-radius: 0;
  box-shadow:
    inset 2px 2px 0 var(--pin-bevel-light),
    inset -2px -2px 0 var(--pin-bevel-dark),
    5px 5px 0 rgba(35, 21, 13, 0.72);
  transition: transform 0.12s steps(2, end), box-shadow 0.12s steps(2, end);
}

[data-theme="dark"] .pin-note {
  border-color: #231811;
}

.pin-note:nth-child(odd) {
  margin-right: 4px;
}

.pin-note:nth-child(even) {
  margin-left: 4px;
}

.pin-note:hover {
  transform: translate(-2px, -3px);
  box-shadow:
    inset 2px 2px 0 var(--pin-bevel-light),
    inset -2px -2px 0 var(--pin-bevel-dark),
    7px 8px 0 rgba(35, 21, 13, 0.78);
}

/* Crisp pixel-art folded bottom-right corner (blends with antique oak board) */
.pin-note::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 20px;
  height: 20px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Crect width='10' height='10' fill='%23966E47'/%3E%3Crect x='0' y='0' width='10' height='1' fill='%233B281E'/%3E%3Crect x='0' y='0' width='1' height='10' fill='%233B281E'/%3E%3Crect x='1' y='1' width='7' height='1' fill='%23FFF4C2'/%3E%3Crect x='1' y='2' width='1' height='6' fill='%23FFF4C2'/%3E%3Crect x='2' y='2' width='5' height='1' fill='%23DEC162'/%3E%3Crect x='2' y='3' width='4' height='1' fill='%23DEC162'/%3E%3Crect x='2' y='4' width='3' height='1' fill='%23DEC162'/%3E%3Crect x='2' y='5' width='2' height='1' fill='%23DEC162'/%3E%3Crect x='2' y='6' width='1' height='1' fill='%23DEC162'/%3E%3Crect x='8' y='1' width='1' height='1' fill='%233B281E'/%3E%3Crect x='7' y='2' width='1' height='1' fill='%233B281E'/%3E%3Crect x='6' y='3' width='1' height='1' fill='%233B281E'/%3E%3Crect x='5' y='4' width='1' height='1' fill='%233B281E'/%3E%3Crect x='4' y='5' width='1' height='1' fill='%233B281E'/%3E%3Crect x='3' y='6' width='1' height='1' fill='%233B281E'/%3E%3Crect x='2' y='7' width='1' height='1' fill='%233B281E'/%3E%3Crect x='1' y='8' width='1' height='1' fill='%233B281E'/%3E%3C/svg%3E");
  pointer-events: none;
}

[data-theme="dark"] .pin-note::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10' shape-rendering='crispEdges'%3E%3Crect width='10' height='10' fill='%233F2B1F'/%3E%3Crect x='0' y='0' width='10' height='1' fill='%23231811'/%3E%3Crect x='0' y='0' width='1' height='10' fill='%23231811'/%3E%3Crect x='1' y='1' width='7' height='1' fill='%23EFE09C'/%3E%3Crect x='1' y='2' width='1' height='6' fill='%23EFE09C'/%3E%3Crect x='2' y='2' width='5' height='1' fill='%23C5A956'/%3E%3Crect x='2' y='3' width='4' height='1' fill='%23C5A956'/%3E%3Crect x='2' y='4' width='3' height='1' fill='%23C5A956'/%3E%3Crect x='2' y='5' width='2' height='1' fill='%23C5A956'/%3E%3Crect x='2' y='6' width='1' height='1' fill='%23C5A956'/%3E%3Crect x='8' y='1' width='1' height='1' fill='%23231811'/%3E%3Crect x='7' y='2' width='1' height='1' fill='%23231811'/%3E%3Crect x='6' y='3' width='1' height='1' fill='%23231811'/%3E%3Crect x='5' y='4' width='1' height='1' fill='%23231811'/%3E%3Crect x='4' y='5' width='1' height='1' fill='%23231811'/%3E%3Crect x='3' y='6' width='1' height='1' fill='%23231811'/%3E%3Crect x='2' y='7' width='1' height='1' fill='%23231811'/%3E%3Crect x='1' y='8' width='1' height='1' fill='%23231811'/%3E%3C/svg%3E");
}

/* Crisp pixel-art push-pin */
.pin-head {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 24px;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  image-rendering: pixelated;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12' shape-rendering='crispEdges'%3E%3Crect x='3' y='0' width='4' height='1' fill='%233B281E'/%3E%3Crect x='2' y='1' width='1' height='1' fill='%233B281E'/%3E%3Crect x='7' y='1' width='1' height='1' fill='%233B281E'/%3E%3Crect x='1' y='2' width='1' height='4' fill='%233B281E'/%3E%3Crect x='8' y='2' width='1' height='4' fill='%233B281E'/%3E%3Crect x='2' y='6' width='1' height='1' fill='%233B281E'/%3E%3Crect x='7' y='6' width='1' height='1' fill='%233B281E'/%3E%3Crect x='3' y='7' width='4' height='1' fill='%233B281E'/%3E%3Crect x='3' y='1' width='4' height='1' fill='%233E6B7E'/%3E%3Crect x='2' y='2' width='6' height='4' fill='%233E6B7E'/%3E%3Crect x='3' y='6' width='4' height='1' fill='%233E6B7E'/%3E%3Crect x='7' y='4' width='1' height='2' fill='%232B4D5C'/%3E%3Crect x='6' y='5' width='1' height='1' fill='%232B4D5C'/%3E%3Crect x='4' y='6' width='3' height='1' fill='%232B4D5C'/%3E%3Crect x='3' y='2' width='2' height='1' fill='%23FFFDF7'/%3E%3Crect x='3' y='3' width='1' height='1' fill='%23FFFDF7'/%3E%3Crect x='4' y='8' width='1' height='3' fill='%233B281E'/%3E%3Crect x='5' y='8' width='1' height='2' fill='%238B7562'/%3E%3Crect x='5' y='10' width='2' height='1' fill='%23D5BE62'/%3E%3C/svg%3E");
  pointer-events: none;
}

.pin-note:nth-child(even) .pin-head {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 12' shape-rendering='crispEdges'%3E%3Crect x='3' y='0' width='4' height='1' fill='%233B281E'/%3E%3Crect x='2' y='1' width='1' height='1' fill='%233B281E'/%3E%3Crect x='7' y='1' width='1' height='1' fill='%233B281E'/%3E%3Crect x='1' y='2' width='1' height='4' fill='%233B281E'/%3E%3Crect x='8' y='2' width='1' height='4' fill='%233B281E'/%3E%3Crect x='2' y='6' width='1' height='1' fill='%233B281E'/%3E%3Crect x='7' y='6' width='1' height='1' fill='%233B281E'/%3E%3Crect x='3' y='7' width='4' height='1' fill='%233B281E'/%3E%3Crect x='3' y='1' width='4' height='1' fill='%23C85A32'/%3E%3Crect x='2' y='2' width='6' height='4' fill='%23C85A32'/%3E%3Crect x='3' y='6' width='4' height='1' fill='%23C85A32'/%3E%3Crect x='7' y='4' width='1' height='2' fill='%239E4222'/%3E%3Crect x='6' y='5' width='1' height='1' fill='%239E4222'/%3E%3Crect x='4' y='6' width='3' height='1' fill='%239E4222'/%3E%3Crect x='3' y='2' width='2' height='1' fill='%23FFFDF7'/%3E%3Crect x='3' y='3' width='1' height='1' fill='%23FFFDF7'/%3E%3Crect x='4' y='8' width='1' height='3' fill='%233B281E'/%3E%3Crect x='5' y='8' width='1' height='2' fill='%238B7562'/%3E%3Crect x='5' y='10' width='2' height='1' fill='%23D5BE62'/%3E%3C/svg%3E");
}

.pin-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.06em;
  color: var(--pin-accent);
  border-bottom: 2px dashed rgba(59, 40, 30, 0.45);
  padding-bottom: 4px;
}

.pin-label::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--pin-accent);
  flex-shrink: 0;
}

.pin-body {
  margin: 0;
  font-size: 17px;
  line-height: 1.55;
}

.pin-meta {
  margin: 8px 0 0;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--pin-muted);
}

/* Hollowed Wood Hole + Wiggling Pixel Worm */
.wood-worm-spot {
  position: relative;
  margin-top: auto;
  padding-top: 12px;
  padding-right: 10px;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
}

.wood-worm-btn {
  position: relative;
  display: block;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
}

.wood-worm-btn svg {
  display: block;
  width: 110px;
  height: 88px;
  image-rendering: pixelated;
  overflow: visible;
}

.worm-body {
  animation: worm-wiggle 1.4s steps(2, end) infinite;
}

.worm-head {
  animation: worm-head-bob 1.4s steps(2, end) infinite;
}

.wood-worm-btn.is-poked .worm-body {
  animation: worm-poked 0.38s steps(3) 2;
}

.worm-bubble {
  bottom: 88px;
  right: 8px;
  left: auto;
  transform: none;
  z-index: 5;
}

@keyframes worm-wiggle {
  0% { transform: translate(0, 0); }
  50% { transform: translate(1px, -1px); }
  100% { transform: translate(0, 0); }
}

@keyframes worm-head-bob {
  0% { transform: translate(0, 0); }
  50% { transform: translate(1px, 1px); }
  100% { transform: translate(0, 0); }
}

@keyframes worm-poked {
  0% { transform: translate(0, 0); }
  33% { transform: translate(2px, -3px); }
  66% { transform: translate(-1px, -1px); }
  100% { transform: translate(0, 0); }
}

/* Custom Retro Pixel Scrollbars */
@supports not selector(::-webkit-scrollbar) {
  .post-composer-card > .billboard-create-form,
  .pixel-modal__card,
  .archive-list,
  .pixel-textarea,
  .left-sidebar,
  .main-column,
  .pin-column {
    scrollbar-width: thin;
    scrollbar-color: var(--scroll-thumb) var(--scroll-track);
  }
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar,
.pixel-modal__card::-webkit-scrollbar,
.archive-list::-webkit-scrollbar,
.pixel-textarea::-webkit-scrollbar,
.left-sidebar::-webkit-scrollbar,
.main-column::-webkit-scrollbar,
.pin-column::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-track,
.pixel-modal__card::-webkit-scrollbar-track,
.archive-list::-webkit-scrollbar-track,
.pixel-textarea::-webkit-scrollbar-track,
.left-sidebar::-webkit-scrollbar-track,
.main-column::-webkit-scrollbar-track,
.pin-column::-webkit-scrollbar-track {
  background-color: var(--scroll-track);
  background-image: radial-gradient(var(--scroll-track-dot) 1px, transparent 1px);
  background-size: 6px 6px;
  border-left: 2px solid var(--border-pixel);
}

.pin-column::-webkit-scrollbar-track {
  background-color: rgba(35, 21, 13, 0.35);
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-thumb,
.pixel-modal__card::-webkit-scrollbar-thumb,
.archive-list::-webkit-scrollbar-thumb,
.pixel-textarea::-webkit-scrollbar-thumb,
.left-sidebar::-webkit-scrollbar-thumb,
.main-column::-webkit-scrollbar-thumb,
.pin-column::-webkit-scrollbar-thumb {
  border: 2px solid var(--border-pixel);
  border-radius: 0;
  background-color: var(--scroll-thumb);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='9' viewBox='0 0 6 9' shape-rendering='crispEdges'%3E%3Crect x='0' y='1' width='6' height='1' fill='%233B2314'/%3E%3Crect x='0' y='4' width='6' height='1' fill='%233B2314'/%3E%3Crect x='0' y='7' width='6' height='1' fill='%233B2314'/%3E%3Crect x='0' y='0' width='6' height='1' fill='%23CFA070'/%3E%3Crect x='0' y='3' width='6' height='1' fill='%23CFA070'/%3E%3Crect x='0' y='6' width='6' height='1' fill='%23CFA070'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 6px 9px;
  box-shadow:
    inset 2px 2px 0 var(--scroll-thumb-hi),
    inset -2px -2px 0 var(--scroll-thumb-shadow);
}

[data-theme="dark"] .post-composer-card > .billboard-create-form::-webkit-scrollbar-thumb,
[data-theme="dark"] .pixel-modal__card::-webkit-scrollbar-thumb,
[data-theme="dark"] .archive-list::-webkit-scrollbar-thumb,
[data-theme="dark"] .pixel-textarea::-webkit-scrollbar-thumb,
[data-theme="dark"] .left-sidebar::-webkit-scrollbar-thumb,
[data-theme="dark"] .main-column::-webkit-scrollbar-thumb,
[data-theme="dark"] .pin-column::-webkit-scrollbar-thumb {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='9' viewBox='0 0 6 9' shape-rendering='crispEdges'%3E%3Crect x='0' y='1' width='6' height='1' fill='%231A0E07'/%3E%3Crect x='0' y='4' width='6' height='1' fill='%231A0E07'/%3E%3Crect x='0' y='7' width='6' height='1' fill='%231A0E07'/%3E%3Crect x='0' y='0' width='6' height='1' fill='%23BA8B60'/%3E%3Crect x='0' y='3' width='6' height='1' fill='%23BA8B60'/%3E%3Crect x='0' y='6' width='6' height='1' fill='%23BA8B60'/%3E%3C/svg%3E");
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-thumb:hover,
.pixel-modal__card::-webkit-scrollbar-thumb:hover,
.archive-list::-webkit-scrollbar-thumb:hover,
.pixel-textarea::-webkit-scrollbar-thumb:hover,
.left-sidebar::-webkit-scrollbar-thumb:hover,
.main-column::-webkit-scrollbar-thumb:hover,
.pin-column::-webkit-scrollbar-thumb:hover {
  background-color: var(--scroll-thumb-hover);
  box-shadow:
    inset 2px 2px 0 var(--scroll-thumb-hover-hi),
    inset -2px -2px 0 var(--scroll-thumb-shadow);
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-thumb:active,
.pixel-modal__card::-webkit-scrollbar-thumb:active,
.archive-list::-webkit-scrollbar-thumb:active,
.pixel-textarea::-webkit-scrollbar-thumb:active,
.left-sidebar::-webkit-scrollbar-thumb:active,
.main-column::-webkit-scrollbar-thumb:active,
.pin-column::-webkit-scrollbar-thumb:active {
  box-shadow:
    inset 2px 2px 0 var(--scroll-thumb-shadow),
    inset -1px -1px 0 var(--scroll-thumb-hi);
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-corner,
.pixel-modal__card::-webkit-scrollbar-corner,
.archive-list::-webkit-scrollbar-corner,
.pixel-textarea::-webkit-scrollbar-corner,
.left-sidebar::-webkit-scrollbar-corner,
.main-column::-webkit-scrollbar-corner,
.pin-column::-webkit-scrollbar-corner {
  background-color: var(--scroll-track);
  border-top: 2px solid var(--border-pixel);
  border-left: 2px solid var(--border-pixel);
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-button:single-button,
.pixel-modal__card::-webkit-scrollbar-button:single-button,
.archive-list::-webkit-scrollbar-button:single-button,
.pixel-textarea::-webkit-scrollbar-button:single-button,
.left-sidebar::-webkit-scrollbar-button:single-button,
.main-column::-webkit-scrollbar-button:single-button,
.pin-column::-webkit-scrollbar-button:single-button {
  display: block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-pixel);
  border-right: none;
  background-color: var(--scroll-btn-bg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 6px 4px;
  box-shadow:
    inset 1px 1px 0 var(--scroll-thumb-hi),
    inset -1px -1px 0 var(--scroll-thumb-shadow);
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-button:single-button:hover,
.pixel-modal__card::-webkit-scrollbar-button:single-button:hover,
.archive-list::-webkit-scrollbar-button:single-button:hover,
.pixel-textarea::-webkit-scrollbar-button:single-button:hover,
.left-sidebar::-webkit-scrollbar-button:single-button:hover,
.main-column::-webkit-scrollbar-button:single-button:hover,
.pin-column::-webkit-scrollbar-button:single-button:hover {
  background-color: var(--scroll-btn-hover);
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-button:start:increment,
.post-composer-card > .billboard-create-form::-webkit-scrollbar-button:end:decrement,
.pixel-modal__card::-webkit-scrollbar-button:start:increment,
.pixel-modal__card::-webkit-scrollbar-button:end:decrement,
.archive-list::-webkit-scrollbar-button:start:increment,
.archive-list::-webkit-scrollbar-button:end:decrement,
.pixel-textarea::-webkit-scrollbar-button:start:increment,
.pixel-textarea::-webkit-scrollbar-button:end:decrement,
.left-sidebar::-webkit-scrollbar-button:start:increment,
.left-sidebar::-webkit-scrollbar-button:end:decrement,
.main-column::-webkit-scrollbar-button:start:increment,
.main-column::-webkit-scrollbar-button:end:decrement,
.pin-column::-webkit-scrollbar-button:start:increment,
.pin-column::-webkit-scrollbar-button:end:decrement {
  display: none;
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-button:single-button:vertical:decrement,
.pixel-modal__card::-webkit-scrollbar-button:single-button:vertical:decrement,
.archive-list::-webkit-scrollbar-button:single-button:vertical:decrement,
.pixel-textarea::-webkit-scrollbar-button:single-button:vertical:decrement,
.left-sidebar::-webkit-scrollbar-button:single-button:vertical:decrement,
.main-column::-webkit-scrollbar-button:single-button:vertical:decrement,
.pin-column::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4' viewBox='0 0 6 4' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='1' fill='%232B1D14'/%3E%3Crect x='1' y='1' width='4' height='1' fill='%232B1D14'/%3E%3Crect x='0' y='2' width='6' height='2' fill='%232B1D14'/%3E%3C/svg%3E");
}

.post-composer-card > .billboard-create-form::-webkit-scrollbar-button:single-button:vertical:increment,
.pixel-modal__card::-webkit-scrollbar-button:single-button:vertical:increment,
.archive-list::-webkit-scrollbar-button:single-button:vertical:increment,
.pixel-textarea::-webkit-scrollbar-button:single-button:vertical:increment,
.left-sidebar::-webkit-scrollbar-button:single-button:vertical:increment,
.main-column::-webkit-scrollbar-button:single-button:vertical:increment,
.pin-column::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4' viewBox='0 0 6 4' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='6' height='2' fill='%232B1D14'/%3E%3Crect x='1' y='2' width='4' height='1' fill='%232B1D14'/%3E%3Crect x='2' y='3' width='2' height='1' fill='%232B1D14'/%3E%3C/svg%3E");
}

[data-theme="dark"] .post-composer-card > .billboard-create-form::-webkit-scrollbar-button:single-button:vertical:decrement,
[data-theme="dark"] .pixel-modal__card::-webkit-scrollbar-button:single-button:vertical:decrement,
[data-theme="dark"] .archive-list::-webkit-scrollbar-button:single-button:vertical:decrement,
[data-theme="dark"] .pixel-textarea::-webkit-scrollbar-button:single-button:vertical:decrement,
[data-theme="dark"] .left-sidebar::-webkit-scrollbar-button:single-button:vertical:decrement,
[data-theme="dark"] .main-column::-webkit-scrollbar-button:single-button:vertical:decrement,
[data-theme="dark"] .pin-column::-webkit-scrollbar-button:single-button:vertical:decrement {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4' viewBox='0 0 6 4' shape-rendering='crispEdges'%3E%3Crect x='2' y='0' width='2' height='1' fill='%23EFE3CE'/%3E%3Crect x='1' y='1' width='4' height='1' fill='%23EFE3CE'/%3E%3Crect x='0' y='2' width='6' height='2' fill='%23EFE3CE'/%3E%3C/svg%3E");
}

[data-theme="dark"] .post-composer-card > .billboard-create-form::-webkit-scrollbar-button:single-button:vertical:increment,
[data-theme="dark"] .pixel-modal__card::-webkit-scrollbar-button:single-button:vertical:increment,
[data-theme="dark"] .archive-list::-webkit-scrollbar-button:single-button:vertical:increment,
[data-theme="dark"] .pixel-textarea::-webkit-scrollbar-button:single-button:vertical:increment,
[data-theme="dark"] .left-sidebar::-webkit-scrollbar-button:single-button:vertical:increment,
[data-theme="dark"] .main-column::-webkit-scrollbar-button:single-button:vertical:increment,
[data-theme="dark"] .pin-column::-webkit-scrollbar-button:single-button:vertical:increment {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='6' height='4' viewBox='0 0 6 4' shape-rendering='crispEdges'%3E%3Crect x='0' y='0' width='6' height='2' fill='%23EFE3CE'/%3E%3Crect x='1' y='2' width='4' height='1' fill='%23EFE3CE'/%3E%3Crect x='2' y='3' width='2' height='1' fill='%23EFE3CE'/%3E%3C/svg%3E");
}

/* Bottom Framed Status Footer (Hướng 1: Antique Wood Rail + Upward Sprouts) */
.site-footer {
  flex-shrink: 0;
  position: relative;
  z-index: 15;
  overflow: visible;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 8px 18px;
  border-top: 3px solid var(--border-pixel);
  background-color: #825A38;
  background-size: 192px 40px;
  background-repeat: repeat;
  image-rendering: pixelated;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 20' shape-rendering='crispEdges'%3E%3Crect width='96' height='20' fill='%23825A38'/%3E%3Crect x='0' y='0' width='96' height='1' fill='%239C7049'/%3E%3Crect x='0' y='19' width='96' height='1' fill='%234A2E1A'/%3E%3Crect x='8' y='5' width='18' height='1' fill='%236B4628'/%3E%3Crect x='46' y='13' width='22' height='1' fill='%236B4628'/%3E%3Crect x='78' y='4' width='12' height='1' fill='%236B4628'/%3E%3Crect x='24' y='8' width='12' height='1' fill='%23926844'/%3E%3Crect x='64' y='6' width='10' height='1' fill='%23926844'/%3E%3Crect x='14' y='15' width='11' height='1' fill='%23926844'/%3E%3Crect x='34' y='15' width='6' height='1' fill='%233B2314'/%3E%3Crect x='84' y='11' width='5' height='1' fill='%233B2314'/%3E%3C/svg%3E");
  box-shadow:
    inset 0 2px 0 #A57850,
    inset 0 -3px 0 #4B2F1B;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  color: #FFF8EE;
  text-shadow: 1px 1px 0 rgba(28, 15, 8, 0.75);
}

[data-theme="dark"] .site-footer {
  background-color: #362319;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 96 20' shape-rendering='crispEdges'%3E%3Crect width='96' height='20' fill='%23362319'/%3E%3Crect x='0' y='0' width='96' height='1' fill='%234D3526'/%3E%3Crect x='0' y='19' width='96' height='1' fill='%231C100A'/%3E%3Crect x='8' y='5' width='18' height='1' fill='%23281911'/%3E%3Crect x='46' y='13' width='22' height='1' fill='%23281911'/%3E%3Crect x='78' y='4' width='12' height='1' fill='%23281911'/%3E%3Crect x='24' y='8' width='12' height='1' fill='%23442E21'/%3E%3Crect x='64' y='6' width='10' height='1' fill='%23442E21'/%3E%3Crect x='14' y='15' width='11' height='1' fill='%23442E21'/%3E%3Crect x='34' y='15' width='6' height='1' fill='%23150B06'/%3E%3Crect x='84' y='11' width='5' height='1' fill='%23150B06'/%3E%3C/svg%3E");
  box-shadow:
    inset 0 2px 0 #503728,
    inset 0 -3px 0 #1B100A;
  color: #EFE3CE;
}

.site-footer .pixel-btn {
  text-shadow: none;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.footer-toggle-btn {
  padding: 4px 10px;
  font-size: 11px;
}

/* =========================================================
   Update Log Modal (Triggered from News Banner)
   ========================================================= */

.pixel-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background-color: rgba(43, 29, 20, 0.5);
}

.pixel-modal[hidden] {
  display: none;
}

.pixel-modal__card {
  width: 100%;
  max-width: 580px;
  max-height: 82vh;
  overflow-y: auto;
  padding: 18px 20px;
}

.pixel-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 2px dashed var(--dashed-divider);
}

.update-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.update-item {
  padding: 10px 12px;
  border: 2px solid var(--border-pixel);
  border-radius: var(--radius-pixel);
  background-color: var(--bg-paper);
}

.update-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.update-date {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-primary);
}

.update-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.update-note {
  margin: 0;
  font-size: 17px;
  line-height: 1.5;
}

/* =========================================================
   Shared Type A Account Modal (Nickname / Login / Sign Up)
   ========================================================= */

.account-modal__card {
  max-width: 480px;
}

.account-status-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 2px solid var(--border-pixel);
  border-radius: var(--radius-pixel);
  background-color: var(--bg-paper);
}

.account-status-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.account-status-name {
  font-family: var(--font-display);
  font-size: 26px;
  line-height: 1;
  color: var(--text-main);
}

.account-status-sub {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-muted);
  word-break: break-word;
}

.account-role-badge {
  display: inline-block;
  padding: 2px 7px;
  border: 2px solid var(--border-pixel);
  background-color: var(--surface-sidebar);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
}

.account-role-badge--anon {
  background-color: var(--pin-note);
  color: var(--on-pin);
}

.account-role-badge--member {
  background-color: var(--accent-secondary);
  color: var(--on-secondary);
}

.account-role-badge--admin {
  background-color: var(--accent-primary);
  color: var(--on-primary);
}

.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.account-tab-btn {
  flex: 1 1 auto;
  padding: 6px 10px;
  font-size: 12px;
}

.account-tab-btn.is-active {
  background-color: var(--accent-primary);
  color: var(--on-primary);
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.account-modal__card [hidden] {
  display: none !important;
}

.account-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.account-field__label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
}

.account-hint {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-muted);
}

.account-notice {
  padding: 8px 10px;
  border: 2px solid var(--border-pixel);
  background-color: var(--pin-note);
  color: var(--on-pin);
  font-family: var(--font-ui);
  font-size: 11px;
  line-height: 1.5;
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

.account-actions .pixel-btn {
  padding: 7px 12px;
  font-size: 12px;
}

.account-feedback {
  min-height: 18px;
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

.account-feedback:empty {
  display: none;
}

.account-feedback.is-error {
  padding: 6px 10px;
  border: 2px solid var(--border-pixel);
  background-color: rgba(200, 90, 50, 0.14);
  color: var(--accent-primary);
  font-weight: 700;
}

.account-feedback.is-success {
  padding: 6px 10px;
  border: 2px solid var(--border-pixel);
  background-color: rgba(62, 107, 126, 0.14);
  color: var(--accent-secondary);
  font-weight: 700;
}

/* =========================================================
   Pixel Walkers inside Home Playground
   ========================================================= */

.pixel-walker {
  position: absolute;
  top: 0;
  left: 0;
  width: 52px;
  height: 52px;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
  user-select: none;
  will-change: transform;
  transition-property: transform;
  transition-timing-function: linear;
}

.pixel-walker.is-grabbed {
  cursor: grabbing;
  z-index: 25;
  transition-duration: 0s !important;
}

.walker-sprite {
  display: block;
  width: 48px;
  height: 48px;
  margin: 2px auto 0;
  image-rendering: pixelated;
  filter: drop-shadow(2px 2px 0 rgba(59, 40, 30, 0.4));
}

.walker-sprite.is-facing-left {
  transform: scaleX(-1);
}

.pixel-walker.is-walking .walker-sprite {
  animation: pixel-walk 0.36s steps(2) infinite;
}

.pixel-walker.is-excited .walker-sprite {
  animation: pixel-excited 0.42s steps(3);
}

.pixel-walker.is-grabbed .walker-sprite {
  animation: pixel-dangle 0.32s steps(2) infinite;
  filter: drop-shadow(4px 10px 0 rgba(35, 22, 14, 0.42));
}

.pixel-walker.is-grabbed .walker-sprite.is-facing-left {
  animation-name: pixel-dangle-left;
}

.pixel-walker.is-landing .walker-sprite {
  animation: pixel-land 0.28s steps(3);
}

.pixel-walker.is-landing .walker-sprite.is-facing-left {
  animation-name: pixel-land-left;
}

.walker-bubble {
  position: absolute;
  bottom: 54px;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 170px;
  padding: 4px 8px;
  border: 2px solid var(--border-pixel);
  border-radius: var(--radius-pixel);
  box-shadow: 2px 2px 0 var(--border-pixel);
  background-color: var(--surface-card);
  color: var(--text-main);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.walker-bubble.is-visible {
  opacity: 1;
}

@keyframes pixel-walk {
  0% { margin-top: 2px; }
  50% { margin-top: -3px; }
  100% { margin-top: 2px; }
}

@keyframes pixel-excited {
  0% { margin-top: 2px; }
  35% { margin-top: -12px; }
  70% { margin-top: -4px; }
  100% { margin-top: 2px; }
}

@keyframes pixel-dangle {
  0%, 100% { transform: translateY(-8px) rotate(-6deg); }
  50% { transform: translateY(-10px) rotate(6deg); }
}

@keyframes pixel-dangle-left {
  0%, 100% { transform: scaleX(-1) translateY(-8px) rotate(-6deg); }
  50% { transform: scaleX(-1) translateY(-10px) rotate(6deg); }
}

@keyframes pixel-land {
  0% { transform: scale(1.16, 0.84) translateY(3px); }
  55% { transform: scale(0.95, 1.06) translateY(-3px); }
  100% { transform: scale(1, 1) translateY(0); }
}

@keyframes pixel-land-left {
  0% { transform: scaleX(-1) scale(1.16, 0.84) translateY(3px); }
  55% { transform: scaleX(-1) scale(0.95, 1.06) translateY(-3px); }
  100% { transform: scaleX(-1) scale(1, 1) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .pin-note,
  .pin-note:hover {
    transition: none;
    animation: none;
    transform: none;
  }

  .news-marquee.is-scrolling .news-text {
    animation: none;
  }

  .news-text {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .wood-sprout,
  .sky-cloud-sleepy,
  .sky-cloud-small,
  .sky-moon,
  .sky-stars,
  .worm-body,
  .worm-head,
  .wood-worm-btn.is-poked .worm-body,
  .welcome-deco svg,
  .welcome-deco img,
  .pixel-walker.is-walking .walker-sprite,
  .pixel-walker.is-excited .walker-sprite,
  .pixel-walker.is-grabbed .walker-sprite,
  .pixel-walker.is-landing .walker-sprite {
    animation: none;
  }
}

/* =========================================================
   Responsive Mobile Stacking Order
   1. Logo + Menu + Social icons
   2. News Banner (with Update Log + Nickname box)
   3. Main Content (Unboxed Welcome + Pixel Playground)
   4. Pin Post
   5. Footer
   ========================================================= */

@media (max-width: 900px) {
  .site-shell {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .left-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    border-right: none;
    border-bottom: 2px solid var(--border-pixel);
    padding: 14px 12px;
    gap: 10px;
  }

  .site-logo {
    font-size: 40px;
    padding: 8px 10px;
  }

  .main-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .nav-link {
    justify-content: center;
    padding: 8px 6px;
    font-size: 22px;
  }

  .nav-link.is-active {
    border-left-width: 2px;
    border-bottom-width: 5px;
  }

  .nav-link.is-active::after {
    display: none;
  }

  .sidebar-social {
    margin-top: 4px;
    padding-top: 10px;
  }

  .social-icon-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .workspace-col {
    height: auto;
    min-height: auto;
    overflow: visible;
  }

  .news-banner {
    flex-wrap: wrap;
    gap: 8px;
  }

  .news-track {
    min-width: 100%;
  }

  .banner-actions {
    margin-left: auto;
  }

  .content-grid {
    grid-template-columns: 1fr;
    overflow: visible;
  }

  .main-column {
    height: auto;
    overflow: visible;
    padding: 24px 18px 14px;
  }

  .page-sky {
    right: 0;
    top: 6px;
    height: 84px;
  }

  .sky-cloud-sleepy {
    width: 96px;
    height: 52px;
    right: 14px;
  }

  .sky-cloud-small {
    display: none;
  }

  .sky-moon {
    width: 50px;
    height: 50px;
    right: 16px;
  }

  .sky-stars {
    right: 76px;
  }

  .home-playground {
    flex: none;
    min-height: 150px;
  }

  .pin-column {
    height: auto;
    overflow: visible;
    border-left: none;
    border-top: 3px solid var(--border-pixel);
    padding: 22px 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }

  .pin-note:nth-child(odd),
  .pin-note:nth-child(even) {
    margin: 0;
  }

  .wood-worm-spot {
    grid-column: 1 / -1;
    padding-top: 4px;
  }

  .wood-sprout--top-right,
  .wood-sprout--bot-right {
    display: none;
  }
}

@media (max-width: 560px) {
  .main-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pin-column {
    grid-template-columns: 1fr;
  }

  .welcome-gate__card {
    min-height: auto;
    padding: 24px 18px 20px;
  }

  .welcome-gate__title {
    font-size: 46px;
  }

  .welcome-gate__bottom {
    gap: 10px;
  }

  .welcome-deco {
    width: 48px;
    height: 48px;
  }

  .welcome-deco svg,
  .welcome-deco img {
    width: 46px;
    height: 46px;
  }

  .welcome-gate__field {
    flex-wrap: wrap;
  }
}
