*{margin:0;padding:0;box-sizing:border-box;-webkit-tap-highlight-color:transparent}html,body{height:100%;overflow:hidden;touch-action:manipulation}body{background:#1a1a2e;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,sans-serif}#app{height:100%;display:flex;flex-direction:column;padding:env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left)}#game{flex:1;width:100%;touch-action:none}#controls{display:flex;gap:1rem;padding:1rem;justify-content:center}#controls button{padding:.75rem 2rem;font-size:1rem;font-weight:600;border:none;border-radius:8px;background:#4a4a6a;color:#fff;cursor:pointer;transition:background .15s}#controls button:active{background:#6a6a8a}#counter{position:absolute;top:env(safe-area-inset-top,1rem);right:1rem;padding:.5rem 1rem;background:#00000080;color:#fff;border-radius:4px;font-size:.875rem}#counter:empty{display:none}#setup{min-height:100%;padding:2rem 1rem;padding-top:calc(env(safe-area-inset-top) + 2rem);display:flex;flex-direction:column;align-items:center;gap:1.5rem;overflow-y:auto}#setup h1{color:#fff;font-size:2.5rem;margin-bottom:1rem}.setup-section{width:100%;max-width:400px;display:flex;flex-direction:column;gap:.5rem}.setup-section>label{color:#aaa;font-size:.875rem;text-transform:uppercase;letter-spacing:.05em}#file-input{display:none}.file-label{display:block;padding:1rem;background:#2a2a4a;border:2px dashed #4a4a6a;border-radius:8px;color:#fff;text-align:center;cursor:pointer;transition:border-color .15s,background .15s}.file-label:active{background:#3a3a5a;border-color:#6a6a8a}#file-count,#url-list{color:#8a8aaa;font-size:.875rem}#url-list{display:flex;flex-direction:column;gap:.25rem}.url-item{display:flex;justify-content:space-between;align-items:center;padding:.5rem;background:#2a2a4a;border-radius:4px;font-size:.75rem;word-break:break-all}.url-item button{margin-left:.5rem;padding:.25rem .5rem;background:#e63946;border:none;border-radius:4px;color:#fff;font-size:.75rem;cursor:pointer;flex-shrink:0}.url-input-row{display:flex;gap:.5rem}.url-input-row input{flex:1;padding:.75rem;background:#2a2a4a;border:1px solid #4a4a6a;border-radius:8px;color:#fff;font-size:1rem}.url-input-row input::placeholder{color:#6a6a8a}.url-input-row button{padding:.75rem 1rem;background:#4a4a6a;border:none;border-radius:8px;color:#fff;font-weight:600;cursor:pointer}.tile-size-options{display:flex;gap:.5rem}.tile-size{flex:1;padding:.75rem;background:#2a2a4a;border:2px solid #4a4a6a;border-radius:8px;color:#fff;font-size:1rem;cursor:pointer;transition:border-color .15s,background .15s}.tile-size.active{background:#4a4a6a;border-color:#8a8aaa}#btn-start{width:100%;max-width:400px;padding:1rem;margin-top:1rem;background:#2a9d8f;border:none;border-radius:8px;color:#fff;font-size:1.25rem;font-weight:600;cursor:pointer;transition:background .15s,opacity .15s}#btn-start:disabled{background:#4a4a6a;opacity:.5;cursor:not-allowed}#btn-start:not(:disabled):active{background:#238b7e}#btn-install{width:100%;max-width:400px;padding:.75rem;margin-top:2rem;background:#4a4a6a;border:none;border-radius:8px;color:#fff;font-size:1rem;font-weight:600;cursor:pointer}#btn-install:active{background:#5a5a7a}#ios-install{width:100%;max-width:400px;padding:1rem;margin-top:2rem;background:#2a2a4a;border-radius:8px;color:#ccc;font-size:.9rem;text-align:center}.ios-share-icon{display:inline-block;width:1.2em;height:1.2em;vertical-align:middle;margin:0 .2em;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2399ccff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8'/%3E%3Cpolyline points='16 6 12 2 8 6'/%3E%3Cline x1='12' y1='2' x2='12' y2='15'/%3E%3C/svg%3E");background-size:contain;background-repeat:no-repeat}#btn-refresh{width:100%;max-width:400px;padding:.75rem;margin-top:.5rem;background:transparent;border:1px solid #4a4a6a;border-radius:8px;color:#8a8aaa;font-size:.875rem;cursor:pointer}#btn-refresh:active{background:#2a2a4a}.hidden{display:none!important}
