/* Sinner Maker Heaven: a 2004-2008 game site in black and gold (PLAN.md "Design", research/FINDINGS.md).
   Era rules: every bar, tab, button and title is an image (ui.py); CSS only sets system fonts, flat colours,
   1 px borders and the column widths. No gradients, rounded corners, shadows or web fonts. Web-safe colours. */

body {
  margin: 0; padding: 0 0 10px;
  background: #000 url("../images/ui/bg.jpg");
  font: 11px Verdana, Tahoma, Arial, sans-serif; color: #cccc99;
}
a { color: #ffcc00; }
a:visited { color: #cc9933; }
a:hover { color: #ffffff; }
img { border: 0; vertical-align: top; }
h1, h3, p, ul { margin: 0; }
b { color: #ffcc66; }
button { font: inherit; }

#page { position: relative; width: 980px; margin: 0 auto; background: #000; border: 1px solid #663300; border-top: 0; }

/* Header: one sliced banner, a sinner standing over the tab strip (the Civ III advisor). */
#top { position: relative; height: 172px; }
#tabs { height: 30px; background: #000 url("../images/ui/tab_fill.gif") repeat-x; border-bottom: 1px solid #996600; }
#tabs a { float: left; height: 30px; overflow: hidden; }
#tabs a:hover img, #tabs a.on img { margin-top: -30px; }

/* Flex row: the left column and the rail stretch down to the footer, however long the middle gets. */
#content { display: flex; overflow: hidden; border-top: 1px solid #000; }
#left, #main, #rail { flex: none; padding-bottom: 12px; }
#left { width: 160px; padding: 6px 2px 12px 4px; background: #0f0b06 url("../images/ui/col_left.jpg"); border-right: 1px solid #663300; min-height: 720px; }
#main { width: 600px; padding: 6px 4px 12px 6px; }
#rail { width: 194px; padding: 4px 2px 12px 2px; background: #140f08; border-left: 1px solid #663300; min-height: 720px; }
.bar { display: block; margin-top: 8px; }
#left .bar:first-child, #rail .buy + .bar { margin-top: 0; }

.links { list-style: none; padding: 5px 0 6px 6px; line-height: 15px; }
.links li { padding-left: 13px; background: url("../images/ui/bullet.gif") no-repeat 0 3px; }
.sinners { margin-top: 10px; text-align: center; }
.sinners a { display: block; margin-top: 2px; font-weight: bold; }

#welcome { overflow: hidden; margin-bottom: 4px; }
.promo { float: left; margin-right: 6px; border: 1px solid #996600; }
.intro { overflow: hidden; padding-top: 3px; line-height: 14px; }
.intro h1 { font: bold 13px Verdana, Arial, sans-serif; color: #ffcc00; margin-bottom: 5px; }
.intro p { margin-bottom: 8px; }
.dl b { color: #ffffff; }


/* Company page: the Divine Machine intro, silent, on a loop; the logo still and turning. */
.marks { text-align: center; }
.marks img { margin: 0 14px; vertical-align: middle; }
.dmintro { margin: 6px 0 10px; line-height: 0; text-align: center; }
.dmintro video { width: 100%; max-width: 576px; height: auto; background: #000; border: 1px solid #996600; }

/* 88x31 contact buttons (SOCIAL in build.py). */
.b88s { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 6px 0; }
.b88 { line-height: 0; }
.b88:hover img, .b88:focus-visible img { outline: 1px solid #ffcc00; }
.ownlink { margin: 8px 0 0; text-align: center; font-size: 10px; font-weight: bold; color: #ffcc00; }
textarea.code { display: block; width: 100%; max-width: 470px; margin: 2px auto 6px; box-sizing: border-box; resize: none;
  font: 9px "Courier New", monospace; color: #ffffcc; background: #0a0804; border: 1px solid #663300; }

/* Media: official sinner cards (ui.sinner_card) with gold name plates (ui.name_plate). */
.sinner-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 10px; margin: 4px 0 6px; }
.sinner { width: 180px; line-height: 0; }
.sinner img { display: block; }
.sinner .sz:hover img, .sinner .sz:focus-visible img { outline: 2px solid #ffcc00; outline-offset: -2px; }
#sinnerzoom { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.88); }
#sinnerzoom[hidden] { display: none; }
.sz-frame { position: relative; padding: 46px 12px 10px; background: radial-gradient(ellipse at 50% 60%, #3a2810, #0a0804 70%);
  border: 2px solid #996600; box-shadow: 0 0 24px #000; text-align: center; max-width: 96vw; }
.sz-art { display: block; margin: 0 auto; width: auto; height: auto; max-width: calc(96vw - 28px); max-height: calc(100vh - 120px); }
.sz-portrait { position: absolute; right: 18px; bottom: 44px; width: 160px; height: 160px; image-rendering: pixelated;
  background: #1a1206; border: 3px solid #c9962f; outline: 1px solid #000; box-shadow: 0 2px 8px #000; }
.sz-plate { display: block; margin: 6px auto 0; }
.sz-tools { position: absolute; top: 6px; right: 8px; display: flex; gap: 6px; }
.sz-tools a { line-height: 0; }
.sz-close { position: absolute; top: 12px; left: 10px; padding: 1px 6px; font: bold 11px Verdana, sans-serif; color: #ffcc00;
  background: #000; border: 1px solid #996600; cursor: pointer; }

/* Latest Video: a brushed-metal media player shell (images from ui.player_parts). */
.vidbox { padding: 6px 0 4px; }
.player { position: relative; max-width: 560px; margin: 0 auto 6px; padding: 0 12px 12px; color: #000;
  background: linear-gradient(rgba(255,255,255,.55), rgba(255,255,255,0) 9%, rgba(255,255,255,0) 82%, rgba(0,0,0,.28)),
    linear-gradient(90deg, rgba(255,255,255,.25), rgba(255,255,255,0) 6%, rgba(0,0,0,0) 94%, rgba(0,0,0,.22)),
    #bcaa82 url("../images/ui/pl_metal.jpg");
  border: 1px solid #4a3a24; border-radius: 12px 12px 8px 8px;
  box-shadow: 0 4px 10px rgba(0,0,0,.75), 0 1px 2px rgba(0,0,0,.6), inset 0 1px 0 #fff, inset 1px 0 0 rgba(255,255,255,.7),
    inset -1px 0 0 rgba(0,0,0,.3), inset 0 -2px 2px rgba(0,0,0,.35); }
.pl-top { position: relative; height: 22px; line-height: 22px; text-align: center; }
.pl-lights { position: absolute; left: 0; top: 4px; }
.pl-zoom { position: absolute; left: 38px; top: 4px; width: 14px; height: 14px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.pl-zoom:hover { box-shadow: 0 0 4px #9cf07a; }
.pl-title { font: 12px "Lucida Grande", Tahoma, Verdana, sans-serif; color: #111; text-shadow: 0 1px 0 #f2f3f4; }
.pl-screen { background: #000; border: 1px solid #33281a; border-top-color: #1f180e; line-height: 0; text-align: center;
  box-shadow: 0 1px 0 rgba(255,255,255,.95), 0 -1px 0 rgba(0,0,0,.25), inset 0 3px 6px rgba(0,0,0,.9); }
.pl-video { width: 100%; max-width: 536px; height: auto; background: #000; cursor: pointer; }
.pl-lcd { display: flex; align-items: center; gap: 6px; margin-top: 8px; height: 16px; padding: 0 6px; background: #e8eccc;
  border: 1px solid #45483a; border-radius: 4px; font: 10px "Courier New", monospace; color: #222;
  background-image: linear-gradient(rgba(0,0,0,.12), rgba(0,0,0,0) 40%, rgba(255,255,255,.35));
  box-shadow: inset 0 2px 3px rgba(0,0,0,.45), 0 1px 0 rgba(255,255,255,.95); }
.pl-time { flex: none; }
.pl-track { position: relative; flex: 1; height: 8px; border: 1px solid #45483a; background: #f6f8e6; cursor: pointer; }
.pl-track:focus { outline: 1px dotted #000; }
.pl-head { position: absolute; left: 0; top: -5px; width: 0; height: 0; margin-left: -5px;
  border-left: 5px solid transparent; border-right: 5px solid transparent; border-top: 7px solid #222; }
.pl-bottom { display: flex; align-items: center; justify-content: space-between; margin: 9px -6px 0; padding: 5px 8px;
  border: 1px solid #7a6440; border-radius: 16px;
  background: linear-gradient(rgba(255,255,255,.7), rgba(255,255,255,.1) 45%, rgba(0,0,0,.05) 55%, rgba(0,0,0,.25)),
    #c6b48c url("../images/ui/pl_metal.jpg");
  box-shadow: inset 0 1px 0 #fff, inset 0 -1px 1px rgba(0,0,0,.3), 0 1px 0 rgba(255,255,255,.8), 0 2px 3px rgba(0,0,0,.35); }
.pl-btns img, .pl-via img { filter: drop-shadow(0 1px 1px rgba(0,0,0,.55)); }
.pl-vol { display: flex; align-items: center; gap: 4px; width: 110px; }
.pl-vol input { width: 80px; accent-color: #8a6a36; }
.pl-btns { display: flex; align-items: center; gap: 4px; }
.pl-btns button { padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; border-radius: 50%; }
.pl-btns button:active img, .pl-via:active img { filter: brightness(.8); }
.pl-btns button:focus-visible, .pl-via:focus-visible { outline: 2px solid #3d7bd9; }
.pl-via { width: 110px; text-align: right; line-height: 0; }
.player::after { content: ""; position: absolute; right: 3px; bottom: 3px; width: 12px; height: 12px; background: url("../images/ui/pl_grip.png"); }
.box .player { margin: 4px auto; }

#platforms { width: 100%; border-collapse: collapse; border: 1px solid #333300; border-top: 0; background: #0a0804; }
#platforms td { width: 33%; padding: 6px; vertical-align: top; border-right: 1px solid #333300; line-height: 14px; }
#platforms .pf { font-weight: bold; color: #ffffff; font-size: 12px; margin-bottom: 3px; }
#platforms .pf span { font-weight: normal; font-size: 10px; color: #999966; }
#platforms p + * { display: inline-block; margin-top: 6px; }

#rail .buy { display: block; margin: 6px 0 4px; text-align: center; }
#rail .bar:first-child { margin-top: 0; }
.req { width: 100%; margin: 4px 0 2px; border-collapse: collapse; }
.req th { width: 46px; padding: 1px 3px; text-align: left; color: #ff9900; font-size: 10px; }
.req td { padding: 1px 3px; font-size: 10px; }
.note, .rtext { padding: 4px 4px 2px; line-height: 14px; }
.note { font-size: 10px; color: #999966; }
#rail .mark { display: block; margin: 12px auto 0; width: 64px; height: 64px; }

/* Inner pages: a gold title GIF, gold bars over dark boxes, plain Verdana text (legal pages too, as era sites had). */
#main { overflow-wrap: break-word; }
h1.title, h1.sect, h2.sect { margin: 0; font-size: 11px; }
h2.sect .bar { margin-top: 10px; }
.step { clear: both; margin-top: 4px; }
.shot { display: block; max-width: 100%; height: auto; margin: 4px 0 8px; border: 1px solid #996600; }
.box { padding: 6px 8px 8px; border: 1px solid #333300; border-top: 0; background: #0a0804; line-height: 15px; }
.box p, .box ul, .box ol, .box dl, .box table { margin-bottom: 7px; }
.box ul, .box ol { padding-left: 18px; }
.box li { margin-bottom: 2px; }
.box h3 { font: bold 11px Verdana, Arial, sans-serif; color: #ffcc00; margin: 8px 0 3px; }
.box dt { font-weight: bold; color: #ffcc00; margin-top: 6px; }
.box dd { margin: 1px 0 0 12px; }
.box code { font: 11px "Courier New", monospace; color: #ffffcc; }
.lead { padding: 6px 2px 2px; line-height: 15px; }
.ph { color: #ff9900; font-weight: bold; }

table.data { width: 100%; border-collapse: collapse; }
table.data th, table.data td { padding: 3px 5px; border: 1px solid #333300; text-align: left; vertical-align: top; }
table.data th { width: 34%; color: #ff9900; background: #140f08; font-weight: bold; }
table.data thead th { width: auto; color: #ffffff; }

table.gallery { border-collapse: collapse; margin: 0 auto 6px; }
table.gallery td { padding: 4px; text-align: center; font-size: 10px; color: #999966; }
table.gallery a { display: block; border: 1px solid #996600; margin-bottom: 2px; }
table.gallery a:hover { border-color: #ffcc00; }

.post { padding: 4px 0 8px; border-bottom: 1px dotted #663300; }
.post .date { color: #ff9900; font-size: 10px; font-weight: bold; }
.post .date img { vertical-align: -1px; }
.post h3 { margin-top: 1px; }

table.logos { border-collapse: collapse; margin-bottom: 6px; }
table.logos td { width: 120px; padding: 6px; text-align: center; vertical-align: top; border: 1px solid #333300; font-size: 10px; }
table.logos td.light { background: #cccc99; color: #000000; }
table.logos td.light a { color: #663300; }

.legal h2 { font: bold 12px Verdana, Arial, sans-serif; color: #ffcc00; margin: 10px 0 3px; }
.legal .meta { font-size: 10px; color: #999966; }
.legal .lang { text-align: right; font-weight: bold; }

.big404 { padding: 20px 8px; text-align: center; line-height: 18px; }

/* Gallery lightbox (js/site.js): flat black, no CSS gloss. */
#lightbox { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 50; background: #000; text-align: center; overflow: auto; }
#lightbox[hidden] { display: none; }
#lightbox img { display: block; max-width: 100%; height: auto; margin: 12px auto 6px; border: 1px solid #996600; }
#lightbox p { padding: 0 8px 12px; color: #ffffff; }
#lightbox button { padding: 1px 6px; color: #ffcc00; background: #000; border: 1px solid #996600; cursor: pointer; }

/* Footer legalese. */
#bottom { clear: both; padding: 8px 12px 12px; text-align: center; font-size: 10px; color: #999966; border-top: 1px solid #996600; background: #000; }
#bottom .fmark { float: left; margin: 2px 10px 0 4px; }
#bottom p { margin-top: 3px; }
#bottom .links { padding: 0; font-size: 11px; }

/* S3 part 3 art: 16 px platform icons beside their names, 64 px paintings beside a section, news banners. */
img.ico { vertical-align: -3px; margin-right: 2px; }
img.ico[height="32"] { vertical-align: middle; }
.box .art { float: right; margin: 0 0 6px 8px; border: 1px solid #996600; }
.box::after, .post::after { content: ""; display: block; clear: both; }
.post .banner { float: left; margin: 2px 8px 2px 0; border: 1px solid #996600; }
.box .crew { display: block; max-width: 100%; height: auto; margin: 4px auto 6px; border: 1px solid #333300; }
ul.sins { list-style: none; padding-left: 0; }

/* Phones (Apple reviewers): same look, the columns stack. */
/* Home visitor counter: odometer digits on a rusty gold plate (ui.counter_parts); shown only when /api/hits answers. */
#rail .counter { width: 192px; height: 64px; margin: 10px 0 6px; background: url("../images/ui/cnt_plate.jpg"); }
#rail .counter .cd { margin: 0; padding-top: 24px; text-align: center; font-size: 0; line-height: 0; }
#rail .from { width: 190px; margin: 0 0 8px; border: 1px solid #663300; background: #1a1206; }
#rail .from .bar { display: block; margin: -1px; }
/* A menu that opens on click, closed by default (<details>); the arrow shows which way it goes. */
#rail .from summary { display: block; position: relative; cursor: pointer; list-style: none; }
#rail .from summary::-webkit-details-marker { display: none; }
#rail .from summary::after { content: "\25BC"; position: absolute; right: 7px; top: 5px; font: 10px Verdana, sans-serif; color: #1a0f02; }
#rail .from details[open] summary::after { content: "\25B2"; }
#rail .from summary:hover img, #rail .from summary:focus-visible img { filter: brightness(1.2); }
#rail .from summary:focus-visible { outline: 1px dotted #ffe9a0; }
#rail .from table { width: 100%; border-collapse: collapse; margin-top: 3px; }
#rail .from td { padding: 2px 4px; font: 10px Verdana, sans-serif; color: #e8c872; border-bottom: 1px dotted #4a3010; }
#rail .from td.f { width: 20px; padding-right: 0; }
#rail .from td.f img { display: block; border: 1px solid #000; }
#rail .from td.n { text-align: right; color: #ffe9a0; font-weight: bold; }
#rail .from .more { margin: 3px 4px 4px; font: 10px Verdana, sans-serif; color: #b89a5a; text-align: right; }

@media (max-width: 759px) {
  #page { width: auto; }
  #top { height: auto; }
  #top .banner { width: 100%; height: auto; }
  #tabs { height: auto; overflow: hidden; }
  #content { display: block; }
  #left, #main, #rail { float: none; width: auto; min-height: 0; border: 0; padding: 8px; }
  .bar, .promo img { max-width: 100%; height: auto; }
  .promo { float: none; display: block; margin: 0 0 8px; }
  .sz-portrait { width: 96px; height: 96px; }
  .sz-frame { padding-top: 50px; }
  .player { padding: 0 6px 10px; }
  .pl-vol, .pl-via { width: auto; }
  .pl-vol input { width: 50px; }
  #platforms td { display: block; width: auto; border-right: 0; border-bottom: 1px solid #333300; }
  .sinners { display: none; }
  h1.title img { max-width: 100%; height: auto; }
  table.gallery td, table.logos td { display: inline-block; }
  table.data th { width: 40%; }
}
