html, body {
  margin: 0;
  min-height: 100%;
  background: #b22222;  /* the colour of the original game and of sasku.maido.io */
  font: 14px/1.4 "Segoe UI", system-ui, -apple-system, sans-serif;
  color: #fff;
}

main {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 12px;
}

.window {
  background: #fff;
  border: 1px solid #555;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 10px;
  color: #000;
  font-size: 12px;
  user-select: none;
}

.titlebar img { image-rendering: pixelated; }

/* One game pixel is a whole number of screen pixels (sasku.js sizes it). */
#game {
  display: block;
  image-rendering: pixelated;
  outline: none;
  touch-action: none;
}

.note {
  max-width: 640px;
  margin: 20px 0 0;
  text-align: center;
  opacity: 0.9;
}

.note a { color: #fff; }

.closed {
  margin-top: 120px;
  text-align: center;
}

/* The "Tulemused" box, after the Windows message box the original used. */
dialog#box {
  min-width: 300px;
  max-width: 460px;
  padding: 0;
  border: 1px solid #888;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
  color: #000;
  font-size: 12px;
}

dialog#box::backdrop { background: transparent; }

.box-title {
  padding: 8px 12px;
  user-select: none;
}

.box-text {
  padding: 16px 20px 24px;
  white-space: pre-line;
}

.box-footer {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px;
  background: #f0f0f0;
}

.box-footer button,
.closed button {
  min-width: 88px;
  padding: 4px 12px;
  font: inherit;
  color: #000;
  background: #fdfdfd;
  border: 1px solid #d0d0d0;
  border-bottom-color: #bababa;
  border-radius: 4px;
}

.box-footer button:focus-visible { outline: 2px solid #0067c0; outline-offset: 1px; }
