/* Independent desktop profile workspace. The mobile template and its layout
   rules remain untouched; only shared rendered data blocks are reused here. */
html[data-device-kind="desktop"] .profile-panel {
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

html[data-device-kind="desktop"] .profile-dashboard--desktop {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: var(--app-bg);
  color: var(--app-text);
}

html[data-device-kind="desktop"] .profile-dashboard--desktop[hidden] {
  display: none !important;
}

html[data-device-kind="desktop"] .profile-desktop__sidebar {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 27px 22px 24px;
  border-right: 1px solid var(--app-border);
  background: color-mix(in srgb, var(--app-surface-soft) 70%, var(--app-bg));
}

html[data-device-kind="desktop"] .profile-desktop__eyebrow {
  margin: 0;
  color: var(--app-accent);
  font: 800 11px/1.2 var(--font-ui);
  letter-spacing: .14em;
  text-transform: uppercase;
}

html[data-device-kind="desktop"] .profile-desktop__identity {
  display: grid;
  justify-items: center;
  gap: 17px;
  margin-top: 0;
  text-align: center;
}

html[data-device-kind="desktop"] .profile-desktop__avatar-wrap {
  position: relative;
  isolation: isolate;
  width: 154px;
  height: 154px;
}

html[data-device-kind="desktop"] .profile-desktop__progress {
  position: absolute;
  z-index: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

html[data-device-kind="desktop"] .profile-desktop__progress-track,
html[data-device-kind="desktop"] .profile-desktop__progress-ring {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

html[data-device-kind="desktop"] .profile-desktop__progress-track {
  stroke: color-mix(in srgb, var(--app-border) 68%, transparent);
  stroke-dasharray: 236 327;
}

html[data-device-kind="desktop"] .profile-desktop__progress-ring {
  stroke: var(--app-accent);
  filter: drop-shadow(0 0 5px color-mix(in srgb, var(--app-accent) 68%, transparent));
  transition: stroke-dasharray 500ms ease;
}

html[data-device-kind="desktop"] .profile-desktop__avatar {
  position: absolute;
  z-index: 1;
  inset: 12px;
  display: grid;
  overflow: hidden;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--app-accent) 26%, var(--app-border));
  border-radius: 50%;
  background: var(--app-surface-strong);
  color: var(--app-accent);
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
}

html[data-device-kind="desktop"] .profile-desktop__avatar--interactive {
  appearance: none;
  padding: 0;
  cursor: pointer;
}

html[data-device-kind="desktop"] .profile-desktop__avatar--interactive:focus-visible {
  outline: 2px solid var(--app-accent);
  outline-offset: 5px;
}

html[data-device-kind="desktop"] .profile-desktop__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

html[data-device-kind="desktop"] .profile-desktop__avatar span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #f8c45e;
  font-size: 36px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  letter-spacing: .04em;
  text-shadow: 0 2px 14px rgb(0 0 0 / .7);
}

html[data-device-kind="desktop"] .profile-desktop__progress-label {
  position: absolute;
  z-index: 2;
  right: 50%;
  bottom: -4px;
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 12px;
  transform: translateX(50%);
  border-radius: 999px;
  background: var(--app-accent);
  color: var(--app-on-accent);
  font: 800 11px var(--font-ui);
  white-space: nowrap;
  box-shadow: 0 5px 18px rgb(0 0 0 / .28);
}

html[data-device-kind="desktop"] .profile-desktop__identity-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

html[data-device-kind="desktop"] .profile-desktop__name {
  overflow-wrap: anywhere;
  color: var(--app-text);
  font-size: 20px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.03em;
}

html[data-device-kind="desktop"] .profile-desktop__plan {
  padding: 3px 6px;
  border-radius: 5px;
  border: 1px solid var(--app-border);
  color: var(--app-muted);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .06em;
}

html[data-device-kind="desktop"] .profile-desktop__plan.is-pro {
  border-color: color-mix(in srgb, var(--app-accent) 55%, var(--app-border));
  color: var(--app-accent);
}

