
body {
  margin: 0;
  background: #000 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Crect width='80' height='80' fill='%23000000'/%3E%3Ccircle cx='8' cy='14' r='1' fill='%23808080'/%3E%3Ccircle cx='42' cy='30' r='1' fill='%23b7b7b7'/%3E%3Ccircle cx='67' cy='58' r='1' fill='%23777777'/%3E%3Ccircle cx='24' cy='64' r='1' fill='%23d0d0d0'/%3E%3C/svg%3E");
  color: #d6d6d6;
  font-family: "굴림", "Gulim", "돋움", "Dotum", Arial, sans-serif;
  font-size: 13px;
}

a { color: #ffff99; }
a:visited { color: #cc99ff; }
a:hover { color: #ff3333; background: #ffff00; }

body.site-locked { overflow: hidden; }

.wrapper {
  width: 760px;
  margin: 18px auto;
  border: 3px ridge #777;
  background: #080808;
}

.topbar {
  background: #1a1a1a;
  color: #00ff66;
  padding: 4px 8px;
  font-family: "Courier New", monospace;
  font-size: 12px;
  border-bottom: 2px groove #777;
}

.header {
  padding: 18px 16px 14px;
  text-align: center;
  background:
    radial-gradient(circle at center, rgba(80,80,150,.5), transparent 35%),
    linear-gradient(#111, #030303);
  border-bottom: 3px double #999;
}

.header h1 {
  margin: 0;
  color: #fff;
  font-family: "Times New Roman", serif;
  font-size: 46px;
  letter-spacing: 3px;
  text-shadow: 2px 2px #990000, 4px 4px #333;
}

.header p {
  margin: 8px 0 0;
  color: #cfcfcf;
}

.nav {
  text-align: center;
  padding: 9px 0;
  background: #292929;
  border-top: 1px solid #555;
  border-bottom: 1px solid #555;
  font-weight: bold;
}

.nav a {
  display: inline-block;
  padding: 2px 12px;
  text-decoration: underline;
}

.content-table {
  width: 100%;
  border-collapse: collapse;
}

.left-menu {
  width: 160px;
  vertical-align: top;
  background: #111;
  border-right: 2px groove #777;
  padding: 10px;
}

.left-box {
  border: 2px ridge #777;
  margin-bottom: 10px;
  background: #050505;
}

.left-title {
  color: #000;
  background: #c0c0c0;
  padding: 3px 5px;
  font-weight: bold;
}

.left-box ul {
  margin: 8px 0;
  padding-left: 18px;
  line-height: 1.7;
}

.main {
  vertical-align: top;
  padding: 14px;
  background: #0b0b0b;
}

.page-title {
  margin: 0 0 12px;
  padding: 6px;
  color: #ffffcc;
  background: #330000;
  border: 1px solid #993333;
  font-size: 18px;
}

.notice {
  padding: 8px;
  background: #111133;
  border: 1px dashed #6666cc;
  color: #ccccff;
  margin-bottom: 12px;
}

.box {
  border: 2px ridge #888;
  background: #000;
  margin-bottom: 14px;
  padding: 10px;
}

.box h3 {
  margin: 0 0 8px;
  color: #ffcc66;
  font-size: 16px;
  border-bottom: 1px dotted #777;
  padding-bottom: 5px;
}

.old-button {
  border: 2px outset #c0c0c0;
  background: #c0c0c0;
  color: #000;
  padding: 3px 9px;
  font-family: "굴림", "Gulim", sans-serif;
  cursor: pointer;
  font-size: 12px;
}

.old-button:active { border-style: inset; }

.warning { color: #ff6666; font-weight: bold; }
.blink { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.cover {
  width: 230px;
  height: 330px;
  margin: 0 auto 14px;
  border: 3px ridge #888;
  background:
    radial-gradient(circle at 50% 25%, rgba(255,255,255,.45), transparent 3px),
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.35), transparent 2px),
    radial-gradient(circle at 70% 40%, rgba(255,255,255,.3), transparent 2px),
    radial-gradient(circle at 50% 43%, rgba(70,70,150,.6), transparent 75px),
    #02020a;
  position: relative;
  overflow: hidden;
}
.pyramid {
  width: 118px;
  height: 98px;
  background: linear-gradient(120deg, #d0b76a, #4c3517 48%, #221306 49%, #b99643);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  position: absolute;
  top: 86px;
  left: 56px;
  filter: drop-shadow(0 0 12px #d9b35c);
}
.cover .title {
  position: absolute;
  top: 18px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: "Times New Roman", serif;
  font-size: 28px;
  color: #fff;
  text-shadow: 2px 2px #900;
}
.cover .headline {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 26px;
  padding: 7px;
  color: #000;
  background: #ffff99;
  border: 2px solid #cc0000;
  font-weight: bold;
  line-height: 1.4;
}

.article p { line-height: 1.75; }
.article blockquote {
  margin: 12px 0;
  padding: 8px;
  color: #ffdddd;
  background: #250000;
  border-left: 4px solid #990000;
}
.article-corrupt {
  display: none;
  color: #ffd1d1;
  text-shadow: 1px 0 #ff0000, -1px 0 #0066ff;
}

.red-list {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #770000;
  background: #140000;
  color: #ff4b4b;
  line-height: 1.9;
}
.red-list h4 {
  margin: 0 0 10px;
  color: #ff0000;
  font-size: 18px;
}
.red-list .entered-name {
  font-size: 18px;
  font-weight: bold;
  color: #ff9999;
}
.red-list .warning-end {
  margin-top: 12px;
  font-weight: bold;
  color: #ff0000;
}

.org-table {
  width: 100%;
  border-collapse: collapse;
  background: #111;
}
.org-table th {
  background: #c0c0c0;
  color: #000;
  border: 2px ridge #888;
  padding: 6px;
}
.org-table td {
  border: 1px solid #666;
  padding: 7px;
}
.org-table .unknown { color: #aaa; }
#orgTable.dead td {
  background: #270000;
  color: #ffcccc;
  animation: shake .12s steps(2) infinite;
}
#orgTable.dead .alive { display: none; }
.dead-note {
  display: none;
  color: #ff3333;
  font-weight: bold;
  font-family: "Courier New", monospace;
}
#orgTable.dead .dead-note { display: inline; }
@keyframes shake {
  0% { transform: translateX(0); }
  50% { transform: translateX(-2px); }
  100% { transform: translateX(2px); }
}

.news-item {
  border-bottom: 1px dotted #666;
  padding: 9px 0;
}
.news-item:last-child { border-bottom: 0; }
.news-item b { color: #ffcc66; }
.counter {
  text-align: center;
  margin-top: 10px;
  color: #00ff66;
  font-family: "Courier New", monospace;
}
.counter span {
  display: inline-block;
  background: #000;
  border: 1px inset #999;
  padding: 2px 5px;
  color: #00ff66;
}
.footer {
  border-top: 2px groove #777;
  background: #111;
  color: #777;
  text-align: center;
  padding: 10px;
  font-size: 11px;
}
.glitch { animation: pageGlitch .18s steps(2) 10; }
@keyframes pageGlitch {
  0% { filter: none; transform: translate(0,0); }
  25% { filter: contrast(2) hue-rotate(70deg); transform: translate(-3px,1px); }
  50% { filter: invert(.85); transform: translate(2px,-1px); }
  75% { filter: contrast(1.6); transform: translate(-1px,-2px); }
  100% { filter: none; transform: translate(0,0); }
}

#ghostScreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  pointer-events: none;
  overflow: hidden;
}
#ghostScreen.show {
  display: block;
  animation: ghostFlash .68s ease-out forwards;
}
.ghost-face {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 410px;
  transform: translate(-50%, -50%) scale(0.88);
  opacity: 0;
}
#ghostScreen.show .ghost-face { animation: ghostPop .58s ease-out forwards; }
.ghost-face::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 52%;
  width: 170px;
  height: 220px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 50% 35%, #f6f6f6 0%, #d4d4d4 44%, #8d8d8d 72%, transparent 100%);
  border-radius: 48% 48% 44% 44%;
  filter: blur(1px);
  box-shadow: 0 0 40px rgba(255,255,255,0.25);
}
.ghost-face::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 47%;
  width: 235px;
  height: 325px;
  transform: translate(-50%, -50%);
  background:
    repeating-linear-gradient(90deg, rgba(0,0,0,1) 0px, rgba(0,0,0,1) 7px, rgba(26,26,26,.98) 8px, rgba(3,3,3,1) 13px);
  border-radius: 46% 46% 42% 42%;
  box-shadow: inset 0 -40px 70px rgba(0,0,0,0.7), 0 0 26px rgba(0,0,0,0.9);
  clip-path: polygon(8% 0%, 92% 0%, 100% 18%, 95% 35%, 90% 52%, 84% 66%, 78% 82%, 70% 100%, 62% 84%, 54% 100%, 46% 82%, 38% 100%, 30% 84%, 22% 100%, 14% 80%, 8% 62%, 4% 38%, 0% 18%);
}
@keyframes ghostFlash {
  0% { opacity: 0; background: rgba(0,0,0,0); }
  14% { opacity: 1; background: rgba(255,255,255,0.12); }
  100% { opacity: 0; background: rgba(0,0,0,0.92); }
}
@keyframes ghostPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.78); filter: blur(9px); }
  18% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); filter: blur(1px); }
  62% { opacity: 1; transform: translate(-50%, -50%) scale(1); filter: blur(0.5px); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.13); filter: blur(4px); }
}

