/* #region zone:desk.style.profile — หน้าโปรไฟล์และการใช้งาน และป้าย beta */
/* Profile panel (desk-profile.js), owner 2026-09-25. Built on the shared .desk-dialog (desk-chat.css):
   centred with a scrim on desktop/tablet, a bottom sheet on phones. Same tokens as the rest of the Desk. */
.profile-dialog {
  width: min(440px, calc(100vw - 32px));
  max-height: min(640px, calc(100dvh - 48px));
}
.profile-head {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
}
.profile-head .desk-dialog-title {
  margin-bottom: var(--sp-3);
}
.profile-head .icon-btn {
  margin: -6px -8px 0 0;
  flex-shrink: 0;
}
.profile-who {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-1) var(--sp-2);
}
.profile-name {
  font-size: 14px;
  font-weight: 700;
}
.profile-login {
  font-size: var(--u-text-xs);
  color: var(--muted);
}
.profile-note {
  margin: var(--sp-2) 0 0;
  font-size: var(--u-text-xs);
  line-height: 1.6;
  color: var(--muted);
}
.profile-status {
  margin: 10px 0 0;
  padding: var(--sp-2) 10px;
  border-radius: var(--r-inner);
  font-size: var(--u-text-xs);
  line-height: 1.6;
  background: var(--tag-down-bg);
  color: var(--tag-down-fg);
}
.profile-rows {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: var(--sp-2);
  margin: 14px 0 0;
}
.profile-row {
  padding: 10px var(--sp-3);
  border: 1px solid var(--line);
  border-radius: var(--r-inner);
  background: var(--panel2);
  min-width: 0;
}
/* Questions (first) and the reset time (last) span the panel; the two token counts sit side by side. */
.profile-row:first-child,
.profile-row:last-child {
  grid-column: 1 / -1;
}
.profile-row dt {
  font-size: var(--u-text-xs);
  color: var(--muted);
}
.profile-row dd {
  margin: 3px 0 0;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.profile-sub {
  margin: var(--sp-4) 0 6px;
  font-size: var(--u-text-xs);
  font-weight: 700;
  color: var(--muted);
}
.profile-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.profile-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: 7px 2px;
  border-bottom: 1px solid var(--line);
  font-size: var(--u-text-sm);
}
.profile-feature:last-child {
  border-bottom: 0;
}
.profile-feature-flag {
  flex-shrink: 0;
  font-size: var(--u-text-xs);
  font-weight: 700;
  padding: 2px var(--sp-2);
  border-radius: var(--u-radius-pill);
  background: var(--panel2);
  color: var(--faint);
  border: 1px solid var(--line);
}
.profile-feature.is-on .profile-feature-flag {
  background: var(--acc-soft);
  color: var(--accent-text);
  border-color: var(--acc-ring);
}

/* Phones: a bottom sheet (full width, rounded top, above the home indicator). */
@media (max-width: 599px) {
  .profile-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 88dvh;
    margin: auto 0 0;
    border-radius: 16px 16px 0 0;
    border-bottom: 0;
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
  .profile-dialog[open] {
    animation: stSheetIn 0.2s ease-out;
  }
}
@keyframes stSheetIn {
  from {
    transform: translateY(24px);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .profile-dialog[open] {
    animation: none;
  }
}

/* "(beta)" next to the header profile chip and in the panel title. */
.beta-label {
  flex-shrink: 0;
  font-size: var(--u-text-xs);
  font-weight: 600;
  color: var(--header-well-text);
  letter-spacing: 0.02em;
}
.profile-dialog .beta-label {
  color: var(--faint);
  font-size: var(--u-text-xs);
  font-weight: 600;
}
/* Sign-in / LINE setup tabs on the login screen: 44px tall, 8px apart. The shared login-shell.css sets 40px
   and is byte-copied to Monitor, so the Desk overrides it here (this file loads after it). */
.login-shell .tabs {
  gap: var(--sp-2);
}
.login-shell .tab {
  min-height: 44px;
}
/* #endregion */