html[data-device-kind="desktop"] .profile-desktop__divider {
  width: 100%;
  height: 1px;
  margin: 27px 0 20px;
  background: var(--app-border);
}

html[data-device-kind="desktop"] .profile-desktop__settings-panel {
  display: grid;
  min-height: 0;
  gap: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--theme-accent-rgb) / .72) transparent;
}

html[data-device-kind="desktop"] .profile-desktop__range {
  min-height: 0;
}

html[data-device-kind="desktop"] .profile-desktop__range .profile-desktop__range-host {
  margin: 0;
  padding: 0;
}

html[data-device-kind="desktop"] .profile-desktop__range .vocal-range-editor {
  grid-template-rows: minmax(250px, 1fr) auto;
  width: 100%;
  height: clamp(300px, calc(100vh - 370px), 500px);
  min-height: 300px;
  padding-bottom: 10px;
  border-radius: 16px;
  box-shadow: none;
}

html[data-device-kind="desktop"] .profile-desktop__range .vocal-range-editor__body {
  padding-top: 12px;
}

html[data-device-kind="desktop"] .profile-desktop__range .vocal-range-editor__controls {
  gap: 6px;
  padding: 8px 8px 0 58px;
}

html[data-device-kind="desktop"] .profile-desktop__settings-actions {
  display: grid;
  gap: 7px;
  margin-top: 2px;
}

html[data-device-kind="desktop"] .profile-desktop__settings-actions button {
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  font-size: 11px;
  white-space: normal;
}

html[data-device-kind="desktop"] .profile-desktop__settings-actions button.is-calibrating {
  border-color: var(--app-accent);
  background: rgb(var(--theme-accent-rgb) / .14);
  color: var(--app-accent);
}

html[data-device-kind="desktop"] .profile-desktop__workspace {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  overflow-y: auto;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgb(var(--theme-accent-rgb) / .78) rgb(var(--theme-text-rgb) / .06);
}

html[data-device-kind="desktop"] .profile-desktop__workspace-header {
  flex: 0 0 auto;
  padding: 0 32px;
}

html[data-device-kind="desktop"] .profile-desktop__workspace-header h1 {
  margin: 7px 0 0;
  color: var(--app-text);
  font: 800 clamp(28px, 3vw, 40px)/1.05 var(--font-heading);
  letter-spacing: -.04em;
}

html[data-device-kind="desktop"] .profile-desktop__workspace-header p:last-child {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--app-muted);
  font: 400 14px/1.5 var(--font-text);
}

html[data-device-kind="desktop"] .profile-desktop__content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
  align-items: start;
  min-height: 0;
  padding: 26px 32px 42px;
}

html[data-device-kind="desktop"] .profile-desktop__practice-panel {
  display: grid;
  grid-template-columns: minmax(150px, .75fr) minmax(155px, .8fr) minmax(250px, 1.2fr) minmax(340px, 2fr);
  min-width: 0;
  min-height: 176px;
}

html[data-device-kind="desktop"] .profile-desktop__practice-summary {
  display: contents;
}

html[data-device-kind="desktop"] .profile-desktop__summary-stat,
html[data-device-kind="desktop"] .profile-desktop__summary-action,
html[data-device-kind="desktop"] .profile-desktop__school-slot {
  position: relative;
  min-width: 0;
  padding: 25px 24px;
}

html[data-device-kind="desktop"] .profile-desktop__summary-stat {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 9px;
}

html[data-device-kind="desktop"] .profile-desktop__summary-stat + .profile-desktop__summary-stat::before,
html[data-device-kind="desktop"] .profile-desktop__summary-action::before,
html[data-device-kind="desktop"] .profile-desktop__school-slot::before {
  position: absolute;
  top: 24px;
  bottom: 24px;
  left: 0;
  width: 1px;
  background: var(--app-border);
  content: "";
}