/* signup overlay */
#signupOverlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.92);
  display: none;
  align-items: center;
  justify-content: center;
}
#signupOverlay.show { display: flex; }
.signup-window {
  width: 420px;
  max-width: calc(100% - 24px);
  border: 3px ridge #999;
  background: #c0c0c0;
  color: #000;
  box-shadow: 0 0 30px rgba(255,255,255,.15);
}
.signup-head {
  background: linear-gradient(90deg, #000080, #1084d0);
  color: #fff;
  padding: 5px 8px;
  font-weight: bold;
  font-size: 12px;
}
.signup-body {
  padding: 14px;
  font-size: 12px;
}
.signup-body p { margin: 0 0 10px; line-height: 1.7; }
.signup-body input {
  width: calc(100% - 10px);
  padding: 4px;
  font-size: 12px;
  margin: 6px 0 12px;
  border: 2px inset #fff;
}
.signup-actions { text-align: right; }
.signup-note { color: #990000; font-size: 11px; }
.welcome-name { color: #ff9999; font-weight: bold; }

/* Tape button & modal */
.tape-trigger-wrap {
  margin-top: 10px;
}
.tape-button {
  display: inline-block;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}
.mini-tape {
  width: 210px;
  height: 122px;
  position: relative;
  background: linear-gradient(180deg, #171717, #050505 70%);
  border: 3px ridge #666;
  box-shadow: inset 0 0 14px rgba(255,255,255,.05), 0 0 14px rgba(180,0,0,.2);
}
.mini-tape::before,
.mini-tape::after {
  content: "";
  position: absolute;
  top: 28px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 10px solid #111;
  background: #d8d8d8;
}
.mini-tape::before { left: 34px; }
.mini-tape::after { right: 34px; }
.mini-tape-label {
  position: absolute;
  left: 18px;
  right: 18px;
  top: 12px;
  height: 24px;
  background: linear-gradient(90deg, #551111, #160000);
  border: 1px solid #933;
  color: #f2d9d9;
  font-family: "Times New Roman", serif;
  font-size: 17px;
  letter-spacing: 1px;
  text-align: center;
  line-height: 24px;
  text-shadow: 1px 1px #000;
}
.mini-tape-scratch,
.mini-tape-scratch2,
.mini-tape-scratch3 {
  position: absolute;
  background: rgba(255,255,255,.12);
  height: 1px;
  transform: rotate(-16deg);
}
.mini-tape-scratch { width: 90px; left: 24px; top: 76px; }
.mini-tape-scratch2 { width: 70px; right: 24px; top: 66px; }
.mini-tape-scratch3 { width: 45px; left: 86px; top: 96px; }
.mini-tape-note {
  position: absolute;
  bottom: 8px;
  left: 0;
  right: 0;
  color: #cc8888;
  font-size: 11px;
  text-align: center;
}

#tapeModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,.9);
}
#tapeModal.show { display: block; }
.tape-modal-inner {
  width: 520px;
  max-width: calc(100% - 30px);
  margin: 70px auto;
  border: 3px ridge #777;
  background: #111;
  padding: 18px;
  color: #ddd;
}
.tape-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: #ff9999;
}
.large-tape {
  width: 100%;
  height: 280px;
  position: relative;
  border: 3px ridge #666;
  background:
    radial-gradient(circle at 25% 25%, rgba(130,0,0,.16), transparent 25%),
    radial-gradient(circle at 75% 65%, rgba(255,255,255,.05), transparent 20%),
    linear-gradient(180deg, #1b1b1b 0%, #090909 70%, #000 100%);
  overflow: hidden;
}
.large-tape .label-top {
  position: absolute;
  top: 16px;
  left: 24px;
  right: 24px;
  height: 54px;
  border: 1px solid #933;
  background:
    radial-gradient(circle at 50% 30%, rgba(60,60,120,.45), transparent 45%),
    #060610;
}
.large-tape .label-title {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-family: "Times New Roman", serif;
  font-size: 27px;
  letter-spacing: 2px;
  text-shadow: 2px 2px #900;
}
.large-tape .pyr {
  position: absolute;
  top: 88px;
  left: 50%;
  width: 90px;
  height: 74px;
  transform: translateX(-50%);
  clip-path: polygon(50% 0, 0 100%, 100% 100%);
  background: linear-gradient(120deg, #d0b76a, #4c3517 48%, #221306 49%, #b99643);
  filter: drop-shadow(0 0 8px #d9b35c);
}
.large-tape .reel1,
.large-tape .reel2 {
  position: absolute;
  top: 132px;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  border: 18px solid #111;
  background: #ddd;
}
.large-tape .reel1 { left: 82px; }
.large-tape .reel2 { right: 82px; }
.large-tape .text-bottom {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: #ffb8b8;
  font-size: 16px;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(255,0,0,.35);
}
.large-tape .scratchA,
.large-tape .scratchB,
.large-tape .scratchC,
.large-tape .scratchD {
  position: absolute;
  height: 1px;
  background: rgba(255,255,255,.18);
  transform: rotate(-14deg);
}
.large-tape .scratchA { width: 140px; left: 30px; top: 126px; }
.large-tape .scratchB { width: 100px; right: 36px; top: 110px; }
.large-tape .scratchC { width: 80px; left: 190px; top: 200px; }
.large-tape .scratchD { width: 62px; right: 140px; top: 228px; }
.modal-desc { margin-top: 12px; line-height: 1.7; color: #c7b5b5; }

@media (max-width: 800px) {
  .wrapper { width: calc(100% - 18px); margin: 9px; }
  .content-table, .content-table tbody, .content-table tr, .content-table td { display: block; width: 100%; }
  .left-menu { border-right: 0; border-bottom: 2px groove #777; }
  .header h1 { font-size: 34px; }
  .nav a { padding: 4px 6px; }
}


/* v7 article updates */
.red-list {
  display: none;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #770000;
  background: #140000;
  color: #ff4b4b;
  line-height: 1.95;
}
.red-list .hidden-line {
  opacity: 0;
  transition: opacity .35s ease;
}
.red-list .hidden-line.show {
  opacity: 1;
}
.red-list h4 {
  margin: 0 0 10px;
  color: #ff0000;
  font-size: 18px;
}
.red-list .entered-name {
  font-size: 18px;
  font-weight: bold;
  color: #ff9999;
}
.red-list .warning-mid {
  margin-top: 12px;
  font-weight: bold;
  color: #ff7b7b;
}
.red-list .warning-end {
  margin-top: 12px;
  font-weight: bold;
  color: #ff0000;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  letter-spacing: 1px;
  text-shadow: 0 0 3px rgba(255,0,0,.6), 2px 2px 0 #330000;
  animation: creepyPulse 1.6s ease-in-out infinite;
}
@keyframes creepyPulse {
  0%, 100% { transform: translateX(0); opacity: .95; }
  20% { transform: translateX(1px); opacity: 1; }
  40% { transform: translateX(-1px); }
  60% { transform: translateX(2px); text-shadow: 0 0 8px rgba(255,0,0,.8), 2px 2px 0 #220000; }
  80% { transform: translateX(-2px); }
}

#tapeModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(0,0,0,.88);
}
#tapeModal.show { display: block; }
.tape-modal-inner {
  width: 520px;
  max-width: calc(100% - 30px);
  margin: 55px auto;
  border: 3px ridge #777;
  background: #111;
  padding: 18px;
  color: #ddd;
}
.tape-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: #ff9999;
}
.tape-modal-inner img {
  display: block;
  width: 100%;
  height: auto;
  border: 2px ridge #777;
  background: #000;
}
.modal-desc {
  margin-top: 12px;
  line-height: 1.75;
  color: #d4bebe;
}


/* v9 dramatic ending */
.red-list .warning-end {
  margin-top: 18px;
  font-weight: bold;
  color: #ff0000;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  letter-spacing: 1px;
  text-shadow: 0 0 4px rgba(255,0,0,.75), 2px 2px 0 #330000, -1px 0 0 #550000;
  animation: creepyPulse 1.6s ease-in-out infinite;
}


/* v10: ensure the final creepy line stays hidden until its reveal timing */
.red-list .hidden-line {
  opacity: 0 !important;
  visibility: hidden;
}
.red-list .hidden-line.show {
  opacity: 1 !important;
  visibility: visible;
}


/* v15 realistic ghost jumpscare */
#ghostScreen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.96);
  pointer-events: none;
  overflow: hidden;
}
#ghostScreen.show {
  display: block;
  animation: ghostScreenFlash .34s steps(1, end) forwards;
}
#ghostScreen .ghost-jumpscare {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(440px, 72vw);
  height: auto;
  transform: translate(-50%, -50%);
  opacity: 0;
  filter: contrast(1.12) brightness(.92);
  box-shadow: 0 0 28px rgba(255,255,255,.08);
}
#ghostScreen.show .ghost-jumpscare {
  animation: ghostInstantPop .34s steps(1, end) forwards;
}
@keyframes ghostScreenFlash {
  0% { opacity: 1; background: rgba(255,255,255,0.12); }
  100% { opacity: 1; background: rgba(0,0,0,0.96); }
}
@keyframes ghostInstantPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(1.02); }
  1% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.03); }
}


