/* P3 My Workspace — premium mobile-first shell (EN/BN, light/dark, 320–430+) */
.page-workspace .page-hero { padding-bottom: 0.75rem; }
.ws-mount { min-height: 50vh; max-width: 100%; overflow-x: clip; }

.ws-shell {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 0 0 calc(1.5rem + env(safe-area-inset-bottom, 0px));
  min-width: 0;
  max-width: 100%;
}

.ws-appbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  position: sticky;
  top: 0;
  z-index: 4;
  padding: 0.65rem 0;
  margin: 0 -0.15rem;
  background: color-mix(in srgb, var(--bg, #f8fafc) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
html[data-theme="dark"] .ws-appbar,
body.theme-dark .ws-appbar {
  background: color-mix(in srgb, var(--bg, #0f172a) 88%, transparent);
}

.ws-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted, #64748b);
}
.ws-h1 {
  margin: 0.15rem 0 0;
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
}
.ws-lead { margin: 0; color: var(--muted); max-width: 40rem; line-height: 1.45; font-size: 0.95rem; }

.ws-switcher {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: min(100%, 11.5rem);
  font-size: 0.8rem;
  color: var(--muted);
}
.ws-switcher select {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border, #cbd5e1);
  background: var(--surface-solid, var(--surface, #fff));
  color: var(--text);
  font: inherit;
  padding: 0.45rem 0.65rem;
}

.ws-picker-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.65rem;
}
@media (min-width: 360px) {
  .ws-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 720px) {
  .ws-picker-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ws-pick-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  text-align: left;
  min-height: 5.5rem;
  padding: 0.9rem 0.95rem;
  border-radius: 16px;
  border: 1px solid var(--border, #e2e8f0);
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--surface, #fff) 92%, #0f766e 8%), var(--surface, #fff));
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.ws-pick-card:hover,
.ws-pick-card:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, #0f766e 45%, var(--border));
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  outline: none;
}
.ws-pick-title { font-weight: 700; font-size: 0.98rem; }
.ws-pick-meta { font-size: 0.8rem; color: var(--muted); }
.ws-pick-badge {
  margin-top: 0.35rem;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #0f766e;
}

.ws-section { display: flex; flex-direction: column; gap: 0.65rem; }
.ws-section-head h2 { margin: 0; font-size: 1.05rem; }
.ws-section-head .section-lead { margin: 0.2rem 0 0; font-size: 0.85rem; color: var(--muted); line-height: 1.4; }
.ws-section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.ws-qa-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
@media (max-width: 359px) {
  .ws-qa-grid { grid-template-columns: 1fr; }
}
.ws-qa {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.8rem 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  color: inherit;
  text-decoration: none;
  min-height: 4.25rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.ws-qa:hover,
.ws-qa:focus-visible {
  border-color: #0f766e;
  transform: translateY(-1px);
  outline: none;
}
.ws-qa-label { font-weight: 650; font-size: 0.92rem; }
.ws-qa-hint { font-size: 0.7rem; color: var(--muted); line-height: 1.3; }

.ws-list { display: flex; flex-direction: column; gap: 0.45rem; }
.ws-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  color: inherit;
  text-decoration: none;
}
.ws-link-card:hover,
.ws-link-card:focus-visible { border-color: #0f766e; outline: none; }
.ws-link-card--draft { border-style: dashed; }
.ws-link-title { font-weight: 600; font-size: 0.92rem; }
.ws-link-meta { font-size: 0.75rem; color: var(--muted); }

.ws-search-row { display: flex; }
.ws-search {
  width: 100%;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-solid, var(--surface, #fff));
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 0.55rem 0.75rem;
}

.ws-export-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
@media (min-width: 390px) {
  .ws-export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.ws-export-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.2rem;
  text-align: left;
  padding: 0.85rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 90%, #134e4a 10%), var(--surface));
  color: inherit;
  font: inherit;
  text-decoration: none;
  cursor: pointer;
  min-height: 5rem;
}
.ws-export-fmt {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0f766e;
}
.ws-export-scope { font-weight: 650; font-size: 0.9rem; }
.ws-export-note { font-size: 0.75rem; color: var(--muted); line-height: 1.35; }

.ws-backup,
.ws-transfer,
.ws-quickstart {
  padding: 0.75rem;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
}

/* P6 Device Transfer wizard */
.xf-shell { display: flex; flex-direction: column; gap: 0.85rem; }
.xf-head { display: flex; flex-direction: column; gap: 0.35rem; }
.xf-h2 { margin: 0; font-size: 1.05rem; letter-spacing: -0.01em; }
.xf-lead { margin: 0; color: var(--muted, #64748b); font-size: 0.9rem; line-height: 1.45; }
.xf-actions { display: flex; flex-direction: column; gap: 0.5rem; }
.xf-cta { min-height: 48px; width: 100%; justify-content: center; }
@media (min-width: 420px) {
  .xf-actions { flex-direction: row; flex-wrap: wrap; }
  .xf-cta { width: auto; flex: 1 1 12rem; }
}
.xf-bullets { margin: 0; padding-left: 1.15rem; font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.xf-bullets li { margin: 0.2rem 0; }
.xf-back { align-self: flex-start; min-height: 44px; margin: 0 0 0.25rem; }
.xf-ws-list { display: flex; flex-direction: column; gap: 0.45rem; }
.xf-ws {
  display: flex; gap: 0.65rem; align-items: flex-start;
  padding: 0.7rem 0.75rem; border-radius: 12px;
  border: 1px solid var(--border, #cbd5e1);
  background: color-mix(in srgb, var(--surface, #fff) 92%, #0f766e 8%);
  font-size: 0.9rem;
}
.xf-ws input { margin-top: 0.2rem; width: 1.15rem; height: 1.15rem; }
.xf-ws strong { display: block; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.78rem; }
.xf-ws small { display: block; color: var(--muted); font-size: 0.78rem; margin-top: 0.15rem; word-break: break-word; }
.xf-progress { margin: 0.35rem 0; }
.xf-progress .fst-progress {
  height: 8px; border-radius: 999px; background: rgba(148, 163, 184, 0.35); overflow: hidden;
}
.xf-progress .fst-progress > span {
  display: block; height: 100%; width: 0; background: #0f766e; transition: width 0.2s ease;
}
.xf-preview { display: flex; flex-direction: column; gap: 0.65rem; }
.xf-totals {
  max-height: 12rem; overflow: auto; padding: 0.65rem;
  border-radius: 10px; border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface, #fff) 88%, #64748b 12%);
  font-size: 0.75rem; white-space: pre-wrap; word-break: break-word;
}
.bk-transfer-mount {
  margin-top: 0.75rem; padding-top: 0.75rem;
  border-top: 1px dashed var(--border, #cbd5e1);
}
html[data-theme="dark"] .xf-ws,
body.theme-dark .xf-ws {
  background: color-mix(in srgb, var(--surface, #0f172a) 90%, #0f766e 10%);
}

.ws-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.ws-privacy, .ws-foot, .ws-status { margin: 0; line-height: 1.4; }
.ws-toast { margin: 0; padding: 0.65rem 0.8rem; border-radius: 12px; font-size: 0.88rem; }
.ws-toast--info { background: rgba(15, 118, 110, 0.1); }
.ws-toast--error { background: rgba(185, 28, 28, 0.12); color: #b91c1c; }

@media (prefers-reduced-motion: reduce) {
  .ws-pick-card,
  .ws-qa { transition: none; }
  .ws-pick-card:hover,
  .ws-qa:hover { transform: none; }
}
