:root{color-scheme:dark;--bg: #15181c;--panel: #242a31;--line: #3c444d;--text: #e9ecef;--accent: #4b9fd5}*{box-sizing:border-box}html,body{margin:0;padding:0;height:100%;background:var(--bg);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Hiragino Sans,Noto Sans JP,sans-serif;overscroll-behavior:none}#app{position:relative;display:flex;flex-direction:column;height:100dvh}button{font-family:inherit;color:inherit;-webkit-tap-highlight-color:transparent}.start{display:flex;flex-direction:column;justify-content:flex-start;gap:1rem;height:100%;padding:2rem 1.5rem 1.5rem;overflow-y:auto;max-width:32rem;margin:0 auto}.start h1{margin:0;font-size:1.3rem}.start .drop{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;padding:2rem 1rem;border:2px dashed var(--line);border-radius:.8rem;text-align:center;cursor:pointer}.start .drop b{font-size:1.05rem}.start .drop small{opacity:.65}input[type=file].hidden-file{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.start .go{padding:.9rem;border:none;border-radius:.6rem;background:var(--accent);color:#0b1116;font-size:1.05rem;font-weight:700}.start .go:disabled{opacity:.35}.start .sub{background:none;border:none;padding:0;color:var(--accent);text-decoration:underline;font-size:.9rem;text-align:left}.warn{padding:.7rem .9rem;border-radius:.6rem;background:#4a3b16;border:1px solid #7a6225;font-size:.85rem;line-height:1.5}.note{font-size:.8rem;opacity:.7;line-height:1.5}.bar{position:absolute;top:0;left:0;right:0;z-index:5;display:flex;align-items:center;gap:.7rem;padding:.3rem .6rem;background:linear-gradient(to bottom,#0a0c0f4d,#0a0c0f00);pointer-events:none}.bar button,.bar .title{pointer-events:auto}.bar button{padding:.25rem .8rem;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);border:1px solid rgba(140,150,162,.45);border-radius:.4rem;background:#242a3159;font-size:.8rem;font-weight:700;letter-spacing:.06em}.bar .title{font-size:.72rem;opacity:.55;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.toast{padding:.45rem .7rem;background:var(--panel);border-top:1px solid var(--line);border-bottom:1px solid var(--line);font-size:.78rem;flex:0 0 auto}.screens{display:flex;flex-direction:column;align-items:center;justify-content:center;flex:1 1 auto;min-height:0;overflow:hidden;background:#000}.screens canvas{image-rendering:pixelated;display:block;aspect-ratio:256 / 192;width:100%;height:auto;max-height:50%;object-fit:contain;touch-action:none;user-select:none;-webkit-user-select:none}@media (pointer: fine){.screens{flex:1 1 auto;max-height:none;min-height:0}.screens canvas{width:auto;height:50%;max-width:100%;max-height:none}}.pad{display:none}@media (pointer: coarse){.pad{display:grid;grid-template-columns:1fr 1fr;grid-template-rows:auto 1fr;align-content:end;gap:.35rem;padding:.3rem .5rem max(.4rem,env(safe-area-inset-bottom));flex:0 0 auto;touch-action:none;user-select:none;-webkit-user-select:none}}.pad .minor{grid-column:1 / -1;display:flex;align-items:center;gap:.3rem}.pad .minor .gap{flex:1 1 auto}.pad .minor button{width:3rem;height:1.4rem;font-size:.65rem;border-radius:.35rem}.pad .dpad,.pad .face{display:grid;grid-template-areas:". up ." "left . right" ". down .";gap:.15rem;align-self:end}.pad .dpad{grid-column:1;justify-self:center}.pad .face{grid-column:2;justify-self:center}.pad .dpad button,.pad .face button{width:min(12.5vw,3rem);height:min(12.5vw,3rem);font-size:1.1rem}.pad button{border:none;background:#49515b;font-weight:700}.pad .dpad button{border-radius:.3rem}.pad .face button{border-radius:50%}.pad button:active{background:#6b747f}.sheet{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:flex-end;z-index:10}.sheet .body{width:100%;max-height:85dvh;overflow-y:auto;padding:1rem 1rem max(1rem,env(safe-area-inset-bottom));background:var(--bg);border-top:1px solid var(--line);border-radius:1rem 1rem 0 0}@media (pointer: fine){.sheet{align-items:center;justify-content:center}.sheet .body{max-width:30rem;border-radius:1rem;border:1px solid var(--line)}}.sheet h2{margin:1.2rem 0 .5rem;font-size:.8rem;letter-spacing:.08em;opacity:.55}.sheet h2:first-child{margin-top:0}.row{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}.sheet .act{flex:1 1 auto;min-width:7rem;padding:.7rem .9rem;border:1px solid var(--line);border-radius:.5rem;background:var(--panel);font-size:.9rem}.sheet .act.primary{background:var(--accent);color:#0b1116;border-color:transparent;font-weight:700}.sheet .act.danger{border-color:#7a3030}.sheet .act:disabled{opacity:.4}.sheet .close{width:100%;margin-top:1.2rem;padding:.8rem;border:none;border-radius:.5rem;background:var(--panel);font-size:.95rem}.friend{display:flex;align-items:center;gap:.5rem;padding:.45rem 0;border-bottom:1px solid var(--line)}.field{flex:1 1 7rem;min-width:0;padding:.6rem .7rem;border:1px solid var(--line);border-radius:.5rem;background:var(--panel);color:inherit;font-size:.95rem}.friend .who{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.friend .who small{opacity:.45;font-size:.7rem;margin-left:.4rem}.friend code{flex:1 1 auto;font-size:1rem;letter-spacing:.05em}.friend button{padding:.4rem .8rem;border:1px solid var(--line);border-radius:.4rem;background:var(--panel);font-size:.8rem}.friend button.go{background:var(--accent);color:#0b1116;border-color:transparent}.stat{display:flex;justify-content:space-between;font-size:.82rem;padding:.25rem 0;border-bottom:1px solid var(--line)}.err{margin-top:.6rem;padding:.6rem .8rem;border-radius:.5rem;background:#4a1f1f;border:1px solid #7a3030;font-size:.85rem}