/* v17 cutout ghost tuning */
#ghostScreen .ghost-jumpscare {
  width: min(520px, 70vw);
  box-shadow: none !important;
  background: transparent !important;
}


/* v18 mobile optimization */
html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 640px) {
  body {
    font-size: 12px;
  }

  .wrapper {
    width: 100%;
    margin: 0;
    border-left: 0;
    border-right: 0;
    border-top: 0;
  }

  .topbar {
    padding: 6px 8px;
    font-size: 10px;
    line-height: 1.5;
    word-break: break-word;
  }

  .header {
    padding: 14px 10px 12px;
  }

  .header h1 {
    font-size: 28px;
    letter-spacing: 1px;
  }

  .header p {
    font-size: 11px;
    line-height: 1.5;
  }

  .nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    padding: 8px 8px;
    font-size: 12px;
    line-height: 1.5;
  }

  .nav a {
    padding: 4px 8px;
    background: #151515;
    border: 1px solid #444;
    text-decoration: none;
  }

  .content-table,
  .content-table tbody,
  .content-table tr,
  .content-table td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .left-menu {
    width: 100%;
    border-right: 0;
    border-bottom: 2px groove #777;
    padding: 10px;
  }

  .main {
    width: 100%;
    padding: 10px;
  }

  .page-title {
    font-size: 16px;
    line-height: 1.4;
    padding: 7px 8px;
    word-break: keep-all;
  }

  .notice,
  .box {
    padding: 9px;
  }

  .box h3 {
    font-size: 15px;
    line-height: 1.4;
  }

  .cover {
    width: 200px;
    height: 290px;
  }

  .pyramid {
    width: 102px;
    height: 84px;
    top: 82px;
    left: 49px;
  }

  .cover .title {
    font-size: 24px;
  }

  .cover .headline {
    font-size: 12px;
    line-height: 1.4;
  }

  .article p,
  .box p,
  .news-item {
    line-height: 1.8;
    word-break: keep-all;
  }

  .article blockquote {
    padding: 10px 8px;
    font-size: 12px;
    line-height: 1.7;
  }

  .old-button {
    display: inline-block;
    width: 100%;
    margin: 0 0 8px 0;
    padding: 8px 10px;
    font-size: 13px;
    box-sizing: border-box;
  }

  .red-list {
    padding: 10px;
  }

  .red-list h4 {
    font-size: 17px;
    line-height: 1.4;
  }

  .red-list .entered-name {
    font-size: 17px;
  }

  .red-list .warning-mid {
    font-size: 14px;
    line-height: 1.7;
  }

  .red-list .warning-end {
    font-size: 20px;
    line-height: 1.45;
    word-break: keep-all;
  }

  .signup-window {
    width: calc(100% - 20px);
  }

  .signup-body {
    padding: 12px;
  }

  .signup-body input {
    width: 100%;
    box-sizing: border-box;
  }

  #tapeModal {
    padding: 12px 0;
    overflow-y: auto;
  }

  .tape-modal-inner {
    width: calc(100% - 20px);
    margin: 12px auto 18px;
    padding: 12px;
    box-sizing: border-box;
  }

  .tape-modal-head {
    gap: 8px;
    align-items: flex-start;
  }

  .tape-modal-head strong {
    font-size: 14px;
    line-height: 1.4;
  }

  .modal-desc {
    font-size: 12px;
    line-height: 1.7;
  }

  #ghostScreen .ghost-jumpscare {
    width: min(88vw, 420px);
    top: 50%;
  }

  .org-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    font-size: 12px;
  }

  .org-table th,
  .org-table td {
    padding: 6px;
  }

  .footer {
    padding: 12px 10px;
    line-height: 1.6;
    word-break: break-word;
  }
}


