422 lines
28 KiB
CSS
422 lines
28 KiB
CSS
/* 捏人物=競選總部的更衣間(CreatorScreen.tsx):整頁不捲,只有分頁裡的選項自己捲。
|
||
左邊衣櫃(存好的角色)、中間化妝鏡前的舞台、右邊分頁;手機版舞台在上、分頁在下,衣櫃疊在舞台左側。
|
||
顏色一律用 tokens.css 的變數;動畫只動 transform、opacity。 */
|
||
|
||
.cr-room {
|
||
height: 100%; min-height: 0;
|
||
display: grid; gap: 12px 16px;
|
||
grid-template-columns: 104px minmax(0, 1fr) minmax(380px, min(36vw, 540px));
|
||
grid-template-rows: minmax(0, 1fr) auto;
|
||
grid-template-areas: "rail stage panel" "rail cta panel";
|
||
}
|
||
|
||
/* ── 衣櫃 ── */
|
||
.cr-rail { grid-area: rail; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 10px; }
|
||
.cr-rail-h {
|
||
justify-self: center; margin: 0; padding: 2px 14px;
|
||
border: 3px solid var(--signal-ink); border-radius: 999px; background: var(--signal); color: var(--signal-ink);
|
||
font-family: var(--font-serif); font-size: 15px; box-shadow: 3px 3px 0 var(--signal-ink);
|
||
}
|
||
.cr-rail-list { display: grid; align-content: start; justify-items: center; gap: 12px; padding: 8px 4px 10px; }
|
||
.cr-slot {
|
||
display: grid; justify-items: center; gap: 4px; width: 88px;
|
||
color: var(--navy-ink); font-size: 13px; font-weight: 800; text-decoration: none;
|
||
transition: transform 140ms var(--ease-out);
|
||
}
|
||
.cr-slot-face {
|
||
width: 76px; height: 76px; display: grid; place-items: end center; overflow: hidden;
|
||
border-radius: 18px; border: 3px solid var(--signal-ink); background: var(--tv-ink); color: var(--signal-ink);
|
||
box-shadow: 3px 3px 0 var(--signal-ink);
|
||
}
|
||
.cr-slot-face .avatar { display: block; width: 112%; height: auto; transform: translateY(16%); }
|
||
.cr-slot.is-new .cr-slot-face {
|
||
place-items: center; border-style: dashed; border-color: color-mix(in srgb, var(--navy-ink) 60%, transparent);
|
||
background: color-mix(in srgb, var(--navy-ink) 10%, transparent); color: var(--navy-ink); box-shadow: none;
|
||
}
|
||
.cr-slot-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||
.cr-slot.is-on .cr-slot-face { border-color: var(--signal); box-shadow: 0 0 0 3px var(--signal-ink), 0 0 0 6px color-mix(in srgb, var(--signal) 45%, transparent); }
|
||
.cr-slot.is-new.is-on .cr-slot-face { color: var(--signal); }
|
||
.cr-slot.is-on .cr-slot-name { color: var(--signal); }
|
||
.cr-slot:active { transform: scale(0.95); }
|
||
.cr-slot:focus-visible { outline: none; }
|
||
.cr-slot:focus-visible .cr-slot-face { outline: 4px solid var(--signal); outline-offset: 3px; }
|
||
|
||
/* ── 舞台:化妝鏡、聚光燈、人物、講台 ── */
|
||
.cr-stage {
|
||
grid-area: stage; position: relative; min-height: 0; overflow: hidden; container-type: size;
|
||
--fig: min(62cqh, 64cqw, 460px);
|
||
--b: 3cqh;
|
||
}
|
||
.cr-mirror {
|
||
--frame: 8px;
|
||
position: absolute; left: 0; right: 0; top: max(3cqh, calc(100cqh - var(--b) - var(--fig) * 1.5)); bottom: calc(var(--b) + var(--fig) * 0.2);
|
||
width: min(calc(var(--fig) * 1.55), 92cqw); margin-inline: auto;
|
||
border: var(--frame) solid var(--signal-ink); border-radius: 28px 28px 10px 10px;
|
||
background:
|
||
linear-gradient(115deg, transparent 0 34%, color-mix(in srgb, var(--navy-ink) 7%, transparent) 34% 42%, transparent 42% 47%, color-mix(in srgb, var(--navy-ink) 5%, transparent) 47% 50%, transparent 50%),
|
||
radial-gradient(ellipse at 50% 32%, color-mix(in srgb, var(--navy-2) 75%, transparent), color-mix(in srgb, var(--navy) 85%, transparent) 78%);
|
||
box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 30%, transparent), 0 18px 40px color-mix(in srgb, var(--navy) 70%, transparent);
|
||
}
|
||
.cr-bulb {
|
||
position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
|
||
background: var(--signal); box-shadow: 0 0 10px 2px color-mix(in srgb, var(--signal) 65%, transparent);
|
||
animation: cr-bulb 2.4s ease-in-out infinite; animation-delay: calc(var(--i) * -0.3s);
|
||
}
|
||
.cr-bulb.is-top { left: var(--at); top: calc(var(--frame) / -2); }
|
||
.cr-bulb.is-left { left: calc(var(--frame) / -2); top: var(--at); }
|
||
.cr-bulb.is-right { left: calc(100% + var(--frame) / 2); top: var(--at); }
|
||
@keyframes cr-bulb { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
|
||
|
||
.cr-spot {
|
||
position: absolute; left: 0; right: 0; top: 0; bottom: var(--b); margin-inline: auto; width: calc(var(--fig) * 1.5);
|
||
clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
|
||
background: linear-gradient(180deg, color-mix(in srgb, var(--signal) 40%, transparent), color-mix(in srgb, var(--signal) 5%, transparent) 92%);
|
||
transform-origin: 50% 0; animation: cr-sway 7s ease-in-out infinite alternate; pointer-events: none;
|
||
}
|
||
@keyframes cr-sway { from { transform: rotate(-3deg); } to { transform: rotate(3deg); } }
|
||
.cr-floor {
|
||
position: absolute; left: 0; right: 0; margin-inline: auto; bottom: calc(var(--b) - var(--fig) * 0.06);
|
||
width: calc(var(--fig) * 1.7); height: calc(var(--fig) * 0.28); border-radius: 50%;
|
||
background: radial-gradient(closest-side, color-mix(in srgb, var(--signal) 42%, transparent), transparent);
|
||
}
|
||
|
||
.cr-actor { position: absolute; left: 0; right: 0; margin-inline: auto; bottom: calc(var(--b) + var(--fig) * 0.29); width: var(--fig); height: calc(var(--fig) * 1.1); }
|
||
.cr-backdrop {
|
||
position: absolute; left: 6%; top: 2%; width: 88%; aspect-ratio: 1; border-radius: 50%;
|
||
border: 4px solid var(--signal-ink); box-shadow: 0 0 0 6px color-mix(in srgb, var(--signal) 45%, transparent);
|
||
}
|
||
.cr-flash { position: absolute; left: 0; top: -3.5%; width: 100%; aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--signal); opacity: 0; pointer-events: none; }
|
||
.cr-breathe { position: absolute; inset: 0; transform-origin: 50% 100%; animation: cr-breathe 3.6s ease-in-out infinite; }
|
||
@keyframes cr-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: translateY(-0.5%) scale(1.012, 1.02); } }
|
||
.cr-pop { width: 100%; height: 100%; transform-origin: 50% 100%; }
|
||
.cr-pop .avatar { display: block; width: 100%; height: 100%; }
|
||
|
||
.cr-bubble {
|
||
position: absolute; left: 62%; top: 0; z-index: 3; margin: 0;
|
||
width: max-content; max-width: min(280px, calc(50cqw - var(--fig) * 0.12 - 8px));
|
||
padding: 6px 10px; border: 3px solid var(--signal-ink); border-radius: 16px;
|
||
background: var(--tv-ink); color: var(--signal-ink); box-shadow: 3px 3px 0 var(--signal-ink);
|
||
font-size: clamp(12px, calc(var(--fig) * 0.045), 18px); font-weight: 800; line-height: 1.3;
|
||
transform-origin: 0 100%; animation: cr-say 2800ms var(--ease-out) both;
|
||
}
|
||
.cr-bubble::after {
|
||
content: ""; position: absolute; left: 12px; bottom: -9px; width: 14px; height: 14px;
|
||
background: var(--tv-ink); border-right: 3px solid var(--signal-ink); border-bottom: 3px solid var(--signal-ink);
|
||
transform: rotate(45deg);
|
||
}
|
||
@keyframes cr-say {
|
||
0% { opacity: 0; transform: translateY(8px) scale(0.6); }
|
||
10% { opacity: 1; transform: scale(1.04); }
|
||
16% { transform: none; }
|
||
86% { opacity: 1; transform: none; }
|
||
100% { opacity: 0; transform: translateY(-6px); }
|
||
}
|
||
|
||
.cr-podium { position: absolute; left: 0; right: 0; margin-inline: auto; bottom: var(--b); width: calc(var(--fig) * 0.96); height: calc(var(--fig) * 0.35); }
|
||
.cr-podium-art { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
|
||
.cr-podium-front { fill: var(--party); stroke: var(--signal-ink); stroke-width: 3px; stroke-linejoin: round; }
|
||
.cr-podium-stripe { fill: var(--signal); }
|
||
.cr-podium-top { fill: var(--signal-ink); }
|
||
.cr-mic { position: absolute; left: 6%; bottom: calc(100% - 6px); width: calc(var(--fig) * 0.08); height: calc(var(--fig) * 0.16); overflow: visible; }
|
||
.cr-mic path { fill: none; stroke: var(--signal-ink); stroke-width: 4; stroke-linecap: round; }
|
||
.cr-mic rect { fill: var(--signal-ink); }
|
||
.cr-sign {
|
||
position: absolute; left: 15%; right: 15%; top: 23%; bottom: 25%;
|
||
display: grid; place-content: center; justify-items: center; gap: 2px; padding: 2px 8px; overflow: hidden;
|
||
border: 3px solid var(--signal-ink); border-radius: 8px; background: var(--tv-ink); color: var(--signal-ink); text-align: center;
|
||
}
|
||
.cr-sign b {
|
||
max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||
font-family: var(--font-serif); font-size: max(12px, calc(var(--fig) * 0.1 * var(--name-scale, 1))); line-height: 1.1; letter-spacing: 0.06em;
|
||
}
|
||
.cr-sign b.is-empty { opacity: 0.55; font-size: max(12px, calc(var(--fig) * 0.07)); }
|
||
.cr-sign { font: inherit; cursor: pointer; pointer-events: auto; transition: transform 140ms var(--ease-out); }
|
||
.cr-sign:active { transform: scale(0.98); }
|
||
.cr-sign:focus-visible { outline: 4px solid var(--signal); outline-offset: 3px; }
|
||
.cr-sign-pen { margin-left: 0.3em; vertical-align: 0.1em; opacity: 0.5; }
|
||
@media (hover: hover) and (pointer: fine) { .cr-sign:hover .cr-sign-pen { opacity: 1; } }
|
||
.cr-sign > span { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; overflow: hidden; white-space: nowrap; font-size: max(10px, calc(var(--fig) * 0.036)); font-weight: 800; }
|
||
.cr-sign-short { display: none; }
|
||
|
||
/* 戴了頭像外框:舞台右上角放一張加框的頭像卡 */
|
||
.cr-card-preview {
|
||
position: absolute; top: 10px; right: 10px; z-index: 4; width: clamp(64px, 18cqh, 104px); transform: rotate(3deg);
|
||
filter: drop-shadow(3px 3px 0 var(--signal-ink)); animation: cr-tick 260ms var(--ease-out) both;
|
||
}
|
||
.cr-card-preview .avatar { display: block; width: 100%; height: auto; }
|
||
.cr-dice {
|
||
position: absolute; right: 10px; bottom: calc(var(--b) + 4px); z-index: 4;
|
||
display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 6px 16px 6px 10px;
|
||
border: 3px solid var(--signal-ink); border-radius: 999px; background: var(--tv-ink); color: var(--signal-ink);
|
||
font-weight: 800; box-shadow: 3px 3px 0 var(--signal-ink); transition: transform 140ms var(--ease-out);
|
||
}
|
||
.cr-dice svg { transition: transform 200ms var(--ease-out); }
|
||
.cr-dice:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--signal-ink); }
|
||
.cr-dice:active svg { transform: rotate(-30deg); }
|
||
.cr-dice:focus-visible { outline: 4px solid var(--signal); outline-offset: 3px; }
|
||
@container (max-width: 640px) {
|
||
.cr-dice { width: 48px; padding: 0; justify-content: center; }
|
||
.cr-dice span { display: none; }
|
||
.cr-sign .cr-sign-full { display: none; }
|
||
.cr-sign .cr-sign-short { display: inline; }
|
||
}
|
||
|
||
/* ── 分頁面板 ── */
|
||
.cr-panel { grid-area: panel; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
|
||
/* 10 個分頁排成兩排(外觀一排、身分與畫風一排),手機上每格也夠大 */
|
||
.cr-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; padding: 8px; background: var(--navy); border-bottom: 3px solid var(--ink); }
|
||
.cr-tab {
|
||
position: relative; display: grid; justify-items: center; align-content: center; gap: 2px; min-width: 0; min-height: 54px; padding: 6px 2px;
|
||
border: 2px solid transparent; border-radius: 12px; background: none; color: var(--navy-ink);
|
||
font-size: 13px; font-weight: 800; letter-spacing: 0.04em; opacity: 0.75;
|
||
transition: transform 140ms var(--ease-out), opacity 140ms ease;
|
||
}
|
||
.cr-tab.is-on { opacity: 1; background: var(--signal); color: var(--signal-ink); border-color: var(--signal-ink); box-shadow: 0 3px 0 var(--signal-ink); transform: translateY(-2px); }
|
||
.cr-tab:active { transform: scale(0.95); }
|
||
.cr-tab:focus-visible { outline: 3px solid var(--signal); outline-offset: 1px; }
|
||
.cr-badge {
|
||
position: absolute; top: 1px; right: 3px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px;
|
||
background: var(--stamp); color: var(--navy-ink); font: 800 12px/18px var(--font-num); font-style: normal; letter-spacing: 0; text-align: center;
|
||
}
|
||
.cr-tabpanel { min-height: 0; display: grid; align-content: start; gap: 18px; padding: 14px 16px 20px; animation: cr-panel-in 240ms var(--ease-out) both; }
|
||
@keyframes cr-panel-in { from { opacity: 0; transform: translateY(8px); } }
|
||
.cr-tabhead { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
|
||
.cr-tabhead h2 { margin: 0; font-family: var(--font-serif); font-size: 24px; }
|
||
.cr-tabhead p { margin: 0; color: var(--muted); font-size: 14px; font-weight: 700; }
|
||
|
||
.cr-sec { display: grid; gap: 10px; }
|
||
.cr-sec-h { margin: 0; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-family: var(--font-serif); font-size: 17px; }
|
||
.cr-sec-h small { color: var(--muted); font-family: var(--font-body); font-size: 13px; font-weight: 800; }
|
||
.cr-note { margin: 0; color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.5; }
|
||
.cr-note.is-warn { color: var(--stamp); font-weight: 800; }
|
||
|
||
/* 造型格子 */
|
||
.cr-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px 10px; }
|
||
.cr-tiles.is-wide { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
|
||
.cr-tile {
|
||
position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; min-height: 48px; padding: 6px 6px 8px;
|
||
border: 3px solid var(--ink); border-radius: 14px; background: var(--surface-2); color: var(--ink);
|
||
box-shadow: 3px 3px 0 var(--shadow-ink); font-size: 13px; font-weight: 800; line-height: 1.2; text-align: center;
|
||
transition: transform 140ms var(--ease-out);
|
||
}
|
||
.cr-tiles.is-text .cr-tile { align-content: center; }
|
||
.cr-tile.is-on { background: var(--signal); color: var(--signal-ink); transform: translateY(-2px); box-shadow: 3px 5px 0 var(--shadow-ink); }
|
||
.cr-tile:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-ink); }
|
||
.cr-tile:focus-visible, .cr-swatch:focus-visible, .cr-origin:focus-visible, .cr-step:focus-visible, .cr-tool:focus-visible, .cr-delete:focus-visible { outline: 4px solid var(--signal); outline-offset: 3px; }
|
||
.cr-tile-art { width: 100%; aspect-ratio: 1; display: grid; place-items: center; overflow: hidden; border-radius: 9px; background: color-mix(in srgb, var(--ink) 7%, transparent); }
|
||
.cr-tile.is-on .cr-tile-art { background: color-mix(in srgb, var(--tv-ink) 65%, transparent); }
|
||
.cr-tile-art .avatar { display: block; width: 100%; height: auto; }
|
||
.cr-tiles.is-face .cr-tile-art .avatar { transform: translateY(12%) scale(1.9); }
|
||
.cr-tiles.is-head .cr-tile-art .avatar { transform: translateY(15%) scale(1.35); }
|
||
.cr-tiles.is-none .cr-tile-art .avatar { transform: translateY(5%); }
|
||
/* 還沒拿到:灰色、鎖頭、下面寫怎麼拿到(跟圖鑑灰卡同一種做法) */
|
||
.cr-tile.is-locked { border-style: dashed; border-color: var(--muted); background: var(--surface-2); box-shadow: none; }
|
||
.cr-tile.is-locked .cr-tile-art { filter: grayscale(1); opacity: 0.5; }
|
||
.cr-tile.is-locked .cr-tile-label { color: var(--muted); }
|
||
.cr-tile-how { display: flex; align-items: flex-start; justify-content: center; gap: 2px; color: var(--muted); font-size: 11px; font-weight: 700; line-height: 1.25; }
|
||
.cr-tile-how svg { flex: none; margin-top: 1px; }
|
||
/* 稀有度角標 */
|
||
.cr-rarity {
|
||
position: absolute; top: -8px; left: -6px; padding: 1px 7px; border: 2px solid var(--ink); border-radius: 999px;
|
||
background: #7a5cc4; color: #fff; font-size: 11px; font-weight: 900; letter-spacing: 0.06em; transform: rotate(-6deg);
|
||
}
|
||
.cr-rarity.is-limited { background: var(--stamp); }
|
||
.cr-tile.is-locked .cr-rarity { opacity: 0.75; }
|
||
.cr-note.is-lock { padding: 8px 12px; border: 2px dashed var(--muted); border-radius: 12px; color: var(--ink); font-weight: 700; }
|
||
.cr-note.is-lock a { display: inline-block; margin: -12px 0 -12px 6px; padding: 12px 4px; color: var(--stamp); font-weight: 900; }
|
||
.cr-tick {
|
||
position: absolute; top: -9px; right: -9px; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%;
|
||
border: 2px solid var(--signal-ink); background: var(--stamp); color: var(--navy-ink);
|
||
animation: cr-tick 260ms var(--ease-out) both;
|
||
}
|
||
@keyframes cr-tick { from { opacity: 0; transform: scale(0.4); } }
|
||
|
||
/* 色票 */
|
||
.cr-swatches { display: flex; flex-wrap: wrap; gap: 12px; }
|
||
.cr-swatch {
|
||
position: relative; width: 46px; height: 46px; padding: 0; border-radius: 50%;
|
||
border: 3px solid var(--ink); background: var(--sw); box-shadow: 2px 2px 0 var(--shadow-ink);
|
||
transition: transform 140ms var(--ease-out);
|
||
}
|
||
.cr-swatch.is-on { transform: scale(1.08); box-shadow: 0 0 0 3px var(--surface), 0 0 0 6px var(--ink); }
|
||
.cr-swatch:active { transform: scale(0.94); }
|
||
.cr-swatch .cr-tick { top: -7px; right: -7px; width: 20px; height: 20px; }
|
||
|
||
/* 名字、政黨 */
|
||
.cr-name {
|
||
width: 100%; min-height: 54px; padding: 8px 14px;
|
||
border: 3px solid var(--ink); border-radius: 14px; background: var(--surface-2); color: var(--ink);
|
||
box-shadow: inset 3px 3px 0 color-mix(in srgb, var(--ink) 10%, transparent);
|
||
font: inherit; font-family: var(--font-serif); font-size: 24px; letter-spacing: 0.08em;
|
||
}
|
||
.cr-name::placeholder { color: var(--muted); opacity: 0.7; }
|
||
.cr-name:focus-visible { outline: 4px solid var(--signal); outline-offset: 2px; }
|
||
.cr-name.is-bad { border-color: var(--stamp); }
|
||
.cr-tiles.is-party { grid-template-columns: repeat(2, minmax(0, 1fr)); }
|
||
.cr-party { display: flex; align-items: center; justify-content: flex-start; gap: 10px; min-height: 58px; padding: 8px 10px; border-bottom-width: 9px; border-bottom-color: var(--party); font-size: 15px; text-align: left; }
|
||
.cr-party-flag { display: inline-flex; flex: none; }
|
||
.cr-flag-none { display: inline-block; width: 39px; height: 26px; border-radius: 3px; background: var(--slot-other); }
|
||
.cr-poster .poster { width: 100%; }
|
||
.cr-delete {
|
||
justify-self: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px;
|
||
border: 2px dashed var(--stamp); border-radius: 12px; background: none; color: var(--stamp); font-weight: 800;
|
||
}
|
||
.cr-delete.is-armed { border-style: solid; background: var(--stamp); color: var(--navy-ink); }
|
||
|
||
/* 出身 */
|
||
.cr-origins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
|
||
.cr-origin {
|
||
position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 10px;
|
||
min-height: 66px; padding: 8px 10px; text-align: left;
|
||
border: 3px solid var(--ink); border-radius: 14px; background: var(--surface-2); color: var(--ink); box-shadow: 3px 3px 0 var(--shadow-ink);
|
||
transition: transform 140ms var(--ease-out);
|
||
}
|
||
.cr-origin-ic { grid-row: span 2; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--navy); color: var(--navy-ink); }
|
||
.cr-origin b { font-family: var(--font-serif); font-size: 16px; line-height: 1.2; }
|
||
.cr-origin small { color: var(--muted); font-size: 12px; font-weight: 600; line-height: 1.35; }
|
||
.cr-origin.is-on { background: var(--signal); color: var(--signal-ink); transform: translateY(-2px); box-shadow: 3px 5px 0 var(--shadow-ink); }
|
||
.cr-origin.is-on small { color: color-mix(in srgb, var(--signal-ink) 75%, transparent); }
|
||
.cr-origin.is-on .cr-origin-ic { background: var(--stamp); }
|
||
.cr-origin:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--shadow-ink); }
|
||
|
||
/* 能力點數 */
|
||
.cr-pot {
|
||
display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; padding: 10px 14px;
|
||
border: 3px solid var(--ink); border-radius: 16px; background: var(--navy); color: var(--navy-ink); box-shadow: 3px 3px 0 var(--shadow-ink);
|
||
}
|
||
.cr-pot-coin {
|
||
width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%;
|
||
border: 3px solid var(--signal-ink); background: var(--signal); color: var(--signal-ink);
|
||
box-shadow: inset 0 -5px 0 color-mix(in srgb, var(--signal-ink) 20%, transparent);
|
||
font: 900 30px/1 var(--font-num); font-variant-numeric: tabular-nums;
|
||
}
|
||
.cr-pot.is-over .cr-pot-coin { background: var(--stamp); color: var(--navy-ink); }
|
||
.cr-pot-txt { display: grid; gap: 2px; }
|
||
.cr-pot-txt b { font-family: var(--font-serif); font-size: 18px; }
|
||
.cr-pot-txt small { font-size: 12px; font-weight: 700; opacity: 0.8; }
|
||
.cr-pot-tools { display: flex; flex-wrap: wrap; gap: 8px; }
|
||
.cr-tool {
|
||
display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px;
|
||
border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); color: var(--ink);
|
||
font-size: 14px; font-weight: 800; box-shadow: 2px 2px 0 var(--shadow-ink); transition: transform 120ms var(--ease-out);
|
||
}
|
||
.cr-tool:active { transform: translate(2px, 2px); box-shadow: none; }
|
||
.cr-stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
|
||
.cr-stat { display: grid; gap: 6px; padding: 10px 12px; border: 3px solid var(--ink); border-radius: 14px; background: var(--surface-2); }
|
||
.cr-stat-txt { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
|
||
.cr-stat-txt b { font-family: var(--font-serif); font-size: 17px; }
|
||
.cr-stat-txt small { color: var(--muted); font-size: 12px; font-weight: 600; }
|
||
.cr-stat-ctl { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px 32px; align-items: center; gap: 8px; }
|
||
.cr-step {
|
||
width: 44px; height: 44px; display: grid; place-items: center; padding: 0;
|
||
border: 3px solid var(--ink); border-radius: 12px; background: var(--surface); color: var(--ink); box-shadow: 2px 2px 0 var(--shadow-ink);
|
||
transition: transform 120ms var(--ease-out);
|
||
}
|
||
.cr-step.is-plus { background: var(--signal); color: var(--signal-ink); }
|
||
.cr-step:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: none; }
|
||
.cr-step:disabled { opacity: 0.35; box-shadow: none; }
|
||
.cr-pips { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); align-items: end; gap: 3px; height: 26px; }
|
||
.cr-pips i { height: 100%; border-radius: 4px; background: color-mix(in srgb, var(--ink) 14%, transparent); transform: scaleY(0.45); transform-origin: 50% 100%; transition: transform 220ms var(--ease-out); }
|
||
.cr-pips i.is-on { background: var(--stamp); transform: none; }
|
||
.cr-stat-val { font: 900 26px/1 var(--font-num); font-variant-numeric: tabular-nums; text-align: right; }
|
||
|
||
/* ── 下面的大按鈕 ── */
|
||
.cr-cta { grid-area: cta; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: stretch; gap: 12px; }
|
||
.cr-save, .cr-go { border: 3px solid var(--signal-ink); border-radius: 16px; transition: transform 140ms var(--ease-out); }
|
||
.cr-save {
|
||
display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; padding: 8px 18px;
|
||
background: var(--tv-ink); color: var(--signal-ink); box-shadow: 4px 4px 0 var(--signal-ink); font-size: 16px; font-weight: 800;
|
||
}
|
||
.cr-save:disabled { box-shadow: none; }
|
||
.cr-save:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--signal-ink); }
|
||
.cr-go {
|
||
display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 64px; padding: 8px 22px;
|
||
background: var(--stamp); color: var(--navy-ink); box-shadow: 5px 5px 0 var(--signal-ink); text-align: left;
|
||
}
|
||
.cr-go span { display: grid; min-width: 0; }
|
||
.cr-go b { font-family: var(--font-serif); font-size: clamp(18px, 1.9vw, 26px); line-height: 1.15; letter-spacing: 0.06em; }
|
||
.cr-go small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 700; opacity: 0.9; }
|
||
.cr-go.is-locked { background: color-mix(in srgb, var(--stamp) 40%, var(--navy-2)); cursor: not-allowed; }
|
||
.cr-go:active { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--signal-ink); }
|
||
.cr-save:focus-visible, .cr-go:focus-visible { outline: 4px solid var(--signal); outline-offset: 3px; }
|
||
|
||
@media (hover: hover) and (pointer: fine) {
|
||
.cr-slot:hover { transform: translateY(-3px); }
|
||
.cr-tab:not(.is-on):hover { opacity: 1; transform: translateY(-2px); }
|
||
.cr-tile:not(.is-on):hover, .cr-origin:not(.is-on):hover { transform: translateY(-3px); }
|
||
.cr-swatch:not(.is-on):hover { transform: scale(1.1); }
|
||
.cr-dice:hover, .cr-tool:hover, .cr-step:not(:disabled):hover, .cr-save:not(:disabled):hover { background: var(--signal); color: var(--signal-ink); }
|
||
.cr-dice:hover svg { transform: rotate(20deg); }
|
||
.cr-go:not(.is-locked):hover { transform: translateY(-2px); }
|
||
}
|
||
|
||
/* ── 平板、手機:舞台在上、分頁在中間、大按鈕在最下面;衣櫃疊在舞台左側 ── */
|
||
@media (max-width: 820px) {
|
||
.cr-room {
|
||
gap: 10px;
|
||
grid-template-columns: minmax(0, 1fr);
|
||
grid-template-rows: minmax(200px, 36fr) minmax(0, 64fr) auto;
|
||
grid-template-areas: "stage" "panel" "cta";
|
||
}
|
||
.cr-rail { grid-area: stage; z-index: 5; justify-self: start; width: 64px; grid-template-rows: minmax(0, 1fr); }
|
||
.cr-rail-h, .cr-slot-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
|
||
.cr-rail-list { gap: 10px; padding: 8px; }
|
||
.cr-slot { width: 48px; }
|
||
.cr-slot-face { width: 48px; height: 48px; border-radius: 50%; box-shadow: 2px 2px 0 var(--signal-ink); }
|
||
.cr-stage { --fig: min(64cqh, 56cqw, 460px); --b: 2cqh; }
|
||
.cr-mirror { --frame: 6px; width: min(calc(var(--fig) * 1.55), 100cqw - 136px); border-radius: 20px 20px 8px 8px; }
|
||
.cr-bulb { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
|
||
.cr-sign { left: 10%; right: 10%; top: 20%; bottom: 18%; padding: 1px 4px; border-width: 2px; }
|
||
.cr-tabs { gap: 2px; padding: 6px; }
|
||
.cr-tab { min-height: 46px; padding: 3px 2px; font-size: 12px; letter-spacing: 0; }
|
||
.cr-tab svg { width: 18px; height: 18px; }
|
||
.cr-tabpanel { gap: 16px; padding: 12px 12px 18px; }
|
||
.cr-tabhead h2 { font-size: 20px; }
|
||
.cr-tiles { grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); }
|
||
.cr-cta { gap: 8px; }
|
||
.cr-save { min-height: 56px; padding: 6px 12px; font-size: 14px; }
|
||
.cr-go { min-height: 56px; gap: 8px; padding: 6px 12px; box-shadow: 4px 4px 0 var(--signal-ink); }
|
||
.cr-go b { font-size: 17px; letter-spacing: 0.02em; }
|
||
.cr-go small { font-size: 11px; }
|
||
}
|
||
@media (max-width: 820px) and (min-height: 960px) {
|
||
.cr-room { grid-template-rows: minmax(200px, 46fr) minmax(0, 54fr) auto; }
|
||
}
|
||
/* 橫放的手機:人物在左、衣櫃在右,按鈕在人物下面 */
|
||
@media (max-width: 820px) and (orientation: landscape) and (max-height: 500px) {
|
||
.cr-room { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); grid-template-rows: minmax(0, 1fr) auto; grid-template-areas: "stage panel" "cta panel"; }
|
||
.cr-save, .cr-go { min-height: 46px; }
|
||
.cr-go small { display: none; }
|
||
}
|
||
@media (max-width: 380px) {
|
||
.cr-origins { grid-template-columns: minmax(0, 1fr); }
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.cr-bulb, .cr-spot, .cr-breathe, .cr-tabpanel, .cr-tick, .cr-card-preview { animation: none; }
|
||
.cr-bubble { animation: cr-say-fade 2800ms linear both; }
|
||
.cr-pips i, .cr-slot, .cr-tab, .cr-tile, .cr-origin, .cr-swatch, .cr-step, .cr-tool, .cr-save, .cr-go, .cr-dice, .cr-dice svg { transition: none; }
|
||
}
|
||
@keyframes cr-say-fade { 0% { opacity: 0; } 6%, 88% { opacity: 1; } 100% { opacity: 0; } }
|
||
|
||
/* 更多政黨(18 第 52 項):可搜尋的清單,歷屆推出過候選人的政黨都有 */
|
||
.cr-more-parties { display: grid; gap: 8px; margin-top: 10px; }
|
||
.cr-more-toggle { justify-self: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; }
|
||
.cr-more-toggle[aria-expanded="true"] { background: var(--ink); color: var(--surface); }
|
||
.cr-more-toggle:focus-visible { outline: 4px solid var(--signal); outline-offset: 3px; }
|
||
.cr-more-body { display: grid; gap: 8px; }
|
||
.cr-party-search { min-height: 46px; padding: 6px 14px; border: 3px solid var(--ink); border-radius: 12px; background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; }
|
||
.cr-party-search:focus-visible { outline: 4px solid var(--signal); outline-offset: 2px; }
|
||
.cr-party-list { list-style: none; margin: 0; padding: 4px; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; max-height: 300px; overflow-y: auto; overscroll-behavior: contain; border: 2px solid var(--line); border-radius: 12px; }
|
||
.cr-party-list button { width: 100%; min-height: 48px; display: grid; gap: 1px; padding: 6px 10px; text-align: left; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
|
||
.cr-party-list button b { font-size: 15px; }
|
||
.cr-party-list button small { font-size: 11px; color: var(--muted); font-weight: 700; }
|
||
.cr-party-list button[aria-pressed="true"] { border: 3px solid var(--ink); background: var(--signal); color: var(--signal-ink); }
|
||
.cr-party-list button[aria-pressed="true"] small { color: #3a3a3a; }
|
||
.cr-party-list button:focus-visible { outline: 4px solid var(--signal); outline-offset: 2px; }
|
||
|
||
/* 黨的資源(18 第 53 項) */
|
||
.cr-party-perks { display: grid; gap: 2px; margin-top: 10px; padding: 8px 12px; border: 2px dashed var(--line); border-radius: 12px; font-size: 13px; line-height: 1.5; }
|
||
.cr-party-perks span { color: var(--muted); font-weight: 600; }
|
||
.cr-party-perks .is-cost { color: var(--stamp); }
|