html[data-device-kind="desktop"] .profile-desktop__summary-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--app-muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

html[data-device-kind="desktop"] .profile-desktop__summary-icon {
  display: grid;
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  place-items: center;
  border-radius: 9px;
  color: var(--app-accent);
  background: color-mix(in srgb, var(--app-accent) 14%, var(--app-surface));
}

html[data-device-kind="desktop"] .profile-desktop__summary-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

html[data-device-kind="desktop"] .profile-desktop__summary-stat > strong {
  overflow: hidden;
  color: var(--app-text);
  font-size: 19px;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.055em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-device-kind="desktop"] .profile-desktop__summary-stat > small,
html[data-device-kind="desktop"] .profile-desktop__summary-action > small {
  color: var(--app-muted);
  font-size: 11px;
}

html[data-device-kind="desktop"] .profile-desktop__summary-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

html[data-device-kind="desktop"] .profile-desktop__summary-action > strong {
  overflow: hidden;
  color: var(--app-text);
  font-size: 19px;
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-device-kind="desktop"] .profile-desktop__summary-action > small b {
  color: var(--app-text);
}

html[data-device-kind="desktop"] .profile-desktop__summary-action .profile-dashboard__daily-button {
  align-self: flex-start;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 12px;
  font-size: 12px;
}

html[data-device-kind="desktop"] .profile-desktop__school-slot {
  grid-column: 4;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--app-surface-soft) 75%, transparent), transparent);
}

html[data-device-kind="desktop"] .profile-desktop__school-mark {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border-radius: 15px;
  color: var(--app-accent);
  background: color-mix(in srgb, var(--app-accent) 14%, var(--app-surface));
}

html[data-device-kind="desktop"] .profile-desktop__school-mark svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

html[data-device-kind="desktop"] .profile-desktop__school-copy {
  min-width: 0;
}