/* v19: keep organization chart as a table on mobile */
@media (max-width: 640px) {
  .org-table-wrap,
  .box:has(.org-table) {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .content-table .org-table {
    display: table !important;
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    white-space: normal;
    font-size: 11px;
  }

  .content-table .org-table tbody {
    display: table-row-group !important;
  }

  .content-table .org-table tr {
    display: table-row !important;
    width: auto !important;
  }

  .content-table .org-table th,
  .content-table .org-table td {
    display: table-cell !important;
    width: auto !important;
    padding: 6px 5px;
    vertical-align: middle;
    white-space: normal;
    word-break: keep-all;
  }

  .content-table .org-table th:nth-child(1),
  .content-table .org-table td:nth-child(1) {
    min-width: 72px;
  }

  .content-table .org-table th:nth-child(2),
  .content-table .org-table td:nth-child(2) {
    min-width: 92px;
  }

  .content-table .org-table th:nth-child(3),
  .content-table .org-table td:nth-child(3) {
    min-width: 130px;
  }

  .content-table .org-table th:nth-child(4),
  .content-table .org-table td:nth-child(4) {
    min-width: 135px;
  }
}


/* v20: remove side menu and use top tabs only */
.main {
  width: 100%;
}

.top-tabs {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: #111;
  border-top: 2px groove #777;
  border-bottom: 2px groove #777;
}

.top-tabs a {
  flex: 1;
  max-width: 170px;
  padding: 9px 8px;
  text-align: center;
  color: #ffff99;
  background: #222;
  border-right: 1px solid #555;
  border-left: 1px solid #000;
  text-decoration: none;
  font-weight: bold;
}

.top-tabs a:hover {
  color: #ff3333;
  background: #ffff00;
}

.content-table {
  width: 100%;
}

.content-table .main {
  border-left: 0;
}

/* Hide any leftover sidebar elements if cached/old markup remains */
.left-menu {
  display: none !important;
}

@media (max-width: 640px) {
  .top-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding: 0;
  }

  .top-tabs a {
    max-width: none;
    padding: 9px 4px;
    font-size: 12px;
    border: 1px solid #444;
  }

  .main {
    padding: 10px;
  }
}


