/* ==========================================================================
   Geeky Lucas — a Mac OS 9 "Platinum" theme
   ========================================================================== */

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

:root {
  --platinum: #dddddd;
  --plat-light: #eeeeee;
  --plat-mid: #bbbbbb;
  --plat-dark: #888888;
  --hilite: #3434c4;
  --text-hilite: #ccccff;
  --desktop: #6670b8;
  --balloon: #ffffcc;
  --stickies: #fff9a8;
  /* Modern Geneva has no bold face, so bold UI text falls through to Lucida Grande */
  --ui-font: "Charcoal", "Chicago", "ChicagoFLF", "Lucida Grande", "Verdana", sans-serif;
  --text-font: "Geneva", "Verdana", "Lucida Grande", sans-serif;
  --mono: "Monaco", "Menlo", "Courier New", monospace;
  --barber: repeating-linear-gradient(-45deg, #5262c8 0 6px, #8d9cf0 6px 12px);
}

html { background: var(--desktop); }

body {
  margin: 0;
  min-height: 100vh;
  color: #000;
  font: 13px/1.55 var(--text-font);
  background-color: var(--desktop);
  background-image:
    radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1.3px),
    radial-gradient(rgba(0, 0, 50, .12) 1px, transparent 1.3px);
  background-size: 6px 6px;
  background-position: 0 0, 3px 3px;
  transition: background-color .6s;
}

::selection { background: var(--text-hilite); }

strong, b { font-family: var(--ui-font); }

