/* 共用狀態提示列：手機上固定在底部、按鈕夠大好點 */
.cp-status {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  max-width: min(92vw, 480px);
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 10px;
  font-size: 15px; line-height: 1.4;
  background: #1f2937; color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); z-index: 1000;
}
.cp-status[data-kind="error"] { background: #b91c1c; }
.cp-status button {
  min-height: 44px; min-width: 64px; padding: 0 14px;
  border: 1px solid rgba(255,255,255,.7); border-radius: 8px;
  background: transparent; color: inherit; font: inherit; cursor: pointer;
}
.cp-status button:focus-visible { outline: 3px solid #fbbf24; outline-offset: 2px; }
@media (prefers-reduced-motion: no-preference) { .cp-status { transition: opacity .2s; } }
/* 登入／未受邀畫面 */
.cp-auth{position:fixed;inset:0;z-index:2000;display:grid;place-items:center;padding:20px;background:rgba(244,247,245,.97)}
.cp-auth[hidden]{display:none}
.cp-auth-card{width:min(100%,420px);background:#fff;border:1px solid #dce6df;border-radius:14px;padding:28px 24px;box-shadow:0 8px 30px rgba(0,0,0,.08)}
.cp-auth-card h1{font-size:24px;margin:6px 0 12px;line-height:1.4}
.cp-auth-card p{line-height:1.7;margin:0 0 16px}
.cp-auth-brand{font-weight:700;color:#17644e}
.cp-auth-card button{width:100%;min-height:48px;font-size:16px}
.cp-auth-error{color:#962e20;background:#ffe7e2;padding:10px 12px;border-radius:8px}
body.cp-auth-locked{overflow:hidden}
.cp-signed-out{box-sizing:border-box;min-height:calc(100dvh - 84px);display:grid;place-items:center;padding:16px;padding-bottom:max(16px, env(safe-area-inset-bottom))}
.cp-signed-out[hidden],#app-shell[hidden]{display:none !important}
.cp-signed-out .cp-auth-card{width:min(100%,420px);max-width:100%}
.cp-signed-out h1{overflow-wrap:anywhere}
.cp-signed-out button{width:100%;min-height:48px}
.cp-panel{margin:16px 0;padding:16px;border-radius:10px;background:#fff;border:1px solid #dce6df;max-width:100%}
.cp-panel[data-kind="error"]{background:#fff5f5;border-color:#f0c2bc;color:#7f1d1d}
.cp-panel p{margin:0 0 12px;line-height:1.6;overflow-wrap:anywhere}
.cp-panel button{min-height:44px;min-width:44px}
@media(max-width:600px){header{height:auto;flex-wrap:wrap;row-gap:8px;padding-top:12px;padding-bottom:12px}header a:last-child{margin-left:0}.cp-signed-out{min-height:auto;padding:20px 12px 32px}}
.cp-user{margin-left:auto;display:flex;align-items:center;gap:10px;font-size:13px}
.cp-user span{max-width:40vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cp-user button{min-height:40px;padding:6px 14px;margin:0}
.cp-more{min-height:44px;min-width:44px;padding:10px 16px}
