:root {
  --bg: #141710;
  --gutter: #10130d;
  --panel: #1c2118;
  --ink: #f4f0e6;
  --muted: #b7b1a3;
  --gold: #e6b15a;
  --line: rgba(244, 240, 230, 0.14);
  --star: #7ec8ff;
  --tic: #3ec6ff;
  --mid: #e07a4c;
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Avenir Next", "Segoe UI", Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; }

.mast {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 76px;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: #191d15;
}

.mark {
  color: var(--gold);
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 600;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.mark:hover { color: #f0c98a; }

body.shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.layout {
  display: grid;
  grid-template-columns: 276px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
}

.gutter {
  display: flex;
  flex-direction: column;
  background: var(--gutter);
  border-right: 1px solid var(--line);
  padding: 28px 18px 22px;
  overflow: auto;
}

.label {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.gutter nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gutter a {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 8px 10px;
  border-left: 3px solid transparent;
  border-radius: 0 10px 10px 0;
  text-decoration: none;
}

.gutter img,
.home-mark {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 10px;
  object-fit: cover;
  background: #0b0d0a;
}

.home-mark {
  display: grid;
  place-items: center;
  color: var(--gold);
}

.names {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.gutter a:hover,
.gutter a:focus-visible,
.gutter a[aria-current="page"] {
  background: rgba(230, 177, 90, 0.1);
  border-left-color: var(--gold);
  outline: none;
}

.gutter a span { font-weight: 650; }

.menu-note {
  margin: 8px 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.gutter a small {
  color: var(--muted);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
}

.contact {
  margin: auto 0 0;
  padding-top: 28px;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact a { color: var(--gold); }

.stage {
  width: 100%;
  height: 100%;
  border: 0;
  background: var(--bg);
}

.home {
  padding: 36px 40px 64px;
}

.intro {
  margin: 0 0 28px;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.game {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 18px;
  margin: 0 0 16px;
  padding: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.mark-tile {
  display: grid;
  place-items: center;
  width: 84px;
  height: 84px;
  border-radius: 18px;
  font-family: "Iowan Old Style", Palatino, Georgia, serif;
  font-size: 2rem;
  font-weight: 650;
}

.star .mark-tile { background: #102033; color: var(--star); }
.tic .mark-tile { background: #10243a; color: var(--tic); }
.mid .mark-tile { background: #2a1812; color: var(--mid); }
.heather .mark-tile { background: #102b23; }

img.mark-tile {
  display: block;
  object-fit: cover;
}

.folder {
  margin: 0 0 4px;
  color: var(--gold);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.82rem;
}

h2 {
  margin: 0 0 8px;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
}

.game p { margin: 0 0 12px; color: var(--muted); }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
}

.open {
  color: var(--gold);
  font-weight: 700;
  text-decoration: none;
}

.open:hover { text-decoration: underline; }

.download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  background: var(--gold);
  color: #1a1408;
  font-weight: 700;
  text-decoration: none;
}

.download:hover {
  background: #f0c98a;
  text-decoration: none;
}

@media (max-width: 760px) {
  body.shell { height: auto; min-height: 100vh; overflow: auto; }
  .mast { padding: 0 18px; }
  .layout { grid-template-columns: 1fr; min-height: auto; }
  .gutter { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .gutter nav { flex-direction: row; flex-wrap: wrap; }
  .contact { margin-top: 18px; }
  .stage { height: 75vh; }
  .home { padding: 28px 18px 48px; }
  .game { grid-template-columns: 64px minmax(0, 1fr); }
  .mark-tile { width: 64px; height: 64px; border-radius: 14px; font-size: 1.6rem; }
}