/* v21: mobile button and organization table fixes */

/* Remove any old mini-tape visual remnants that can overlap the plain buttons */
.tape-trigger-wrap,
.tape-button,
.mini-tape,
.mini-tape-label,
.mini-tape-note,
.mini-tape-scratch,
.mini-tape-scratch2,
.mini-tape-scratch3 {
  display: none !important;
}

/* Make the article action buttons clean and prevent old red text overlap */
.article-buttons {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
}

.article-buttons .old-button {
  position: relative;
  z-index: 2;
}

/* Mobile: keep buttons as normal gray buttons without overlapping text */
@media (max-width: 640px) {
  .article-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .article-buttons .old-button {
    width: 100%;
    margin: 0;
    color: #000 !important;
    background: #c0c0c0 !important;
    text-shadow: none !important;
  }
}

/* Mobile organization table: show all columns including 비고 within the screen */
@media (max-width: 640px) {
  .box:has(.org-table) {
    overflow-x: visible !important;
  }

  .content-table .org-table {
    display: table !important;
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    border-collapse: collapse !important;
    white-space: normal !important;
    font-size: 10px !important;
  }

  .content-table .org-table tbody {
    display: table-row-group !important;
  }

  .content-table .org-table tr {
    display: table-row !important;
    width: auto !important;
  }

  .content-table .org-table th,
  .content-table .org-table td {
    display: table-cell !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 5px 3px !important;
    vertical-align: middle !important;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
    line-height: 1.35 !important;
  }

  .content-table .org-table th:nth-child(1),
  .content-table .org-table td:nth-child(1) {
    width: 17% !important;
  }

  .content-table .org-table th:nth-child(2),
  .content-table .org-table td:nth-child(2) {
    width: 21% !important;
  }

  .content-table .org-table th:nth-child(3),
  .content-table .org-table td:nth-child(3) {
    width: 31% !important;
  }

  .content-table .org-table th:nth-child(4),
  .content-table .org-table td:nth-child(4) {
    width: 31% !important;
  }

  .org-table .unknown {
    display: block;
    font-size: 9px;
    line-height: 1.25;
  }
}


