:root {
  color-scheme: light;
  font: 16px/1.55 system-ui, "Microsoft YaHei", sans-serif;
  background: #f2f5f7;
  color: #17232c;
  --ink: #17232c;
  --muted: #526572;
  --line: #d6dfe5;
  --paper: #fff;
  --accent: #126455;
  --accent-hover: #084b40;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.container { width: min(100% - 2rem, 960px); margin-inline: auto; }
.top { background: #162932; color: #fff; }
.top-row, .hero, .section-heading, .game-main, .game-actions {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem;
}
.top-row { min-height: 66px; }
.brand { font-size: 1.4rem; letter-spacing: -.06em; font-weight: 760; color: #fff; text-decoration: none; }
.brand span { color: #a6e2ce; }
main { padding-block: clamp(1.25rem, 5vw, 3.5rem); }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.75rem, 5vw, 2.65rem); line-height: 1.15; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.15rem; overflow-wrap: anywhere; }
p, small { overflow-wrap: anywhere; }
p { margin-top: .4rem; color: var(--muted); }
.hero { margin-bottom: 2rem; }
.section-heading { margin-bottom: 1rem; }
.panel, .game {
  padding: clamp(1rem, 3vw, 1.8rem);
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: 14px;
}
.auth { max-width: 530px; margin-inline: auto; }
.games { display: grid; gap: .75rem; }
.game-main { align-items: flex-start; }
.game-main > div:first-child { min-width: min(100%, 15rem); flex: 1; }
.game-status { color: var(--accent-hover); }
.muted, .game small { color: var(--muted); }
.game-actions { justify-content: flex-start; }
button, input { font: inherit; }
button {
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: .5rem .95rem;
  min-height: 43px;
  font-weight: 640;
}
button:hover:not(:disabled) { background: var(--accent-hover); cursor: pointer; }
button:disabled { opacity: .58; }
.secondary, .text-button { background: var(--paper); color: var(--ink); border-color: var(--line); }
.secondary:hover:not(:disabled), .text-button:hover:not(:disabled) { background: #e9f3f0; color: var(--accent-hover); }
.top .text-button { background: transparent; color: #fff; border-color: #57717c; }
.danger { color: #893e33; }
form { display: grid; gap: 1rem; margin-top: 1.2rem; }
form button { justify-self: start; }
label { display: grid; gap: .35rem; font-weight: 640; }
input { width: 100%; padding: .65rem; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input::file-selector-button { font: inherit; margin-right: .5rem; }
small { font-size: .88rem; font-weight: 400; color: var(--muted); }
.file-field { padding: 1rem; background: #f1f8f6; border-radius: 10px; }
.upload h1 { font-size: clamp(1.4rem, 5vw, 2rem); }
#preview { margin-top: 1.5rem; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.preview-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.1rem; align-items: start; margin-top: .8rem; }
.preview-layout img { width: 100%; height: auto; border-radius: 9px; }
.preview-layout + p, #preview .section-heading { margin-top: 1rem; }
#publish { margin-left: auto; }
#notice { background: #dff2ea; color: #144d3e; padding: .75rem 1rem; margin: 0 0 1rem; border-radius: 8px; }
#notice[data-error="true"] { background: #fbe8e3; color: #783629; }
details { margin-top: .6rem; color: var(--muted); }
summary { cursor: pointer; width: fit-content; }
ol { padding-inline-start: 1.25rem; margin-bottom: 0; }
a { color: var(--accent-hover); }
@media (max-width: 560px) {
  .game-main { display: grid; }
  .game-actions { justify-content: flex-start; }
}