html[data-device-kind="desktop"] .profile-desktop__school-copy > span {
  color: var(--app-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .01em;
}

html[data-device-kind="desktop"] .profile-desktop__school-copy h2 {
  margin: 7px 0 5px;
  color: var(--app-text);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.02em;
}

html[data-device-kind="desktop"] .profile-desktop__school-copy p {
  max-width: 390px;
  margin: 0;
  color: var(--app-muted);
  font-size: 13px;
  line-height: 1.5;
}

html[data-device-kind="desktop"] .profile-desktop__school-homework-heading {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid color-mix(in srgb, var(--app-border) 75%, transparent);
  color: var(--app-accent);
  font-size: 11px;
  letter-spacing: .02em;
  font-weight: 800;
}

html[data-device-kind="desktop"] .profile-desktop__school-homework-empty {
  color: var(--app-muted);
  font-size: 10px;
  line-height: 1.35;
}

html[data-device-kind="desktop"] .profile-desktop__school-homework-empty {
  margin-top: 7px;
}

html[data-device-kind="desktop"] .profile-dashboard--desktop [data-profile-today] {
  min-width: 0;
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel {
  grid-column: 1 / -1;
  grid-row: auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 20px 0 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel > .profile-panel__notes-header {
  display: none;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-panel__notes-header {
  gap: 18px;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-dashboard__notes-heading strong {
  font-size: 20px;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-panel__notes {
  margin-top: 0;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-voice-map__viewport {
  min-height: 238px;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-voice-map__note {
  width: 156px;
  flex-basis: 156px;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-voice-map__result {
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-voice-map__note-head {
  margin-bottom: 6px;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-voice-map__result-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 1.1fr);
  align-items: center;
  gap: 10px 18px;
  border-top: 1px solid var(--app-border);
  border-left: 0;
  padding-top: 14px;
  padding-left: 0;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-voice-map__attempts {
  grid-column: 1 / -1;
  margin-top: 0;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-voice-map__stability-title {
  margin-top: 0;
}

html[data-device-kind="desktop"] .profile-desktop__notes-panel .profile-voice-map__stability {
  margin-top: 0;
}

html[data-device-kind="desktop"] .profile-voice-map__result-details {
  padding-top: 14px;
  border-top: 1px solid var(--app-border);
}

html[data-device-kind="desktop"] .profile-voice-map__result-details-title {
  color: var(--app-accent);
  font: 700 10px var(--font-ui);
  letter-spacing: .08em;
  text-transform: uppercase;
}

html[data-device-kind="desktop"] .profile-voice-map__result-details dl {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 10px 0 0;
}

html[data-device-kind="desktop"] .profile-voice-map__result-details dl > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding-bottom: 6px;
  border-bottom: 1px solid color-mix(in srgb, var(--app-border) 72%, transparent);
}

html[data-device-kind="desktop"] .profile-voice-map__result-details dt {
  min-width: 0;
  overflow: hidden;
  color: var(--app-muted);
  font: 400 11px var(--font-text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-device-kind="desktop"] .profile-voice-map__result-details dd {
  margin: 0;
  color: var(--app-text);
  font: 700 11px var(--font-ui);
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

html[data-device-kind="desktop"] .profile-voice-map__result-details dl > div.is-primary dd {
  color: var(--app-accent);
  font-size: 14px;
}

@media (max-width: 980px) {
  html[data-device-kind="desktop"] .profile-dashboard--desktop {
    grid-template-columns: 1fr;
    height: auto;
    min-height: 100%;
    overflow: visible;
  }

  html[data-device-kind="desktop"] .profile-desktop__sidebar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 22px;
    border-right: 0;
    border-bottom: 1px solid var(--app-border);
  }

  html[data-device-kind="desktop"] .profile-desktop__identity {
    display: flex;
    justify-content: flex-start;
    gap: 12px;
    margin-top: 0;
    text-align: left;
  }

  html[data-device-kind="desktop"] .profile-desktop__avatar-wrap {
    width: 84px;
    height: 84px;
  }

  html[data-device-kind="desktop"] .profile-desktop__identity-copy {
    justify-items: start;
  }

  html[data-device-kind="desktop"] .profile-desktop__divider {
    display: none;
  }

  html[data-device-kind="desktop"] .profile-desktop__settings-panel {
    grid-column: 1 / -1;
    width: 100%;
  }

  html[data-device-kind="desktop"] .profile-desktop__workspace-header,
  html[data-device-kind="desktop"] .profile-desktop__content {
    padding-right: 22px;
    padding-left: 22px;
  }

  html[data-device-kind="desktop"] .profile-desktop__workspace-header {
    grid-template-columns: 1fr;
  }

  html[data-device-kind="desktop"] .profile-desktop__practice-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-device-kind="desktop"] .profile-desktop__school-slot {
    grid-column: 1 / -1;
    min-height: 145px;
    border-top: 1px solid var(--app-border);
  }

  html[data-device-kind="desktop"] .profile-desktop__school-slot::before {
    display: none;
  }

  html[data-device-kind="desktop"] .profile-desktop__content {
    grid-template-columns: 1fr;
  }

  html[data-device-kind="desktop"] .profile-desktop__notes-panel {
    grid-column: 1;
    grid-row: auto;
  }
}

@media (max-width: 640px) {
  html[data-device-kind="desktop"] .profile-desktop__sidebar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  html[data-device-kind="desktop"] .profile-desktop__identity {
    width: 100%;
    justify-content: center;
  }

  html[data-device-kind="desktop"] .profile-desktop__workspace-header,
  html[data-device-kind="desktop"] .profile-desktop__content {
    padding: 20px 14px 28px;
  }

  html[data-device-kind="desktop"] .profile-desktop__practice-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  html[data-device-kind="desktop"] .profile-desktop__summary-action {
    grid-column: 1 / -1;
    border-top: 1px solid var(--app-border);
  }

  html[data-device-kind="desktop"] .profile-desktop__summary-action::before {
    display: none;
  }
}
