mobile: rules + game pages responsive at 640px and 480px

This commit is contained in:
2026-08-08 21:01:46 +02:00
parent 0ec748f67f
commit 2bd9aed4ef
2 changed files with 112 additions and 1 deletions
+70 -1
View File
@@ -738,6 +738,75 @@
.entry { grid-template-columns: 1fr; }
.entry-actions { justify-content: flex-start; }
}
/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 640px) {
/* Nav: keep two groups, wrap if needed, larger tap areas */
nav .shell { flex-wrap: wrap; gap: 0; }
nav .nav-left { gap: .9rem; flex: 1 1 auto; min-width: 0; overflow-x: auto; }
nav .nav-left a { padding: .8rem 0; font-size: .65rem; }
.nav-right { gap: .4rem; flex-shrink: 0; }
.edit-toggle { padding: .5rem .8rem; font-size: .6rem; }
/* Timeline: horizontal scroll instead of hidden overflow */
.timeline-section { overflow: hidden; }
.tl-wrap {
overflow-x: auto;
overflow-y: visible;
-webkit-overflow-scrolling: touch;
overscroll-behavior-x: contain;
}
/* Chronicle: tighter vertical rhythm */
.chronicle-section { margin-bottom: 3rem; }
.chronicle-header-row { padding-bottom: 1.5rem; }
.chronicle-title { font-size: clamp(1.8rem, 8vw, 3.2rem); }
.entry { padding: 1.4rem 0; gap: 0 1rem; }
.entry-title { font-size: clamp(1.2rem, 5vw, 1.9rem); }
/* Entry side images: break earlier (was 700px, now caught here too) */
.entry-body.env-left,
.entry-body.env-right { display: block; }
.entry-body.env-left .entry-env,
.entry-body.env-right .entry-env {
position: relative; top: auto; margin-top: 1rem;
}
/* Modal: less padding, date fields stack */
.modal { padding: 1.2rem 1rem 1.6rem; }
.date-row { grid-template-columns: 1fr; }
/* Minimum touch target height on all buttons */
.btn { min-height: 42px; }
.btn.sm { min-height: 36px; padding: .45rem .8rem; }
/* Game header actions stack naturally */
.game-header-top { align-items: flex-start; }
/* Section label + button row */
.section-header { flex-wrap: wrap; }
/* Truth items full width */
.truth-list { gap: .35rem; }
}
@media (max-width: 480px) {
/* Modal rises from bottom, full width */
.modal-overlay { padding: 0; align-items: flex-end; }
.modal {
width: 100%;
max-height: 88vh;
padding: 1rem 1rem 2rem;
}
/* Smaller eyebrow text */
.chronicle-eyebrow { font-size: .6rem; }
.entry-eyebrow { font-size: .62rem; }
/* Game header meta tighter */
.game-meta-row { gap: .5rem; flex-wrap: wrap; }
}
[x-cloak] { display: none !important; }
/* ── Animation ──────────────────────────────────────────────────── */
@@ -820,7 +889,7 @@
<a href="games.html">Sessions</a>
<a x-show="game" x-text="game && game.title" style="color:var(--paper);pointer-events:none;"></a>
</div>
<div style="display:flex;align-items:center;gap:.6rem">
<div class="nav-right" style="display:flex;align-items:center;gap:.6rem">
<select x-show="game && (cards.length || customDecks.length)"
x-model="activeDeckId"
style="background:transparent;border:1px solid var(--line);color:var(--muted);