/* LF 家庭留言板（Family 分頁）：操作照 LINE，外觀用 LF 色系變數（--pine、--sage、--surface…），主題切換會跟著變 */
/* Family 分頁：分頁區不留邊；聊天卡片浮在上面，手機全寬貼底，寬螢幕可移動、調寬窄 */
body.lf-tab-family main { padding-bottom:0; }
@media (max-width:639px) { body.lf-tab-family main { padding-left:0 !important; padding-right:0 !important; }
  body.lf-tab-family main > .clc-tb-search { margin-left:max(var(--lf-pad), env(safe-area-inset-left)); margin-right:max(var(--lf-pad), env(safe-area-inset-right)); } }
body.lf-tab-family #panelFamily { margin:0; padding:0; overflow:hidden; position:relative; }
.lf-family-scroll { position:absolute; inset:0; overflow:auto; overscroll-behavior:contain; padding-bottom:calc(82px + env(safe-area-inset-bottom)); }
#lfChat { position:absolute; inset:0; pointer-events:none; z-index:1; }
.lfc { position:absolute; left:0; right:0; top:0; height:100%; pointer-events:auto; display:flex; flex-direction:column; overflow:hidden; min-height:160px;
  border-radius:20px 20px 0 0; border:1px solid var(--border); border-bottom:0;
  background:color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); }
@media (max-width:639px) { .lfc { border-left:0; border-right:0; } }
.lfc[hidden], .lfc-rz[hidden], .lfc-tab[hidden], .lfc-tdot[hidden] { display:none; }
.lfc-rz { position:absolute; top:0; bottom:0; width:10px; cursor:ew-resize; pointer-events:auto; z-index:2; touch-action:none; }
.lfc-tab { position:absolute; bottom:0; pointer-events:auto; display:inline-flex; align-items:center; gap:8px; padding:10px 14px calc(10px + env(safe-area-inset-bottom)); border:1px solid var(--border); border-bottom:0;
  border-radius:14px 14px 0 0; background:color-mix(in srgb, var(--surface) 88%, transparent); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px); color:var(--text); font-size:14px; font-weight:800; cursor:pointer; }
