/* SCP-089 */
.gone089 { display: none !important; }
.item.burn089 { animation: burn089 8s ease-in forwards; }
@keyframes burn089 {
  0% { background: rgba(255,120,20,0); }
  15% { background: rgba(255,120,20,.25); color: #ffb060; }
  70% { background: rgba(120,30,0,.35); color: #5a2a10; filter: blur(.5px); }
  100% { background: #000; color: #000; opacity: .15; filter: blur(2px); }
}
.w089 .clock089 { font-family: var(--head); font-size: 22px; letter-spacing: .14em; color: #ff8a3c; margin: 12px 0 10px; }
.w089 .clock089 b { color: #fff; font-weight: 500; margin-left: 8px; }
.list089 { margin: 0 0 14px; padding-left: 22px; font-size: 13px; color: var(--text-dim); }
.list089 li { margin-bottom: 6px; }
.list089 li.ok { color: var(--text); }
.list089 li.ok::marker { color: var(--green); }
.list089 label { cursor: pointer; }
.w089 input[type=checkbox] { width: auto; padding: 0; margin: 0 8px 0 0; accent-color: #c21d24; vertical-align: -2px; }
.bar089 { height: 8px; margin: 12px 0 0; border: 1px solid var(--line-2); background: #0a0c0d; }
.bar089 i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #7a1810, #ff8a1c); transition: width .8s linear; }
.doc.scorch089 .doc-text { box-shadow: inset 0 -90px 90px -50px rgba(255,90,10,.2); transition: box-shadow 2s; }
.doc.scorch089 .doc-text > p, .doc.scorch089 .doc-text > h2 { text-shadow: 0 0 6px rgba(255,100,20,.35); }
.ash089 { border-color: #8a4a1a; background: rgba(120,50,10,.12); color: #d8a070; }
.ash089 b { color: #ff9a4a; }
.fire089 {
  position: fixed; inset: 0; z-index: 930; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px;
  background: radial-gradient(ellipse at 50% 115%, rgba(255,140,30,.8), rgba(170,30,0,.55) 42%, rgba(10,0,0,.9) 80%);
  animation: appIn .8s ease, fire089 .9s ease-in-out infinite alternate; transition: opacity 1.2s;
}
@keyframes fire089 { from { filter: brightness(1); } to { filter: brightness(1.18); } }
.fire089.out { opacity: 0; }
.fire089 .f-log { width: min(620px, 100%); max-height: 64vh; overflow: hidden; font-family: var(--mono); font-size: 13px; color: #ffd8b0; text-shadow: 0 0 8px rgba(255,80,0,.6); }
.fire089 .f-log p { margin: 0 0 6px; animation: appIn .4s ease; }
.fire089 .f-log p:first-child { font-family: var(--head); font-size: 18px; letter-spacing: .16em; color: #fff; }
.fire089 .btn { margin-top: 0; }

/* SCP-140 */
.stat140 { display: grid; gap: 4px; font-family: var(--mono); font-size: 12.5px; color: var(--text-dim); }
.stat140 b { color: #e0c89a; font-weight: 400; }
.stat140 b.red { color: #ff4a3a; }
.stat140 b.hit140 { animation: hit140 .7s ease; }
@keyframes hit140 { from { color: #ff4a3a; text-shadow: 0 0 8px rgba(255,60,40,.6); } }
.doc-text p.ink140 { color: #b0474a; transition: color 5s; }
.doc-text p.ink140.dry140 { color: var(--text); }
.doc-text p.ink140::after { content: "_"; animation: caret 1s steps(1) infinite; }
.doc-text p.ink140.dry140::after { content: none; }
.doc-text h2.ink140h { color: #b0474a; animation: appIn 1.2s ease; }
.h140.swap140 { animation: swap140 1.4s steps(2) forwards; }
@keyframes swap140 { 30% { color: transparent; text-shadow: 0 0 6px #b0474a; } 60% { color: #b0474a; filter: blur(1px); } 100% { color: #b0474a; } }
.h140.done140 { color: #d8a0a2; border-bottom: 1px dotted rgba(176,71,74,.6); }

/* SCP-217 */
.fig-frame.on217::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: rgba(150,100,30,.5); mix-blend-mode: color; animation: appIn 3s ease; }
.gears217 { --spd217: 1; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 3s; }
.fig-frame.on217 .gears217 { opacity: .92; }
.gears217 i { position: absolute; display: block; color: #b08a3a; filter: drop-shadow(0 0 6px rgba(0,0,0,.8)); }
.gears217 svg { display: block; width: 100%; height: auto; }
.gears217 .a { width: 46%; left: -10%; top: 6%; animation: rot217 calc(var(--spd217) * 7s) linear infinite; }
.gears217 .b { width: 30%; right: 4%; top: 34%; color: #8a8e94; animation: rot217 calc(var(--spd217) * 4.5s) linear infinite reverse; }
.gears217 .c { width: 60%; left: 26%; bottom: -16%; color: #9a6a2a; animation: rot217 calc(var(--spd217) * 11s) linear infinite; }
@keyframes rot217 { to { transform: rotate(360deg); } }
.fig-frame.tk217 .gears217 { animation: tk217 .1s steps(1); }
@keyframes tk217 { 50% { transform: translate(1px, -1px); } }
.stage217 { font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: #c9a45a; margin-bottom: 6px; }
.bar217 { height: 8px; margin: 8px 0 14px; border: 1px solid #3a3020; background: #0a0c0d; }
.bar217 i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5a4010, #d8b060); transition: width 1s linear; }
.mech217 { transition: color 1.6s, background-color 1.6s, border-color 1.6s, filter 1.6s; }
.doc-text .mech217 { position: relative; }
.doc-text p.mech217, .doc-text h2.mech217 { padding-right: 24px; color: #c9a45a; font-family: var(--mono); }
.doc-text .mech217::after {
  content: ""; position: absolute; right: 2px; top: .2em; width: 16px; height: 16px; pointer-events: none;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='36' fill='none' stroke='%23b08a3a' stroke-width='18' stroke-dasharray='9.5 9.35'/%3E%3Ccircle cx='50' cy='50' r='10' fill='%23b08a3a'/%3E%3C/svg%3E") center / contain no-repeat;
  animation: rot217 3s linear infinite;
}
.doc-text .logbox.mech217 { border-color: #8a6a2a; background: #0c0a06; }
.doc-text .logbox.mech217 p { color: #b89a60; }
.doc-text .warnbox.mech217 { border-color: #b08a3a; color: #d8b878; background: rgba(176,138,58,.08); }
.meta.mech217 { background: #6a5020; border-color: #6a5020; }
.meta.mech217 div { background: #100d07; }
.meta.mech217 dd { color: #c9a45a; font-family: var(--mono); }
.doc-head.mech217 { border-bottom-color: #8a6a2a; }
.doc-head.mech217 .doc-num { color: #c9a45a; text-shadow: 0 0 16px rgba(200,160,80,.35); }
figcaption.mech217 { color: #b08a3a; font-family: var(--mono); }
.item.mech217 { border-bottom-color: rgba(176,138,58,.4); }
.item.mech217 .item-num, .item.mech217 .item-name { color: #c9a45a; font-family: var(--mono); }
.topbar.mech217 { border-bottom-color: #8a6a2a; }
.topbar.mech217 .brand-name, .topbar.mech217 .motto span { color: #c9a45a; }
.blast217 { position: fixed; inset: 0; z-index: 940; pointer-events: none; }
.blast217 i {
  position: absolute; top: 0; bottom: 0; width: 50%; border: 4px solid #0a0a08;
  background: repeating-linear-gradient(135deg, #1c1c18 0 30px, #5a4810 30px 60px);
  box-shadow: inset 0 0 70px rgba(0,0,0,.85); transition: transform 1s cubic-bezier(.7,0,.3,1);
}
.blast217 .l { left: 0; transform: translateX(-100%); }
.blast217 .r { right: 0; transform: translateX(100%); }
.blast217.shut .l, .blast217.shut .r { transform: none; }
.blast217 p {
  position: absolute; left: 0; right: 0; top: 50%; margin: 0; transform: translateY(-50%); padding: 0 20px; text-align: center;
  font-family: var(--head); font-size: clamp(18px, 3vw, 30px); letter-spacing: .2em; color: #e8d8a0; text-shadow: 0 0 10px #000;
  opacity: 0; transition: opacity .6s .8s;
}
.blast217.shut p { opacity: 1; }
.blast217.open p { opacity: 0; transition-delay: 0s; }

/* SCP-239 */
.w239 .w-h { color: #6aa88a; }
.ekg239 {
  --dur239: 1.03s; height: 64px; border: 1px solid #16322a;
  background: #020605 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 64'%3E%3Cpath d='M0 36H40l5-4 4 4h6l4-28 5 44 4-16h10q6-8 12 0H120' fill='none' stroke='%234fae74' stroke-width='1.6'/%3E%3C/svg%3E") repeat-x 0 0 / 120px 64px;
  animation: ekg239 var(--dur239) linear infinite;
}
@keyframes ekg239 { to { background-position: -120px 0; } }
.vit239 { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 10px 0 12px; font-family: var(--mono); font-size: 12px; color: var(--text-dim); letter-spacing: .06em; }
.vit239 b { color: #7fe0a8; font-weight: 400; margin-left: 6px; }
.vit239 b.red { color: #ff6a6f; animation: pulse 1s infinite; }
.f239 { transition: color 1.2s, text-shadow 1.2s; }
.on239 { color: #f7b2c8 !important; font-family: "Segoe Print", "Comic Sans MS", "Chalkboard SE", cursive; text-shadow: 0 0 10px rgba(247,178,200,.45); }
.doc-text p.tale239 { font-size: 15px; animation: appIn 2s ease; }
.doodle239 { position: absolute; left: 4%; right: 4%; bottom: 6%; z-index: 2; pointer-events: none; opacity: 0; transition: opacity 4s; }
.doodle239.on { opacity: .85; }
.doodle239 svg { display: block; width: 100%; height: auto; filter: drop-shadow(0 0 3px rgba(0,0,0,.6)); }
.spark239 { position: fixed; z-index: 760; pointer-events: none; color: #ffe08a; font-size: 14px; text-shadow: 0 0 8px #f7b2c8; }
.wake239 {
  position: fixed; inset: 0; z-index: 945; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: radial-gradient(ellipse at 50% 45%, rgba(255,236,242,.16), rgba(8,6,10,.92) 70%);
  animation: appIn 1.6s ease; transition: opacity 1.4s, background 1.4s;
}
.wake239.empty { background: #000; }
.wake239.out { opacity: 0; }
.wake239 .w-in { max-width: 560px; text-align: center; }
.wake239 .w-t { margin: 0 0 18px; font-family: var(--head); font-size: clamp(20px, 3.4vw, 32px); letter-spacing: .2em; color: #ff8a8f; }
.wake239 .w-q { margin: 0 0 18px; font-family: "Segoe Print", "Comic Sans MS", cursive; font-size: clamp(17px, 2.6vw, 24px); color: #f7d2de; text-shadow: 0 0 14px rgba(247,178,200,.5); }
.wake239.empty .w-q { font-family: var(--mono); font-size: 14px; color: var(--text-dim); text-shadow: none; }
.wake239 .w-b { display: flex; gap: 12px; justify-content: center; }
.wake239 .w-b .btn { margin-top: 0; }
body.gone239 #app { opacity: .03; transition: opacity 1.2s; }

/* SCP-701 */
.doc.stage701 .doc-text { font-family: Georgia, "Times New Roman", serif; }
.doc.stage701 .doc-text h2 { font-family: Georgia, "Times New Roman", serif; font-style: italic; text-transform: none; letter-spacing: .04em; color: #d8b870; }
.act701 { display: block; font-family: var(--head); font-style: normal; font-size: 12px; letter-spacing: .3em; color: #c21d24; text-transform: uppercase; }
.role701 { font-family: var(--head); font-weight: 500; letter-spacing: .14em; color: #d8b870; margin-right: 6px; font-size: 13px; }
.doc-text p.dir701 { font-style: italic; color: var(--text-dim); text-align: center; margin: 14px 8%; }
.doc-text p.line701 { padding-left: 18px; border-left: 2px solid #5a1a14; }
.doc-text p.line701 b { font-family: var(--head); font-weight: 500; letter-spacing: .14em; color: #d8b870; margin-right: 6px; }
.doc-text p.k701 { color: #e8c8c8; border-left-color: #c21d24; }
.doc-text p.k701 b { color: #ff4a3a; }
.in701 { animation: appIn 1.4s ease; }
.king701 {
  position: absolute; left: 62%; top: 0; z-index: 2; width: 8%; opacity: 0; pointer-events: none; transform-origin: 50% 0;
  filter: drop-shadow(0 0 6px rgba(230,210,160,.45)); transition: opacity 5s, width 4s, left 4s;
  animation: sway701 4.8s ease-in-out infinite;
}
.king701.on { opacity: .95; }
.king701.near { left: 40%; width: 20%; }
.king701 svg { display: block; width: 100%; height: auto; }
@keyframes sway701 { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
.bar701 {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 740; display: flex; align-items: center; gap: 14px; padding: 7px 16px;
  background: rgba(20,4,5,.94); border-top: 1px solid #5a1a14; font-size: 12px; color: #e0a0a2; letter-spacing: .04em;
  animation: appIn .8s ease; transition: opacity .8s;
}
.bar701 b { flex: none; font-family: var(--head); font-weight: 500; letter-spacing: .2em; color: #ff4a3a; }
.bar701 span { transition: opacity .4s; }
.bar701 span.fade { opacity: 0; }
.bar701.out { opacity: 0; }
.curt701 {
  position: fixed; inset: 0; z-index: 945; overflow: hidden;
  background: radial-gradient(ellipse at 50% 30%, rgba(230,210,160,.28), rgba(0,0,0,.96) 55%);
  animation: appIn 1s ease; transition: opacity 1.2s, background .3s;
}
.curt701 .cur {
  position: absolute; top: 0; bottom: 0; width: 51%; z-index: 3;
  background: repeating-linear-gradient(90deg, #4a0608 0 22px, #2a0204 22px 44px);
  box-shadow: inset 0 -40px 60px rgba(0,0,0,.7); transition: transform 2.4s cubic-bezier(.6,0,.3,1);
}
.curt701 .cur.l { left: 0; }
.curt701 .cur.r { right: 0; }
.curt701.open .cur.l { transform: translateX(-88%); }
.curt701.open .cur.r { transform: translateX(88%); }
.curt701 .kb701 {
  position: absolute; left: 50%; top: 0; z-index: 1; width: 22vh; max-width: 28vw; transform: translateX(-50%);
  filter: drop-shadow(0 0 20px rgba(230,210,160,.35));
}
.curt701 .kb701 svg { display: block; width: 100%; height: auto; transform-origin: 50% 0; animation: sway701 5s ease-in-out infinite; }
.curt701 .s-lines {
  position: absolute; left: 50%; bottom: 9%; z-index: 2; width: min(640px, 90vw); transform: translateX(-50%); text-align: center;
  font-family: Georgia, "Times New Roman", serif; font-size: clamp(15px, 2.2vw, 20px); color: #f0e0c8; text-shadow: 0 0 10px #000;
}
.curt701 .s-lines p { margin: 0 0 8px; animation: appIn 1s ease; }
.curt701 .s-lines p.d { font-style: italic; color: #bfae94; }
.curt701 .s-lines b { font-family: var(--head); font-weight: 500; letter-spacing: .16em; color: #ff4a3a; margin-right: 8px; }
.curt701 .rope701 { position: absolute; top: 0; z-index: 1; width: 2px; height: 0; background: #1a120c; box-shadow: 0 0 4px rgba(230,210,160,.3); transition: height 1.2s cubic-bezier(.5,0,.2,1); }
.curt701 .rope701.drop { height: var(--h, 55vh); }
.curt701 .rope701::after { content: ""; position: absolute; bottom: -14px; left: -6px; width: 10px; height: 12px; border: 2px solid #1a120c; border-radius: 50%; }
.curt701.dark { background: #000; }
.curt701.dark > * { opacity: 0; transition: opacity .2s; }
.curt701.out { opacity: 0; }
.curt701 .btn { position: absolute; right: 18px; top: 18px; z-index: 4; margin-top: 0; }

@media (max-width: 560px) {
  .w089 .clock089 { font-size: 18px; }
  .bar701 { font-size: 11px; padding: 6px 10px; gap: 8px; }
}

body.calm .fire089, body.calm .item.burn089, body.calm .gears217 i, body.calm .doc-text .mech217::after, body.calm .ekg239,
body.calm .king701, body.calm .curt701 .kb701 svg, body.calm .h140.swap140 { animation: none; }
