.color-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.color-btn:hover { background: var(--tool-hover); }
.color-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.strip { width: 168px; flex-shrink: 0; overflow-y: auto; background: #f1f3f4; border-right: 1px solid var(--border); padding: 10px 8px; display: flex; flex-direction: column; gap: 10px; }
.thumb { display: flex; gap: 6px; cursor: pointer; }
.thumb .num { width: 16px; font-size: 11px; color: var(--muted); text-align: right; padding-top: 2px; }
.thumb .frame { position: relative; width: 132px; height: 74.25px; background: #fff; border: 2px solid transparent; border-radius: 4px; box-shadow: 0 0 0 1px var(--border); overflow: hidden; }
.thumb.active .frame { border-color: var(--accent); }
.thumb .frame .stage { transform: scale(0.1375); transform-origin: 0 0; pointer-events: none; }
.stage-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.stage-area { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; padding: 16px; min-height: 0; position: relative; }
.stage { position: absolute; left: 0; top: 0; width: 960px; height: 540px; background: #fff; transform-origin: 0 0; overflow: hidden; }
.stage-area .stage { box-shadow: 0 1px 3px rgba(60,64,67,.3), 0 4px 8px 3px rgba(60,64,67,.15); }
.el { position: absolute; box-sizing: border-box; }
.el.text { white-space: pre-wrap; padding: 6px 10px; overflow: hidden; line-height: 1.25; outline: none; }
.el.sel { outline: 2px solid var(--accent); }
.el .handle { position: absolute; right: -6px; bottom: -6px; width: 12px; height: 12px; background: var(--accent); border: 2px solid #fff; border-radius: 3px; cursor: nwse-resize; }
.el.editing { cursor: text; user-select: text; }
.stage.painting, .stage.painting .el, .stage.painting .el .handle { cursor: var(--brush-cursor), copy; }
.notes { height: 92px; border: none; border-top: 1px solid var(--border); resize: none; padding: 10px 16px; font-size: 13px; outline: none; flex-shrink: 0; font-family: inherit; }
.thumb .num .fx { color: var(--accent); font-size: 10px; }
/* 主題的裝飾圖形（在物件底下，點不到） */
.deco { position: absolute; box-sizing: border-box; pointer-events: none; }
/* 「動畫」面板打開時，物件左上角標出動畫順序 */
.el .anim-badge { position: absolute; left: 2px; top: 2px; min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px; background: #f9ab00; color: #fff; font: 600 15px/26px -apple-system, "Noto Sans TC", sans-serif; font-style: normal; text-align: center; pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,.3); }

/* 簡報模式：每張投影片一個全螢幕的框，轉場時新舊兩個框一起動 */
.presenter { position: fixed; inset: 0; background: #000; z-index: 50; overflow: hidden; perspective: 1600px; }
.presenter[hidden] { display: none; }
.pframe { position: absolute; inset: 0; backface-visibility: hidden; }
.presenter .stage { box-shadow: none; }
.present-info { position: fixed; bottom: 10px; right: 16px; color: #888; font-size: 12px; z-index: 1; }
/* 編輯畫面裡預覽轉場 / 動畫：疊在投影片上 */
.preview-layer { position: absolute; inset: 0; overflow: hidden; perspective: 1600px; z-index: 5; pointer-events: none; }

/* 右側面板：主題 / 版面配置 / 轉場 / 動畫 */
.side-panel { width: 300px; flex-shrink: 0; border-left: 1px solid var(--border); background: #fff; display: flex; flex-direction: column; min-height: 0; }
.side-panel[hidden] { display: none; }
.side-panel .panel-head { padding: 6px 6px 6px 8px; }
.side-tabs { display: flex; gap: 2px; }
.side-tabs button { height: 30px; padding: 0 9px; border: none; border-radius: 15px; background: transparent; cursor: pointer; font-size: 12.5px; color: var(--muted); }
.side-tabs button:hover { background: var(--hover); }
.side-tabs button.on { background: var(--active); color: var(--active-text); font-weight: 600; }
.side-body { flex: 1; overflow-y: auto; padding: 10px 14px 18px; }
.side-hint { font-size: 12px; color: var(--muted); margin: 4px 0 10px; line-height: 1.5; }
.side-title { font-size: 13px; font-weight: 600; margin: 18px 0 8px; }
.card-grid { display: grid; grid-template-columns: repeat(2, 128px); justify-content: space-between; gap: 12px 8px; }
.card { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 0; border: none; background: transparent; cursor: pointer; font-size: 12px; color: var(--text); }
.card .mini { position: relative; width: 128px; height: 72px; border-radius: 6px; overflow: hidden; box-shadow: 0 0 0 1px var(--border); }
.card .mini .stage { transform: scale(0.133333); pointer-events: none; }
.card:hover .mini { box-shadow: 0 0 0 2px #aecbfa; }
.card.on .mini { box-shadow: 0 0 0 3px var(--accent); }
.card.on span { color: var(--active-text); font-weight: 600; }
.fx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.fx { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 40px; padding: 6px 2px; border: 1px solid var(--border); border-radius: 8px; background: #fff; cursor: pointer; font-size: 12px; color: var(--text); }
.fx .ico { font-size: 18px; line-height: 1.1; color: var(--muted); }
.fx:hover { background: var(--hover); }
.fx.on { border-color: var(--accent); background: var(--active); color: var(--active-text); }
.fx.on .ico { color: var(--active-text); }
.side-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 13px; }
.side-row label { width: 72px; flex-shrink: 0; color: var(--muted); }
.side-row select, .side-row input { flex: 1; min-width: 0; height: 30px; border: 1px solid var(--border); border-radius: 6px; padding: 0 8px; font-size: 13px; background: #fff; }
.side-actions { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.side-actions button { height: 32px; padding: 0 14px; border: 1px solid var(--border); border-radius: 16px; background: #fff; cursor: pointer; font-size: 13px; }
.side-actions button:hover { background: var(--hover); }
.side-actions button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.side-actions button.primary:hover { background: var(--accent-dark); }
.anim-list { display: flex; flex-direction: column; gap: 2px; }
.anim-item { display: flex; align-items: center; gap: 6px; padding: 6px 4px 6px 6px; border-radius: 8px; cursor: pointer; font-size: 12.5px; }
.anim-item:hover { background: var(--hover); }
.anim-item.on { background: var(--active); }
.anim-item .n { width: 20px; height: 20px; border-radius: 10px; background: #f9ab00; color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.anim-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anim-item .t small { display: block; color: var(--muted); font-size: 11px; }
.anim-item button { border: none; background: transparent; width: 22px; height: 22px; padding: 0; border-radius: 4px; cursor: pointer; color: var(--muted); flex-shrink: 0; }
.anim-item button:hover { background: #fff; color: var(--text); }