/* v22: Gungsuh + typing effect for final creepy line */
.red-list .warning-end {
  font-family: "궁서", "궁서체", "Gungsuh", serif !important;
  font-size: 26px;
  letter-spacing: 0.5px;
  text-shadow: 0 0 4px rgba(255,0,0,.75), 2px 2px 0 #330000, -1px 0 0 #550000;
}
#finalCreepyLine {
  display: inline-block;
  white-space: nowrap;
  overflow: hidden;
  border-right: 2px solid rgba(255,60,60,.95);
  width: 0;
  visibility: hidden;
}
#finalCreepyLine.show,
#finalCreepyLine.typing,
#finalCreepyLine.done {
  visibility: visible;
}
#finalCreepyLine.typing {
  animation: cursorBlink .6s steps(1, end) infinite;
}
#finalCreepyLine.done {
  width: auto;
  border-right: 0;
}
@keyframes cursorBlink {
  0%,49% { border-right-color: rgba(255,60,60,.95); }
  50%,100% { border-right-color: transparent; }
}
@media (max-width: 640px) {
  .red-list .warning-end {
    font-family: "궁서", "궁서체", "Gungsuh", serif !important;
    font-size: 21px;
    line-height: 1.5;
  }
  #finalCreepyLine {
    display: block;
    white-space: normal;
    width: auto;
    min-height: 2.8em;
  }
  #finalCreepyLine.done { width: auto; }
}


