|
|
@@ -80,6 +80,89 @@ body {
|
|
|
z-index: 1;
|
|
|
}
|
|
|
|
|
|
+/*
|
|
|
+ * 高竖屏:填色内容本身是方形素材,不能让 game-area 吃满所有剩余高度,
|
|
|
+ * 否则可见画面会悬在一个过高的透明 canvas 中,调色按钮看起来离画面很远。
|
|
|
+ * 这里把 canvas 区域收敛为接近屏宽的正方形,并把 CTA 用 auto margin 推到底部。
|
|
|
+ */
|
|
|
+@media (orientation: portrait) and (min-height: 700px) and (max-width: 599px) {
|
|
|
+ #game-col {
|
|
|
+ flex: 0 0 auto;
|
|
|
+ width: 100%;
|
|
|
+ margin-top: auto;
|
|
|
+ margin-bottom: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ #game-area {
|
|
|
+ flex: 0 0 auto;
|
|
|
+ width: calc(100vw - 32px);
|
|
|
+ height: calc(100vw - 32px);
|
|
|
+ max-width: 430px;
|
|
|
+ max-height: 430px;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ #toolbar-bottom {
|
|
|
+ flex: 0 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ #color-btns {
|
|
|
+ box-sizing: border-box;
|
|
|
+ height: clamp(56px, 9dvh, 72px);
|
|
|
+ padding: 0 10px 8px 10px;
|
|
|
+ }
|
|
|
+
|
|
|
+ #cta-btn-wrapper {
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/* 平板竖屏:给方形绘图区更多空间,但保留 logo / 调色板 / CTA 的安全高度 */
|
|
|
+@media (orientation: portrait) and (min-width: 600px) {
|
|
|
+ #game-col {
|
|
|
+ flex: 0 0 auto;
|
|
|
+ width: 100%;
|
|
|
+ margin-top: auto;
|
|
|
+ margin-bottom: auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ #game-area {
|
|
|
+ flex: 0 0 auto;
|
|
|
+ width: min(
|
|
|
+ calc(100vw - 64px),
|
|
|
+ calc(
|
|
|
+ 100vh - clamp(64px, 20vh, 140px) - clamp(58px, 7vh, 76px) -
|
|
|
+ clamp(64px, 7vh, 82px) - 24px
|
|
|
+ ),
|
|
|
+ 760px
|
|
|
+ );
|
|
|
+ height: min(
|
|
|
+ calc(100vw - 64px),
|
|
|
+ calc(
|
|
|
+ 100vh - clamp(64px, 20vh, 140px) - clamp(58px, 7vh, 76px) -
|
|
|
+ clamp(64px, 7vh, 82px) - 24px
|
|
|
+ ),
|
|
|
+ 760px
|
|
|
+ );
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ #toolbar-bottom {
|
|
|
+ flex: 0 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ #color-btns {
|
|
|
+ box-sizing: border-box;
|
|
|
+ height: clamp(64px, 7vh, 82px);
|
|
|
+ padding: 0 16px 10px 16px;
|
|
|
+ }
|
|
|
+
|
|
|
+ #cta-btn-wrapper {
|
|
|
+ flex-basis: clamp(58px, 7vh, 76px);
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/* ── 竖屏:sidebar 用 display:contents,子项直接排入 body ── */
|
|
|
#sidebar {
|
|
|
display: contents;
|
|
|
@@ -109,7 +192,7 @@ body {
|
|
|
align-items: center;
|
|
|
justify-content: flex-start;
|
|
|
gap: 0;
|
|
|
- width: clamp(140px, 36%, 260px);
|
|
|
+ width: clamp(160px, 40%, 300px);
|
|
|
height: 100%;
|
|
|
background: transparent;
|
|
|
padding: clamp(8px, 1.5vh, 16px) clamp(10px, 2vw, 16px);
|
|
|
@@ -450,19 +533,23 @@ body {
|
|
|
flex: 3 3 0;
|
|
|
min-height: 0;
|
|
|
order: 10;
|
|
|
- width: 90%;
|
|
|
+ width: 96%;
|
|
|
+ max-width: 180px;
|
|
|
padding: 0;
|
|
|
+ margin: 0 auto;
|
|
|
position: static;
|
|
|
z-index: auto;
|
|
|
+ box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
- #cta-btn {
|
|
|
+ #cta-btn-wrapper #cta-btn {
|
|
|
width: 100%;
|
|
|
- max-width: none;
|
|
|
+ max-width: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
height: clamp(42px, 10vh, 54px);
|
|
|
- font-size: clamp(13px, 3.5vh, 17px);
|
|
|
- letter-spacing: clamp(1px, 0.8vw, 3px);
|
|
|
- padding: 0 clamp(8px, 2vw, 24px);
|
|
|
+ font-size: clamp(12px, 3.2vh, 16px);
|
|
|
+ letter-spacing: clamp(0.5px, 0.5vw, 2px);
|
|
|
+ padding: 0 8px;
|
|
|
white-space: nowrap;
|
|
|
overflow: hidden;
|
|
|
text-overflow: ellipsis;
|
|
|
@@ -541,6 +628,51 @@ body {
|
|
|
animation: cta-highlight-pulse 0.8s ease-in-out infinite;
|
|
|
}
|
|
|
|
|
|
+@media (orientation: landscape) {
|
|
|
+ #cta-btn-wrapper {
|
|
|
+ width: 96%;
|
|
|
+ max-width: 180px;
|
|
|
+ margin: 0 auto;
|
|
|
+ }
|
|
|
+
|
|
|
+ #cta-btn-wrapper #cta-btn {
|
|
|
+ width: 100% !important;
|
|
|
+ max-width: 100% !important;
|
|
|
+ min-width: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+/* 放在通用规则之后:平板竖屏先预留 logo/CTA,再让 game-col 吃掉中间剩余空间 */
|
|
|
+@media (orientation: portrait) and (min-width: 600px) {
|
|
|
+ #game-col {
|
|
|
+ flex: 1 1 auto;
|
|
|
+ min-height: 0;
|
|
|
+ width: 100%;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ #game-area {
|
|
|
+ flex: 1 1 auto;
|
|
|
+ min-height: 0;
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ max-width: none;
|
|
|
+ max-height: none;
|
|
|
+ margin: 0;
|
|
|
+ }
|
|
|
+
|
|
|
+ #color-btns {
|
|
|
+ box-sizing: border-box;
|
|
|
+ height: clamp(64px, 7vh, 82px);
|
|
|
+ padding: 0 16px 10px 16px;
|
|
|
+ }
|
|
|
+
|
|
|
+ #cta-btn-wrapper {
|
|
|
+ flex: 0 0 clamp(58px, 7vh, 76px);
|
|
|
+ margin-top: 0;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/* ── 宣传界面 ──────────────────────────────────────────── */
|
|
|
/* 在 game-area 内 position:absolute 展开,填满整个填色区域 */
|
|
|
/* logo-bar(z:200) 和 cta-wrapper(z:200) 叠在其上 */
|