a { color: #0000cc; }
a:visited { color: #551a8b; }

img { max-width: 100%; }

/* Platinum scrollbars */
html { scrollbar-color: #9999ee #dddddd; }
::-webkit-scrollbar { width: 16px; height: 16px; }
::-webkit-scrollbar-track { background: #dddddd; box-shadow: inset 1px 1px #999; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(90deg, #ccccff, #9999ee);
  border: 1px solid #000;
  box-shadow: inset 1px 1px #fff;
}
::-webkit-scrollbar-corner { background: var(--platinum); }

/* --------------------------------------------------------------------------
   Menu bar
   -------------------------------------------------------------------------- */

.menubar {
  position: fixed;
  inset: 0 0 auto 0;
  height: 22px;
  z-index: 1000;
  display: flex;
  align-items: stretch;
  padding: 0 8px;
  background: var(--platinum);
  border-bottom: 1px solid #000;
  box-shadow: inset 0 1px #fff, inset 0 -1px #999;
  font: bold 12px/22px var(--ui-font);
  user-select: none;
  -webkit-user-select: none;
}

.menu { position: relative; }

.menu-title {
  display: flex;
  align-items: center;
  height: 21px;
  padding: 0 9px;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: default;
}
.menu-title img { width: 16px; height: 16px; }
.menu-title:focus-visible { outline: 1px dotted #000; outline-offset: -3px; }
.menu.open .menu-title { background: var(--hilite); color: #fff; }

.menu-items {
  display: none;
  position: absolute;
  top: 21px;
  left: 0;
  min-width: 210px;
  margin: 0;
  padding: 3px 0;
  list-style: none;
  background: var(--platinum);
  border: 1px solid #000;
  box-shadow: inset 1px 1px #fff, 2px 2px 0 rgba(0, 0, 0, .35);
  line-height: 20px;
}
.menu.open .menu-items { display: block; }

.menu-items a {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  padding: 0 20px 0 18px;
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}
.menu-items a:hover,
.menu-items a:focus { background: var(--hilite); color: #fff; outline: none; }
.menu-items .disabled { color: #999; pointer-events: none; }
.menu-items .sep {
  height: 1px;
  margin: 4px 1px;
  background: #999;
  box-shadow: 0 1px #fff;
}

.menubar-right { margin-left: auto; display: flex; align-items: stretch; }
.clock { padding: 0 10px; font-weight: bold; }
.app-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 10px;
  border-left: 1px solid #999;
  box-shadow: inset 1px 0 #fff;
}
.app-indicator img { width: 16px; height: 16px; }

@media (max-width: 560px) {
  .menubar { padding: 0 2px; }
  .menu-title { padding: 0 6px; }
  .menu.hide-sm, .app-indicator { display: none; }
  .menu-items { min-width: 190px; }
}

/* --------------------------------------------------------------------------
   Desktop and icons
   -------------------------------------------------------------------------- */

.desktop {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  padding: 40px 136px 56px 28px;
}

.desktop-icons {
  position: fixed;
  top: 36px;
  right: 14px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.icon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 96px;
  padding: 2px;
  border: 0;
  background: none;
  color: #000;
  text-decoration: none;
  text-align: center;
  font: bold 11px/1.25 var(--ui-font);
  cursor: pointer;
}
.icon:visited { color: #000; }
.icon:focus-visible { outline: none; }

.icon-img { position: relative; display: grid; place-items: center; width: 46px; height: 40px; }
.icon-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.icon-img .glyph {
  position: absolute;
  top: 58%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 17px;
  line-height: 1;
}
.icon-label { padding: 0 4px; background: #fff; }

.icon:hover .icon-img img,
.icon:focus-visible .icon-img img { filter: brightness(.5); }
.icon:hover .icon-label,
.icon:focus-visible .icon-label { background: #000; color: #fff; }

/* An "open" folder gets the dotted fill, just like the Finder */
.icon.is-open .icon-img::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(#000 0 25%, transparent 0 50%) 0 0 / 2px 2px;
  opacity: .45;
  -webkit-mask: url("../images/folder.svg") center / contain no-repeat;
  mask: url("../images/folder.svg") center / contain no-repeat;
}
.icon.is-open.doc .icon-img::after {
  -webkit-mask-image: url("../images/document.svg");
  mask-image: url("../images/document.svg");
}

@media (max-width: 760px) {
  .desktop { padding: 18px 8px 40px; }
  .desktop-icons {
    position: static;
    flex-flow: row wrap;
    justify-content: center;
    gap: 4px 2px;
    padding: 32px 8px 0;
  }
  .icon { width: 70px; font-size: 10px; }
  .icon-img { width: 38px; height: 33px; }
  .icon-img .glyph { font-size: 14px; }
}

.desktop-hint {
  position: fixed;
  left: 50%;
  top: 45%;
  transform: translate(-50%, -50%);
  z-index: 50;
  max-width: min(340px, 90vw);
}

/* --------------------------------------------------------------------------
   Windows
   -------------------------------------------------------------------------- */

.window {
  position: relative;
  width: 100%;
  max-width: 800px;
  padding: 0 6px 6px;
  background: var(--platinum);
  border: 1px solid #000;
  box-shadow: inset 1px 1px 0 #fff, inset -1px -1px 0 var(--plat-dark), 3px 3px 0 rgba(0, 0, 0, .4);
}
.window.zoomed { max-width: none; }
.window.closed { display: none; }
.window.collapsed > :not(.titlebar) { display: none; }
.window.collapsed { padding-bottom: 0; }
.window.dragging { opacity: .88; }

.titlebar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 22px;
  padding: 0 3px;
  user-select: none;
  -webkit-user-select: none;
}
.titlebar::before {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  top: 5px;
  height: 12px;
  background: repeating-linear-gradient(to bottom, #fff 0 1px, #9a9a9a 1px 2px);
}

.wtitle {
  position: relative;
  max-width: 72%;
  margin: 0 auto;
  padding: 0 8px;
  overflow: hidden;
  background: var(--platinum);
  font: bold 12px/22px var(--ui-font);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wbtn {
  position: relative;
  flex: none;
  width: 13px;
  height: 13px;
  padding: 0;
  border: 1px solid #333;
  background: linear-gradient(135deg, #a9a9a9, #fff);
  box-shadow: 0 0 0 2px var(--platinum);
  cursor: pointer;
}
.wbtn:active { background: #666; }
.wbtn:focus-visible { outline: 1px dotted #000; outline-offset: 3px; }
.wbtn.zoom::after {
  content: "";
  position: absolute;
  left: 1px;
  top: 1px;
  width: 6px;
  height: 6px;
  border: 1px solid #333;
}
.wbtn.shade::after {
  content: "";
  position: absolute;
  left: 1px;
  right: 1px;
  top: 4px;
  height: 3px;
  border-block: 1px solid #333;
}

.window.inactive .titlebar::before,
.window.inactive .wbtn { visibility: hidden; }
.window.inactive .wtitle { color: #888; }

.infobar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 5px;
  padding: 1px 8px;
  border: 1px solid;
  border-color: #888 #fff #fff #888;
  font-size: 11px;
}

.window-body {
  padding: 22px 28px 30px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: -1px -1px 0 #888, 1px 1px 0 #fff;
}

.statusbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2px 14px;
  padding: 5px 4px 0;
  font-size: 11px;
  color: #333;
}

@media (max-width: 600px) {
  .window-body { padding: 16px 14px 24px; }
  .infobar span + span { display: none; }
}

/* Stickies */
.window.stickies {
  max-width: 250px;
  padding: 0 4px 8px;
  background: var(--stickies);
  box-shadow: 3px 3px 0 rgba(0, 0, 0, .35);
}
.stickies .titlebar { height: 15px; }
.stickies .titlebar::before {
  top: 3px;
  height: 8px;
  background: repeating-linear-gradient(to bottom, #fffde4 0 1px, #cdbf4e 1px 2px);
}
.stickies .wbtn { width: 10px; height: 10px; background: var(--stickies); box-shadow: 0 0 0 2px var(--stickies); }
.stickies .wtitle { width: 0; padding: 0; }
.stickies .note {
  padding: 4px 10px;
  font: 15px/1.45 "Marker Felt", "Chalkboard", "Comic Sans MS", cursive;
}
.stickies .note ul { margin: 0; padding-left: 18px; }
.stickies .note s { opacity: .6; }

@media (min-width: 1440px) {
  .window.stickies { position: absolute; top: 72px; left: 32px; width: 230px; }
}

/* --------------------------------------------------------------------------
   Content typography
   -------------------------------------------------------------------------- */

.window-body h1 {
  margin: 0 0 8px;
  font: bold 28px/1.15 var(--ui-font);
  letter-spacing: -.3px;
}
.window-body h2 {
  margin: 34px 0 10px;
  padding-bottom: 4px;
  border-bottom: 1px solid #000;
  box-shadow: 0 1px #ccc;
  font: bold 18px/1.25 var(--ui-font);
}
.window-body h3 { margin: 18px 0 4px; font: bold 14px/1.3 var(--ui-font); }
.window-body p { margin: 0 0 10px; }
.window-body ul, .window-body ol { margin: 0 0 12px; padding-left: 22px; }
.window-body li { margin-bottom: 4px; }

.lede { font-size: 15px; line-height: 1.55; }
.kicker {
  margin: 0 0 4px;
  font: 11px/1.3 var(--mono);
  letter-spacing: .5px;
  text-transform: uppercase;
  color: #555;
}
.small { font-size: 11px; color: #444; }
.center { text-align: center; }

.hero { display: flex; align-items: center; gap: 24px; }
.hero > div:not(.hero-art) { flex: 1; min-width: 0; }
.hero-art {
  flex: none;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  font-size: 70px;
  line-height: 1;
  background: var(--platinum);
  border: 1px solid #000;
  box-shadow: inset 2px 2px #fff, inset -2px -2px #888, 3px 3px 0 rgba(0, 0, 0, .25);
}
@media (max-width: 600px) {
  .hero { flex-direction: column-reverse; align-items: flex-start; gap: 14px; }
  .hero-art { width: 96px; height: 96px; font-size: 52px; }
}

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
@media (max-width: 640px) { .two-col { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Controls
   -------------------------------------------------------------------------- */

.btn {
  display: inline-block;
  margin: 4px;
  padding: 6px 16px;
  border: 1px solid #000;
  border-radius: 5px;
  background: linear-gradient(#fff, #d2d2d2);
  box-shadow: inset 1px 1px #fff, inset -1px -1px #999;
  color: #000;
  font: bold 12px/1.2 var(--ui-font);
  text-decoration: none;
  cursor: pointer;
}
.btn:visited { color: #000; }
.btn:active { background: #555; color: #fff; box-shadow: inset 1px 1px #222; }
.btn.default {
  box-shadow: inset 1px 1px #fff, inset -1px -1px #999, 0 0 0 2px var(--platinum), 0 0 0 4px #333;
}
.btn:focus-visible { outline: 2px solid var(--hilite); outline-offset: 5px; }

.group {
  position: relative;
  margin: 26px 0 16px;
  padding: 18px 16px 12px;
  border: 1px solid #888;
  box-shadow: inset 1px 1px #fff, 1px 1px #fff;
}
.group-title {
  position: absolute;
  top: -10px;
  left: 10px;
  padding: 0 6px;
  background: #fff;
  font: bold 12px/1.5 var(--ui-font);
}

input[type="range"] { width: 100%; accent-color: #5262c8; }

/* Finder list view */
.table-wrap {
  overflow-x: auto;
  border: 1px solid #000;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .15);
}
.list-view { width: 100%; border-collapse: collapse; font-size: 12px; }
.list-view th {
  padding: 3px 10px;
  border-right: 1px solid #888;
  border-bottom: 1px solid #000;
  background: linear-gradient(#f6f6f6, #cfcfcf);
  font: bold 11px var(--ui-font);
  text-align: left;
  white-space: nowrap;
}
.list-view th.sorted { background: linear-gradient(#e2e2e2, #a9a9a9); }
.list-view td { padding: 5px 10px; border-bottom: 1px solid #eee; vertical-align: top; }
.list-view td.sorted { background: #f2f2f2; }
.list-view tbody tr:hover td { background: var(--hilite); color: #fff; }
.list-view tbody tr:hover a { color: #fff; }
.list-view .name { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-weight: bold; }
.list-view .name img { width: 18px; height: 15px; }

.status-tag {
  display: inline-block;
  padding: 0 6px;
  border: 1px solid #000;
  font: bold 10px/1.6 var(--ui-font);
  text-transform: uppercase;
  white-space: nowrap;
}
.status-tag.rejected { background: #ffc8c8; }
.status-tag.promising { background: #c8ffc8; }
.status-tag.unclear { background: #ffffc8; }
.list-view tbody tr:hover .status-tag { color: #000; }

/* Balloon Help */
.balloon {
  position: relative;
  margin: 18px 0;
  padding: 12px 16px;
  background: var(--balloon);
  border: 1px solid #000;
  border-radius: 12px;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, .3);
}

/* Mini windows used as cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; margin: 14px 0; }
.mini {
  display: flex;
  flex-direction: column;
  padding: 0 4px 4px;
  background: var(--platinum);
  border: 1px solid #000;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #888, 2px 2px 0 rgba(0, 0, 0, .25);
}
.mini-title {
  position: relative;
  display: flex;
  justify-content: center;
  height: 18px;
  font: bold 11px/18px var(--ui-font);
}
.mini-title::before {
  content: "";
  position: absolute;
  inset: 4px 2px;
  background: repeating-linear-gradient(to bottom, #fff 0 1px, #9a9a9a 1px 2px);
}
.mini-title span { position: relative; padding: 0 6px; background: var(--platinum); }
.mini-body { flex: 1; padding: 10px 12px; background: #fff; border: 1px solid #888; font-size: 12px; }
.mini-body h3 { margin-top: 0; }
.mini-body ul, .mini-body ol { padding-left: 18px; margin-bottom: 8px; }
.mini-body .meta { margin: 8px 0 0; padding-top: 6px; border-top: 1px dotted #888; font-size: 11px; }

/* Timeline */
.timeline { margin: 14px 0 18px 6px; padding: 0 0 0 20px; list-style: none; border-left: 2px solid #000; }
.timeline li { position: relative; margin: 0 0 16px; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 4px;
  width: 12px;
  height: 12px;
  background: #fff;
  border: 2px solid #000;
}
.timeline .year {
  margin-right: 6px;
  padding: 1px 6px;
  background: #000;
  color: #fff;
  font: bold 11px var(--ui-font);
  white-space: nowrap;
}

/* Barber-pole progress bars and charts */
.progress {
  height: 13px;
  margin-top: 14px;
  overflow: hidden;
  background: #eee;
  border: 1px solid #000;
  box-shadow: inset 1px 1px #999;
}
.progress > span { display: block; height: 100%; width: 0; background: var(--barber); }

.bars { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 12px; align-items: center; font-size: 12px; }
.bars .bar-track { height: 16px; background: #f2f2f2; border: 1px solid #000; box-shadow: inset 1px 1px #bbb; }
.bars + p { margin-top: 10px; }
.bars .bar-track, .bars .bar { display: block; }
.bars .bar { height: 100%; min-width: 2px; background: var(--barber); border-right: 1px solid #000; }
.bars .label { font: bold 11px var(--ui-font); text-align: right; white-space: nowrap; }
.bars .value { font: 11px var(--mono); text-align: right; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.stat {
  padding: 10px 12px;
  text-align: center;
  background: var(--platinum);
  border: 1px solid #000;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #888;
}
.stat b { display: block; font: bold 24px/1.2 var(--ui-font); }
.stat span { font-size: 11px; }

.counter {
  display: inline-block;
  padding: 1px 6px;
  background: #000;
  color: #3f3;
  font: bold 14px var(--mono);
  letter-spacing: 2px;
}

.log {
  max-height: 300px;
  overflow: auto;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: inset 1px 1px #aaa;
  font: 12px/1.6 var(--mono);
}
.log p { margin: 0 0 10px; }
.log time { font-weight: bold; }

.construction {
  margin: 26px 0 0;
  padding: 5px;
  background: repeating-linear-gradient(45deg, #ffcc00 0 12px, #111 12px 24px);
  border: 1px solid #000;
}
.construction p { margin: 0; padding: 6px 10px; background: #fff; text-align: center; font: bold 12px var(--ui-font); }

.care-label {
  max-width: 280px;
  margin: 16px auto;
  padding: 14px 18px;
  text-align: center;
  background: #fbfbf4;
  border: 1px dashed #777;
  font: 11px/1.7 var(--mono);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Capri Length-O-Meter */
.capri-meter { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: center; }
.leg { position: relative; width: 80px; height: 230px; margin: 0 auto; }
.leg .skin {
  position: absolute;
  top: 0;
  bottom: 22px;
  left: 22px;
  width: 34px;
  background: #e8b98f;
  border: 1px solid #000;
  border-radius: 0 0 6px 6px;
}
.leg .pant {
  position: absolute;
  top: 0;
  left: 12px;
  width: 54px;
  height: 55%;
  background: repeating-linear-gradient(90deg, #cdb78a 0 3px, #bea676 3px 4px);
  border: 1px solid #000;
  border-bottom-width: 3px;
}
.leg .shoe {
  position: absolute;
  bottom: 0;
  left: 14px;
  width: 62px;
  height: 22px;
  background: #fff;
  border: 1px solid #000;
  border-radius: 10px 16px 4px 4px;
  box-shadow: inset 0 -5px #ccc;
}
.verdict { min-height: 3em; margin-top: 10px; font: bold 15px/1.4 var(--ui-font); }
@media (max-width: 520px) { .capri-meter { grid-template-columns: 1fr; } }

/* Ripeness scale */
.ripeness { display: grid; grid-template-columns: repeat(5, 1fr); border: 1px solid #000; }
.ripeness div { padding: 10px 8px; font-size: 11px; text-align: center; border-right: 1px solid #000; }
.ripeness div:last-child { border-right: 0; }
.ripeness b { display: block; font: bold 12px var(--ui-font); }
@media (max-width: 600px) {
  .ripeness { grid-template-columns: 1fr; }
  .ripeness div { border-right: 0; border-bottom: 1px solid #000; }
  .ripeness div:last-child { border-bottom: 0; }
}

/* Fire Danger Ratings */
.fdr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 10px 0; }
.fdr div { padding: 8px 6px; border: 1px solid #000; text-align: center; font: bold 12px var(--ui-font); }
@media (max-width: 520px) { .fdr { grid-template-columns: 1fr 1fr; } }

.hazard { height: 12px; margin-bottom: 18px; border: 1px solid #000; background: repeating-linear-gradient(45deg, #ffd200 0 14px, #111 14px 28px); }

.scene { display: grid; grid-template-columns: 74px 1fr; gap: 14px; margin: 0 0 14px; }
.scene .clap {
  display: grid;
  place-items: center;
  height: 52px;
  background: #111;
  color: #fff;
  border: 1px solid #000;
  font: bold 11px/1.2 var(--ui-font);
  text-align: center;
  background-image: repeating-linear-gradient(45deg, #111 0 8px, #eee 8px 16px);
  background-size: 100% 12px;
  background-repeat: no-repeat;
  padding-top: 12px;
}

/* --------------------------------------------------------------------------
   Dialogs, splash, sleep
   -------------------------------------------------------------------------- */

.alert-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(0, 0, 0, .1);
}
.alert {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 14px;
  width: 100%;
  max-width: 430px;
  padding: 18px 18px 14px;
  background: var(--platinum);
  border: 2px solid #000;
  box-shadow: inset 2px 2px #fff, inset -2px -2px #888, 4px 4px 0 rgba(0, 0, 0, .4);
}
.alert-icon { font-size: 38px; line-height: 1; }
.alert-icon img { width: 42px; height: 42px; }
.alert-title { margin: 0 0 6px; font: bold 13px/1.35 var(--ui-font); }
.alert-msg { font-size: 12px; }
.alert-msg p { margin: 0 0 8px; }
.alert-buttons { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }

.about-mem { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 8px; align-items: center; margin: 8px 0; font-size: 11px; }
.about-mem .bar-track { height: 10px; border: 1px solid #000; background: #fff; }
.about-mem .bar { height: 100%; background: var(--barber); }

.splash {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: var(--desktop);
  cursor: progress;
  transition: opacity .3s;
}
.splash.done { opacity: 0; pointer-events: none; }
.splash-box {
  width: min(360px, 88vw);
  padding: 24px 26px 20px;
  text-align: center;
  background: var(--platinum);
  border: 1px solid #000;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #888, 4px 4px 0 rgba(0, 0, 0, .4);
}
.splash-box img { width: 64px; height: 64px; }
.splash-title { margin-top: 6px; font: bold 22px/1.2 var(--ui-font); }
.splash-sub { font-size: 12px; }
.splash .progress > span { animation: fill 2.3s steps(23) forwards; }
.splash-extensions { position: absolute; left: 24px; bottom: 22px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 30px; }
.splash-extensions span { opacity: 0; animation: pop .05s forwards; }

@keyframes fill { to { width: 100%; } }
@keyframes pop { to { opacity: 1; } }

.sleep {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #000;
  color: #777;
  font: bold 15px var(--ui-font);
  text-align: center;
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Page effects
   -------------------------------------------------------------------------- */

.avo-drop {
  position: fixed;
  top: -50px;
  z-index: 1500;
  font-size: 30px;
  pointer-events: none;
  animation: drop linear forwards;
}
@keyframes drop { to { transform: translateY(115vh) rotate(600deg); } }

body.steamy { --desktop: #b4472f; }
body.steamy::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 25% 100%, rgba(255, 255, 255, .6), transparent 70%),
    radial-gradient(ellipse 50% 45% at 75% 105%, rgba(255, 255, 255, .55), transparent 70%),
    radial-gradient(ellipse 40% 30% at 50% 90%, rgba(255, 255, 255, .35), transparent 70%);
  animation: steam 3.5s ease-in-out infinite alternate;
}
body.steamy .window-body { background: #fff7f2; }
@keyframes steam {
  from { opacity: .45; transform: translateY(30px); }
  to { opacity: .95; transform: translateY(-40px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* --------------------------------------------------------------------------
   Mario Kart Lab: game archive and Crash Site Map
   -------------------------------------------------------------------------- */

.mini-body .art { display: block; width: 100%; max-width: 200px; height: auto; margin: 0 auto 10px; }

.tabs { display: flex; flex-wrap: wrap; gap: 2px; padding-left: 8px; }
.tab {
  position: relative;
  top: 1px;
  padding: 4px 14px 3px;
  border: 1px solid #000;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(#f2f2f2, #c4c4c4);
  font: bold 11px/1.4 var(--ui-font);
  color: #555;
  cursor: pointer;
}
.tab[aria-selected="true"] { z-index: 1; background: var(--platinum); color: #000; box-shadow: inset 1px 1px #fff; }
.tab:focus-visible { outline: 1px dotted #000; outline-offset: -4px; }

.tab-panel {
  padding: 12px;
  background: var(--platinum);
  border: 1px solid #000;
  box-shadow: inset 1px 1px #fff, inset -1px -1px #888;
}

.map-grid { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; }
.map-grid svg { display: block; width: 100%; height: auto; border: 1px solid #000; box-shadow: 1px 1px #fff; }
.crash-detail {
  min-height: 100%;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid #000;
  box-shadow: inset 1px 1px #aaa;
  font-size: 12px;
}
.crash-detail h3 { margin-top: 0; }
.map-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; margin-top: 10px; }
.map-controls .btn[disabled] { color: #888; cursor: progress; }
.crash-count { margin: 0; font-size: 11px; }
@media (max-width: 640px) { .map-grid { grid-template-columns: 1fr; } }

.map-label { font: 900 26px "Arial Black", Arial, sans-serif; fill: rgba(255, 255, 255, .85); letter-spacing: 3px; }
.map-sub { font: bold 11px var(--ui-font); fill: rgba(255, 255, 255, .75); }

.crash { cursor: pointer; outline: none; }
.crash circle { fill: #fff; stroke: #000; stroke-width: 2; transition: fill .15s; }
.crash text { font: bold 12px var(--ui-font); fill: #000; pointer-events: none; }
.crash:hover circle, .crash:focus-visible circle { fill: #ffe11a; }
.crash:focus-visible circle { stroke-width: 3; }
.crash.active circle { fill: #e22; }
.crash.active text { fill: #fff; }
.crash.boom circle { animation: boom .9s ease-out; }

.kart { pointer-events: none; transform-box: fill-box; transform-origin: center; }
.kart.spin { animation: spin .9s ease-out; }

@keyframes boom { 0% { r: 12; } 40% { r: 22; fill: #ff9f1a; } 100% { r: 12; } }
@keyframes spin { to { transform: rotate(720deg); } }
