:root {
    color-scheme: light;
    font-family: system-ui, "Microsoft YaHei", sans-serif;
    color: #172239;
    background: #f2f5fc;
    line-height: 1.6;
    --accent: #4738bc;
    --border: #dce1ef;
    --muted: #53617a;
}
* { box-sizing: border-box; }
body { margin: 0; }
main, .header-inner { width: min(1120px, calc(100% - 32px)); margin-inline: auto; }
main { padding-block: 32px 52px; }
a { color: var(--accent); text-underline-offset: .22em; }
:focus-visible { outline: 3px solid #7868e8; outline-offset: 4px; }
.site-header { background: #fff; border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-block: 16px; }
.header-inner nav { display: flex; gap: 20px; }
.brand { color: #292056; text-decoration: none; font-size: 1.3rem; font-weight: 800; }
.brand span { margin-left: 8px; color: var(--muted); font-size: .68rem; letter-spacing: .12em; white-space: nowrap; }
.hero { padding: clamp(24px, 5vw, 52px); background: linear-gradient(125deg, #252052, #48389a 64%, #325b91); color: #fff; border-radius: 22px; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .14em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.15; margin: .4em 0; }
h2 { font-size: 1.25rem; margin: 0 0 14px; }
.hero p { margin: 0; }
section { background: #fff; margin-block: 20px; padding: clamp(18px, 3vw, 30px); border: 1px solid var(--border); border-radius: 18px; }
label { display: block; margin: 14px 0; font-weight: 600; }
input, textarea, select, button { font: inherit; max-width: 100%; }
input, textarea, select { padding: 9px 12px; background: #f9faff; border: 1px solid #aeb8d2; border-radius: 9px; color: inherit; }
textarea { display: block; width: 100%; min-height: 8rem; margin-top: 6px; }
button, .button { display: inline-block; padding: 9px 17px; background: var(--accent); border: 1px solid transparent; border-radius: 9px; color: #fff; font-weight: 650; text-decoration: none; cursor: pointer; }
button:hover, .button:hover { background: #362997; }
button[value="unshare"] { color: var(--accent); background: #fff; border-color: #aeb8d2; }
.games { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr)); gap: 12px; }
.games li { padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #f9faff; color: var(--muted); }
.games a { display: block; font-weight: 700; overflow-wrap: anywhere; }
.editor { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 20px; }
.editor nav { background: #f2f5fc; border-radius: 12px; padding: 14px; overflow-wrap: anywhere; }
.editor nav ul { padding-left: 18px; }
.editor textarea { font: 14px/1.6 ui-monospace, Consolas, monospace; min-height: 25rem; }
iframe { display: block; width: 100%; height: 65vh; border: 1px solid var(--border); border-radius: 12px; }
.error { color: #9c201a; background: #fff0ef; padding: 12px 16px; border-radius: 9px; }
.review { white-space: pre-wrap; overflow-wrap: anywhere; }
.notice-page { min-height: 100vh; display: grid; place-items: center; background: radial-gradient(ellipse at top, #e5e0ff, transparent 65%), #f2f5fc; }
.notice { width: min(560px, calc(100% - 32px)); margin-block: 24px; padding: clamp(22px, 6vw, 48px); background: #fff; border: 1px solid var(--border); border-radius: 24px; box-shadow: 0 18px 50px #241b5920; }
.notice h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); margin-top: 26px; }
.notice p { color: var(--muted); margin-bottom: 26px; }
@media (max-width: 650px) {
    .editor { grid-template-columns: 1fr; }
    label input, label select { display: block; margin-top: 6px; }
}

button:disabled { background: #e4e7f0; color: #53617a; cursor: not-allowed; }

.hero .button { margin-top: 20px; background: #fff; color: #292056; }
.hero .button:hover { background: #eeeaff; }

.draft-hero { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 24px; }
.draft-hero form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.publish-button { background: #fff; color: #292056; }
.publish-button:not(:disabled):hover { background: #eeeaff; }
.hero .publish-note { flex-basis: 100%; font-size: .85rem; color: #f1ecff; }


.games { gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.games li { padding: 20px; border-top: 3px solid #7767dd; background: linear-gradient(145deg,#fff,#f7f6ff); }
.games a { font-size: 1.13rem; line-height: 1.4; }
.game-meta { margin: 14px 0 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: .85rem; }
.game-meta div { display: grid; grid-template-columns: 5em minmax(0,1fr); gap: 6px; margin: 4px 0; }
.game-meta dd { margin: 0; color: #253354; overflow-wrap: anywhere; }
.game-rating { display: inline-block; margin-top: 10px; padding: 2px 8px; border-radius: 20px; background: #ece8ff; color: #4738bc; font-size: .8rem; }

.games .interaction-link { margin-top: 10px; font-size: .82rem; font-weight: 500; }
.reaction-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.reaction-icon { width: .85em; height: .85em; vertical-align: -.1em; }
.interaction-link .icon-like { color: #b73365; }
.interaction-link .icon-coin { color: #986300; }
.interaction-link .icon-favorite { color: #5a46bd; }

body { background: radial-gradient(ellipse at top, #eeebff 0, transparent 500px), #f4f6fc; }
.site-header { background: #fafaff; }
.header-inner nav { gap: 6px 14px; flex-wrap: wrap; }
.header-inner nav a { color: #403675; text-decoration: none; font-size: .9rem; font-weight: 600; }
.header-inner nav a:hover { text-decoration: underline; }
.hero { box-shadow: 0 12px 32px #30206426; }
.hero .eyebrow { color: #e5ddff; }
.hero .button { padding-inline: 20px; }
.games { gap: 14px; }
.games li { position: relative; padding: 20px; border: 1px solid #ddd8f4; border-radius: 14px; box-shadow: 0 3px 10px #31225a0a; }
.games li:hover, .games li:focus-within { border-color: #8e7be0; box-shadow: 0 6px 18px #31225a16; }
.games li > a:first-child { color: #302461; text-decoration: none; }
.games li > a:first-child:hover { text-decoration: underline; }
.game-meta dt { color: #5d6680; }
.game-meta time { font-variant-numeric: tabular-nums; }
.games .interaction-link { padding: 6px 8px; border-radius: 8px; background: #eeebfb; color: #44386b; text-decoration: none; }
.games .interaction-link:hover { background: #e6dffb; }
@media (max-width: 650px) {
    main { padding-top: 20px; }
    .header-inner { align-items: flex-start; flex-direction: column; }
}

.interaction-link .icon-comment { color: #375a96; }
.games .game-actions { display: flex; justify-content: space-between; gap: 4px; }
.games .game-actions a { font-size: .82rem; white-space: nowrap; }
.games .game-actions { display: flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 4px; }
.games .game-actions > a, .games .game-actions > span {
    display: inline-flex; align-items: center; gap: 3px; font-size: .82rem; white-space: nowrap;
}
.games .game-actions .reaction-icon { width: 24px; height: 24px; flex: 0 0 24px; }
.games li > a:first-child { padding-right: 32px; }
.game-share .share-trigger { position: absolute; top: 15px; right: 14px; display: grid; place-items: center; width: 30px; height: 30px; cursor: pointer; padding: 0; color: #4738bc; background: #eeebfb; border-radius: 8px; }

.share-content { margin-top: 12px; text-align: center; padding: 10px; background: #fff; border: 1px solid var(--border); border-radius: 10px; }
.share-content label { text-align: left; margin: 4px 0; font-size: .8rem; }
.share-content input { display: block; width: 100%; margin-top: 4px; font-size: .8rem; }

.share-content { width: min(360px, calc(100% - 32px)); margin: auto; padding: 24px; color: #172239; box-shadow: 0 20px 60px #241b5940; }
.share-content::backdrop { background: #18132d99; }
.share-content .share-close { position: absolute; top: 8px; right: 8px; background: #eeebfb; color: #4738bc; padding: 0 9px; }
.cloud-play iframe { height: 100vh; height: 100dvh; border: 0; border-radius: 0; }

.publish-paths { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,15rem),1fr)); gap:1rem; margin-block:1rem; }
.publish-paths a { display:grid; gap:.3rem; padding:1rem; border:1px solid #d6d1f5; border-radius:14px; background:#fff; color:#372989; text-decoration:none; }
.publish-paths a:hover,.publish-paths a:focus-visible { background:#f0edff; outline:2px solid #6754cc; outline-offset:2px; }
.publish-paths span { color:#53617a; font-size:.9rem; }

.git-published { display:inline-block; padding:.12rem .6rem; border-radius:999px; background:#dcfce7; color:#166534; font-size:.82rem; vertical-align:middle; }

.git-projects { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,19rem),1fr)); gap:1rem; margin-block:1rem; }
.git-projects article { display:flex; flex-direction:column; gap:.5rem; padding:1.15rem; border:1px solid #dce1ef; border-radius:16px; background:#f8f9ff; }
.git-projects h3 { display:flex; align-items:center; flex-wrap:wrap; gap:.6rem; margin:0; overflow-wrap:anywhere; }
.git-projects p { margin:0; color:#53617a; }
.git-projects .git-actions { display:flex; flex-wrap:wrap; gap:.55rem; margin-top:.6rem; }
.git-projects .git-actions a:first-child { background:white; color:#4738bc; border:1px solid #d6d1f5; }
.git-projects .git-actions a:focus-visible { outline:2px solid #4738bc; outline-offset:3px; }

.wallet-summary .wallet-balance { display:flex; align-items:baseline; gap:.55rem; flex-wrap:wrap; }
.wallet-balance strong { font-size:clamp(2rem,6vw,3.5rem); line-height:1.2; }
.member-panel { border-radius:18px; }
.member-panel h2 { margin-top:0; }
.member-empty { padding:1rem; border-radius:12px; background:#f3f2fb; }
.favorite-grid { list-style:none; display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,14rem),1fr)); gap:.75rem; padding:0; }
.favorite-grid a { display:block; padding:.85rem 1rem; background:#f5f3ff; border:1px solid #e0daf7; border-radius:12px; overflow-wrap:anywhere; }
.work-status { display:inline-block; padding:.12rem .55rem; border-radius:999px; background:#eceaf7; color:#49436b; font-size:.82rem; }
.work-status.is-public { background:#dcfce7; color:#166534; }
.setup-guide .member-panel { border-inline-start:4px solid #b9adf0; }

.game-card-heading { display:flex; align-items:center; gap:.65rem; min-width:0; } .game-author-avatar { flex:none; width:40px; height:40px; object-fit:cover; border-radius:12px; background:#edeafd; }

.game-list-header { display:flex; justify-content:space-between; align-items:center; gap:.75rem; flex-wrap:wrap; }
.game-list-header h2 { margin-block:.4rem; }
.game-list-header form { display:flex; align-items:center; flex-wrap:wrap; gap:.5rem; margin:0; }
.game-list-header select { max-width:100%; }

.site-header nav a[aria-current="page"] { color:#372989; background:#ebe7ff; border-radius:8px; }

.clone-prompt-box { display:grid; gap:.65rem; margin-block:.5rem 1rem; }
.clone-prompt-box textarea { width:100%; min-width:0; }