/* v23: mobile signup popup and iOS zoom fix */
.signup-body input,
#visitorName {
  font-size: 16px !important;
  line-height: 1.4;
}

@media (max-width: 640px) {
  html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  body {
    width: 100%;
    min-width: 0;
  }

  .signup-window {
    width: calc(100vw - 24px) !important;
    max-width: 420px;
  }

  .signup-body input,
  #visitorName {
    font-size: 16px !important;
    transform: translateZ(0);
  }

  .wrapper {
    width: 100vw !important;
    max-width: 100vw !important;
  }

  .main,
  .box,
  .notice,
  .page-title {
    max-width: 100%;
    box-sizing: border-box;
  }
}


/* v24: ensure final line uses Gungsuh strongly */
.red-list .warning-end,
#finalCreepyLine {
  font-family: "궁서", "궁서체", "Gungsuh", serif !important;
}


/* v27: unify organization table row heights */
.org-table {
  table-layout: fixed;
  width: 100%;
}

.org-table th,
.org-table td {
  height: 68px;
  vertical-align: middle;
  line-height: 1.35;
  box-sizing: border-box;
}

.org-table th {
  white-space: nowrap;
}

.org-table td {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.org-table .unknown {
  display: block;
  line-height: 1.2;
}

@media (max-width: 640px) {
  .content-table .org-table th,
  .content-table .org-table td {
    height: 72px !important;
    vertical-align: middle !important;
  }
}


/* v28: compact organization table so it fits better on mobile */
.org-table th,
.org-table td {
  height: 54px !important;
  padding: 6px 5px !important;
  line-height: 1.25 !important;
}

@media (max-width: 640px) {
  .content-table .org-table {
    font-size: 9px !important;
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .content-table .org-table th,
  .content-table .org-table td {
    height: 44px !important;
    padding: 3px 2px !important;
    line-height: 1.18 !important;
    vertical-align: middle !important;
  }

  .content-table .org-table th:nth-child(1),
  .content-table .org-table td:nth-child(1) {
    width: 17% !important;
  }

  .content-table .org-table th:nth-child(2),
  .content-table .org-table td:nth-child(2) {
    width: 21% !important;
  }

  .content-table .org-table th:nth-child(3),
  .content-table .org-table td:nth-child(3) {
    width: 31% !important;
  }

  .content-table .org-table th:nth-child(4),
  .content-table .org-table td:nth-child(4) {
    width: 31% !important;
  }

  .org-table .unknown {
    display: block;
    font-size: 8px !important;
    line-height: 1.05 !important;
  }

  .dead-note {
    font-size: 8.5px !important;
    line-height: 1.12 !important;
  }
}


/* v30: organization table balance - shorter rows, readable text */
.org-table th,
.org-table td {
  height: 46px !important;
  padding: 5px 5px !important;
  line-height: 1.25 !important;
  font-size: 12px !important;
}

.org-table .unknown {
  font-size: 11px !important;
  line-height: 1.15 !important;
}

.dead-note {
  font-size: 12px !important;
  line-height: 1.2 !important;
}

@media (max-width: 640px) {
  .content-table .org-table {
    font-size: 11px !important;
    table-layout: fixed !important;
    width: 100% !important;
    min-width: 0 !important;
  }

  .content-table .org-table th,
  .content-table .org-table td {
    height: 40px !important;
    padding: 3px 3px !important;
    line-height: 1.15 !important;
    font-size: 11px !important;
    vertical-align: middle !important;
  }

  .org-table .unknown {
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  .dead-note {
    font-size: 10.5px !important;
    line-height: 1.12 !important;
  }
}
