/* didimlabs.com. Pages under site/ are generated; guides/ are hand-written and share these rules.
   Plain on purpose: light by default, dark when the Mac is in dark mode, one accent colour, no motion. */
:root {
  --bg: #fbfbf8; --panel: #f2f2ed; --border: #dcdcd4; --text: #1d1f1c; --dim: #5d625c;
  --accent: #1f7a4d; --accent-hover: #17623d; --on-accent: #fff; --link: #1d5fa8;
  --ok: #1f7a4d; --ok-bg: #e2f1e8; --warn: #8a5a00; --warn-bg: #f6ecd6; --bad: #a3322b; --bad-bg: #f7e1df;
  --info: #2a5596; --info-bg: #e2eaf6; --neutral: #5d625c; --neutral-bg: #ececE6;
  --field: #c9c9bf; --wide: 1080px; --text-w: 700px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161816; --panel: #1f221f; --border: #333833; --text: #e8eae6; --dim: #a3a9a2;
    --accent: #4fb07c; --accent-hover: #63c28f; --on-accent: #0d1a12; --link: #8ab8ec;
    --ok: #6fcf98; --ok-bg: #1d3326; --warn: #e3c27a; --warn-bg: #3a3020; --bad: #f0928a; --bad-bg: #3d2321;
    --info: #9cc0f0; --info-bg: #1f2c40; --neutral: #b4b9b2; --neutral-bg: #2a2e2a;
    --field: #4a504a;
  }
}
* { box-sizing: border-box; }
html { scroll-padding-top: 72px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: hidden;
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", Helvetica, Arial, sans-serif;
}
:lang(ko) { word-break: keep-all; line-height: 1.7; }
a { color: var(--link); text-underline-offset: 2px; }
p, li, td, th, dd { overflow-wrap: break-word; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--panel); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
a:focus-visible, summary:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px;
}

/* Top bar: brand, links, and the download button on the right. On a phone the links scroll sideways. */
nav { position: sticky; top: 0; z-index: 5; background: var(--bg); border-bottom: 1px solid var(--border); }
nav .inner { max-width: var(--wide); margin: 0 auto; padding: 10px 20px; display: flex; gap: 20px; align-items: center; }
nav a { color: var(--dim); text-decoration: none; font-size: 15px; white-space: nowrap; flex-shrink: 0; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); }
nav a.brand { color: var(--text); font-weight: 700; font-size: 17px; display: inline-flex; align-items: center; gap: 8px; margin-right: 4px; }
nav a.brand span { color: var(--dim); font-weight: 400; font-size: 14px; }
nav a.nav-download { margin-left: auto; order: 99; color: var(--on-accent); background: var(--accent); padding: 6px 14px; border-radius: 6px; font-weight: 600; }
nav a.nav-download:hover { color: var(--on-accent); background: var(--accent-hover); }

main { max-width: var(--wide); margin: 0 auto; padding: 8px 20px 64px; }
main > section, main > header, main > h1, main > h2, main > p, main > ul, main > ol, main > figure, main > div { max-width: var(--text-w); }
main > section:has(.proof, .features, .gallery, .game, table, .video, .steps.row, .facts) { max-width: var(--wide); }
main > header.hero-home { max-width: var(--wide); }
h1 { font-size: 34px; line-height: 1.2; margin: 32px 0 12px; letter-spacing: -0.01em; }
h2 { font-size: 24px; line-height: 1.3; margin: 56px 0 12px; }
h3 { font-size: 18px; margin: 24px 0 6px; }
p { margin: 0 0 14px; }
.intro, .lead { color: var(--dim); }
.lead { font-size: 19px; }
ul, ol { padding-left: 22px; } li { margin: 6px 0; }
img, video { max-width: 100%; height: auto; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 20px 0; }
.btn { display: inline-block; background: var(--accent); color: var(--on-accent); font-weight: 600; padding: 10px 18px; border-radius: 7px; text-decoration: none; border: 0; font-size: 16px; cursor: pointer; }
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn.secondary:hover { border-color: var(--dim); color: var(--text); }
.meta { color: var(--dim); font-size: 14.5px; }

/* Home: what it is, the download, and the app itself */
.hero-home { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: center; padding: 40px 0 8px; }
.hero-home h1 { font-size: 40px; line-height: 1.15; margin: 0 0 14px; }
.hero-home .lead { font-size: 18.5px; color: var(--text); }
.hero-home .actions { margin: 22px 0 8px; }
.hero-home .btn { font-size: 17px; padding: 12px 22px; }
.hero-home .meta { margin: 0 0 6px; }
.hero-home .alt { font-size: 14.5px; color: var(--dim); margin: 0; }
.hero-home .alt code { font-size: 13.5px; }
.hero-shot { margin: 0; }
.hero-shot img { display: block; width: 100%; border: 1px solid var(--border); border-radius: 10px; }
img.shot { display: block; width: 100%; border: 1px solid var(--border); border-radius: 10px; margin: 24px 0 0; }

