:root{font-family:system-ui,-apple-system,"Noto Sans JP",sans-serif;color:#fff;background:#0c1220}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overscroll-behavior:none}.app{height:100dvh;max-width:560px;margin:auto;display:flex;flex-direction:column;background:#111827}.top{height:52px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 16px;border-bottom:1px solid #ffffff19}.brand{font-size:15px;font-weight:900;letter-spacing:.08em}.brand-mark{color:#fbbf24}.brand small{font-size:10px;font-weight:500;opacity:.55;margin-left:6px}.text-button{border:1px solid #ffffff35;border-radius:20px;padding:6px 12px;background:#ffffff12;color:#fff}.stage{position:relative;flex:1;min-height:0;background:#1f2937;overflow:hidden}.game-wrap,.game-wrap iframe{height:100%;width:100%;border:0;display:block}.side-rail{position:absolute;right:0;top:0;bottom:118px;width:52px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:linear-gradient(90deg,transparent,#10182777);touch-action:none;z-index:3}.side-rail button{width:42px;height:42px;border:1px solid #ffffff70;border-radius:50%;background:#111827bb;color:#fff;font-size:25px;line-height:1;backdrop-filter:blur(6px)}.rail-label{writing-mode:vertical-rl;letter-spacing:.2em;font-size:9px;opacity:.65}.bottom-shade{position:absolute;bottom:0;left:0;right:0;min-height:120px;display:flex;align-items:end;justify-content:space-between;gap:8px;padding:25px 12px calc(12px + env(safe-area-inset-bottom));background:linear-gradient(transparent,#080d17 50%);pointer-events:none}.game-meta{max-width:65%}.game-meta>*{margin:0}.game-meta #counter{font-size:11px;color:#fbbf24;font-weight:800;letter-spacing:.1em}.game-meta h1{font-size:21px;line-height:1.2;margin:4px 0}.game-meta p{font-size:11px;opacity:.8;line-height:1.4}.actions{display:flex;gap:6px;pointer-events:auto}.actions button{width:47px;height:51px;border:0;border-radius:12px;background:#ffffff23;color:#fff;font-size:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;backdrop-filter:blur(5px)}.actions span{font-size:9px}.actions button.active{color:#ff647e}.hint{font-size:10px;text-align:center;padding:6px 8px max(6px,env(safe-area-inset-bottom));color:#aab5c7;background:#111827}dialog{width:min(92vw,440px);border:1px solid #3d4b61;border-radius:16px;background:#182235;color:white;padding:18px;box-shadow:0 20px 70px #0009}dialog::backdrop{background:#0009}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h2{font-size:18px;margin:0}.dialog-head button{border:0;background:none;color:white;font-size:28px}.stat-row{display:flex;justify-content:space-between;padding:10px 0;border-bottom:1px solid #ffffff18;font-size:14px}.note{font-size:11px;color:#acb7c7;line-height:1.5}button{cursor:pointer}button:focus-visible{outline:2px solid #fbbf24;outline-offset:2px}
.top-actions{display:flex;gap:6px}
.feed-nav{display:flex;align-items:center;gap:5px;padding:6px 10px;background:#111827;border-bottom:1px solid #ffffff1d}.feed-nav button{border:0;border-radius:12px;padding:7px 10px;background:#ffffff15;color:#c7d1df;font-size:11px}.feed-nav button.selected{background:#fbbf24;color:#172033;font-weight:800}.feed-nav .create-button{margin-left:auto;background:#426ba9;color:white}.actions button{width:42px}.field-label{display:block;font-size:12px;margin-top:12px}.field-label input,.field-label textarea{display:block;width:100%;margin-top:5px;border:1px solid #4b5b72;border-radius:8px;padding:9px;background:#0e1728;color:white;font:inherit}.file-label{display:block;font-size:12px;margin-top:12px}.file-label input{display:block;margin-top:6px;max-width:100%}.creator-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:14px}.creator-actions button{border:1px solid #64748b;border-radius:9px;background:#25374f;color:white;padding:9px;font-size:12px}.creator-actions .primary{background:#fbbf24;border-color:#fbbf24;color:#172033;font-weight:800}.draft-preview{height:280px;margin-top:10px;display:none;border:1px solid #4b5b72;border-radius:8px;overflow:hidden}.draft-preview iframe{width:100%;height:100%;border:0}
.actions{gap:4px}.actions button{width:38px;font-size:21px}.game-meta{max-width:calc(100% - 174px)}#promptText{display:block;width:100%;margin-top:10px;border:1px solid #4b5b72;border-radius:8px;padding:9px;background:#0e1728;color:white;font:12px system-ui}#promptText[hidden]{display:none}
dialog{max-height:90dvh;overflow:auto}.dialog-subtitle{font-size:14px;margin:18px 0 8px}.submission-list{display:grid;gap:8px}.submission-item{border:1px solid #ffffff27;border-radius:10px;padding:10px;background:#0e1728}.submission-item strong{display:block;font-size:13px}.submission-item p{font-size:11px;color:#acb7c7;margin:5px 0}.submission-item .status{color:#fbbf24;font-size:11px}.submission-item button{border:1px solid #64748b;border-radius:8px;background:#25374f;color:white;padding:6px 9px;margin:5px 5px 0 0;font-size:11px}#reviewPreview{height:min(42dvh,360px)}.top-actions button[hidden]{display:none}@media(max-width:390px){.brand small{display:none}.top{padding:0 9px}.text-button{padding:6px 8px;font-size:11px}}
.submission-link{display:block;color:#fbbf24;font-size:11px;margin-top:7px}#reviewActions button{border:1px solid #64748b;border-radius:9px;background:#25374f;color:white;padding:8px 12px}#reviewActions button:first-child{background:#fbbf24;color:#172033}
.feed-nav{overflow-x:auto;scrollbar-width:none}.feed-nav::-webkit-scrollbar{display:none}.feed-nav button{flex:none;white-space:nowrap}.feed-nav .create-button{margin-left:auto}.submission-item .play-saved{background:#fbbf24;color:#172033;border-color:#fbbf24}
.account-panel{border:1px solid #50627c;border-radius:12px;background:#101b2d;padding:12px;margin:14px 0}.account-panel h3{font-size:14px;margin:0}.account-panel p{font-size:12px;line-height:1.5}.account-panel button{border:1px solid #64748b;border-radius:8px;background:#25374f;color:white;padding:8px 10px;margin-top:8px}.account-panel input,.account-panel textarea{width:100%;border:1px solid #4b5b72;border-radius:8px;padding:8px;background:#0e1728;color:white;font:inherit}.account-panel textarea{margin-top:4px;overflow-wrap:anywhere}.account-panel [hidden]{display:none}#submitGame:disabled{opacity:.5;cursor:not-allowed}

/* Full-screen feed shell. The game remains the largest touch surface. */
:root{background:#090b14}
.app{background:#090b14;max-width:560px;box-shadow:0 0 80px #0008}
.top{height:47px;background:#090b14;z-index:4;border:0;padding:0 12px}
.brand{font-size:19px;letter-spacing:-.04em;text-transform:none}
.brand-mark{color:#ff5f83;margin-right:3px;font-size:16px}
.brand small{font-size:10px;letter-spacing:0;color:#adbacb;opacity:1;margin-left:4px}
.text-button{font-size:11px;border:0;background:#ffffff14}
.feed-nav{height:39px;flex:none;z-index:4;justify-content:center;gap:18px;border:0;background:#090b14;padding:0 8px}
.feed-nav button{border-radius:0;background:none;color:#9da8b9;font-size:13px;padding:8px 2px;border-bottom:2px solid transparent}
.feed-nav button.selected{background:none;color:white;border-color:#ff5f83}
.stage{flex:1;min-height:0;background:radial-gradient(circle at 50% 38%,#1b2d43,#090b14 72%)}
.game-wrap{position:absolute;inset:0;width:auto;height:auto;display:grid;place-items:center}
.game-wrap iframe{display:block;width:100%;height:100%;border:0;background:#142033}
.game-wrap[data-aspect="square"] iframe{width:min(100%,calc(100dvh - 170px));height:auto;aspect-ratio:1;max-height:100%}
.game-wrap[data-aspect="landscape"] iframe{width:min(100%,calc((100dvh - 170px)*16/9));height:auto;aspect-ratio:16/9;max-height:100%}
.side-rail{right:0;top:24%;bottom:33%;width:47px;gap:9px;background:linear-gradient(90deg,transparent,#090b1488);justify-content:center}
.side-rail button{width:37px;height:37px;font-size:21px;background:#090b14a8;border:1px solid #ffffff75}
.rail-label{font-size:8px;opacity:.7}
.bottom-shade{min-height:112px;padding:28px 12px 12px;background:linear-gradient(transparent,#090b14 62%)}
.game-meta{max-width:calc(100% - 164px);text-shadow:0 2px 8px #000}
.game-meta h1{font-size:20px;margin:3px 0}
.game-meta #counter{color:#ff8ea7}
.game-meta #creatorLabel{font-size:12px;font-weight:800;color:#fff;opacity:1;margin:3px 0}
.game-meta #description{font-size:11px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.actions{gap:3px;align-items:flex-end}
.actions button{width:39px;height:47px;background:#080b1588;border:1px solid #ffffff30;border-radius:11px;font-size:22px}
.actions button.active{color:#ff668a}
.hint{height:19px;flex:none;background:#090b14;font-size:10px;padding:2px;color:#b7c4d6}
.bottom-nav{height:62px;flex:none;display:flex;align-items:stretch;justify-content:space-around;background:#090b14;border-top:1px solid #ffffff1c;padding-bottom:env(safe-area-inset-bottom);z-index:4}
.bottom-nav button{flex:1;min-width:0;border:0;background:none;color:#9ca9ba;font-size:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px}
.bottom-nav button span{font-size:23px;line-height:1}
.bottom-nav button.active{color:white}
.bottom-nav .create-button span{width:39px;height:29px;border-radius:8px;background:linear-gradient(100deg,#3edbd3 0 18%,#fff 18% 82%,#ff5f83 82%);color:#101522;font-size:27px;line-height:27px;font-weight:700}
.field-label select{display:block;width:100%;margin-top:5px;border:1px solid #4b5b72;border-radius:8px;padding:9px;background:#0e1728;color:white;font:inherit}
#searchResults{margin-top:14px}
.draft-preview{place-items:center;background:#080d17}
.draft-preview[data-aspect="square"] iframe{width:min(100%,278px);height:auto;aspect-ratio:1}
.draft-preview[data-aspect="landscape"] iframe{width:100%;height:auto;aspect-ratio:16/9}
@media(max-width:380px){.actions button{width:35px}.game-meta{max-width:calc(100% - 148px)}.brand{font-size:17px}}

.start-overlay{position:absolute;inset:0;background:#090a0d;color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:14px;z-index:3}.start-overlay[hidden]{display:none}.start-overlay img{width:100%;max-height:55%;object-fit:contain}.start-overlay button{padding:16px 26px;border-radius:24px;background:#fff;color:#111;font-weight:700}.submission-item label{display:block;margin-top:10px}.submission-item select{max-width:100%}

.draft-preview{position:relative}.draft-preview>button{position:absolute;left:10%;right:10%;bottom:16px;z-index:4;padding:14px;border:0;border-radius:24px;background:white;color:#111;font:inherit;font-weight:bold}

.comments-panel{padding:16px;border:1px solid #d1d5db;border-radius:12px;background:#fff;color:#172033;margin-top:16px}.comments-panel article{padding:14px 0;border-bottom:1px solid #ddd;overflow-wrap:anywhere}.comments-panel time{display:block;font-size:11px;color:#526071}.comments-panel textarea{display:block;width:100%;padding:10px;box-sizing:border-box;border:1px solid #aaa;border-radius:8px;font:inherit}.comments-panel button,.comments-panel select{padding:9px;margin:5px 5px 0 0;font:inherit;border:1px solid #aaa;border-radius:8px;background:#f4f4f5;color:#172033}.comments-panel button:disabled{opacity:.55}.comments-panel p{white-space:pre-wrap;overflow-wrap:anywhere}.comments-panel a{color:#154bb0}.comments-panel summary{cursor:pointer;font-size:12px}
.field-label input[type=checkbox]{display:inline;width:auto;margin-right:8px}
