/*
  Reference: a real 1997 GeoCities homepage (geocities.restorativland.org/Area51/1007):
  a dark brick tile behind everything, one black centred column, Times New Roman,
  underlined blue links, a blue border round everything you can click, and
  "Welcome to my homepage!" in navy that is too dark on purpose.
  The modern part: the layout breathes, the chat is plainly readable,
  dialogs are Windows 95 windows rather than browser alerts.
*/

:root {
  --black: #000;
  --ink: #f2f2f2;
  --dim: #b8b8b8;
  --link: #3f5cff;
  --visited: #b35cff;
  --frame: #2626d0;
  --navy: #1b1b9a;
  --yellow: #ffff00;
  --red: #ff2020;
  --face: #c0c0c0;
  --twitch: #a970ff;
  --youtube: #ff3b3b;
  --kick: #53fc18;
  --site: #ffcc00;
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { background: #120e0c; }
body {
  margin: 0;
  color: var(--ink);
  font: 16px/1.35 "Times New Roman", Times, serif;
  /* Brick tile: mortar lines and three brick tones, a little grit. */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='48'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .22 0'/%3E%3C/filter%3E%3Crect width='96' height='48' fill='%23100c0a'/%3E%3Cg%3E%3Crect x='1' y='1' width='46' height='22' fill='%232e2521'/%3E%3Crect x='49' y='1' width='46' height='22' fill='%23362b26'/%3E%3Crect x='-23' y='25' width='46' height='22' fill='%23281f1c'/%3E%3Crect x='25' y='25' width='46' height='22' fill='%23332824'/%3E%3Crect x='73' y='25' width='46' height='22' fill='%232b231f'/%3E%3C/g%3E%3Crect width='96' height='48' filter='url(%23n)'/%3E%3C/svg%3E") repeat,
    #120e0c;
  cursor: default;
}
a { color: var(--link); }
a:visited { color: var(--visited); }

#sparkles { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 1000; image-rendering: pixelated; }

/* The black table down the middle. */
/* The column takes the whole browser width; a 16 px strip of brick stays at
   each edge so the homepage still sits on its wall. */
.page {
  max-width: none;
  margin: 0 16px;
  background: var(--black);
  min-height: 100vh;
  padding: 10px 18px 24px;
  box-shadow: 0 0 0 1px #000, 0 0 40px rgba(0, 0, 0, .8);
}

/* ---------- masthead ---------- */
.masthead { text-align: center; position: relative; padding-top: 6px; }
.account { position: absolute; right: 0; top: 4px; font-size: 14px; display: flex; gap: 10px; align-items: baseline; }
.account .who { font-weight: bold; }
/* Helblinde's sign between the World Trade Center towers, in the grey of
   the photo it was taken from. */
.hero { display: flex; justify-content: center; align-items: flex-end; gap: 14px; margin: 4px auto 10px; }
.tower { height: 205px; width: 56px; flex: none; }
.badge-sign { width: min(430px, 62vw); height: auto; flex: none; }
.sign-small { font: bold 18px 'Times New Roman', Times, serif; letter-spacing: .05em; }
.sign-name { font: bold 56px 'Rockwell Extra Bold', Rockwell, 'Clarendon', 'Bookman Old Style', Georgia, serif; letter-spacing: -.01em; }
.welcome-to {
  margin: 0;
  font: italic 900 30px/1 "Arial Black", Arial, sans-serif;
  color: #fff;
  letter-spacing: .02em;
  text-shadow: 2px 2px 0 #555;
}
h1 {
  margin: 4px 0 8px;
  font: bold 40px/1.1 "Times New Roman", Times, serif;
  color: var(--navy);
}
.marquee-box {
  margin: 0 auto 8px; max-width: 760px;
  border: 2px solid var(--frame);
  background: #000;
  color: var(--yellow);
  font: bold 15px/26px "Comic Sans MS", "Comic Sans", cursive;
}
.marquee-box marquee { display: block; }

.ring { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; margin: 6px 0 12px; font-size: 18px; }
.src {
  background: none; border: 0; padding: 0; font: inherit; cursor: pointer;
  color: var(--link); text-decoration: underline;
}
.src::before { content: "[\00a0"; color: var(--ink); text-decoration: none; display: inline-block; }
.src::after { content: "\00a0]"; color: var(--ink); text-decoration: none; display: inline-block; }
.src.on { color: #fff; font-weight: bold; text-decoration: none; }
.ring-item { white-space: nowrap; }
.ring .live-tag { color: var(--red); font: bold 12px Arial, sans-serif; margin-left: 5px; animation: blink 1s steps(1) infinite; }
.src.chat-down { color: #6a6a8a; }
@keyframes blink { 50% { visibility: hidden; } }

/* ---------- stream + chat ---------- */
/* The stream and chat are Windows 95 windows. Stacked on phones; on wider
   screens (.windowed) they sit where the viewer dragged them. */
.desk { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; position: relative; }
.desk.windowed { display: block; }
.desk.windowed .win { position: absolute; }
.win {
  background: var(--face); padding: 3px; display: flex; flex-direction: column; min-width: 0;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff, 4px 4px 0 rgba(0, 0, 0, .55);
}
.win-bar { margin: 0 0 2px; cursor: default; user-select: none; touch-action: none; }
.desk.windowed .win-bar { cursor: move; }
.win-tools { display: flex; align-items: center; gap: 8px; }
.quality { display: flex; align-items: center; gap: 4px; font: normal 11px Tahoma, sans-serif; cursor: default; }
.quality input[type=checkbox] { margin: 0 2px 0 0; }
.quality select { font: 11px Tahoma, sans-serif; padding: 1px 2px; min-width: 110px; }
.win-hint { font: italic normal 11px Tahoma, sans-serif; opacity: .75; }
.desk:not(.windowed) .win-hint, .desk:not(.windowed) .grip { display: none; }
.grip {
  position: absolute; right: 2px; bottom: 2px; width: 14px; height: 14px; cursor: nwse-resize; touch-action: none; z-index: 2;
  background: linear-gradient(135deg, transparent 0 45%, #808080 45% 52%, #fff 52% 58%, transparent 58% 65%, #808080 65% 72%, #fff 72% 78%, transparent 78%);
}
body.dragging { user-select: none; }
body.dragging iframe, body.dragging video { pointer-events: none; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; box-shadow: inset 1px 1px #808080; }
.player video { width: 100%; height: 100%; display: block; background: #000; }
.frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.offline { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 6px; background: #000; }
.offline-title { margin: 0; font: bold 44px/1 "Times New Roman", serif; letter-spacing: .08em; color: #fff; }
.offline-sub { margin: 0; color: var(--dim); font-style: italic; }
.construction { margin: 10px auto 0; }
.construction span {
  display: inline-block; padding: 5px 12px;
  font: bold 14px/1 Arial, sans-serif; letter-spacing: .12em; color: #000;
  background: var(--yellow);
  border: 7px solid transparent;
  border-image: repeating-linear-gradient(-45deg, var(--yellow) 0 7px, #111 7px 14px) 7;
}

.under { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 2px 4px; }
.supporter-line { color: var(--dim); }
.supporter-line strong { color: var(--site); }

hr.rainbow {
  border: 0; height: 4px; margin: 14px 0;
  background: linear-gradient(90deg, #ff0000, #ff8800, #ffff00, #00dd00, #00bbff, #4b00ff, #cc00ff);
}

.chat { display: flex; flex-direction: column; height: min(78vh, 760px); background: #000; position: relative; min-height: 0; }
.desk.windowed .chat { flex: 1; height: auto; }
.desk.windowed #winChat { padding-bottom: 16px; }
.chat-head {
  text-align: center; padding: 6px 4px;
  font: bold 15px/1 "Comic Sans MS", "Comic Sans", cursive; letter-spacing: .06em;
  color: #00ffff; border-bottom: 2px solid var(--frame);
}
.chat-head .star { color: var(--yellow); }
.banner { margin: 8px 8px 0; padding: 8px 10px; background: #2a2400; border: 1px dashed var(--yellow); color: #fff3a0; font: 13px/1.35 Verdana, sans-serif; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.banner.ended { background: #2a0606; border-color: var(--red); color: #ffc0b8; }

/* Chat text is the modern part: Verdana, sized to read, nothing blinking. */
.messages { list-style: none; margin: 0; padding: 6px 0; flex: 1; overflow-y: auto; overscroll-behavior: contain; font: 13px/1.45 Verdana, Geneva, sans-serif; color: #ececec; }
.msg { padding: 2px 10px 2px 8px; border-left: 3px solid transparent; word-wrap: break-word; position: relative; }
.msg:hover { background: #0d0d1d; }
.msg.p-twitch { border-left-color: var(--twitch); }
.msg.p-youtube { border-left-color: var(--youtube); }
.msg.p-kick { border-left-color: var(--kick); }
.msg.p-site { border-left-color: var(--site); }
.msg.p-system { color: var(--yellow); font-weight: bold; border-left-color: var(--yellow); margin: 4px 0; padding: 5px 10px; background: #1a1800; }
.msg.notice { color: #9a9a9a; font-style: italic; }
.msg.action .body { font-style: italic; }
.plat { display: inline-block; min-width: 18px; white-space: nowrap; font: bold 9px/1 Verdana, sans-serif; vertical-align: 1px; margin-right: 3px; }
.p-twitch .plat { color: var(--twitch); }
.p-youtube .plat { color: var(--youtube); }
.p-kick .plat { color: var(--kick); }
.badge { display: inline-block; font: bold 9px/14px Verdana, sans-serif; padding: 0 3px; margin-right: 4px; vertical-align: 1px; border: 1px solid; }
.badge.broadcaster { color: #ff6060; border-color: #ff6060; }
.badge.moderator { color: #40e080; border-color: #40e080; }
.badge.supporter { color: var(--site); border-color: var(--site); }
.badge.member, .badge.subscriber { color: #9ab; border-color: #567; }
.badge.vip { color: #ff70d0; border-color: #ff70d0; }
.name { font-weight: bold; }
.paid { color: var(--site); font-weight: bold; margin-left: 4px; }
.emote { height: 28px; vertical-align: middle; margin: -4px 1px; }
.del { position: absolute; right: 6px; top: 2px; display: none; background: none; border: 0; color: #888; cursor: pointer; font: 13px Verdana, sans-serif; }
.msg:hover .del { display: block; }
.del:hover { color: var(--red); }
.more { position: absolute; left: 50%; transform: translateX(-50%); bottom: 58px; background: #000; color: var(--yellow); border: 1px solid var(--yellow); padding: 3px 12px; cursor: pointer; font: bold 12px Verdana, sans-serif; }

.composer { display: flex; gap: 6px; padding: 8px; border-top: 2px solid var(--frame); position: relative; align-items: center; background: #0a0a14; }
.composer input { flex: 1; min-width: 0; }
.picker { position: absolute; bottom: calc(100% + 4px); left: 8px; right: 8px; max-height: 240px; overflow-y: auto; background: var(--face); padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 4px; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.picker button { background: none; border: 1px solid transparent; padding: 4px; cursor: pointer; display: grid; place-items: center; position: relative; }
.picker button:hover { border: 1px dotted #000; }
.picker img { height: 28px; }
.picker .locked img { opacity: .35; filter: grayscale(1); }
.picker .locked::after { content: "\2665"; position: absolute; right: 2px; bottom: 0; font-size: 10px; color: #a00; }
.picker .empty { grid-column: 1 / -1; color: #000; text-align: center; padding: 8px; font: 12px Tahoma, sans-serif; }

/* ---------- Windows 95 bits ---------- */
.btn95 {
  font: 12px/1 Tahoma, "MS Sans Serif", Geneva, sans-serif; color: #000;
  background: var(--face); border: 0; padding: 6px 12px; min-height: 26px; cursor: pointer; white-space: nowrap;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf;
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
}
.btn95:active:not(:disabled) { box-shadow: inset -1px -1px #fff, inset 1px 1px #0a0a0a, inset -2px -2px #dfdfdf, inset 2px 2px #808080; padding: 7px 11px 5px 13px; }
.btn95:focus-visible { outline: 1px dotted #000; outline-offset: -5px; }
.btn95:disabled { color: #808080; text-shadow: 1px 1px #fff; cursor: default; }
.btn95.default { outline: 1px solid #000; outline-offset: 0; }
.btn95.icon { padding: 6px 8px; font-weight: bold; }
.btn-donate { font: bold 14px/1 "Comic Sans MS", "Comic Sans", cursive; color: #c00000; padding: 8px 16px; }

input, select, textarea {
  font: 13px Tahoma, Geneva, sans-serif; color: #000; background: #fff; border: 0; padding: 5px 6px;
  box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
}
input:focus, select:focus { outline: 1px dotted #000; outline-offset: -4px; }
input:disabled { background: #d4d0c8; color: #6b6b6b; }

.linkish { background: none; border: 0; padding: 0; font: inherit; color: var(--link); text-decoration: underline; cursor: pointer; }
.linkish:hover, .src:hover { color: #ff2020; }

dialog {
  padding: 0; border: 0; color: #000; background: var(--face);
  width: min(400px, calc(100vw - 24px));
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #fff, 6px 6px 0 rgba(0, 0, 0, .5);
  font: 13px/1.4 Tahoma, "MS Sans Serif", Geneva, sans-serif;
}
dialog.wide { width: min(560px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(0, 0, 32, .55); }
.titlebar {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin: 3px 3px 0; padding: 3px 3px 3px 6px;
  background: linear-gradient(90deg, #000080, #1084d0); color: #fff; font: bold 12px/1 Tahoma, sans-serif;
}
.titlebar .x { width: 18px; height: 16px; padding: 0; font: bold 10px/1 Tahoma, sans-serif; color: #000; background: var(--face); border: 0; cursor: pointer; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.dialog { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 10px; }
.dialog p { margin: 0; }
.dialog label { display: flex; flex-direction: column; gap: 3px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.right { margin-left: auto; }
.error { color: #c00000; margin: 0; font-weight: bold; }
.error:empty { display: none; }
.hint { color: #333; }
fieldset { border: 0; margin: 0; padding: 10px 10px 12px; display: flex; flex-direction: column; gap: 8px; box-shadow: inset -1px -1px #fff, inset 1px 1px #808080, inset -2px -2px #808080, inset 2px 2px #fff; }
legend { padding: 0 4px; }
.new { color: #e00000; font-weight: bold; animation: blink 1s steps(1) infinite; }


.amounts { display: flex; gap: 6px; flex-wrap: wrap; }
.amounts .btn95.on { outline: 1px solid #000; font-weight: bold; }
.gets strong { color: #000080; }
.se { display: flex; flex-direction: column; gap: 10px; }
.se-step { padding: 8px 10px; background: #ffffe1; border: 1px solid #000; }
.se-step strong { color: #000080; font-size: 15px; }
.se-go { padding: 9px 14px; }

.wide-btn { width: 100%; padding: 9px 12px; font-weight: bold; }
.logins { display: flex; flex-direction: column; gap: 6px; }
.login-btn { width: 100%; justify-content: flex-start; gap: 10px; padding: 8px 12px; }
.login-btn .mark { width: 16px; height: 16px; display: inline-grid; place-items: center; font: bold 10px/1 Verdana, sans-serif; color: #fff; }
.login-btn.twitch .mark { background: #9146ff; }
.login-btn.youtube .mark { background: #ff0000; }
.login-btn.google .mark { background: #4285f4; }
.link-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.link-list li { display: flex; align-items: center; gap: 8px; padding: 4px 6px; background: #fff; }
.link-list li b { flex: 1; }
.link-form { display: grid; grid-template-columns: auto 1fr auto; gap: 6px; }
.link-code { padding: 8px 10px; background: #ffffe1; border: 1px solid #000; display: flex; flex-direction: column; gap: 6px; }
.link-code code { font: bold 18px "Courier New", monospace; color: #000080; user-select: all; }

.emote-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: end; }
.emote-form label:first-child { grid-column: 1 / -1; }
.emote-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 300px; overflow-y: auto; }
.emote-list li { display: flex; align-items: center; gap: 10px; padding: 4px 6px; background: #fff; }
.emote-list img { height: 28px; width: 28px; object-fit: contain; }
.emote-list code { flex: 1; }

/* ---------- footer ---------- */
.foot { text-align: center; color: var(--dim); }
.foot p { margin: 6px 0; }
.counter-line { color: var(--ink); font-size: 16px; }
.counter { display: inline-flex; gap: 2px; vertical-align: middle; margin-left: 6px; }
.counter b { display: inline-block; width: 18px; padding: 2px 0; background: #000; color: #7cfc00; border: 1px solid #555; font: bold 18px/1 "Courier New", monospace; text-align: center; box-shadow: inset 0 -8px 0 rgba(255, 255, 255, .06); }
.small { font-size: 13px; }

@media (max-width: 900px) {
  .page { padding: 8px 10px 20px; margin: 0; }
  .desk { grid-template-columns: 1fr; }
  .chat { height: 70vh; }
  .account { position: static; justify-content: center; margin-bottom: 6px; }
  h1 { font-size: 30px; }
  .tower { height: 110px; width: 30px; }
  .welcome-to { font-size: 22px; }
  .under { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .ring .live-tag, .new { animation: none; }
}

/* ---------- the wiki ----------
   Each page is a Notepad window: Win95 frame, a menu bar whose items are the
   page's actions, and white paper with black Times on it, the way the web
   looked when pages had no styles of their own. */
.wiki-head h1 { margin-top: 10px; }
.wiki-head h1 a.plain, .wiki-head h1 a.plain:visited { color: var(--navy); text-decoration: none; }
.notepad { max-width: 980px; margin: 0 auto; }
.menubar { display: flex; flex-wrap: wrap; gap: 0; margin: 0 3px; padding: 1px 0; font: 12px/1 Tahoma, sans-serif; min-height: 20px; }
.menu-item { background: none; border: 0; padding: 4px 8px; font: inherit; color: #000; text-decoration: none; cursor: default; }
.menu-item:visited { color: #000; }
.menu-item:hover, .menu-item:focus-visible { background: #000080; color: #fff; outline: none; }
.menu-item::first-letter { text-decoration: underline; }
.paper {
  background: #fff; color: #000; margin: 0 3px 3px; padding: 16px 22px 26px; min-height: 360px;
  box-shadow: inset 1px 1px #808080, inset -1px -1px #fff, inset 2px 2px #0a0a0a, inset -2px -2px #dfdfdf;
  font: 17px/1.5 "Times New Roman", Times, serif;
}
.paper a { color: #0000ee; }
.paper a:visited { color: #551a8b; }
.paper .error { color: #c00000; }
.paper .dim, .paper .byline { color: #555; }
.paper .hint { color: #555; font-style: italic; }
.page-title { color: #000; font: bold 30px/1.15 "Times New Roman", Times, serif; margin: 0 0 4px; border-bottom: 1px solid #999; padding-bottom: 4px; }
.byline { margin: 0 0 14px; font: 12px Verdana, sans-serif; }
.byline .lock { color: #c00000; font-weight: bold; }
.wikitext { overflow-wrap: anywhere; }
.wikitext h2 { font: bold 24px "Times New Roman", serif; margin: 22px 0 6px; border-bottom: 1px solid #ccc; }
.wikitext h3 { font: bold 20px "Times New Roman", serif; margin: 18px 0 4px; }
.wikitext h4 { font: bold 17px "Times New Roman", serif; margin: 14px 0 2px; }
.wikitext p { margin: 0 0 12px; }
.wikitext blockquote { margin: 0 0 12px 8px; padding: 2px 12px; border-left: 4px solid #c0c0c0; color: #333; font-style: italic; }
.wikitext code, .cheats code { font: 14px "Courier New", monospace; background: #eee; padding: 0 3px; }
.wikitext a.missing { color: #cc0000; }
.wikitext hr { border: 0; border-top: 2px groove #c0c0c0; }
.editor { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.editor textarea { width: 100%; font: 15px/1.45 "Courier New", monospace; resize: vertical; }
.cheats { margin: 14px 0; font: 13px Verdana, sans-serif; }
.cheats summary { cursor: pointer; color: #0000ee; text-decoration: underline; }
.cheats table { border-collapse: collapse; margin-top: 6px; }
.cheats td { padding: 3px 12px 3px 0; vertical-align: top; }
.preview { border: 2px dashed #c0c0c0; padding: 10px 14px; margin-top: 6px; }
.preview::before { content: "Preview, not saved yet"; display: block; font: bold 11px Verdana, sans-serif; color: #888; margin-bottom: 8px; }
.history { padding-left: 20px; font-size: 15px; }
.history li { margin: 3px 0; }
.page-list { columns: 3 220px; padding-left: 20px; }
.new-page { margin: 8px 0 14px; }
.new-page input { width: min(320px, 100%); }
.report { border: 2px solid #c00000; background: #fff4f2; padding: 10px 12px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.report p { margin: 0; }
.old-note { background: #ffffcc; border: 1px solid #cc9; padding: 4px 8px; font: 13px Verdana, sans-serif; }
.admin-box { margin-bottom: 18px; }
.admin-box h2, .paper h2 { font: bold 20px "Times New Roman", serif; margin: 12px 0 4px; }
.check { display: inline-flex; align-items: center; gap: 4px; font: 13px Verdana, sans-serif; }
@media (max-width: 600px) {
  .paper { padding: 12px 12px 20px; }
}

/* wiki images */
.wiki-img { max-width: 100%; height: auto; vertical-align: middle; }
.wikitext figure { margin: 6px 0 14px; display: table; max-width: 100%; border: 1px solid #c0c0c0; padding: 4px; background: #f4f4f4; }
.wikitext figure .wiki-img { display: block; }
.wikitext figcaption { font: 13px Verdana, sans-serif; color: #333; padding: 4px 2px 0; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.card { margin: 0; border: 1px solid #c0c0c0; background: #f4f4f4; padding: 6px; display: flex; flex-direction: column; gap: 6px; }
.card img { width: 100%; height: 150px; object-fit: contain; background: #fff; display: block; }
.card figcaption { font: 12px Verdana, sans-serif; overflow-wrap: anywhere; }
.upload { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.upload .wiki-img { margin-top: 8px; max-height: 360px; width: auto; }
.big-code { display: inline-block; font: 15px "Courier New", monospace; background: #eee; padding: 3px 6px; }
.wikitext p > .wiki-img, .wikitext li > .wiki-img { max-height: 220px; width: auto; }
.img-waiting { display: inline-block; padding: 6px 10px; border: 1px dashed #999; color: #666; font: italic 13px Verdana, sans-serif; background: #fafafa; }

/* wiki: finding and writing */
.wiki-search { display: flex; justify-content: center; gap: 6px; margin: 0 auto 14px; max-width: 460px; }
.wiki-search input { flex: 1; min-width: 0; }
.ring .new-topic-link { font-weight: bold; color: var(--site); }
.front { margin-top: 18px; border-top: 2px groove #c0c0c0; padding-top: 14px; }
.front-start { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.big-btn { font: bold 15px Tahoma, sans-serif; padding: 9px 18px; text-decoration: none; color: #000; }
.paper a.big-btn, .paper a.btn95 { color: #000; text-decoration: none; display: inline-block; }
.front-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 28px; }
.front-cols ul { padding-left: 20px; margin: 4px 0 8px; }
.new-topic input { flex: 1; min-width: 220px; }
.make-it { background: #ffffcc; border: 1px solid #cc9; padding: 6px 10px; }
.results { list-style: none; padding: 0; }
.results li { margin: 0 0 12px; }
.results a { font-size: 18px; }
.snippet { font: 13px/1.4 Verdana, sans-serif; color: #444; }
.edit-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.write-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.look-col { min-width: 0; position: sticky; top: 8px; }
.look-label { margin: 0 0 4px; font: bold 11px Verdana, sans-serif; color: #888; text-transform: uppercase; letter-spacing: .05em; }
.look-col .preview { margin: 0; max-height: 70vh; overflow: auto; min-height: 200px; }
.look-col .preview::before { content: none; }
.text-wrap { position: relative; }
.text-wrap textarea { width: 100%; min-height: 380px; font: 15px/1.45 "Courier New", monospace; resize: vertical; }
.toolbar { display: flex; flex-wrap: wrap; gap: 3px; align-items: center; background: var(--face); padding: 3px; box-shadow: inset 1px 1px #fff, inset -1px -1px #808080; }
.tool { font: 12px Tahoma, sans-serif; color: #000; background: var(--face); border: 0; padding: 4px 8px; cursor: default; box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #fff, inset -2px -2px #808080, inset 2px 2px #dfdfdf; }
.tool:active { box-shadow: inset 1px 1px #0a0a0a, inset -1px -1px #fff, inset 2px 2px #808080; }
.tool.b { font-weight: bold; min-width: 26px; }
.tool.i { font-style: italic; font-family: "Times New Roman", serif; font-size: 14px; min-width: 26px; }
.tool.s { text-decoration: line-through; min-width: 26px; }
.toolbar .sep { width: 1px; align-self: stretch; margin: 2px 3px; background: #808080; box-shadow: 1px 0 #fff; }
.link-hints { position: absolute; left: 8px; right: 8px; top: 40px; z-index: 5; list-style: none; margin: 0; padding: 2px; background: #fff; border: 1px solid #000; box-shadow: 3px 3px 0 rgba(0,0,0,.35); font: 14px Tahoma, sans-serif; }
.link-hints li { padding: 4px 8px; cursor: default; }
.link-hints li.on, .link-hints li:hover { background: #000080; color: #fff; }
.draft-note { font: 13px Verdana, sans-serif; color: #555; margin-bottom: 6px; }
.draft-note:empty { display: none; }
.diff { white-space: pre-wrap; font: 15px/1.6 "Courier New", monospace; background: #fafafa; border: 1px solid #ccc; padding: 10px 12px; overflow-wrap: anywhere; }
.diff ins { background: #cdf5cd; color: #064a06; text-decoration: none; }
.diff del { background: #fbd0d0; color: #7a0b0b; }
.diff .cut { color: #999; }
.pending-edit { border: 1px solid #c0c0c0; padding: 8px 12px; margin: 0 0 14px; background: #fcfcfc; }
.pending-edit .diff { max-height: 320px; overflow: auto; }
@media (max-width: 860px) {
  .edit-grid { grid-template-columns: 1fr; }
  .look-col { position: static; }
}
.win-bar { min-height: 22px; }
.notepad > .titlebar { min-height: 18px; }

/* Text with stacked accents (zalgo) stays in its own line; right-to-left
   marks can't flip the name next to them. */
.msg { overflow: hidden; }
.msg .name, .msg .body { unicode-bidi: isolate; }
.paper { overflow-wrap: anywhere; }
.se-step p { margin: 0; }
.se-step .se-head { font-weight: bold; margin-bottom: 3px; }
.se-step code { font: 12px "Courier New", monospace; background: #fff; padding: 0 3px; }
a.se-go, a.se-go:visited { color: #000; text-decoration: none; text-align: center; }

/* ---------- account window ---------- */
/* Long windows scroll inside themselves on short or zoomed-in screens. */
dialog { max-height: calc(100vh - 24px); overflow: auto; }
#accountDialog { width: min(440px, calc(100vw - 24px)); }
/* Linked accounts and ways to log in: plain rows, not boxes to type in. */
#accountDialog .link-list li { background: none; padding: 5px 2px; border-bottom: 1px dotted #808080; min-height: 30px; }
#accountDialog .link-list li:last-child { border-bottom: 0; }
#accountDialog .link-list li::before { content: "\2022"; color: #000080; }
#accountDialog .link-list li span { color: #333; }
#accountDialog .none { margin: 0; color: #555; font-style: italic; }
.link-code { gap: 8px; }
.link-steps { margin: 0; padding-left: 20px; }
.link-steps li { margin: 2px 0; }
.code-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.code-row code { flex: 1; min-width: 0; background: #fff; padding: 4px 8px; box-shadow: inset 1px 1px #808080, inset -1px -1px #fff; }
.link-code p { margin: 0; }
.warn-line { color: #800000; }
.dim-line { color: #444; }
.link-code .linkish { align-self: flex-start; }
/* Browsers paint autofilled boxes grey-blue; keep them white like the rest. */
input:-webkit-autofill, input:autofill { -webkit-box-shadow: 0 0 0 40px #fff inset; box-shadow: 0 0 0 40px #fff inset; -webkit-text-fill-color: #000; }
.tier-badge { width: 32px; height: 32px; vertical-align: -11px; margin-right: 5px; border-radius: 50%; }
.supporter-line .tier-badge { width: 34px; height: 34px; vertical-align: -11px; }
.tier-badge.top { border-radius: 0; width: 36px; height: 36px; vertical-align: -13px; }
.supporter-line .tier-badge.top { width: 40px; height: 40px; vertical-align: -14px; }