/* Tested games: one row per game */
.proof { width: 100%; }
.proof td:nth-child(2) { white-space: nowrap; color: var(--dim); }
.proof td:last-child { color: var(--dim); }

/* Facts: a term and what it means */
dl.facts { display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 0; margin: 16px 0; border-top: 1px solid var(--border); }
dl.facts dt, dl.facts dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--border); }
dl.facts dt { font-weight: 600; padding-right: 20px; }
dl.facts dd { color: var(--dim); }

/* Numbered steps */
.steps { list-style: none; padding: 0; counter-reset: step; margin: 16px 0; }
.steps li { counter-increment: step; position: relative; padding: 0 0 16px 40px; margin: 0; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--accent); color: var(--accent); font-size: 14px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.steps li p { margin: 4px 0 0; color: var(--dim); }
.steps.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.steps.row li { padding: 36px 0 0; }
.steps.row li::before { top: 0; }

code { background: var(--panel); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; font: 14.5px ui-monospace, Menlo, monospace; }
pre { background: var(--panel); border: 1px solid var(--border); padding: 14px 16px; border-radius: 8px; overflow-x: auto; line-height: 1.55; max-width: 100%; }
pre code { background: none; border: 0; padding: 0; }

/* Tables */
.table-scroll { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: 15.5px; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
thead th, table.games tr:first-child th { background: var(--panel); color: var(--dim); font-weight: 600; font-size: 13.5px; }
tbody tr:last-child th, tbody tr:last-child td, table.games tr:last-child td { border-bottom: 0; }
tbody th { font-weight: 600; }
main > section > table, main > table { border: 1px solid var(--border); }
table.games { border: 1px solid var(--border); border-radius: 8px; border-collapse: separate; border-spacing: 0; overflow: hidden; }

/* Status labels: coloured text on a light tint, same shape everywhere */
.status, .pill { display: inline-block; padding: 1px 8px; border-radius: 4px; font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.status.ok, .pill.plays { color: var(--ok); background: var(--ok-bg); }
.status.likely { color: var(--ok); background: var(--ok-bg); }
.status.unknown { color: var(--neutral); background: var(--neutral-bg); }
.status.no { color: var(--bad); background: var(--bad-bg); }
.status.native { color: var(--info); background: var(--info-bg); }
.pill.partial { color: var(--warn); background: var(--warn-bg); }

.note { background: var(--panel); border-left: 3px solid var(--accent); padding: 11px 16px; border-radius: 0 6px 6px 0; margin: 16px 0; }

a.game { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); text-decoration: none; color: var(--text); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; margin: 16px 0; }
a.game:hover { border-color: var(--dim); }
a.game img { display: block; width: 100%; height: 100%; object-fit: cover; }
.game-body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; color: var(--dim); font-size: 15.5px; }
.game-body b { color: var(--text); font-size: 19px; }
.game-meta { color: var(--text); font-size: 14.5px; }

.gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.gallery img { display: block; width: 100%; border-radius: 6px; border: 1px solid var(--border); }
figure { margin: 20px 0; }
figure.video video { display: block; width: 100%; border: 1px solid var(--border); border-radius: 10px; background: #000; }
figcaption { color: var(--dim); font-size: 14px; margin-top: 8px; }

.faq { margin: 16px 0; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 13px 28px 13px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 11px; color: var(--dim); font-weight: 400; font-size: 20px; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 14px; }

ul.links { list-style: none; padding: 0; margin: 12px 0; border-top: 1px solid var(--border); }
ul.links li { margin: 0; border-bottom: 1px solid var(--border); }
ul.links a { display: block; padding: 11px 0; text-decoration: none; color: var(--text); }
ul.links a:hover { color: var(--link); }

/* Closing download block */
main > section.cta { max-width: var(--wide); margin: 64px 0 0; padding: 28px; border: 1px solid var(--border); border-radius: 10px; background: var(--panel); }
.cta h2 { margin: 0 0 6px; font-size: 22px; }
.cta p { margin: 0; color: var(--dim); }
.cta .actions { margin: 18px 0 0; }

footer { border-top: 1px solid var(--border); color: var(--dim); font-size: 14px; }
footer .inner, body > footer:not(:has(.inner)) { max-width: var(--wide); margin: 0 auto; padding: 22px 20px 40px; }
footer p { margin: 4px 0; }
footer a { color: var(--dim); }

h1.with-logo { display: flex; align-items: center; gap: 14px; }
h1.with-logo img { width: 56px; height: 56px; }

/* Sponsor and contact pages */
.figure img { max-width: min(100%, 440px); height: auto; border-radius: 8px; border: 1px solid var(--border); }
form.contact { display: grid; gap: 14px; max-width: 560px; margin: 16px 0; }
form.contact label { display: grid; gap: 6px; font-size: 14px; color: var(--dim); }
form.contact input, form.contact textarea, .notify-row input { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 7px; padding: 10px 12px; width: 100%; }
form.contact input:focus, form.contact textarea:focus, .notify-row input:focus { outline: 2px solid var(--accent); outline-offset: 0; }
form.contact .hp, form.notify .hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
form.contact button:disabled, form.notify button:disabled { opacity: .6; cursor: default; }
.form-status { margin-left: 12px; color: var(--dim); font-size: 14px; }
form.notify { margin: 12px 0; max-width: 560px; }
form.notify label { display: grid; gap: 8px; font-size: 15px; }
.notify-row { display: flex; gap: 8px; flex-wrap: wrap; }
.notify-row input { flex: 1 1 220px; width: auto; }
form.notify .form-status { display: block; margin: 8px 0 0; }

@media (max-width: 860px) {
  .hero-home { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 24px; }
  .steps.row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .steps.row li { padding: 0 0 16px 40px; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  nav .inner { gap: 16px; padding: 10px 16px; overflow-x: auto; scrollbar-width: none; }
  nav .inner::-webkit-scrollbar { display: none; }
  nav a.brand span { display: none; }
  nav a.brand { order: -2; }
  nav a.nav-download { order: -1; margin-left: 0; padding: 5px 12px; }
  main { padding: 4px 16px 56px; }
  h1, .hero-home h1 { font-size: 30px; }
  h2 { font-size: 22px; margin-top: 44px; }
  .lead, .hero-home .lead { font-size: 17px; }
  .hero-home .btn { display: block; text-align: center; width: 100%; }
  dl.facts { grid-template-columns: minmax(0, 1fr); }
  dl.facts dt { border-bottom: 0; padding-bottom: 2px; }
  dl.facts dd { padding-top: 0; }
  .gallery { grid-template-columns: 1fr 1fr; }
  a.game { grid-template-columns: 1fr; }
  /* tested games: one block per game instead of squeezed columns */
  .table-scroll:has(table.proof) { border: 0; overflow: visible; }
  table.proof thead { display: none; }
  table.proof, table.proof tbody { display: block; }
  table.proof tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--border); }
  table.proof th, table.proof td { display: inline; padding: 0; border: 0; }
  table.proof td:nth-child(2)::before { content: " · "; }
  table.proof td:nth-child(3) { margin-left: 8px; }
  table.proof td:last-child { display: block; margin-top: 4px; }
  table.games td, table.games th { padding: 9px 10px; font-size: 14.5px; }
  .status, .pill { white-space: normal; }
  main table:not(.proof) { display: block; max-width: 100%; overflow-x: auto; }
  td code, th code { word-break: break-all; }
  main > section.cta { padding: 20px; }
}

/* "Does my game run?": one field with the button inside it; matches open right under it. */
form.game-search { margin: 40px 0 0; max-width: var(--text-w); }
form.game-search h2 { margin: 0 0 12px; font-size: 22px; }
form.game-search label { display: block; font-weight: 600; margin: 0 0 10px; }
form.game-search h2 label { margin: 0; font-size: inherit; }
.search-row { display: flex; align-items: center; gap: 6px; background: var(--bg); border: 1px solid var(--field); border-radius: 10px; padding: 5px; }
.search-row:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ok-bg); }
.search-row input {
  flex: 1 1 auto; min-width: 0; -webkit-appearance: none; appearance: none; font: inherit; color: var(--text); border: 0; border-radius: 6px;
  padding: 9px 8px 9px 38px; background: transparent no-repeat 11px center / 18px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8f88' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='m20 20-4-4'/%3E%3C/svg%3E");
}
.search-row input:focus, .search-row input:focus-visible { outline: none; }
.search-row input::placeholder { color: var(--dim); opacity: .8; }
.search-row .btn { margin: 0; flex-shrink: 0; padding: 9px 20px; border-radius: 7px; }
form.game-search .hint { margin: 10px 0 0; font-size: 14.5px; color: var(--dim); }
#search-results { list-style: none; padding: 0; margin: 8px 0 0; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); }
#search-results[hidden] { display: none; }
#search-results li { margin: 0; padding: 10px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 6px 10px; align-items: baseline; flex-wrap: wrap; }
#search-results li:last-child { border-bottom: 0; }
#search-results li a { font-weight: 600; }
#search-results .launcher, #search-results .more, #search-results .none { color: var(--dim); font-size: 14.5px; }
.search-row input::-webkit-search-cancel-button { -webkit-appearance: none; display: none; }
