.grass-account-page {
  background: #f2f5f2;
  min-height: 100vh;
}

.grass-account-page [hidden] {
  display: none !important;
}

.account-shell {
  margin: 0 auto;
  min-height: 68vh;
}

#accountSignedOut {
  max-width: 480px;
  margin: 48px auto;
  padding: 24px;
}

.account-primary-button,
.account-secondary-button {
  align-items: center;
  border-radius: 7px;
  box-sizing: border-box;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  justify-content: center;
  min-height: 43px;
  padding: 11px 18px;
  text-decoration: none;
}

.account-primary-button {
  background: var(--color-forest-main);
  border: 1px solid var(--color-forest-main);
  color: white;
}

.account-primary-button:hover,
.account-primary-button:focus { background: #1d4b38; outline: none; }
.account-primary-button:disabled { cursor: wait; opacity: 0.64; }

.account-secondary-button {
  background: white;
  border: 1px solid var(--color-border);
  color: var(--color-forest-main);
}

.account-profile-form {
  background: white;
  border: 1px solid rgba(35, 48, 42, 0.09);
  border-radius: 8px;
}

.account-app {
  margin: 0 auto;
  max-width: 1200px;
}

.account-app-layout {
  display: grid;
  grid-template-columns: 202px minmax(0, 1fr);
  min-height: 72vh;
}

.account-sidebar {
  background: #fbfcfb;
  border-right: 1px solid rgba(35, 48, 42, 0.12);
  padding: 14px 10px 40px;
}

.account-sidebar-inner {
  position: sticky;
  top: 76px;
}

.account-tabs {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.account-tabs a {
  align-items: center;
  border-left: 3px solid transparent;
  border-radius: 5px;
  color: var(--color-text-secondary);
  display: flex;
  font-size: 0.84rem;
  font-weight: 750;
  gap: 8px;
  justify-content: space-between;
  padding: 8px 9px;
  text-decoration: none;
  white-space: nowrap;
}

.account-tabs a:hover { background: #edf2ed; color: var(--color-text-primary); }
.account-tabs a.is-active { background: #dceddf; border-color: var(--color-forest-main); color: var(--color-forest-main); }
.account-tabs .account-tab-count {
  align-items: center;
  background: rgba(35, 48, 42, 0.08);
  border-radius: 4px;
  color: inherit;
  display: inline-flex;
  font-size: 0.65rem;
  font-weight: 800;
  justify-content: center;
  min-width: 19px;
  padding: 1px 5px;
}

.account-tabs .account-tab-count:empty { display: none; }

.account-sidebar-actions {
  border-top: 1px solid rgba(35, 48, 42, 0.1);
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px 6px 0;
}

.account-sidebar-actions .account-primary-button,
.account-sidebar-actions .account-secondary-button {
  font-size: 0.78rem;
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  width: 100%;
}

.account-sidebar-actions .account-create-list-status {
  margin: 0;
  text-align: center;
}

.account-workspace {
  min-width: 0;
  padding: 16px 24px 52px;
}

.account-panel {
  max-width: 1060px;
}

.account-error {
  align-items: center;
  background: white;
  border: 1px solid rgba(35, 48, 42, 0.09);
  border-radius: 8px;
  color: var(--color-text-secondary);
  display: flex;
  gap: 10px;
  justify-content: center;
  padding: 38px;
}

.account-error { color: #8b2e19; }

.account-dashboard {
  display: grid;
  gap: 18px;
}

.account-home-section { margin: 0; min-width: 0; }
.account-home-heading {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 7px;
}

.account-home-heading h2 {
  color: var(--color-text-primary);
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0;
}

.account-home-heading a {
  color: var(--color-forest-main);
  font-size: 0.78rem;
  font-weight: 800;
  text-decoration: none;
}

.account-home-heading a:hover { text-decoration: underline; }

.account-history-list,
.account-repertoire-list {
  background: white;
  border: 1px solid rgba(35, 48, 42, 0.11);
  border-radius: 8px;
  overflow: hidden;
}

.account-history-row {
  align-items: center;
  background: white;
  border-top: 1px solid rgba(35, 48, 42, 0.09);
  color: var(--color-text-primary);
  display: flex;
  gap: 10px;
  justify-content: space-between;
  min-height: 42px;
  padding: 5px 10px;
  text-decoration: none;
}

.account-history-row:first-child { border-top: 0; }
.account-history-row:hover { background: #f6f9f6; }

.account-history-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.account-history-copy strong {
  font-size: 0.84rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-history-copy span,
.account-history-count {
  color: var(--color-text-muted);
  font-size: 0.68rem;
  margin-top: 1px;
}

.account-history-count { flex: 0 0 auto; margin-top: 0; }

.account-list-loading {
  color: var(--color-text-muted);
  font-size: 0.78rem;
  padding: 14px 10px;
  text-align: center;
}

.account-repertoire-song.is-custom-song { background:#fff6df; }
a.account-repertoire-song.is-custom-song:hover { background:#ffefc7; }

.account-home-learning-grid {
  display: grid;
  gap: 12px;
  grid-auto-columns: minmax(220px, calc((100% - 24px) / 3));
  grid-auto-flow: column;
  overflow-x: auto;
  padding-bottom: 7px;
  scroll-snap-type: x proximity;
}

.account-home-learning-card {
  background: white;
  border: 1px solid rgba(35,48,42,.1);
  border-radius: 8px;
  color: var(--color-text-primary);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: start;
  text-decoration: none;
}

.account-home-learning-card:hover { border-color: rgba(39,91,68,.38); }
.account-home-learning-media {
  align-items: center;
  aspect-ratio: 16 / 9;
  background: #dfe8df;
  color: var(--color-forest-main);
  display: flex;
  font-size: 0.75rem;
  font-weight: 800;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.account-home-learning-media img { height: 100%; object-fit: cover; width: 100%; }
.account-home-learning-card strong {
  font-size: 0.87rem;
  overflow: hidden;
  padding: 10px 12px 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.account-featured-setlist {
  background: var(--color-forest-main);
  border-radius: 8px;
  color: white;
  display: block;
  height: 176px;
  overflow: hidden;
  position: relative;
  text-decoration: none;
}

.account-featured-setlist img { height: 100%; object-fit: cover; width: 100%; }
.account-featured-shade {
  background: linear-gradient(90deg, rgba(13, 38, 27, 0.92), rgba(13, 38, 27, 0.48) 62%, rgba(13, 38, 27, 0.08));
  inset: 0;
  position: absolute;
}

.account-featured-copy {
  bottom: 20px;
  display: flex;
  flex-direction: column;
  left: 22px;
  position: absolute;
  right: 22px;
}

.account-featured-copy strong { font-size: 1.35rem; line-height: 1.2; }
.account-featured-copy span { font-size: 0.8rem; margin-top: 5px; opacity: 0.82; }

.account-repertoire-song { align-items:center; border-top:1px solid rgba(35,48,42,.08); color:var(--color-text-primary); display:flex; justify-content:space-between; min-height:50px; padding:10px 16px; text-decoration:none; }
.account-repertoire-song:first-child { border-top:0; }
a.account-repertoire-song:hover { background:#f7faf7; color:var(--color-forest-main); }

.account-empty { color: var(--color-text-secondary); padding: 26px 20px; text-align: center; }
.account-empty strong { color: var(--color-text-primary); }

.account-profile-form input[type="text"],
.account-profile-form input[type="number"] { background: white; border: 1px solid var(--color-border); border-radius: 8px; box-sizing: border-box; color: var(--color-text-primary); font: inherit; min-height: 43px; padding: 10px 12px; }
.account-inline-status { color: var(--color-text-secondary); font-size: 0.78rem; margin: 9px 0 0; }
.account-create-list-status:empty { display: none; }
.account-list-selection-actions { align-items:center; display:flex; gap:10px; margin-bottom:8px; min-height:28px; }
.account-list-selection-actions .account-inline-status { margin:0; }
.account-list-delete-button { background:white; border:1px solid #b76a5d; border-radius:6px; color:#8b2e19; cursor:pointer; font:inherit; font-size:.74rem; font-weight:800; min-height:28px; padding:4px 10px; }
.account-list-delete-button:hover { background:#fff4f1; }
.account-list-delete-button:disabled { cursor:wait; opacity:.6; }
.account-list-section { margin-top: 18px; }
.account-list-section-owned { margin-top: 0; }
.account-list-section h2 { font-size: 0.9rem; margin: 0 0 6px; }
.account-list-grid { background: white; border: 1px solid rgba(35,48,42,.1); border-radius: 6px; overflow: hidden; }
.account-list-card { align-items:center; background:white; border-top:1px solid rgba(35,48,42,.09); box-sizing:border-box; color:var(--color-text-primary); display:grid; gap:8px; grid-template-columns:24px minmax(0,1fr); min-height:44px; padding:5px 10px; }
.account-list-card:first-child { border-top: 0; }
.account-list-card:hover { background: #f6f9f6; }
.account-list-card:has(.account-list-select input:checked) { background:#f1f8f4; }
.account-list-select { align-items:center; cursor:pointer; display:flex; height:28px; justify-content:center; width:24px; }
.account-list-select input { accent-color:var(--color-forest-main); height:16px; margin:0; width:16px; }
.account-list-link { color:inherit; min-width:0; text-decoration:none; }
.account-list-card-shared { grid-template-columns:minmax(0,1fr); text-decoration:none; }
.account-list-copy { display:flex; flex-direction:column; min-width:0; }
.account-list-copy strong { font-size:0.84rem; line-height:1.15; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-list-copy span { color:var(--color-text-muted); font-size:0.68rem; line-height:1.15; margin-top:1px; }

.account-profile-form { max-width: 780px; padding: 24px; }
.account-avatar-editor { align-items:center; border-bottom:1px solid rgba(35,48,42,.08); display:grid; gap:20px; grid-template-columns:104px auto; justify-content:start; margin-bottom:20px; padding-bottom:20px; }
.account-avatar-preview { align-items:center; background:#eef3ec; border:2px solid white; border-radius:50%; box-shadow:0 0 0 1px var(--color-border); color:var(--color-forest-main); display:flex; font-family:'Lora', Georgia, serif; font-size:2rem; height:96px; justify-content:center; overflow:hidden; width:96px; }
.account-avatar-preview img { height:100%; object-fit:cover; width:100%; }
.account-avatar-dialog { background:white; border:0; border-radius:14px; box-shadow:0 22px 65px rgba(25,48,40,.28); color:var(--color-text-primary); max-height:min(720px, calc(100vh - 32px)); padding:0; width:min(580px, calc(100vw - 32px)); }
.account-avatar-dialog::backdrop { background:rgba(20,35,29,.58); }
.account-avatar-dialog-header { align-items:center; border-bottom:1px solid var(--color-border); display:flex; justify-content:space-between; padding:16px 18px; }
.account-avatar-dialog-header h2 { font-family:'Lora', Georgia, serif; font-size:1.25rem; margin:0; }
.account-dialog-close { background:transparent; border:0; color:var(--color-text-secondary); cursor:pointer; font-size:1.75rem; line-height:1; padding:2px 5px; }
.account-avatar-dialog-body { overflow-y:auto; padding:18px; }
.account-avatar-dialog-current { align-items:center; display:flex; gap:16px; }
.account-avatar-dialog-preview { flex:0 0 auto; height:76px; width:76px; }
.account-photo-upload-button { background:var(--color-forest-main); border:1px solid var(--color-forest-main); border-radius:9px; color:white; cursor:pointer; display:inline-flex; font-size:.9rem; font-weight:800; min-height:42px; padding:10px 16px; }
.account-avatar-dialog-body > .account-inline-status:empty { display:none; }
.account-avatar-picker { display:grid; gap:9px; grid-template-columns:repeat(auto-fill, minmax(54px, 1fr)); margin-top:16px; }
.account-avatar-option { align-items:center; background:white; border:2px solid transparent; border-radius:10px; cursor:pointer; display:flex; height:54px; justify-content:center; padding:4px; width:54px; }
.account-avatar-option:hover { background:#f2f6f1; border-color:#b8c9bb; }
.account-avatar-option.is-selected { background:#e9f2e9; border-color:var(--color-forest-main); }
.account-avatar-option:focus-visible { outline:3px solid rgba(39,91,68,.24); outline-offset:1px; }
.account-avatar-option img { display:block; height:44px; object-fit:contain; width:44px; }
.account-avatar-dialog-actions { border-top:1px solid var(--color-border); display:flex; gap:10px; justify-content:flex-end; padding:14px 18px; }
.account-form-row { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; }
.account-profile-form label { color: var(--color-text-primary); font-size: 0.82rem; font-weight: 800; }
.account-profile-form label > input[type="text"] { display: block; margin-top: 7px; width: 100%; }
.account-bpm-field { align-items: center; border-bottom: 1px solid rgba(35,48,42,.08); display: flex; justify-content: space-between; margin-top: 18px; padding: 0 0 18px; }
.account-bpm-field span { align-items: center; color: var(--color-text-muted); display: flex; font-size: 0.75rem; gap: 7px; }
.account-bpm-field input { max-width: 84px; }
.account-profile-form fieldset { border: 0; margin: 22px 0 0; padding: 0; }
.account-profile-form legend { font-family: 'Lora', Georgia, serif; font-size: 1.05rem; font-weight: 700; }
.account-instrument-grid { display: grid; gap: 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 12px; max-width: 360px; }
.account-instrument-option { cursor: pointer; min-width: 0; position: relative; }
.account-instrument-option input { height: 1px; opacity: 0; position: absolute; width: 1px; }
.account-instrument-choice { align-items: center; display: flex; flex-direction: column; gap: 6px; }
.account-instrument-icon { align-items: center; background: #f5f5f1; border: 2px solid var(--color-border); border-radius: 50%; display: flex; height: 58px; justify-content: center; transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease; width: 58px; }
.account-instrument-icon img { display: block; height: auto; max-height: 34px; max-width: 34px; object-fit: contain; opacity: .58; width: auto; }
.account-instrument-label { color: var(--color-text-muted); font-size: .75rem; font-weight: 700; line-height: 1.2; overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; width: 100%; }
.account-instrument-option input:checked + .account-instrument-choice .account-instrument-icon { background: var(--color-forest-main); border-color: var(--color-forest-main); box-shadow: 0 4px 10px rgba(39,91,68,.2); }
.account-instrument-option input:checked + .account-instrument-choice .account-instrument-icon img { filter: brightness(0) invert(1); opacity: 1; }
.account-instrument-option input:checked + .account-instrument-choice .account-instrument-label { color: var(--color-forest-main); }
.account-instrument-option input:focus-visible + .account-instrument-choice .account-instrument-icon { box-shadow: 0 0 0 3px rgba(39,91,68,.2); }
.account-profile-actions { align-items: center; display: flex; gap: 14px; margin-top: 24px; }
.account-profile-actions .account-inline-status { margin: 0; }

@media (max-width: 800px) {
  .account-app-layout { display: block; }
  .account-sidebar {
    border-bottom: 1px solid rgba(35, 48, 42, 0.12);
    border-right: 0;
    padding: 5px 12px 8px;
  }
  .account-sidebar-inner { position: static; }
  /* Every tab in view, on a second line if needed: nothing to scroll to. */
  .account-tabs {
    column-gap: 14px;
    flex-direction: row;
    flex-wrap: wrap;
    row-gap: 0;
    width: 100%;
  }
  .account-sidebar-actions {
    border-top: 0;
    display: flex;
    margin-top: 5px;
    max-width: 360px;
    padding: 0;
  }
  .account-sidebar-actions .account-primary-button,
  .account-sidebar-actions .account-secondary-button {
    flex: 1;
    width: auto;
  }
  .account-sidebar-actions .account-create-list-status { align-self: center; text-align: left; }
  .account-tabs a {
    border-bottom: 3px solid transparent;
    border-left: 0;
    border-radius: 0;
    padding: 8px 1px 7px;
    white-space: nowrap;
  }
  .account-tabs a:hover { background: transparent; }
  .account-tabs a.is-active { background: transparent; border-color: var(--color-forest-main); }
  .account-workspace { padding: 14px 16px 44px; }
  .account-home-learning-grid { grid-auto-columns: minmax(220px, calc((100% - 12px) / 2)); }
}

@media (max-width: 600px) {
  .account-tabs { column-gap: 12px; }
  .account-tab-saved { display: none; }
  .account-sidebar-actions .account-primary-button,
  .account-sidebar-actions .account-secondary-button {
    height: auto;
    line-height: 1.15;
    padding: 6px 8px;
    text-align: center;
  }
  .account-workspace { padding: 12px 12px 40px; }
  .account-home-learning-grid { grid-auto-columns: 78vw; }
  .account-history-copy strong { white-space: normal; }
  .account-featured-setlist { height: 154px; }
  .account-featured-copy strong { font-size: 1.15rem; }
  .account-form-row { grid-template-columns: 1fr; }
  .account-avatar-editor { align-items:center; grid-template-columns:76px auto; }
  .account-avatar-preview { height:70px; width:70px; }
  .account-bpm-field { align-items: flex-start; flex-direction: column; gap: 8px; }
}

.is-account-signed-in .songs-new-footer { display: none; }

/* Profile: your profile as the public sees it (templates/_profile.html),
   your public address, and the form to change it. */
.account-profile-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; margin-bottom: 18px; }
.account-profile-title h2 { margin: 0 0 4px; font-family: var(--font-serif); font-size: 1.5rem; }
.account-profile-address { color: var(--color-forest-main); font-size: 0.92rem; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.account-profile-address:hover { text-decoration: underline; }
.account-profile-head-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.account-profile-head-actions .account-inline-status { margin: 0; }
.account-profile-form { margin-bottom: 22px; }
.account-profile-actions { flex-wrap: wrap; }
.profile-page.is-embedded { max-width: none; margin: 0; padding: 0; }
