lightweight, client-only calendar web application. All data persists in the URL hash for instant sharing, No backend required. Optional AES-GCM password protection keeps shared links locked without a server
JavaScript
feat: Implement mobile drawer and quick-action bar, adapting existing UI elements and adding related documentation and assets.
Supun Lakmal9e5f855de331
diff --git a/index.html b/index.htmlindex 7e2ed92..b187d9c 100644--- a/index.html+++ b/index.html@@ -137,6 +137,27 @@</div></header>+ <div id="mobile-quick-actions" class="mobile-quick-actions mobile-only">+ <button id="mobile-add-event" type="button" class="quick-action-btn" aria-label="Add event">+ <i class="fa-solid fa-plus"></i>+ </button>+ <button id="mobile-copy-link" type="button" class="quick-action-btn" aria-label="Copy link">+ <i class="fa-solid fa-copy"></i>+ </button>+ <button id="mobile-share-qr" type="button" class="quick-action-btn" aria-label="Share QR">+ <i class="fa-solid fa-share-nodes"></i>+ </button>+ <button id="mobile-lock-btn" type="button" class="quick-action-btn" aria-label="Lock">+ <i class="fa-solid fa-lock"></i>+ </button>+ <button id="mobile-unlock-btn" type="button" class="quick-action-btn hidden" aria-label="Unlock">+ <i class="fa-solid fa-lock-open"></i>+ </button>+ <button id="mobile-focus-btn" type="button" class="quick-action-btn" aria-label="Focus">+ <i class="fa-solid fa-bolt"></i>+ </button>+ </div>+<div id="countdown-widget" class="countdown-container hidden" aria-live="polite"><div class="countdown-label" data-i18n="countdown.upNext">Up Next</div><div class="countdown-content">@@ -446,6 +467,97 @@</div></div>+ <div id="mobile-drawer-backdrop" class="mobile-drawer-backdrop mobile-only"></div>+ <aside id="mobile-drawer" class="mobile-drawer mobile-only">+ <div class="mobile-drawer-header">+ <span class="mobile-drawer-title">Menu</span>+ <button id="mobile-drawer-close" type="button" class="icon-btn" aria-label="Close menu">+ <i class="fa-solid fa-xmark"></i>+ </button>+ </div>+ <div class="mobile-drawer-body">+ <div class="mobile-drawer-section">+ <span class="mobile-drawer-label">Views</span>+ <div class="mobile-drawer-view-toggle" role="tablist">+ <button data-view="day" role="tab">Day</button>+ <button data-view="week" role="tab">Week</button>+ <button data-view="month" role="tab" aria-selected="true" class="active">Month</button>+ <button data-view="year" role="tab">Year</button>+ <button data-view="agenda" role="tab">Agenda</button>+ </div>+ </div>++ <div class="mobile-drawer-section">+ <span class="mobile-drawer-label" data-i18n="label.details">Details</span>+ <div class="side-card">+ <h3 id="mobile-selected-date-label" class="side-title" data-i18n="panel.selectedDay">Selected day</h3>+ <div id="mobile-event-list" class="event-list"></div>+ <button id="mobile-add-event-inline" type="button" class="ghost" data-i18n="btn.addEventForDay">Add event for+ this day</button>+ </div>+ </div>++ <div class="mobile-drawer-section">+ <span class="mobile-drawer-label" data-i18n="tz.worldClock">World Clock</span>+ <div class="tz-header">+ <div>+ <p class="tz-subtitle" data-i18n="tz.subtitle">Local time plus saved zones</p>+ </div>+ <button id="mobile-add-tz-btn" type="button" class="icon-btn tz-add" aria-label="Add timezone"+ data-i18n-aria-label="btn.addTimezone">+</button>+ </div>+ <div id="mobile-tz-list" class="tz-list" aria-live="polite"></div>+ </div>++ <div class="mobile-drawer-section">+ <span class="mobile-drawer-label">Actions</span>+ <button id="mobile-world-planner-btn" type="button" class="mobile-drawer-item">+ <i class="fa-solid fa-earth-americas"></i> <span>Planner</span>+ </button>+ <a href="https://github.com/supunlakmal/hash-calendar" class="mobile-drawer-item action-link" target="_blank" rel="noopener">+ <i class="fa-brands fa-github"></i> <span>GitHub</span>+ </a>+ </div>++ <div class="mobile-drawer-section">+ <span class="mobile-drawer-label" data-i18n="panel.shareExport">Share and export</span>+ <div class="side-card">+ <div class="status-row">+ <span data-i18n="panel.urlLength">URL length</span>+ <strong id="mobile-url-length">0</strong>+ </div>+ <p id="mobile-url-warning" class="url-warning"></p>+ <div class="stacked-actions">+ <button id="mobile-view-json" type="button" class="ghost" data-i18n="btn.viewJson">View JSON</button>+ <button id="mobile-export-json" type="button" class="ghost" data-i18n="btn.exportJson">Export JSON</button>+ <button id="mobile-import-ics" type="button" class="ghost" data-i18n="btn.importIcs">Import .ics</button>+ </div>+ </div>+ </div>++ <div class="mobile-drawer-section">+ <span class="mobile-drawer-label" data-i18n="panel.dangerZone">Danger zone</span>+ <div class="side-card danger">+ <button id="mobile-clear-all" type="button" class="danger-btn" data-i18n="btn.clearCalendar">Clear+ calendar</button>+ </div>+ </div>++ <div class="mobile-drawer-section">+ <span class="mobile-drawer-label">Settings</span>+ <button id="mobile-weekstart-toggle" type="button" class="mobile-drawer-item">+ <i class="fa-solid fa-calendar-week"></i> <span>Week starts Sunday</span>+ </button>+ <button id="mobile-theme-toggle" type="button" class="mobile-drawer-item">+ <i class="fa-solid fa-circle-half-stroke"></i> <span>Theme: Light</span>+ </button>+ <button id="mobile-language-btn" type="button" class="mobile-drawer-item">+ <i class="fa-solid fa-language"></i> <span>English</span>+ </button>+ </div>+ </div>+ </aside>+<div id="toast-container" class="toast-container" aria-live="polite" aria-atomic="true"></div><script src="https://cdnjs.cloudflare.com/ajax/libs/qrcodejs/1.0.0/qrcode.min.js"></script>@@ -453,4 +565,4 @@<script type="module" src="script.js"></script></body>-</html>\ No newline at end of file+</html>diff --git a/script.js b/script.jsindex 738261c..ace4940 100644--- a/script.js+++ b/script.js@@ -314,6 +314,36 @@ function cacheElements() {ui.sidePanelClose = document.getElementById("side-panel-close");ui.tzSidebarClose = document.getElementById("tz-sidebar-close");+ // Mobile drawer & quick-action bar+ ui.mobileDrawer = document.getElementById("mobile-drawer");+ ui.mobileDrawerBackdrop = document.getElementById("mobile-drawer-backdrop");+ ui.mobileDrawerClose = document.getElementById("mobile-drawer-close");+ ui.mobileQuickActions = document.getElementById("mobile-quick-actions");+ ui.mobileAddEvent = document.getElementById("mobile-add-event");+ ui.mobileCopyLink = document.getElementById("mobile-copy-link");+ ui.mobileShareQr = document.getElementById("mobile-share-qr");+ ui.mobileLockBtn = document.getElementById("mobile-lock-btn");+ ui.mobileUnlockBtn = document.getElementById("mobile-unlock-btn");+ ui.mobileFocusBtn = document.getElementById("mobile-focus-btn");+ ui.mobileWorldPlannerBtn = document.getElementById("mobile-world-planner-btn");+ ui.mobileEventList = document.getElementById("mobile-event-list");+ ui.mobileSelectedDateLabel = document.getElementById("mobile-selected-date-label");+ ui.mobileAddEventInline = document.getElementById("mobile-add-event-inline");+ ui.mobileUrlLength = document.getElementById("mobile-url-length");+ ui.mobileUrlWarning = document.getElementById("mobile-url-warning");+ ui.mobileViewJson = document.getElementById("mobile-view-json");+ ui.mobileExportJson = document.getElementById("mobile-export-json");+ ui.mobileImportIcs = document.getElementById("mobile-import-ics");+ ui.mobileClearAll = document.getElementById("mobile-clear-all");+ ui.mobileTzList = document.getElementById("mobile-tz-list");+ ui.mobileAddTzBtn = document.getElementById("mobile-add-tz-btn");+ ui.mobileDrawerViewButtons = Array.from(+ document.querySelectorAll(".mobile-drawer-view-toggle [data-view]")+ );+ ui.mobileWeekstartToggle = document.getElementById("mobile-weekstart-toggle");+ ui.mobileThemeToggle = document.getElementById("mobile-theme-toggle");+ ui.mobileLanguageBtn = document.getElementById("mobile-language-btn");+// World Plannerui.worldPlannerBtn = document.getElementById("world-planner-btn");ui.worldPlannerModal = document.getElementById("world-planner-modal");@@ -361,32 +391,40 @@ function createTzCard(zoneId, isLocal) {return div;}-function renderTimezones() {- if (!ui.tzList) return;- ui.tzList.innerHTML = "";-- const localZone = getLocalZone();- ui.tzList.appendChild(createTzCard(localZone, true));-- const zones = Array.isArray(state.timezones) ? state.timezones : [];- let added = 0;- const seen = new Set();- zones.forEach((zone) => {- if (zone === localZone) return;- if (seen.has(zone)) return;- if (!isValidZone(zone)) return;- seen.add(zone);- ui.tzList.appendChild(createTzCard(zone, false));- added += 1;- });-- if (!added) {- const empty = document.createElement("p");- empty.className = "tz-empty";- empty.textContent = t("tz.addToCompare");- ui.tzList.appendChild(empty);- }-}+function renderTimezones() {+ const targets = [ui.tzList, ui.mobileTzList].filter(Boolean);+ if (!targets.length) return;++ const localZone = getLocalZone();+ const zones = Array.isArray(state.timezones) ? state.timezones : [];+ const savedZones = [];+ const seen = new Set();++ zones.forEach((zone) => {+ if (zone === localZone) return;+ if (seen.has(zone)) return;+ if (!isValidZone(zone)) return;+ seen.add(zone);+ savedZones.push(zone);+ });++ targets.forEach((target) => {+ target.innerHTML = "";+ target.appendChild(createTzCard(localZone, true));++ if (!savedZones.length) {+ const empty = document.createElement("p");+ empty.className = "tz-empty";+ empty.textContent = t("tz.addToCompare");+ target.appendChild(empty);+ return;+ }++ savedZones.forEach((zone) => {+ target.appendChild(createTzCard(zone, false));+ });+ });+}function addTimezone(zoneStr) {if (!zoneStr || !isValidZone(zoneStr)) return;@@ -614,32 +652,43 @@ function scheduleSave() {}, DEBOUNCE_MS);}-function updateUrlLength() {- const length = window.location.hash.length;- if (ui.urlLength) ui.urlLength.textContent = String(length);- if (!ui.urlWarning) return;- if (length > 2000) {- ui.urlWarning.textContent = t("panel.urlWarning");- } else {- ui.urlWarning.textContent = "";- }-}+function updateUrlLength() {+ const length = window.location.hash.length;+ if (ui.urlLength) ui.urlLength.textContent = String(length);+ if (ui.mobileUrlLength) ui.mobileUrlLength.textContent = String(length);+ const warning = length > 2000 ? t("panel.urlWarning") : "";+ if (ui.urlWarning) ui.urlWarning.textContent = warning;+ if (ui.mobileUrlWarning) ui.mobileUrlWarning.textContent = warning;+}function updateTheme() {document.body.dataset.theme = state.s.d ? "dark" : "light";+ const label = t(state.s.d ? "settings.themeDark" : "settings.themeLight");if (ui.themeToggle) {- ui.themeToggle.textContent = t(state.s.d ? "settings.themeDark" : "settings.themeLight");+ ui.themeToggle.textContent = label;+ }+ if (ui.mobileThemeToggle) {+ const span = ui.mobileThemeToggle.querySelector("span");+ if (span) span.textContent = label;}}function syncTopbarHeight() {if (!ui.topbar) return;- document.documentElement.style.setProperty("--topbar-height", `${ui.topbar.offsetHeight}px`);+ const topbarH = ui.topbar.offsetHeight;+ document.documentElement.style.setProperty("--topbar-height", `${topbarH}px`);+ const quickBar = ui.mobileQuickActions;+ const quickH = quickBar && window.getComputedStyle(quickBar).display !== "none" ? quickBar.offsetHeight : 0;+ document.documentElement.style.setProperty("--topbar-plus-quick", `${topbarH + quickH}px`);}function updateWeekStartLabel() {- if (!ui.weekstartToggle) return;- ui.weekstartToggle.textContent = t(state.s.m ? "settings.weekStartsMonday" : "settings.weekStartsSunday");+ const label = t(state.s.m ? "settings.weekStartsMonday" : "settings.weekStartsSunday");+ if (ui.weekstartToggle) ui.weekstartToggle.textContent = label;+ if (ui.mobileWeekstartToggle) {+ const span = ui.mobileWeekstartToggle.querySelector("span");+ if (span) span.textContent = label;+ }}function updateFocusButton(isActive) {@@ -656,6 +705,13 @@ function updateViewButtons() {button.classList.toggle("active", isActive);button.setAttribute("aria-selected", isActive ? "true" : "false");});+ if (ui.mobileDrawerViewButtons && ui.mobileDrawerViewButtons.length) {+ ui.mobileDrawerViewButtons.forEach((button) => {+ const isActive = button.dataset.view === currentView;+ button.classList.toggle("active", isActive);+ button.setAttribute("aria-selected", isActive ? "true" : "false");+ });+ }}function setView(view) {@@ -700,11 +756,29 @@ function updateLockUI() {ui.lockBtn.textContent = t("btn.lock");}}- if (ui.lockedOverlay) {- ui.lockedOverlay.classList.toggle("hidden", !isLocked);+ if (ui.lockedOverlay) {+ ui.lockedOverlay.classList.toggle("hidden", !isLocked);+ }+ const disabled = isLocked;+ [ui.addEventBtn, ui.addEventInline, ui.mobileAddEventInline, ui.copyLinkBtn, ui.shareQrBtn].forEach((btn) => {+ if (btn) btn.disabled = disabled;+ });++ // Mobile lock/unlock button visibility+ if (ui.mobileLockBtn && ui.mobileUnlockBtn) {+ if (lockState.encrypted && lockState.unlocked) {+ // Show unlock (remove-lock) button, hide lock+ ui.mobileLockBtn.classList.add("hidden");+ ui.mobileUnlockBtn.classList.remove("hidden");+ } else {+ // Show lock button, hide unlock+ ui.mobileLockBtn.classList.remove("hidden");+ ui.mobileUnlockBtn.classList.add("hidden");+ }}- const disabled = isLocked;- [ui.addEventBtn, ui.addEventInline, ui.copyLinkBtn, ui.shareQrBtn].forEach((btn) => {++ // Disable mobile quick-action buttons when locked+ [ui.mobileAddEvent, ui.mobileCopyLink, ui.mobileShareQr].forEach((btn) => {if (btn) btn.disabled = disabled;});}@@ -769,6 +843,11 @@ function updateLanguageUI() {const langCode = getCurrentLanguage();ui.currentLang.textContent = t(`lang.${langCode}`);+ if (ui.mobileLanguageBtn) {+ const span = ui.mobileLanguageBtn.querySelector("span");+ if (span) span.textContent = t(`lang.${langCode}`);+ }+ui.langList.querySelectorAll(".dropdown-item").forEach((item) => {item.classList.toggle("active", item.dataset.lang === langCode);});@@ -930,25 +1009,19 @@ function render() {initCountdownWidget(state.e);}-function renderEventList() {- if (!ui.eventList || !ui.selectedDateLabel) return;- ui.selectedDateLabel.textContent = formatDateLabel(selectedDate);- const key = formatDateKey(selectedDate);- const list = occurrencesByDay.get(key) || [];-- ui.eventList.innerHTML = "";- if (!list.length) {- const empty = document.createElement("div");- empty.className = "event-item";- empty.textContent = t("calendar.noEvents");- ui.eventList.appendChild(empty);- return;- }-- list.forEach((event) => {- const item = document.createElement("div");- item.className = "event-item";- item.dataset.index = String(event.sourceIndex);+function renderEventList() {+ const key = formatDateKey(selectedDate);+ const list = occurrencesByDay.get(key) || [];+ const label = formatDateLabel(selectedDate);+ const targets = [+ [ui.selectedDateLabel, ui.eventList],+ [ui.mobileSelectedDateLabel, ui.mobileEventList],+ ];++ const createEventItem = (event) => {+ const item = document.createElement("div");+ item.className = "event-item";+ item.dataset.index = String(event.sourceIndex);const left = document.createElement("div");left.className = "event-info";@@ -964,13 +1037,31 @@ function renderEventList() {const dot = document.createElement("div");dot.className = "event-dot";dot.style.background = event.color;-- item.appendChild(left);- item.appendChild(dot);- item.addEventListener("click", () => openEventModal({ index: event.sourceIndex }));- ui.eventList.appendChild(item);- });-}++ item.appendChild(left);+ item.appendChild(dot);+ item.addEventListener("click", () => openEventModal({ index: event.sourceIndex }));+ return item;+ };++ targets.forEach(([labelEl, listEl]) => {+ if (!labelEl || !listEl) return;+ labelEl.textContent = label;+ listEl.innerHTML = "";++ if (!list.length) {+ const empty = document.createElement("div");+ empty.className = "event-item";+ empty.textContent = t("calendar.noEvents");+ listEl.appendChild(empty);+ return;+ }++ list.forEach((event) => {+ listEl.appendChild(createEventItem(event));+ });+ });+}function handleSelectDay(date) {selectedDate = startOfDay(date);@@ -1496,11 +1587,12 @@ function bindEvents() {if (ui.tzAddBtn) ui.tzAddBtn.addEventListener("click", openTzModal);if (ui.tzClose) ui.tzClose.addEventListener("click", closeTzModal);if (ui.tzSearch) ui.tzSearch.addEventListener("input", handleTzSearch);- if (ui.tzResults) ui.tzResults.addEventListener("click", handleTzResultsClick);- if (ui.tzList) ui.tzList.addEventListener("click", handleTzListClick);- if (ui.tzModal) {- ui.tzModal.addEventListener("click", (event) => {- if (event.target === ui.tzModal) closeTzModal();+ if (ui.tzResults) ui.tzResults.addEventListener("click", handleTzResultsClick);+ if (ui.tzList) ui.tzList.addEventListener("click", handleTzListClick);+ if (ui.mobileTzList) ui.mobileTzList.addEventListener("click", handleTzListClick);+ if (ui.tzModal) {+ ui.tzModal.addEventListener("click", (event) => {+ if (event.target === ui.tzModal) closeTzModal();});}@@ -1508,43 +1600,131 @@ function bindEvents() {window.addEventListener("resize", syncTopbarHeight);}+function openMobileDrawer() {+ if (ui.mobileDrawer) ui.mobileDrawer.classList.add("is-active");+ if (ui.mobileDrawerBackdrop) ui.mobileDrawerBackdrop.classList.add("is-active");+ document.body.style.overflow = "hidden";+ const icon = ui.hamburgerBtn && ui.hamburgerBtn.querySelector("i");+ if (icon) { icon.classList.remove("fa-bars"); icon.classList.add("fa-xmark"); }+}++function closeMobileDrawer() {+ if (ui.mobileDrawer) ui.mobileDrawer.classList.remove("is-active");+ if (ui.mobileDrawerBackdrop) ui.mobileDrawerBackdrop.classList.remove("is-active");+ document.body.style.overflow = "";+ const icon = ui.hamburgerBtn && ui.hamburgerBtn.querySelector("i");+ if (icon) { icon.classList.add("fa-bars"); icon.classList.remove("fa-xmark"); }+}+function initResponsiveFeatures() {- if (ui.hamburgerBtn && ui.secondaryActions) {+ // Hamburger opens/closes the drawer+ if (ui.hamburgerBtn) {ui.hamburgerBtn.addEventListener("click", (e) => {e.stopPropagation();- ui.secondaryActions.classList.toggle("is-active");- const icon = ui.hamburgerBtn.querySelector("i");- if (icon) {- icon.classList.toggle("fa-bars");- icon.classList.toggle("fa-xmark");+ if (ui.mobileDrawer && ui.mobileDrawer.classList.contains("is-active")) {+ closeMobileDrawer();+ } else {+ openMobileDrawer();}});+ }- document.addEventListener("click", (e) => {- if (!ui.secondaryActions.contains(e.target) && !ui.hamburgerBtn.contains(e.target)) {- ui.secondaryActions.classList.remove("is-active");- const icon = ui.hamburgerBtn.querySelector("i");- if (icon) {- icon.classList.add("fa-bars");- icon.classList.remove("fa-xmark");- }- }+ // Close button & backdrop close the drawer+ if (ui.mobileDrawerClose) ui.mobileDrawerClose.addEventListener("click", closeMobileDrawer);+ if (ui.mobileDrawerBackdrop) ui.mobileDrawerBackdrop.addEventListener("click", closeMobileDrawer);++ // Quick-action buttons delegate to existing handlers+ if (ui.mobileAddEvent) ui.mobileAddEvent.addEventListener("click", () => openEventModal({ date: selectedDate }));+ if (ui.mobileCopyLink) ui.mobileCopyLink.addEventListener("click", handleCopyLink);+ if (ui.mobileShareQr) ui.mobileShareQr.addEventListener("click", handleShareQr);+ if (ui.mobileLockBtn) ui.mobileLockBtn.addEventListener("click", handleLockAction);+ if (ui.mobileUnlockBtn) ui.mobileUnlockBtn.addEventListener("click", handleLockAction);+ if (ui.mobileFocusBtn) ui.mobileFocusBtn.addEventListener("click", handleFocusToggle);+ if (ui.mobileAddEventInline) {+ ui.mobileAddEventInline.addEventListener("click", () => {+ closeMobileDrawer();+ openEventModal({ date: selectedDate });+ });+ }+ if (ui.mobileViewJson) {+ ui.mobileViewJson.addEventListener("click", () => {+ closeMobileDrawer();+ openJsonModal();+ });+ }+ if (ui.mobileExportJson) {+ ui.mobileExportJson.addEventListener("click", () => {+ closeMobileDrawer();+ handleExportJson();+ });+ }+ if (ui.mobileImportIcs) {+ ui.mobileImportIcs.addEventListener("click", () => {+ closeMobileDrawer();+ handleImportIcsClick();+ });+ }+ if (ui.mobileClearAll) {+ ui.mobileClearAll.addEventListener("click", () => {+ closeMobileDrawer();+ handleClearAll();+ });+ }+ if (ui.mobileAddTzBtn) {+ ui.mobileAddTzBtn.addEventListener("click", () => {+ closeMobileDrawer();+ openTzModal();+ });+ }++ // Drawer view buttons+ if (ui.mobileDrawerViewButtons && ui.mobileDrawerViewButtons.length) {+ ui.mobileDrawerViewButtons.forEach((button) => {+ button.addEventListener("click", () => {+ setView(button.dataset.view);+ closeMobileDrawer();+ });+ });+ }++ // Drawer settings buttons+ if (ui.mobileWeekstartToggle) {+ ui.mobileWeekstartToggle.addEventListener("click", handleWeekStartToggle);+ }+ if (ui.mobileThemeToggle) {+ ui.mobileThemeToggle.addEventListener("click", handleThemeToggle);+ }+ if (ui.mobileLanguageBtn) {+ ui.mobileLanguageBtn.addEventListener("click", () => {+ const codes = SUPPORTED_LANGUAGES.map((lang) => lang.code);+ const currentIndex = codes.indexOf(getCurrentLanguage());+ const nextIndex = (currentIndex + 1) % codes.length;+ setLanguage(codes[nextIndex]);+ state.s.l = codes[nextIndex];+ scheduleSave();+ updateLanguageUI();+ });+ }++ // Drawer world planner button+ if (ui.mobileWorldPlannerBtn) {+ ui.mobileWorldPlannerBtn.addEventListener("click", () => {+ closeMobileDrawer();+ if (ui.worldPlannerBtn) ui.worldPlannerBtn.click();});}+ // Existing mobile sidebar toggle logic (unchanged)if (ui.mobileSidebarToggle) {ui.mobileSidebarToggle.addEventListener("click", () => {if (ui.sidePanel.classList.contains("is-active")) {- // From Events to Clockui.sidePanel.classList.remove("is-active");ui.tzSidebar.classList.add("is-active");ui.mobileSidebarToggle.querySelector("span").textContent = t("label.clock");} else if (ui.tzSidebar.classList.contains("is-active")) {- // From Clock to Calendar (Close both)ui.tzSidebar.classList.remove("is-active");ui.mobileSidebarToggle.querySelector("span").textContent = t("label.details");} else {- // From Calendar to Eventsui.sidePanel.classList.add("is-active");ui.mobileSidebarToggle.querySelector("span").textContent = t("label.events");}diff --git a/styles.css b/styles.cssindex d407ccc..fdfdd08 100644--- a/styles.css+++ b/styles.css@@ -1653,11 +1653,11 @@ button:disabled {@media (max-width: 720px) {.topbar {- height: auto;- padding: 12px 16px;- flex-direction: column;- align-items: flex-start;- gap: 12px;+ height: var(--topbar-height);+ padding: 0 12px;+ flex-direction: row;+ align-items: center;+ gap: 8px;}.countdown-container {@@ -1739,15 +1739,32 @@ button:disabled {.desktop-only {display: none !important;}-+.mobile-only {display: block !important;}+ .mobile-quick-actions {+ display: flex !important;+ }++ .mobile-drawer,+ .mobile-drawer-backdrop {+ display: flex !important;+ }++ .secondary-actions {+ display: none !important;+ }+.mobile-warning {display: flex;}+ .countdown-container {+ top: var(--topbar-plus-quick, calc(var(--topbar-height, 64px) + 56px));+ }+.layout {grid-template-columns: 1fr;grid-template-areas: "calendar";@@ -1773,6 +1790,14 @@ button:disabled {.tz-sidebar.is-active {transform: translateX(0);}++ /* Hide settings from panel-header on mobile — they live in the drawer */+ #weekstart-toggle,+ #theme-toggle,+ .lang-selector,+ #mobile-sidebar-toggle {+ display: none !important;+ }}/* --- World Planner Modal & Grid --- */@@ -2310,5 +2335,195 @@ body[data-theme="dark"] .ripple {border-color: var(--border);}+/* ---- Mobile Quick-Action Bar ---- */+.mobile-quick-actions {+ display: none;+ align-items: center;+ justify-content: center;+ gap: 8px;+ padding: 8px 16px;+ background: var(--panel);+ border-bottom: 1px solid var(--border);+ position: sticky;+ top: var(--topbar-height, 64px);+ z-index: 9;+}++.quick-action-btn {+ width: 40px;+ height: 40px;+ border-radius: 50%;+ border: 1px solid var(--border);+ background: var(--panel-2);+ color: var(--text);+ display: inline-flex;+ align-items: center;+ justify-content: center;+ font-size: 1rem;+ padding: 0;+ cursor: pointer;+ transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;+}++.quick-action-btn:hover {+ background: var(--accent-soft);+ border-color: var(--accent);+ transform: translateY(-1px);+}++.quick-action-btn:disabled {+ opacity: 0.4;+ cursor: not-allowed;+ transform: none;+}++/* ---- Mobile Drawer ---- */+.mobile-drawer-backdrop {+ display: none;+ position: fixed;+ inset: 0;+ background: rgba(32, 33, 36, 0.5);+ z-index: 49;+ opacity: 0;+ transition: opacity 0.3s ease;+ pointer-events: none;+}++.mobile-drawer-backdrop.is-active {+ opacity: 1;+ pointer-events: auto;+}++.mobile-drawer {+ display: none;+ position: fixed;+ top: 0;+ right: 0;+ bottom: 0;+ width: min(300px, 80vw);+ background: var(--panel);+ border-left: 1px solid var(--border);+ box-shadow: var(--shadow-lg);+ z-index: 50;+ flex-direction: column;+ transform: translateX(100%);+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);+ overflow-y: auto;+}++.mobile-drawer.is-active {+ transform: translateX(0);+}++.mobile-drawer-header {+ display: flex;+ align-items: center;+ justify-content: space-between;+ padding: 16px;+ border-bottom: 1px solid var(--border);+}++.mobile-drawer-title {+ font-size: 1rem;+ font-weight: 600;+}++.mobile-drawer-body {+ padding: 12px 16px;+ display: flex;+ flex-direction: column;+ gap: 20px;+}++.mobile-drawer-section {+ display: flex;+ flex-direction: column;+ gap: 8px;+}++.mobile-drawer-label {+ font-size: 0.72rem;+ text-transform: uppercase;+ letter-spacing: 0.15em;+ color: var(--muted);+ font-weight: 600;+}++.mobile-drawer-view-toggle {+ display: flex;+ flex-direction: column;+ gap: 2px;+ background: var(--panel-2);+ border: 1px solid var(--border-soft);+ border-radius: var(--radius-sm);+ overflow: hidden;+}++.mobile-drawer-view-toggle button {+ width: 100%;+ text-align: left;+ padding: 10px 14px;+ border: none;+ border-radius: 0;+ background: transparent;+ color: var(--text);+ font-size: 0.85rem;+ font-weight: 500;+ cursor: pointer;+ transition: background 0.15s ease;+}++.mobile-drawer-view-toggle button:hover {+ background: var(--accent-soft);+}++.mobile-drawer-view-toggle button.active {+ background: var(--accent-soft);+ color: var(--accent);+ font-weight: 600;+}++.mobile-drawer-item {+ display: flex;+ align-items: center;+ gap: 10px;+ padding: 10px 14px;+ border-radius: var(--radius-sm);+ border: 1px solid var(--border-soft);+ background: var(--panel-2);+ color: var(--text);+ font-size: 0.85rem;+ font-weight: 500;+ text-decoration: none;+ cursor: pointer;+ transition: background 0.15s ease, border-color 0.15s ease;+}++.mobile-drawer-item:hover {+ background: var(--accent-soft);+ border-color: var(--accent);+}++/* Constrain embedded lists in mobile drawer */+#mobile-event-list {+ max-height: 200px;+ overflow-y: auto;+ min-height: 60px;+}++#mobile-tz-list {+ max-height: 240px;+ overflow-y: auto;+}++.mobile-drawer-section .side-card {+ padding: 12px;+}++/* Always show remove button on mobile (no hover) */+.mobile-drawer-section .tz-card .tz-remove {+ opacity: 1;+}+