.lfc-tdot { width:8px; height:8px; border-radius:50%; background:#ef4444; }
body.lf-tab-family footer { display:none; }
.lfc-qhit .lfc-bub { box-shadow:0 0 0 2px var(--sage); }
.lfc-findbar button { width:30px; height:26px; border-radius:8px; color:var(--text); font-size:16px; }
.lfc-findbar span { flex:1; }
.lfc-title { flex:1; margin:0; font-size:16px; font-weight:800; }
.lfc-title small { font-weight:600; color:var(--muted); font-size:13px; margin-left:4px; }
.lfc-hbtn { border:0; background:none; border-radius:10px; height:40px; width:40px; padding:0; cursor:pointer; color:var(--text); display:inline-flex; align-items:center; justify-content:center; flex:none; }
.lfc-hbtn:hover { background:var(--btn-h); }
.lfc-findbar { display:flex; align-items:center; gap:8px; padding:6px 12px; border-bottom:1px solid var(--border); font-size:12.5px; color:var(--muted); }
.lfc-findbar[hidden], .lfc-tools[hidden], .lfc-ibtn[hidden] { display:none; }
.lfc-findbar input { flex:1; min-width:0; border:1px solid var(--border); background:var(--btn); border-radius:16px; padding:6px 12px; font-size:14px; outline:none; }
.lfc-findbar button { border:0; background:none; cursor:pointer; color:var(--muted); font-size:15px; }
.lfc-pin { display:flex; align-items:center; gap:8px; padding:8px 14px; font-size:13px; background:color-mix(in srgb, var(--sage) 18%, transparent); border-bottom:1px solid var(--border); cursor:pointer; }
.lfc-pin[hidden] { display:none; }
.lfc-pin span { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lfc-pin button { border:0; background:none; cursor:pointer; color:var(--muted); font-size:15px; }
.lfc-list { position:relative; flex:1; min-height:0; overflow-y:auto; padding:8px 12px 12px; background:color-mix(in srgb, var(--cream) 14%, transparent); overscroll-behavior:contain;
  -webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 12px); mask-image:linear-gradient(to bottom, transparent 0, #000 12px); } /* 上緣淡出：知道上面還能捲 */
html.dark .lfc-list { background:color-mix(in srgb, var(--sage) 4%, transparent); }
.lfc-date, .lfc-sys { text-align:center; margin:12px 0 6px; }
.lfc-date span, .lfc-sys span { display:inline-block; font-size:11.5px; padding:3px 11px; border-radius:10px; background:var(--btn-h); color:var(--muted); }
.lfc-unread span { background:var(--pine); color:#fff; }
.lfc-row { display:flex; gap:8px; margin:9px 0; align-items:flex-start; }
.lfc-row.me { justify-content:flex-end; }
.lfc-av { width:36px; height:36px; border-radius:50%; overflow:hidden; flex:none; cursor:pointer; border:0; padding:0; background:none; }
.lfc-col { display:flex; flex-direction:column; min-width:0; max-width:74%; }
.lfc-row.me .lfc-col { align-items:flex-end; }
.lfc-name { display:block; font:inherit; font-size:11.5px; color:var(--muted); margin:0 0 3px 3px; padding:0; border:0; background:none; cursor:pointer; text-align:left; }
.lfc-name:hover { color:#1a73e8; }
.lfc-line { display:flex; gap:6px; align-items:flex-end; }
.lfc-row.me .lfc-line { flex-direction:row-reverse; }
.lfc-bub { background:var(--surface); color:var(--text); border:1px solid var(--border); border-radius:17px; padding:8px 12px; font-size:14.5px; line-height:1.5;
  white-space:pre-wrap; word-break:break-word; user-select:text; -webkit-touch-callout:none; }
.lfc-row.me .lfc-bub { background:color-mix(in srgb, var(--pine) 28%, #fff); color:#111; border-color:transparent; } /* 自己的訊息：主題綠（松綠）調淡＋黑字 */
html.dark .lfc-row.me .lfc-bub { background:color-mix(in srgb, var(--pine) 50%, #fff); color:#111; }
.lfc-row.me .lfc-bub a { color:#1a5fb4; }
.lfc-bub.lfc-media { padding:3px; background:transparent; border:0; }
.lfc-bub img.lfc-photo { display:block; max-width:min(230px, 60vw); max-height:300px; border-radius:14px; cursor:zoom-in; }
.lfc-stk { width:110px; height:110px; }
.lfc-bub.lfc-stkbub { padding:0 !important; background:none !important; border:0 !important; box-shadow:none !important; } /* 貼圖不要泡泡框 */
.lfc-row.hit .lfc-bub { box-shadow:0 0 0 2px #1a73e8; }
html.dark .lfc-row.hit .lfc-bub { box-shadow:0 0 0 2px #6ea8fe; }
.lfc-ment { font-weight:700; color:#1a73e8; }
html.dark .lfc-ment { color:#6ea8fe; }
.lfc-row.me .lfc-ment, html.dark .lfc-row.me .lfc-ment { color:#1a5fb4; } /* 自己的訊息裡 @ 也是藍色 */
.lfc-quote { border-left:3px solid var(--sage); padding:2px 8px; margin:-1px 0 5px; font-size:12.5px; opacity:.85; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:220px; }
.lfc-row.me .lfc-quote { border-left-color:var(--pine); }
.lfc-meta { font-size:10.5px; color:var(--muted); line-height:1.3; white-space:nowrap; text-align:right; }
.lfc-row:not(.me) .lfc-meta { text-align:left; }
.lfc-reacts { display:flex; gap:4px; margin-top:3px; flex-wrap:wrap; }
.lfc-reacts span { font-size:12px; background:var(--surface); border:1px solid var(--border); border-radius:10px; padding:1px 7px; cursor:pointer; }
.lfc-reacts span.mine { border-color:var(--pine); }
.lfc-flash .lfc-bub { animation:lfcFlash 1.2s; }
@keyframes lfcFlash { 30% { box-shadow:0 0 0 3px var(--sage); } }
.lfc-reply, .lfc-sugg { display:flex; align-items:center; gap:8px; padding:7px 14px; font-size:12.5px; border-top:1px solid var(--border); color:var(--muted); }
.lfc-reply[hidden], .lfc-sugg[hidden], .lfc-stks[hidden] { display:none; }
.lfc-reply span { flex:1; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.lfc-reply button { border:0; background:none; cursor:pointer; color:var(--muted); font-size:15px; }
.lfc-sugg { flex-wrap:wrap; }
.lfc-sugg button { border:1px solid var(--border); background:var(--btn); border-radius:14px; padding:3px 10px 3px 4px; cursor:pointer; display:inline-flex; align-items:center; gap:5px; font-size:13px; }
.lfc-sugg .lfc-av { width:22px; height:22px; }
.lfc-stks { position:absolute; right:8px; z-index:20; display:flex; flex-direction:column; box-sizing:border-box; width:min(366px, calc(100% - 16px)); max-height:min(60%, 390px); overflow:hidden; border:1px solid var(--border); border-radius:14px; background:var(--surface); box-shadow:var(--shadow); }
.lfc-stk-tabs, .lfc-stk-packs { display:flex; flex:none; gap:4px; padding:4px 8px; border-bottom:1px solid var(--border); }
.lfc-stks button { border:0; background:none; color:var(--text); cursor:pointer; padding:4px; border-radius:8px; min-width:0; }
.lfc-stks button:hover, .lfc-stks button[aria-pressed=true] { background:var(--btn); }
.lfc-stk-tabs button, .lfc-stk-packs button { min-height:36px; padding-inline:8px; }
.lfc-stk-tabs .lfc-stk-close { margin-inline-start:auto; min-width:36px; font-size:22px; }
.lfc-stk-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(26%, 88px), 1fr)); align-content:start; gap:4px; padding:8px; min-height:0; overflow-x:hidden; overflow-y:auto; overscroll-behavior:contain; }
.lfc-stk-grid.is-emoji { grid-template-columns:repeat(auto-fill, minmax(38px, 1fr)); }
.lfc-stk-grid button { aspect-ratio:1; width:100%; }
.lfc-stk-grid p { grid-column:1 / -1; margin:8px; color:var(--muted); font-size:13px; }
.lfc-stk-grid img, .lfc-stk img { display:block; width:100%; height:100%; object-fit:contain; border-radius:8px; }
.lfc-bar { display:flex; align-items:flex-end; gap:4px; padding:8px 8px calc(8px + env(safe-area-inset-bottom)); border-top:1px solid var(--border); }
.lfc-tools { display:flex; gap:2px; }
.lfc-ibtn { border:0; background:none; cursor:pointer; width:42px; height:42px; border-radius:50%; color:var(--text); flex:none; display:inline-flex; align-items:center; justify-content:center; padding:0; }
.lfc-ibtn:hover { background:var(--btn); }
.lfc-inwrap { flex:1; min-width:0; display:flex; align-items:flex-end; border:1px solid var(--border); background:var(--btn); border-radius:22px; }
.lfc-inwrap:focus-within { border-color:var(--sage); }
.lfc-in { flex:1; min-width:0; resize:none; border:0; background:none; padding:10px 4px 10px 16px; font-size:15px; line-height:1.4; max-height:120px; min-height:42px; outline:none; }
.lfc-smile { color:var(--muted); }
#lfcSend.on { color:var(--pine); }
.lfc-empty { text-align:center; color:var(--muted); font-size:13.5px; margin:40px 12px; }
/* 彈出層（個人卡片、成員、頭像、長按選單、看照片） */
.lfc-ov.lfc-ov-g { position:fixed; z-index:1000; }
.lfc-ov { position:absolute; box-sizing:border-box; inset:0; z-index:90; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; padding:16px; }
.lfc-card { background:var(--surface); color:var(--text); border-radius:18px; width:min(320px, 100%); padding:22px 18px 16px; text-align:center; box-shadow:var(--shadow); box-sizing:border-box; max-height:100%; overflow-y:auto; }
.lfc-confirm-buttons { display:flex; gap:8px; margin-top:14px; }
.lfc-confirm-buttons button { flex:1; margin:0; }
.lfc-notice { position:absolute; z-index:91; top:50%; left:50%; transform:translate(-50%, -50%); width:max-content; max-width:calc(100% - 32px); box-sizing:border-box; padding:10px 16px; border:1px solid var(--border); border-radius:12px; background:var(--surface); color:var(--text); box-shadow:var(--shadow); text-align:center; overflow-wrap:anywhere; pointer-events:none; }
.lfc-notice:empty { opacity:0; }
.lfc-big { width:92px; height:92px; border-radius:50%; overflow:hidden; margin:0 auto; }
.lfc-card h3 { margin:10px 0 2px; font-size:18px; }
.lfc-card p { margin:0; color:var(--muted); font-size:13.5px; }
.lfc-pbtn { display:flex; align-items:center; justify-content:center; gap:6px; width:100%; margin-top:14px; padding:11px; border:0; border-radius:12px; background:var(--pine); color:#fff; font-size:15px; font-weight:700; cursor:pointer; text-decoration:none; }
.lfc-gbtn { display:block; width:100%; margin-top:8px; padding:9px; border:0; border-radius:12px; background:var(--btn); cursor:pointer; font-size:14px; }
.lfc-field { display:flex; gap:6px; margin-top:12px; }
.lfc-field input { flex:1; min-width:0; border:1px solid var(--border); background:var(--btn); border-radius:10px; padding:8px 10px; font-size:14px; }
.lfc-field button { border:0; border-radius:10px; background:var(--pine); color:#fff; padding:0 14px; cursor:pointer; font-size:14px; }
.lfc-avs { display:grid; grid-template-columns:repeat(4, 1fr); gap:12px; margin-top:14px; }
.lfc-avs button { border:0; background:none; cursor:pointer; display:flex; flex-direction:column; align-items:center; gap:4px; font-size:11.5px; color:var(--muted); }
.lfc-avs span { width:54px; height:54px; border-radius:50%; overflow:hidden; display:block; }
.lfc-avs .on span { box-shadow:0 0 0 3px var(--pine); }
.lfc-mem { display:flex; align-items:center; gap:10px; width:100%; padding:8px 4px; border:0; background:none; cursor:pointer; text-align:left; font-size:15px; border-radius:10px; }
.lfc-mem:hover { background:var(--btn); }
.lfc-mem .lfc-av { width:40px; height:40px; }
/* 長按／右鍵：表情列＋選單（樣式跟 LF 的選單一致） */
.lfc-pop-bg { position:fixed; inset:0; z-index:90; }
.lfc-pop { position:fixed; z-index:91; display:flex; flex-direction:column; gap:8px; width:220px; }
.lfc-emos, .lfc-menu { background:#fff; border:1px solid #e2e8f0; box-shadow:0 25px 50px -12px rgba(0,0,0,.3); }
html.dark .lfc-emos, html.dark .lfc-menu { background:#161924; border-color:rgba(255,255,255,.1); }
.lfc-emos { display:flex; justify-content:space-between; border-radius:24px; padding:4px 6px; }
.lfc-emos button { border:0; background:none; font-size:24px; width:34px; height:38px; cursor:pointer; border-radius:10px; padding:0; }
.lfc-emos button:hover { background:var(--btn); }
.lfc-menu { border-radius:14px; padding:6px 0; }
.lfc-menu button { display:flex; align-items:center; gap:12px; width:100%; padding:11px 16px; border:0; background:none; cursor:pointer; text-align:left;
  font-size:15px; font-weight:700; color:#334155; }
html.dark .lfc-menu button { color:#e2e8f0; }
.lfc-menu button:hover { background:#f1f5f9; }
html.dark .lfc-menu button:hover { background:rgba(255,255,255,.05); }
.lfc-menu button.danger { color:#E0525E; }
.lfc-act { display:block; width:100%; padding:12px 8px; border:0; background:none; text-align:left; font-size:15px; cursor:pointer; border-radius:10px; }
.lfc-act:hover { background:var(--btn); }
.lfc-view { position:fixed; inset:0; z-index:95; background:rgba(0,0,0,.92); display:flex; align-items:center; justify-content:center; touch-action:pan-y; }
.lfc-vbox { position:relative; width:100%; height:100%; display:flex; align-items:center; justify-content:center; padding-top:env(safe-area-inset-top); padding-bottom:env(safe-area-inset-bottom); }
.lfc-vbox img { max-width:100%; max-height:100%; object-fit:contain; }
/* 寬螢幕：照片在 App 裡跳出自己的視窗（像電腦版 LINE） */
@media (min-width:640px) { .lfc-view { background:rgba(0,0,0,.45); }
  .lfc-vbox { width:min(960px, 88vw); height:min(760px, 86vh); background:#111; border-radius:16px; overflow:hidden; box-shadow:0 25px 60px rgba(0,0,0,.45); } }
.lfc-vbtn { position:absolute; border:0; background:rgba(255,255,255,.14); color:#fff; border-radius:50%; width:42px; height:42px; font-size:20px; cursor:pointer; display:flex; align-items:center; justify-content:center; text-decoration:none; }
.lfc-vcount { position:absolute; top:22px; left:50%; transform:translateX(-50%); color:#fff; font-size:13px; }
.lfc-tabdot { position:absolute; top:-5px; right:-6px; min-width:18px; height:18px; padding:0 5px; box-sizing:border-box; border-radius:9px; background:#ef4444; color:#fff; font:700 11px/18px "CLC Arial", Arial, sans-serif; text-align:center; pointer-events:none; box-shadow:0 0 0 2px var(--surface); }
@media (max-width:639px) { .lfc-vbtn[data-v=x] { top:calc(12px + env(safe-area-inset-top)) !important; } .lfc-vbtn[data-v=dl] { bottom:calc(14px + env(safe-area-inset-bottom)) !important; } .lfc-vcount { top:calc(22px + env(safe-area-inset-top)); } }
.lfc { transition:transform .32s cubic-bezier(.4,0,.2,1); } /* 加速再減速 */
/* 收合：卡片被「吸進」右下角固定的泡泡（泡泡上顯示未讀數字），點泡泡再「放出來」 */
.lfc.is-collapsed { visibility:hidden; pointer-events:none; }
.lfc-bubble { position:absolute; right:max(var(--lf-pad), env(safe-area-inset-right)); bottom:calc(16px + env(safe-area-inset-bottom)); width:54px; height:54px; border-radius:50%; border:0; padding:0; cursor:pointer; pointer-events:auto; z-index:3;
  display:flex; align-items:center; justify-content:center; color:#fff; background:var(--pine); box-shadow:0 6px 18px rgba(0,0,0,.28); }
@media (min-width:640px) { .lfc-bubble { right:0; } } /* 右緣切齊上面那排（手機：頁面左右內距；寬螢幕：留言板區已有內距） */
.lfc-bubble[hidden], .lfc-bnum[hidden], .lfc-x[hidden] { display:none; }
.lfc-bnum { position:absolute; top:-4px; right:-4px; min-width:20px; height:20px; padding:0 5px; border-radius:10px; background:#ef4444; color:#fff; font:700 11.5px/20px Arial, sans-serif; text-align:center; box-shadow:0 0 0 2px var(--surface); }
/* 浮在訊息上方，保留清單的捲動高度。 */
.lfc-top { position:absolute; inset:0 0 auto; z-index:4; height:48px; display:flex; align-items:center; gap:2px; padding:0 6px;
  background:rgba(0,0,0,.06); -webkit-backdrop-filter:blur(12px); backdrop-filter:blur(12px); border-bottom:1px solid rgba(0,0,0,.06); } /* 淡淡的半透明 header，訊息從底下捲過 */
html.dark .lfc-top { background:rgba(0,0,0,.22); border-bottom-color:rgba(255,255,255,.06); }
.lfc-top .lfc-ibtn { width:44px; height:44px; }
.lfc-top .lfc-ibtn:hover { background:transparent; color:var(--pine); }
.lfc-top strong { flex:1; min-width:0; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:16px; }
.lfc-top .lfc-options [hidden] { display:none !important; }
.lfc-top .lfc-options { position:absolute; top:100%; left:auto; right:8px; transform-origin:top right; background:var(--surface); }
.lfc-options[hidden] { display:none; }
.lfc-findbar:not([hidden]), .lfc-findbar[hidden] + .lfc-pin:not([hidden]) { margin-top:48px; }
.lfc-findbar[hidden] + .lfc-pin[hidden] + .lfc-list { padding-top:48px; }
@media (min-width:640px) { .lfc-top { cursor:grab; } .lfc-top:active { cursor:grabbing; } }

.lf-family-widget, .lf-family-pinned { box-sizing:border-box; width:100%; height:100%; display:flex; align-items:center; justify-content:center;
  gap:10px; padding:4px; border-radius:16px; color:var(--text); background:transparent; cursor:pointer; }
.lf-family-widget img { display:block; width:100%; height:100%; user-select:none; -webkit-user-drag:none; }
.lf-family-note { padding:1px; }
.lf-family-note img { object-fit:contain; }
.lf-family-photo { position:relative; padding:5px clamp(13px, 10%, 23px); border-radius:8px;
  background:color-mix(in srgb, var(--pine) 54%, #182e2a); }
.lf-family-photo img { object-fit:cover; border-radius:3px; }
.lf-family-photo::before, .lf-family-photo::after {
  content:""; position:absolute; inset-block:2px; width:8px; pointer-events:none;
  background:radial-gradient(ellipse 4px 3px at center, var(--cream) 91%, transparent) center / 8px 13px repeat-y;
  opacity:.85; }
.lf-family-photo::before { left:4px; }
.lf-family-photo::after { right:4px; }
.lf-family-pinned { padding:0; overflow:hidden; }
.lf-family-pinned img { width:100%; height:100%; object-fit:cover; user-select:none; -webkit-user-drag:none; }
.lf-family-pinned span { font-size:13px; color:var(--muted); }
.lf-family-gallery button { display:grid; place-items:center; border:0; padding:0; color:var(--text); background:var(--btn); cursor:pointer; }
.lf-family-gallery button:hover { background:var(--btn-h); }
.lf-family-feature textarea { box-sizing:border-box; width:100%; resize:vertical; padding:10px; border:1px solid var(--border);
  border-radius:12px; background:var(--btn); color:var(--text); font:inherit; }
.lf-family-actions { display:flex; gap:8px; }
.lf-family-actions button { margin:0; }
.lf-family-gallery { display:grid; grid-template-columns:repeat(auto-fit, minmax(84px, 1fr)); gap:8px; }
.lf-family-gallery button { overflow:hidden; border-radius:10px; aspect-ratio:1; }
.lf-family-gallery img { width:100%; height:100%; object-fit:cover; }

/* 留言板英文字型跟全站一致（按鈕/輸入框預設不繼承字型） */
.lfc, .lfc button, .lfc input, .lfc textarea, .lfc-view, .lfc-view button, .lfc-view input, .lfc-cam, .lfc-cam button { font-family:"CLC Arial", Arial, "Microsoft JhengHei", "微軟正黑體", "PingFang TC", "Noto Sans TC", sans-serif; }
.lfc-bot { cursor:default; }
.lfc-face { width:100%; height:100%; object-fit:cover; border-radius:50%; display:block; }
.lfc-src { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; margin:10px 0 4px; }
.lfc-src button { border:1px solid var(--border); background:var(--btn); color:var(--text); border-radius:14px; padding:5px 11px; font-size:13px; cursor:pointer; }

/* ↓ 回到最新 */
.lfc-downwrap { position:sticky; bottom:0; height:0; z-index:2; }
.lfc-down { position:absolute; right:2px; bottom:10px; width:40px; height:40px; border-radius:50%; border:1px solid var(--border); background:color-mix(in srgb, var(--surface) 90%, transparent); -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); color:var(--text); display:grid; place-items:center; cursor:pointer; box-shadow:0 4px 12px rgba(0,0,0,.15); padding:0; }
.lfc-down[hidden], .lfc-down b[hidden] { display:none; }
.lfc-down b { position:absolute; top:-6px; right:-6px; min-width:18px; height:18px; padding:0 5px; box-sizing:border-box; border-radius:9px; background:#ef4444; color:#fff; font:700 11px/18px "CLC Arial", Arial, sans-serif; }
.lfc.lfc-drop { outline:3px dashed var(--sage); outline-offset:-6px; }
/* 相機（照 LINE 的介面，底部用淡粉＋sage 漸層） */
.lfc-cam { position:fixed; inset:0; z-index:2000; background:#000; color:#fff; }
.lfc-cam.wide { position:fixed; z-index:2000; background:rgba(0,0,0,.45); display:flex; align-items:center; justify-content:center; }
.lfc-cam-box { position:absolute; inset:0; display:flex; flex-direction:column; overflow:hidden; background:#000; }
.lfc-cam.wide .lfc-cam-box { position:relative; inset:auto; width:min(960px, 88vw); height:min(760px, 86vh); border-radius:16px; box-shadow:0 25px 60px rgba(0,0,0,.45); }
.lfc-cam-view { position:relative; flex:1; min-height:0; overflow:hidden; }
.lfc-cam video, .lfc-cam-shotimg { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
.lfc-cam-shotimg { object-fit:contain; background:#000; z-index:2; }
.lfc-cam video.mirror { transform:scaleX(-1); }
.lfc-cam-fr { position:absolute; pointer-events:none; z-index:1; }
.lfc-cam-count { position:absolute; inset:0; display:grid; place-items:center; font:800 96px/1 "CLC Arial", Arial, sans-serif; color:#fff; text-shadow:0 4px 20px rgba(0,0,0,.5); z-index:3; }
.lfc-cam-count[hidden], .lfc-cam-shotimg[hidden], .lfc-cam [hidden] { display:none !important; }
.lfc-cam.flash .lfc-cam-view::after { content:''; position:absolute; inset:0; background:#fff; z-index:4; animation:lfcFl .3s ease-out forwards; }
@keyframes lfcFl { to { opacity:0; } }
.lfc-cam button { border:0; background:none; cursor:pointer; color:#fff; font-family:inherit; padding:0; }
.lfc-cam-x { position:absolute; top:calc(10px + env(safe-area-inset-top)); left:10px; width:44px; height:44px; display:grid; place-items:center; z-index:5; filter:drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.lfc-cam-side { position:absolute; top:calc(10px + env(safe-area-inset-top)); right:8px; display:flex; flex-direction:column; gap:14px; z-index:5; }
.lfc-cam-side button { position:relative; width:44px; height:44px; display:grid; place-items:center; border-radius:50%; filter:drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
.lfc-cam-side button.on { color:#fbcfe8; }
.lfc-cam-side small { position:absolute; bottom:-2px; right:-2px; font:700 10.5px/1 "CLC Arial", Arial, sans-serif; background:#f472b6; color:#fff; border-radius:8px; padding:2px 4px; }
.lfc-cam.taken .lfc-cam-side, .lfc-cam.taken .lfc-cam-fr { display:none; }
/* 底部不放色塊：按鈕直接浮在畫面上，相框才看得完整 */
.lfc-cam-panel { position:absolute; left:0; right:0; bottom:0; z-index:5; padding:10px 12px calc(22px + env(safe-area-inset-bottom)); color:#fff; }
.lfc-cam-frs button { text-shadow:0 1px 3px rgba(0,0,0,.7); }
/* 相框列：延伸到左右邊緣、頭尾留空、兩側淡出 */
.lfc-cam-frs { display:flex; gap:8px; overflow-x:auto; margin:0 -12px; padding:2px 16px 10px; scrollbar-width:none; scroll-padding:0 16px;
  -webkit-mask-image:linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); mask-image:linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%); }
.lfc-cam-frs::-webkit-scrollbar { display:none; }
.lfc-cam-frs button { flex:none; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:11px; color:inherit; }
.lfc-cam-th { width:48px; height:48px; border-radius:50%; display:grid; place-items:center; overflow:hidden; background:rgba(255,255,255,.7); font-size:20px; border:3px solid transparent; box-sizing:border-box; }
.lfc-cam-th img { width:100%; height:100%; object-fit:cover; }
.lfc-cam-frs button.on .lfc-cam-th { border-color:#f472b6; }
.lfc-cam-bar { display:flex; justify-content:center; }
.lfc-cam-shot { width:76px; height:76px; border-radius:50%; border:5px solid #fff !important; background:transparent !important; box-shadow:0 0 8px rgba(0,0,0,.35), inset 0 0 8px rgba(0,0,0,.2); }
.lfc-cam-shot:active { transform:scale(.92); }
.lfc-cam-after { display:flex; gap:12px; justify-content:center; padding:10px 0 4px; }
.lfc-cam-after button { min-width:120px; height:46px; border-radius:23px; font-size:16px; font-weight:700; background:rgba(255,255,255,.8) !important; color:#4b5563 !important; }
.lfc-cam-after button.go { background:#f472b6 !important; color:#fff !important; }
/* 相機：縮放、對焦框、亮度、手機相機 */
.lfc-cam-base { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; background:#000; }
.lfc-cam.native .lfc-cam-side button:not([data-a="frames"]) { display:none; }
.lfc-cam.native .lfc-cam-side { display:flex; }
.lfc-cam.native .lfc-cam-fr { display:block; }
.lfc-cam-zoom { display:flex; justify-content:center; gap:8px; margin-bottom:10px; }
.lfc-cam-zoom:empty, .lfc-cam-zoom[hidden] { display:none; }
.lfc-cam-zoom { align-items:center; gap:10px; font:700 12px/1 "CLC Arial", Arial, sans-serif; text-shadow:0 1px 3px rgba(0,0,0,.7); }
.lfc-cam-zoom input { width:min(260px, 60vw); accent-color:#f472b6; }
.lfc-cam-zoom b { min-width:34px; color:#fbcfe8; }
.lfc-cam-side button.off svg { opacity:.5; }
.lfc-cam-side button.off::after { content:''; position:absolute; width:26px; height:2px; background:#fff; transform:rotate(-45deg); border-radius:1px; }
.lfc-cam-pol { display:block; width:26px; height:30px; background:#fff; border-radius:2px; box-shadow:0 1px 3px rgba(0,0,0,.3); position:relative; }
.lfc-cam-pol::before { content:''; position:absolute; left:3px; right:3px; top:3px; height:19px; background:#cbd5e1; }
.lfc-cam-focus { position:absolute; width:70px; height:70px; margin:-35px 0 0 -35px; border:2px solid #fbcfe8; border-radius:14px; z-index:3; pointer-events:none; }
.lfc-cam-focus.go { animation:lfcFoc .35s ease-out; }
@keyframes lfcFoc { from { transform:scale(1.5); opacity:.4; } }
.lfc-cam-exp { position:absolute; right:12px; top:50%; transform:translateY(-50%); z-index:5; display:flex; flex-direction:column; align-items:center; gap:6px; font-size:16px; text-shadow:0 1px 3px rgba(0,0,0,.6); }
.lfc-cam-exp input { writing-mode:vertical-lr; direction:rtl; height:150px; width:24px; accent-color:#f472b6; }
.lfc-cam-bar { display:grid !important; grid-template-columns:1fr auto 1fr; align-items:center; }
.lfc-cam-bar[hidden] { display:none !important; }
.lfc-cam-native { justify-self:start; margin-left:6px; display:flex; flex-direction:column; align-items:center; gap:3px; font-size:11px; text-shadow:0 1px 3px rgba(0,0,0,.7); filter:drop-shadow(0 1px 3px rgba(0,0,0,.5)); }
/* 照片編輯 */
.lfc-ed .lfc-cam-box { background:#111; }
.lfc-ed-stage { position:relative; flex:1; min-height:0; box-sizing:border-box; display:grid; place-items:center; overflow:hidden; touch-action:none; }
.lfc-ed-art { position:relative; }
.lfc-ed-cv, .lfc-ed-pen { position:absolute; inset:0; width:100%; height:100%; display:block; }
.lfc-ed-pen { z-index:3; cursor:crosshair; touch-action:none; }
.lfc-ed-layers { position:absolute; inset:0; z-index:2; touch-action:none; }
.lfc-ed-obj { position:absolute; touch-action:none; cursor:move; user-select:none; -webkit-user-select:none; line-height:1.1; white-space:pre; }
.lfc-ed-obj img { width:100%; height:100%; object-fit:contain; pointer-events:none; }
.lfc-ed-obj.sel { outline:2px dashed rgba(255,255,255,.9); outline-offset:4px; }
.lfc-ed-del, .lfc-ed-rs { position:absolute; width:26px; height:26px; border-radius:50%; background:#fff !important; color:#ef4444 !important; font:700 13px/26px Arial, sans-serif !important; text-align:center; box-shadow:0 1px 4px rgba(0,0,0,.4); }
.lfc-ed-del { top:-18px; left:-18px; }
.lfc-ed-rs { bottom:-18px; right:-18px; color:#be185d !important; cursor:nwse-resize; }
.lfc-ed-back { left:6px !important; }
.lfc-ed-tools { position:absolute; top:calc(10px + env(safe-area-inset-top)); right:10px; z-index:5; display:flex; flex-direction:column; gap:12px; align-items:flex-end; }
.lfc-ed-tools button { display:flex; align-items:center; gap:10px; font-size:14.5px; font-weight:700; text-shadow:0 1px 3px rgba(0,0,0,.7); }
.lfc-ed-tools button svg { width:46px; height:46px; padding:11px; box-sizing:border-box; border-radius:50%; background:rgba(40,40,40,.65); }
.lfc-ed-bottom { position:absolute; left:0; right:0; bottom:0; z-index:5; padding:8px 12px calc(14px + env(safe-area-inset-bottom)); }
.lfc-ed-frs button { text-shadow:0 1px 3px rgba(0,0,0,.7); }
.lfc-ed-bar { display:flex; justify-content:space-between; align-items:center; padding:4px 6px 0; }
.lfc-ed-dl { width:52px; height:52px; display:grid; place-items:center; filter:drop-shadow(0 1px 3px rgba(0,0,0,.6)); }
.lfc-ed-send { width:66px; height:66px; border-radius:50%; display:grid; place-items:center; background:#f472b6 !important; color:#fff !important; box-shadow:0 4px 14px rgba(244,114,182,.5); }
.lfc-ed-send svg { margin-left:4px; }
.lfc-ed-sub, .lfc-ed-sheet { position:absolute; left:0; right:0; bottom:0; z-index:6; padding:12px 14px calc(14px + env(safe-area-inset-bottom)); background:rgba(17,17,17,.82); -webkit-backdrop-filter:blur(10px); backdrop-filter:blur(10px); border-radius:18px 18px 0 0; display:flex; flex-direction:column; gap:10px; }
.lfc-ed-chips { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }
.lfc-ed-chips button { min-height:34px; padding:0 14px !important; border-radius:17px; background:rgba(255,255,255,.12) !important; font-size:14px; display:inline-flex; align-items:center; gap:4px; }
.lfc-ed-chips button.on { background:#f472b6 !important; }
.lfc-ed-chips button.hand { font-family:"Segoe Script", "Snell Roundhand", "Bradley Hand", "Dancing Script", cursive; }
.lfc-ed-chips .lfc-ed-col { width:30px; min-height:30px; height:30px; padding:0 !important; border-radius:50%; border:2px solid rgba(255,255,255,.5) !important; }
.lfc-ed-chips .lfc-ed-col.on { outline:3px solid #f472b6; outline-offset:2px; background-clip:padding-box; }
.lfc-ed-ok { display:flex; gap:10px; justify-content:flex-end; }
.lfc-ed-ok button { min-width:84px; height:40px; border-radius:20px; background:rgba(255,255,255,.15) !important; font-size:15px; font-weight:700; }
.lfc-ed-ok button.go { background:#f472b6 !important; }
.lfc-ed-tin { width:100%; box-sizing:border-box; height:44px; border-radius:12px; border:0; padding:0 14px; font-size:16px; background:rgba(255,255,255,.95); color:#111; }
.lfc-ed-sheet { max-height:55%; }
.lfc-ed-sgrid { overflow-y:auto; display:grid; grid-template-columns:repeat(auto-fill, minmax(68px, 1fr)); gap:8px; }
.lfc-ed-sgrid button { aspect-ratio:1; border-radius:12px; background:rgba(255,255,255,.08) !important; padding:4px !important; }
.lfc-ed-sgrid img { width:100%; height:100%; object-fit:contain; }
.lfc-ed-sgrid .emo { font-size:38px; }
.lfc-ed-crop { position:absolute; inset:0; touch-action:none; }
.lfc-ed-crop canvas { position:absolute; }
.lfc-ed-cbox { position:absolute; border:2px solid #fff; box-shadow:0 0 0 9999px rgba(0,0,0,.55); cursor:move; touch-action:none;
  background-image:linear-gradient(rgba(255,255,255,.35) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.35) 1px, transparent 1px); background-size:33.333% 33.333%; background-position:-1px -1px; }
.lfc-ed-cbox i { position:absolute; width:22px; height:22px; border:4px solid #fbcfe8; }
.lfc-ed-cbox [data-h="nw"] { left:-5px; top:-5px; border-right:0; border-bottom:0; cursor:nwse-resize; }
.lfc-ed-cbox [data-h="ne"] { right:-5px; top:-5px; border-left:0; border-bottom:0; cursor:nesw-resize; }
.lfc-ed-cbox [data-h="sw"] { left:-5px; bottom:-5px; border-right:0; border-top:0; cursor:nesw-resize; }
.lfc-ed-cbox [data-h="se"] { right:-5px; bottom:-5px; border-left:0; border-top:0; cursor:nwse-resize; }
.lfc-ed-cbox i::after { content:''; position:absolute; inset:-12px; }
/* 裁切：上方取消／完成（純文字，照 LINE） */
.lfc-ed-top { position:absolute; top:0; left:0; right:0; z-index:6; display:flex; justify-content:space-between; padding:calc(12px + env(safe-area-inset-top)) 18px 8px; }
.lfc-ed-top button { font-size:17px; font-weight:700; padding:6px 4px !important; text-shadow:0 1px 3px rgba(0,0,0,.6); }
.lfc-ed-cropbar { background:transparent; -webkit-backdrop-filter:none; backdrop-filter:none; }
