/* Rules, developer area, submission status, staff review of games. Uses tokens from app.css. */
.sub-muted { color: var(--muted); }
.sub-center { justify-content: center; margin-top: 14px; }
.sub-back { display: inline-block; color: var(--muted); margin-bottom: 14px; }
.sub-back:hover { color: var(--text); }

/* ---------- rules ---------- */
.sub-rules { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 32px; align-items: start; }
.sub-side { position: sticky; top: calc(var(--top) + 20px); }
.sub-side nav { display: flex; flex-direction: column; gap: 2px; }
.sub-side a { padding: 9px 14px; border-radius: 10px; color: var(--muted); font-weight: 500; }
.sub-side a:hover { background: var(--bg-2); color: var(--text); }
.sub-side a.active { background: var(--card-2); color: var(--text); }
.sub-doc { max-width: 760px; line-height: 1.6; }
.sub-doc h1 { font-size: clamp(26px, 4vw, 34px); margin-bottom: 18px; }
.sub-doc h2 { font-size: 20px; margin: 28px 0 10px; }
.sub-doc h3 { font-size: 17px; margin: 20px 0 8px; }
.sub-doc p, .sub-doc ul, .sub-doc ol { margin: 0 0 12px; }
.sub-doc ul, .sub-doc ol { padding-left: 22px; }
.sub-doc li { margin: 4px 0; }
.sub-doc code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--card-2); padding: 2px 6px; border-radius: 6px; }
.sub-doc blockquote { margin: 0 0 16px; padding: 12px 16px; border-left: 3px solid var(--accent); background: var(--bg-2); border-radius: 0 10px 10px 0; }
.sub-lead { color: var(--muted); font-size: 17px; }
.sub-draft { display: inline-block; font-size: 13px; color: #ffcf5c; background: rgba(255, 207, 92, .1); border: 1px solid rgba(255, 207, 92, .3); border-radius: 999px; padding: 4px 12px; margin-bottom: 16px; }
.sub-table { overflow-x: auto; margin: 0 0 16px; }
.sub-table table { border-collapse: collapse; width: 100%; min-width: 420px; }
.sub-table th, .sub-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sub-table th { color: var(--muted); font-weight: 500; }
.sub-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin-top: 18px; }
.sub-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); transition: border-color .15s, transform .15s; }
.sub-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.sub-card span { color: var(--muted); font-size: 14px; }
.sub-count { display: inline-block; min-width: 22px; padding: 1px 7px; margin-left: 6px; border-radius: 999px; background: var(--accent-2); color: #fff; font-size: 12px; text-align: center; }

/* ---------- developers ---------- */
.sub-hero { padding: clamp(28px, 6vw, 56px) clamp(20px, 5vw, 48px); border-radius: var(--r-xl, 22px); background: radial-gradient(120% 140% at 0% 0%, rgba(139, 92, 255, .35), transparent 60%), radial-gradient(120% 140% at 100% 100%, rgba(255, 77, 141, .25), transparent 60%), var(--bg-2); border: 1px solid var(--line); margin-bottom: 24px; }
.sub-hero .kicker { color: var(--accent-2); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; margin-bottom: 10px; }
.sub-hero h1 { font-size: clamp(28px, 5vw, 44px); max-width: 720px; }
.sub-hero p { color: var(--muted); font-size: 17px; max-width: 620px; margin: 14px 0 22px; }
.sub-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 12px; }
.sub-why > div { padding: 18px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); }
.sub-why p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.sub-list { display: flex; flex-direction: column; gap: 6px; }
.sub-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.sub-row:hover { border-color: var(--accent); }
.sub-row-title { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- form ---------- */
.sub-form-page .form { max-width: 760px; }
.sub-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sub-chips label { cursor: pointer; }
.sub-chips input { position: absolute; opacity: 0; pointer-events: none; }
.sub-chips span { display: inline-block; padding: 7px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); }
.sub-chips input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.sub-chips input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.sub-chips input:disabled + span { opacity: .4; cursor: not-allowed; }
.sub-agree { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); margin: 6px 0 4px; }
.sub-agree a { color: var(--text); text-decoration: underline; }
.sub-error { color: #ff7a8a; background: rgba(255, 59, 78, .1); border: 1px solid rgba(255, 59, 78, .3); padding: 10px 14px; border-radius: 10px; margin: 8px 0; }
input[type=file] { color: var(--muted); max-width: 100%; }

/* ---------- status ---------- */
.sub-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--card-2); color: var(--muted); }
.sub-badge.st-checking { background: rgba(139, 92, 255, .18); color: #c4adff; }
.sub-badge.st-needs_changes { background: rgba(255, 207, 92, .15); color: #ffcf5c; }
.sub-badge.st-in_review { background: rgba(80, 170, 255, .15); color: #8cc8ff; }
.sub-badge.st-approved { background: rgba(61, 220, 151, .15); color: var(--ok); }
.sub-badge.st-rejected { background: rgba(255, 59, 78, .15); color: #ff7a8a; }
.sub-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 18px; }
.sub-head h1 { font-size: clamp(24px, 4vw, 32px); margin-bottom: 8px; }
.sub-head p { margin: 8px 0 0; }
.sub-cover { width: 200px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; background: var(--card); flex: none; }
.sub-meta { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sub-note { padding: 14px 16px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); margin-bottom: 16px; }
.sub-note p { margin: 6px 0 0; white-space: pre-wrap; }
.sub-checks { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.sub-checks li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); }
.ck-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; }
.ck-msg { overflow-wrap: anywhere; }
.ck-pass .ck-icon, i.ck-pass { background: rgba(61, 220, 151, .15); color: var(--ok); }
.ck-warn .ck-icon, i.ck-warn { background: rgba(255, 207, 92, .15); color: #ffcf5c; }
.ck-fail .ck-icon, i.ck-fail { background: rgba(255, 59, 78, .18); color: #ff7a8a; }
.ck-skipped .ck-icon { background: var(--card-2); color: var(--dim); }
.ck-fail { border-color: rgba(255, 59, 78, .35) !important; }
.sub-shots { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 16px; }
.sub-shots figure { margin: 0; }
.sub-shots img { max-height: 280px; width: auto; border-radius: 10px; border: 1px solid var(--line); background: #000; }
.sub-shots figcaption { color: var(--dim); font-size: 12px; margin-top: 4px; }
.sub-preview { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; margin-bottom: 16px; }
.sub-preview iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 12px; background: #000; }
.sub-preview iframe.portrait { width: min(100%, 400px); aspect-ratio: 9 / 16; }
.sub-spin { display: inline-block; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: sub-spin .8s linear infinite; vertical-align: -3px; }
@keyframes sub-spin { to { transform: rotate(360deg); } }

/* ---------- staff ---------- */
.sub-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.sub-tabs a { padding: 7px 14px; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.sub-tabs a span { color: var(--dim); margin-left: 4px; }
.sub-tabs a.active { background: var(--card-2); color: var(--text); border-color: var(--accent); }
.sub-item { border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); margin-bottom: 10px; }
.sub-item summary { display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; list-style: none; }
.sub-item summary::-webkit-details-marker { display: none; }
.sub-item summary img, .sub-nocover { width: 96px; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; flex: none; background: var(--bg-2); }
.sub-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.sub-item-main .sub-muted { font-size: 13px; }
.sub-tally { display: flex; gap: 4px; }
.sub-tally i { font-style: normal; font-size: 12px; font-weight: 600; min-width: 24px; text-align: center; padding: 2px 6px; border-radius: 999px; }
.sub-item-body { padding: 4px 16px 16px; border-top: 1px solid var(--line); }
.sub-decide textarea { width: 100%; background: var(--bg-2); border: 1px solid var(--line); border-radius: 10px; color: var(--text); font: inherit; padding: 10px 12px; margin-bottom: 8px; resize: vertical; }

@media (max-width: 760px) {
  .sub-rules { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .sub-side { position: static; }
  .sub-side nav { flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .sub-side a { white-space: nowrap; background: var(--bg-2); }
  .sub-head { flex-direction: column; }
  .sub-cover { width: 100%; max-width: 360px; }
  .sub-item summary { flex-wrap: wrap; }
  .sub-item summary img, .sub-nocover { width: 72px; }
  .sub-tally { display: none; }
}
