/* T7b — push settings, "加入主畫面" guide, setup hint, app lock screen. Colours from styles.css tokens. */

/* ---------------------------------------------------------------- lock screen (§3.3) */
/* Everything else in .app is hidden (not just covered) while locked or shielded: no text, no focus,
   nothing for screen readers or app-switcher snapshots. Layout is kept, so scroll positions survive. */
.app.app-locked > :not(.lock-screen) { visibility: hidden !important; }

.lock-screen {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: calc(24px + var(--safe-t)) calc(20px + var(--safe-r)) calc(24px + var(--safe-b)) calc(20px + var(--safe-l));
  background: radial-gradient(1100px 620px at 50% -12%, var(--accent-soft) 0%, transparent 62%), var(--bg);
  overflow-y: auto;
}
.lock-card {
  width: 100%; max-width: 380px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px;
}
.lock-logo { width: 88px; height: 88px; border-radius: 22%; box-shadow: var(--shadow-2); margin-bottom: 8px; }
.lock-title { font-size: 28px; font-weight: 800; letter-spacing: 0.01em; }
.lock-sub { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 15px; margin: 0 0 22px; max-width: 100%; }
.lock-sub .icon { color: var(--accent-text); }
.lock-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12em; }
.lock-btn { gap: 10px; }
.lock-error { color: var(--danger); font-size: 14px; margin: 10px 0 0; line-height: 1.5; }
.lock-hint { color: var(--text-3); font-size: 13px; margin: 12px 0 0; }
.lock-out { margin-top: 18px; }
.lock-out-confirm { margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-1); font-size: 14px; color: var(--text-2); }
.lock-out-confirm p { margin: 0 0 10px; line-height: 1.5; }
.lock-shield .lock-card { opacity: 0.9; }
@media (prefers-reduced-motion: no-preference) {
  .lock-screen:not(.lock-shield) .lock-card { animation: lock-in 0.18s ease-out; }
}
@keyframes lock-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- settings: notifications */
.push-status { display: flex; gap: 12px; padding: 14px 16px; align-items: flex-start; }
.push-status + .row-block, .push-status + .row-switch { border-top: 1px solid var(--line); }
.push-icon {
  width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: none;
  background: var(--surface-2); color: var(--text-2);
}
.push-on .push-icon, .push-off .push-icon, .push-install .push-icon { background: var(--accent-soft); color: var(--accent-text); }
.push-denied .push-icon { background: var(--danger-soft); color: var(--danger); }
.push-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.push-text { display: flex; flex-direction: column; gap: 2px; }
.push-text b { font-size: 16px; font-weight: 600; }
.push-text span { font-size: 13.5px; color: var(--text-2); line-height: 1.5; }
.push-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.push-error { color: var(--danger); font-size: 13.5px; margin: 0; line-height: 1.5; }

/* ---------------------------------------------------------------- settings: security */
.lock-suggest {
  display: flex; gap: 12px; align-items: flex-start; flex-wrap: wrap; padding: 12px 16px 14px;
  border-top: 1px solid var(--line); background: var(--warn-bg); color: var(--warn-text);
}
.lock-suggest > .icon { margin-top: 2px; }
.lock-suggest-text { flex: 1 1 220px; display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; line-height: 1.5; }
.lock-suggest-text b { font-size: 15px; }
.lock-suggest .btn { margin-left: auto; }
/* 「立即上鎖」 (T19) */
.lock-now-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 16px 14px; border-top: 1px solid var(--line); }
.lock-now-row .row-hint { flex: 1 1 200px; }
.lock-now-row .btn { gap: 6px; margin-left: auto; }
.lock-now[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.icon-btn.lock-now[aria-disabled="true"]:hover { background: transparent; }

/* ---------------------------------------------------------------- hint card above the room list */
.setup-hint {
  display: flex; align-items: center; gap: 10px; margin: 2px 12px 8px; padding: 10px 6px 10px 12px;
  background: var(--accent-soft); border-radius: 14px; color: var(--text);
}
.setup-hint-icon { color: var(--accent-text); flex: none; display: flex; }
.setup-hint-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; line-height: 1.4; }
.setup-hint-text b { font-size: 14.5px; font-weight: 700; }
.setup-hint-text span { font-size: 12.5px; color: var(--text-2); }
.setup-hint .btn { flex: none; }
.setup-hint-close { width: 36px; height: 36px; color: var(--text-2); }
@media (pointer: coarse) { .setup-hint-close { width: 40px; height: 40px; } }

