.auth-panel {
  max-width: 28rem;
  margin-inline: auto;
}

.auth-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.auth-heading img { flex: 0 0 56px; width: 56px; height: 56px; }

.form-note {
  color: var(--muted);
}

.field-meta {
  margin-left: .35rem;
  color: var(--muted);
  font-size: .875rem;
  font-weight: 400;
}

.auth-panel .auth-provider {
  display: flex;
  justify-content: center;
  width: 100%;
  padding: .8rem 1rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 650;
  text-decoration: none;
}

.auth-panel .auth-provider:disabled {
  background: var(--paper);
  color: var(--muted);
  cursor: default;
}

.auth-panel a.auth-provider:hover {
  border-color: var(--forest);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-block: 1.5rem;
  color: var(--muted);
  font-size: .875rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-top: 1px solid var(--line);
}

.auth-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem;
  padding: .25rem;
  margin: 1.5rem 0;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--paper);
}

.auth-modes a {
  padding: .6rem .5rem;
  border-radius: .5rem;
  color: var(--forest);
  font-weight: 650;
  text-align: center;
  text-decoration: none;
}

.auth-modes a:hover { text-decoration: underline; }
.auth-modes [aria-current="page"] { background: var(--forest); color: white; }
.auth-panel form button { width: 100%; }

.profile-heading {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: .5rem 1rem;
}

.profile-progress {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 650;
}

.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0 0;
  padding: 0 0 1rem;
  border-bottom: 1px solid var(--line);
}

.profile-tabs a {
  padding: .5rem .85rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--forest);
  font-size: .875rem;
  font-weight: 650;
  text-decoration: none;
}

.profile-tabs a:hover {
  border-color: var(--forest);
}

.profile-tabs a[aria-current="page"] {
  border-color: var(--forest);
  background: var(--forest);
  color: #fff;
}

.profile-section {
  margin-top: 1.5rem;
}

.profile-section h2 {
  margin-bottom: .35rem;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  align-items: start;
}

.profile-question {
  min-inline-size: 0;
  margin: 0;
  padding: .8rem 1rem 1rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
}

.profile-question legend {
  max-width: 100%;
  padding: 0 .3rem;
  font-weight: 650;
}

.profile-options {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.workspace-panel .profile-option {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 36px;
  margin: 0;
  padding: .35rem .7rem;
  border: 1px solid var(--line);
  border-radius: .65rem;
  background: white;
  font-size: .9rem;
  font-weight: 500;
  cursor: pointer;
}

.workspace-panel .profile-option input[type="checkbox"] {
  flex: none;
  width: 1rem;
  height: 1rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--forest);
}

.profile-option:has(input:checked) {
  border-color: var(--forest);
  background: #e9eee5;
}

.profile-other {
  margin-top: .5rem;
}

.workspace-panel .profile-other-detail {
  margin: .6rem 0 0;
  color: var(--muted);
  font-size: .9rem;
}

@supports selector(:has(*)) {
  .profile-other:not(:has(input:checked)) .profile-other-detail {
    display: none;
  }
}

.profile-submit {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.profile-save-only {
  border-color: var(--line);
  background: transparent;
  color: var(--ink);
}

.profile-save-only:hover { background: #e9eee5; }
.profile-next { display: inline-block; margin-top: .75rem; color: var(--muted); }

.profile-saved {
  color: var(--forest);
  font-weight: 650;
}

.profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}

.profile-actions form {
  margin: 0;
}

.profile-actions button {
  padding: .5rem .8rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.profile-intensities { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:14px; margin:1.15rem 0 .45rem; }
.profile-intensity { border:1px solid var(--line); border-radius:14px; padding:15px; background:#fffefa; min-width:0; }
.intensity-label { display:flex; align-items:center; justify-content:space-between; gap:9px; }
.intensity-label label { font-weight:700; color:var(--ink); }
.intensity-label output { padding:3px 8px; border-radius:20px; color:var(--forest); background:#e7eee1; font-weight:750; font-variant-numeric:tabular-nums; min-width:3.4rem; text-align:center; }
.profile-intensity input[type=range] { width:100%; min-height:36px; accent-color:var(--forest); cursor:pointer; padding:0; margin:.45rem 0 0; border:0; background:transparent; }
.intensity-scale { display:flex; justify-content:space-between; font-size:.75rem; color:var(--muted); margin-bottom:.55rem; }
.profile-intensity summary,.profile-extra summary { color:var(--forest); font-weight:650; cursor:pointer; }
.profile-intensity summary { font-size:.86rem; }
.profile-intensity-detail { display:block; margin-top:.45rem; }
.profile-intensity-detail textarea { width:100%; resize:vertical; border:1px solid var(--line); background:var(--paper); border-radius:8px; padding:.55rem; }
.profile-extra { margin:0 0 1rem; padding:.65rem .85rem; border:1px solid var(--line); border-radius:10px; }

.studio-swing-loader[hidden] { display:none; }
.studio-swing-loader { position:fixed; z-index:20; inset:auto 14px 14px auto; display:flex; align-items:center; gap:9px; max-width:calc(100vw - 28px); padding:7px 14px 7px 9px; border:1px solid var(--line); border-radius:14px; background:#fffefa; color:#24372f; font-weight:650; box-shadow:0 6px 26px #14231d1f; pointer-events:none; }
.studio-swing-loader img { width:68px; height:56px; object-fit:contain; }
