/* Fixed one-screen app: no page scroll; content is centred and only as big as needed. */
html, body { height: 100%; overflow: hidden; }
.app { height: 100vh; height: 100dvh; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 8px 10px; }
.top, main, .dock { width: 100%; max-width: 560px; }
.top { flex: none; display: flex; align-items: center; justify-content: space-between; height: 44px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; }
.brand span { font-size: 1.3rem; }
.brand img { display: block; width: 28px; height: 28px; }
.nav { display: flex; align-items: center; gap: 6px; }

main { flex: none; display: flex; flex-direction: column; gap: 8px; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; }
.grid { display: grid; gap: 6px; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 68px; }
.card { position: relative; min-width: 0; min-height: 0; }
@media (min-width: 480px) { .grid { grid-template-columns: repeat(5, 1fr); } }
@media (min-height: 760px) { .grid { grid-auto-rows: 74px; gap: 8px; } }

.dock { flex: none; display: flex; align-items: center; gap: 10px; margin-top: 8px; padding: 6px 10px; border-radius: 18px; background: var(--card); border: 1px solid var(--line); }
.dock .mid { flex: 1; min-width: 0; }
.status { display: block; font-size: .95rem; line-height: 1.35; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sleep { display: flex; flex-direction: column; align-items: flex-end; font-size: .8rem; line-height: 1.1; color: var(--mute); }

.back { position: fixed; inset: 0; z-index: 20; background: rgba(0, 0, 0, .45); opacity: 0; transition: opacity .2s; }
.back.in { opacity: 1; }
.sheet { position: fixed; z-index: 21; left: 0; right: 0; bottom: 0; height: min(560px, 86dvh); display: flex; flex-direction: column; border-radius: 22px 22px 0 0; background: var(--bg); border: 1px solid var(--line); transform: translateY(100%); transition: transform .22s ease-out; }
.sheet.in { transform: none; }
.sheet[hidden], .back[hidden] { display: none; }
.grab { flex: none; display: flex; justify-content: flex-end; padding: 6px 8px 0; }
.sheet .body { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding: 0 18px 18px; overscroll-behavior: contain; }
@media (min-width: 700px) {
  .sheet { left: 50%; right: auto; bottom: auto; top: 50%; width: 560px; border-radius: 22px; transform: translate(-50%, -46%); opacity: 0; transition: transform .2s, opacity .2s; }
  .sheet.in { transform: translate(-50%, -50%); opacity: 1; }
}
.lbl { margin: 0 0 10px; font-size: 1.2rem; letter-spacing: 1.2px; text-transform: uppercase; color: var(--mute); }
.lbl + .lbl, .refs + .lbl { margin-top: 18px; }
.note { color: var(--mute); }
.foot { margin-top: 18px; text-align: center; color: var(--mute); }
.foot a { text-decoration: none; }
@media (min-width: 640px) and (max-height: 620px) { .top, main, .dock { max-width: 820px; } .grid { grid-template-columns: repeat(9, 1fr); } }
@media (max-height: 600px) { .grid { grid-auto-rows: 60px; gap: 5px; } .orb svg { width: 20px; height: 20px; } .tog { padding-bottom: 17px; } .nm { font-size: .95rem; } .top { height: 38px; } }