/* ---------------------------------------------------------------- /install */
.install-lead { display: flex; gap: 14px; align-items: center; margin: 4px 0 18px; }
.install-lead p { margin: 0; line-height: 1.6; color: var(--text-2); }
.install-lead b { color: var(--text); }
.install-icon { width: 56px; height: 56px; border-radius: 22%; box-shadow: var(--shadow-1); flex: none; }
.install-note {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--warn-bg); color: var(--warn-text);
  font-size: 14px; line-height: 1.5; margin: 0 0 16px;
}
.install-note .icon { margin-top: 2px; }
.install-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .install-steps { grid-template-columns: 1fr 1fr; } }
.install-step { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-1); padding: 14px 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.install-step-head { display: flex; align-items: center; gap: 10px; }
.install-step-head h3 { font-size: 17px; font-weight: 700; }
.install-num {
  width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 15px;
  display: flex; align-items: center; justify-content: center; flex: none;
}
.install-step-text { margin: 0; color: var(--text-2); font-size: 14.5px; line-height: 1.6; }
.install-cta { display: flex; justify-content: center; margin: 8px 0 22px; }
.install-text-steps { margin: 0 0 22px; padding: 14px 16px 14px 36px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-1); line-height: 1.7; }
.install-text-steps li + li { margin-top: 4px; }
.install-more { margin-top: 6px; }
.install-more summary { cursor: pointer; font-weight: 600; color: var(--accent-text); padding: 10px 2px; min-height: 44px; }
.install-more[open] summary { margin-bottom: 8px; }
.install-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 32px 16px; }
.install-done h2 { font-size: 22px; }
.install-done p { max-width: 30em; line-height: 1.6; }
.install-done-mark {
  width: 64px; height: 64px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text);
  display: flex; align-items: center; justify-content: center; margin-bottom: 6px;
}

/* illustrations: inline SVG, colours via classes so light / dark both work */
.ill { display: block; width: 100%; max-width: 300px; height: auto; margin: 0 auto; border-radius: 14px; background: var(--surface-2); }
.ill-phone { fill: var(--text-3); opacity: 0.35; }
.ill-screen { fill: var(--surface); }
.ill-home { fill: var(--accent-soft-2); }
.ill-dim { fill: var(--surface-3); }
.ill-bar { fill: var(--surface-2); }
.ill-field { fill: var(--surface-2); stroke: var(--line-2); stroke-width: 1; }
.ill-sheet { fill: var(--surface); stroke: var(--line-2); stroke-width: 1; }
.ill-line { fill: var(--line-2); }
.ill-app { fill: var(--surface); opacity: 0.85; }
.ill-hot { fill: var(--accent-soft); stroke: var(--accent); stroke-width: 2; }
.ill-ring { fill: none; stroke: var(--accent); stroke-width: 2.5; }
.ill-stroke { stroke: var(--text-2); }
.ill-stroke-muted { stroke: var(--text-3); }
.ill-stroke-accent { stroke: var(--accent); }
.ill-toggle { fill: var(--online); }
.ill-knob { fill: #fff; }
.ill-badge { fill: #e5484d; }
.ill-badge-text { fill: #fff; font-size: 9px; font-weight: 700; }
.ill text { font-family: var(--font); }
.ill-text { fill: var(--text); font-size: 13px; }
.ill-text-sm { fill: var(--text-2); font-size: 11px; }
.ill-text-xs { fill: var(--text); font-size: 8px; }
.ill-text-strong { font-weight: 700; fill: var(--text); }
.ill-text-accent { fill: var(--accent-text); }
.ill-text-strong.ill-text-accent { fill: var(--accent-text); }
@media (prefers-reduced-motion: no-preference) {
  .ill-ring { animation: ill-pulse 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
}
@keyframes ill-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
