/* v15.12.1: top-right sound settings panel */ .sound-menu { position: relative; display: inline-block; } .sound-menu-btn.active { background: linear-gradient(180deg, #f3ffe9, #e7f8db); border-color: rgba(103,178,44,.46); } .sound-panel { position: absolute; right: 0; top: calc(100% + 8px); z-index: 12000; min-width: 210px; padding: 11px; border-radius: 16px; border: 1px solid rgba(84,68,48,.16); background: rgba(255,252,246,.98); box-shadow: 0 16px 42px rgba(44,34,25,.20); display: grid; gap: 7px; text-align: left; } .sound-panel.hidden { display: none; } .sound-panel label { display: flex; align-items: center; gap: 7px; font-size: 12px; cursor: pointer; white-space: nowrap; } .sound-panel input { accent-color: #82bf66; } .sound-panel input:disabled + span { opacity: .55; } .sound-master { font-weight: 700; } .sound-panel-divider { height: 1px; background: rgba(84,68,48,.12); margin: 2px 0; } @media (max-width: 980px) { .sound-panel { right: auto; left: 0; } } /* Collapsed card sizing is shared by the base panel rules; no event-only shrink override. */ /* v15.12.4: event log scroll chains to the right menu at top/bottom */ .log { overscroll-behavior-y: auto !important; } /* v15.12.4: sound settings live only in the top-right sound menu */ /* v15.17.0: mobile layout isolation and canvas touch gestures */ #app { overflow-x: clip; } .layout { position: relative; z-index: 2; } .panel { position: relative; z-index: 3; } .lineage-main-card { position: relative; z-index: 1; overflow: hidden; contain: layout paint; } #gameCanvas { touch-action: none; -webkit-user-select: none; user-select: none; } .archive-content, .lineage-main-content, .lineage-family-tree { max-width: 100%; box-sizing: border-box; } @media (max-width: 980px) { .layout { position: relative; z-index: 4; } .panel { position: relative; z-index: 5; isolation: isolate; } .lineage-main-card { z-index: 1; width: 100%; max-width: 100%; margin-top: 14px; clear: both; } .lineage-main-content { height: auto; min-height: 340px; max-height: 72vh; overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; } .lineage-family-tree { overflow: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; } .lineage-family-tree .lineage-tree-panel { max-width: none; } } /* Mobile input mode */ .mobile-mode-controls { display: none; position: absolute; left: 10px; bottom: 10px; z-index: 24; gap: 5px; padding: 6px; border-radius: 14px; background: rgba(255, 251, 245, 0.90); box-shadow: 0 8px 22px rgba(80,60,35,.18); border: 1px solid rgba(120, 95, 60, .16); backdrop-filter: blur(8px); } .mobile-mode-controls button { border: 0; border-radius: 10px; padding: 7px 8px; font-size: 12px; font-weight: 800; color: #65533f; background: rgba(255,255,255,.78); box-shadow: inset 0 -1px 0 rgba(0,0,0,.05); } .mobile-mode-controls button.active { color: #3d321f; background: linear-gradient(180deg, #ffe9a8, #ffd376); box-shadow: 0 3px 10px rgba(150, 105, 30, .20); } body.touch-mobile-ui .mobile-mode-controls:not([hidden]) { display: flex; } body:not(.touch-mobile-ui) .mobile-mode-controls { display: none !important; } .mobile-rotate-controls { display: none; position: absolute; right: 10px; bottom: 58px; z-index: 24; gap: 6px; padding: 6px; border-radius: 14px; background: rgba(255, 251, 245, 0.92); box-shadow: 0 8px 22px rgba(80,60,35,.18); border: 1px solid rgba(120, 95, 60, .16); backdrop-filter: blur(8px); } .mobile-rotate-controls button { border: 0; border-radius: 10px; padding: 7px 10px; font-size: 12px; font-weight: 800; color: #65533f; background: rgba(255,255,255,.82); box-shadow: inset 0 -1px 0 rgba(0,0,0,.05); } .mobile-rotate-controls button:active { transform: translateY(1px); } body.touch-mobile-ui .mobile-rotate-controls:not([hidden]) { display: flex; } body:not(.touch-mobile-ui) .mobile-rotate-controls { display: none !important; } @media (max-width: 980px) { body.touch-mobile-ui .mobile-rotate-controls:not([hidden]) { position: fixed; left: 50%; right: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 56px); transform: translateX(-50%); z-index: 12002; max-width: calc(100vw - 22px); } } body.touch-mobile-ui.mobile-mode-camera #gameCanvas { cursor: grab; } body.touch-mobile-ui.mobile-mode-tool #gameCanvas { cursor: crosshair; } /* Keep panel themes on narrow layouts. */ .card.tool-card { --ui-theme-rgb: 0, 114, 178; background: linear-gradient(180deg, rgba(242, 248, 252, 0.94), rgba(232, 243, 250, 0.91)); border-color: rgba(0, 114, 178, 0.24); } .card.selected-card { --ui-theme-rgb: 204, 121, 167; background: linear-gradient(180deg, rgba(253, 245, 250, 0.94), rgba(249, 235, 244, 0.91)); border-color: rgba(204, 121, 167, 0.24); } .card.colony-card { --ui-theme-rgb: 0, 158, 115; background: linear-gradient(180deg, rgba(240, 250, 247, 0.94), rgba(229, 245, 239, 0.91)); border-color: rgba(0, 158, 115, 0.24); } .card.log-card { --ui-theme-rgb: 230, 159, 0; background: linear-gradient(180deg, rgba(255, 249, 236, 0.94), rgba(253, 242, 215, 0.91)); border-color: rgba(230, 159, 0, 0.24); } /* v39.15.35: mobile controls and scroll affordances */ @media (max-width: 980px) { body.touch-mobile-ui .mobile-mode-controls:not([hidden]) { display: flex !important; } .panel-quick-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); position: sticky; top: 0; } .panel-quick-tabs button { padding-left: 3px; padding-right: 3px; font-size: 10.5px; } } body.touch-mobile-ui .tool-tip-popover { max-width: min(240px, calc(100vw - 24px)); } /* v39.15.36: mobile navigation redesign without family input mode */ @media (max-width: 980px) { body.touch-mobile-ui .mobile-mode-controls:not([hidden]) { position: fixed; left: 50%; right: auto; bottom: calc(env(safe-area-inset-bottom, 0px) + 10px); transform: translateX(-50%); z-index: 12001; max-width: calc(100vw - 22px); } .panel-quick-tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); } .lineage-main-card { margin: 10px 0 0; contain: content; } .lineage-main-card .lineage-head { gap: 8px; } .lineage-main-card .lineage-actions { flex-wrap: wrap; } body.touch-mobile-ui .tool-category:not([data-tool-category="operate"]).collapsed .tool-category-body { display: none; } body.touch-mobile-ui .log { max-height: 240px; } } .back-to-game-btn { position: fixed; right: calc(env(safe-area-inset-right, 0px) + 12px); bottom: calc(env(safe-area-inset-bottom, 0px) + 68px); z-index: 12000; border: 1px solid rgba(103,178,44,.38); border-radius: 999px; padding: 9px 12px; background: rgba(246, 255, 236, 0.94); color: #3f5f2b; font-weight: 900; font-size: 12px; box-shadow: 0 10px 25px rgba(54, 76, 40, .20); backdrop-filter: blur(8px); } .back-to-game-btn[hidden] { display: none !important; } @media (min-width: 981px) { .back-to-game-btn { display: none !important; } } /* v39.15.38: keep desktop layout close to v39.15.36; only hide the PC quick-scroll buttons that duplicate the canvas/tool card. */ @media (min-width: 981px) { .panel-quick-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); } .panel-quick-tabs [data-panel-tab="game"] { display: none !important; } } /* v39.15.38: mobile navigation/footer room and family-graph reachability. */ @media (max-width: 980px) { html, body { max-width: 100%; overflow-x: hidden; } #app { width: 100%; max-width: 100%; box-sizing: border-box; padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(10px, env(safe-area-inset-right, 0px)); padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 92px); overflow-x: clip; } .topbar, .top-left, .brand, .layout, .stage-wrap, .panel, .card, .lineage-main-card { min-width: 0; max-width: 100%; box-sizing: border-box; } .top-actions { width: 100%; max-width: 100%; display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 5px; overflow-x: auto; overflow-y: hidden; padding: 1px 0 5px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; } .top-actions > .btn, .top-actions > .sound-menu, .top-actions .sound-menu-btn { flex: 0 0 auto; white-space: nowrap; } .top-actions .btn { padding: 7px 9px; font-size: 11px; } .room-link { max-width: 100%; overflow: hidden; text-overflow: ellipsis; } body.touch-mobile-ui .mobile-mode-controls:not([hidden]) { position: absolute; left: 50%; right: auto; bottom: 10px; transform: translateX(-50%); z-index: 24; max-width: calc(100% - 18px); } body.touch-mobile-ui .panel-quick-tabs { position: fixed; left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); top: auto; z-index: 12002; width: auto; max-width: none; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; margin: 0; padding: 6px; border: 1px solid rgba(102, 169, 215, 0.34); border-radius: 16px; background: rgba(244, 250, 247, 0.95); box-shadow: 0 12px 28px rgba(42, 54, 64, 0.18); } body.touch-mobile-ui .panel-quick-tabs button { min-height: 34px; padding: 5px 2px; font-size: 10px; } body.touch-mobile-ui .selected-card, body.touch-mobile-ui .tool-card, body.touch-mobile-ui .colony-card, body.touch-mobile-ui .log-card, body.touch-mobile-ui .lineage-main-card { scroll-margin-top: 10px; scroll-margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 88px); } body.touch-mobile-ui .lineage-main-card { margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 78px); } .back-to-game-btn { bottom: calc(env(safe-area-inset-bottom, 0px) + 62px); right: max(10px, env(safe-area-inset-right, 0px)); } } /* v39.15.47: desktop rollback guard. Keep the normal PC layout; only remove duplicated quick-scroll buttons. */ @media (min-width: 981px) { .topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 18px; } .top-left { flex: 1 0 auto; min-width: max-content; max-width: 100%; } .brand, .brand h1, h1 { flex: 0 0 auto; min-width: max-content; max-width: none !important; overflow: visible !important; text-overflow: clip !important; } .top-actions { flex: 1 1 560px; margin-left: auto; justify-content: flex-end; align-items: center; gap: 10px; } .top-actions .btn, .top-actions .sound-menu-btn, .room-link { min-height: 42px; padding: 10px 16px; font-size: 13px; line-height: 1.15; } .panel-quick-tabs { grid-template-columns: repeat(5, minmax(0, 1fr)); } .panel-quick-tabs [data-panel-tab="game"] { display: none !important; } } /* v39.15.47: PC / smartphone UI isolation. All override UI placement is scoped by width. */ @media (min-width: 981px) { html, body { overflow-x: hidden; overflow-y: auto; } #app { width: min(1480px, 100vw); padding: 18px; overflow: visible; } .topbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 18px; } .top-left { flex: 1 0 auto; min-width: max-content; max-width: 100%; } .brand, .brand h1, h1 { flex: 0 0 auto; min-width: max-content; max-width: none !important; overflow: visible !important; text-overflow: clip !important; } .top-actions { flex: 1 1 560px; margin-left: auto; justify-content: flex-end; align-items: center; gap: 10px; } .top-actions .btn, .top-actions .sound-menu-btn, .room-link { min-height: 42px; padding: 10px 16px; font-size: 13px; line-height: 1.15; } .layout { display: grid; grid-template-columns: minmax(680px, 1fr) minmax(320px, 390px); align-items: start; } .panel { position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); overflow-y: auto; overflow-x: hidden; } .panel-quick-tabs { position: sticky; top: 0; grid-template-columns: repeat(5, minmax(0, 1fr)); } .panel-quick-tabs [data-panel-tab="game"] { display: none !important; } .lineage-main-card { display: block; visibility: visible; position: relative; z-index: 1; width: auto; margin: 16px 0 0; overflow: hidden; contain: layout paint; } .lineage-main-content { height: min(78vh, 980px); min-height: 520px; max-height: calc(100vh - 120px); overflow: auto; overscroll-behavior: auto; } } @media (max-width: 980px) { html, body { width: 100%; max-width: 100%; min-height: 100%; overflow-x: hidden; overflow-y: auto; overscroll-behavior-y: auto; } #app { width: 100%; max-width: 100%; padding: 10px max(10px, env(safe-area-inset-right, 0px)) calc(env(safe-area-inset-bottom, 0px) + 104px) max(10px, env(safe-area-inset-left, 0px)); overflow-x: clip; overflow-y: visible; } .topbar, .top-left, .brand, .layout, .stage-wrap, .panel, .card, .lineage-main-card { min-width: 0; max-width: 100%; box-sizing: border-box; } .topbar { display: flex; flex-direction: column; align-items: stretch; gap: 8px; } .top-left { display: flex; align-items: center; gap: 8px; } .brand h1, h1 { max-width: 100%; overflow: visible; text-overflow: clip; white-space: nowrap; font-size: clamp(20px, 7vw, 30px); } .top-actions { display: flex; flex-wrap: nowrap; justify-content: flex-start; gap: 5px; width: 100%; overflow-x: auto; overflow-y: hidden; padding: 1px 0 5px; -webkit-overflow-scrolling: touch; } .top-actions > .btn, .top-actions > .sound-menu, .top-actions .sound-menu-btn { flex: 0 0 auto; white-space: nowrap; } .top-actions .btn, .top-actions .sound-menu-btn { min-height: 34px; padding: 7px 9px; font-size: 11px; } .layout { display: flex; flex-direction: column; align-items: stretch; gap: 10px; position: relative; z-index: 2; overflow: visible; } .stage-wrap { position: relative; width: 100%; overflow: hidden; } .panel { position: relative !important; top: auto !important; display: flex; flex-direction: column; gap: 10px; width: 100%; max-height: none !important; height: auto !important; overflow: visible !important; isolation: auto; } body.touch-mobile-ui .panel-quick-tabs, .panel-quick-tabs { position: fixed; left: max(8px, env(safe-area-inset-left, 0px)); right: max(8px, env(safe-area-inset-right, 0px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 8px); top: auto; z-index: 12002; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; width: auto; max-width: none; margin: 0; padding: 6px; border: 1px solid rgba(102, 169, 215, 0.34); border-radius: 16px; background: rgba(244, 250, 247, 0.95); box-shadow: 0 12px 28px rgba(42, 54, 64, 0.18); } .panel-quick-tabs button { min-height: 34px; padding: 5px 2px; font-size: 10px; } body.touch-mobile-ui .mobile-mode-controls:not([hidden]) { display: flex !important; position: absolute; left: 50%; right: auto; bottom: 10px; transform: translateX(-50%); z-index: 24; max-width: calc(100% - 18px); } body.touch-mobile-ui.mobile-mode-auto #gameCanvas { touch-action: pan-y pinch-zoom !important; } body.touch-mobile-ui.mobile-mode-camera #gameCanvas, body.touch-mobile-ui.mobile-mode-tool #gameCanvas { touch-action: none !important; } .log { max-height: none !important; height: auto !important; overflow: visible !important; overscroll-behavior-y: auto !important; } .lineage-main-card { display: block !important; visibility: visible !important; position: relative; z-index: 1; width: 100%; margin: 10px 0 calc(env(safe-area-inset-bottom, 0px) + 132px); overflow: visible !important; contain: none !important; clear: both; } .lineage-main-content { display: block !important; height: auto !important; min-height: 360px; max-height: none !important; overflow-x: hidden !important; overflow-y: visible !important; overscroll-behavior-y: auto !important; -webkit-overflow-scrolling: auto; touch-action: pan-y pinch-zoom; } .lineage-family-tree { max-width: 100%; overflow-x: auto !important; overflow-y: visible !important; overscroll-behavior-x: contain; overscroll-behavior-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-x pan-y pinch-zoom; } .lineage-family-tree .lineage-tree-panel { max-width: none; } .selected-card, .tool-card, .colony-card, .log-card, .lineage-main-card, .stage-wrap { scroll-margin-top: 0 !important; scroll-margin-bottom: calc(env(safe-area-inset-bottom, 0px) + 104px); } }