/* MEH logo, and the Profile room. */
.logo-img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; box-shadow: var(--panel-shadow); }
.splash-logo .logo-img { width: 150px; height: 150px; }
.brand-sub { font-family: var(--font-body); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-dim); }

.pf { display: grid; gap: 14px; }
.pf-banner { margin: 0; padding: 10px 12px; border-radius: var(--radius-xs); background: var(--accent-soft); color: var(--text); font-size: 13px; }
.pf-card { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 14px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--panel-edge); }
.pf-avatar { width: 76px; height: 76px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: var(--btn); color: var(--text); font: 700 30px var(--font-head); border: 2px solid var(--accent); flex: 0 0 auto; }
.pf-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pf-id { flex: 1 1 160px; min-width: 0; }
.pf-id h3 { margin: 0; font-family: var(--font-head); font-size: 22px; color: var(--text); }
.pf-user { display: block; font-size: 12px; color: var(--text-dim); }
.pf-joined { margin: 4px 0 0; font-size: 12px; }
.pf-upload { cursor: pointer; }

.pf-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.pf-stat { padding: 10px; border-radius: var(--radius-xs); background: var(--card); border: 1px solid var(--panel-edge); }
.pf-stat b { display: block; font-family: var(--font-head); font-size: 20px; color: var(--text); }
.pf-stat span { font-size: 12px; color: var(--text-dim); }
.pf-stat.big b { color: var(--accent); }

.pf-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.pf-badge { padding: 10px; border-radius: var(--radius-xs); border: 1px dashed var(--panel-edge); background: var(--card); opacity: .55; }
.pf-badge.on { opacity: 1; border-style: solid; border-color: var(--accent); }
.pf-badge b { display: block; font-family: var(--font-head); color: var(--text); }
.pf-badge small { font-size: 12px; color: var(--text-dim); }

.pf-add { display: flex; gap: 8px; flex-wrap: wrap; }
.pf-add input, .pf-edit input {
  min-height: 36px; padding: 6px 10px; border-radius: var(--radius-xs);
  border: 1px solid var(--field-edge); background: var(--field); color: var(--field-text); font: inherit; flex: 1 1 200px;
}
.pf-friends { display: grid; gap: 6px; }
.pf-friend { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius-xs); background: var(--card); border: 1px solid var(--panel-edge); }
.pf-friend i { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); display: grid; place-items: center; font-style: normal; font-weight: 700; color: var(--text); flex: 0 0 auto; }
.pf-friend > div { flex: 1; min-width: 0; }
.pf-friend small { color: var(--text-dim); font-size: 12px; }
.pf-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); display: inline-block; margin-right: 4px; }
.pf-dot.off { background: var(--text-dim); }

.pf-edit { padding: 10px 12px; border-radius: var(--radius-xs); border: 1px solid var(--panel-edge); background: var(--card); }
.pf-edit summary { cursor: pointer; font-family: var(--font-head); color: var(--text); margin-bottom: 8px; }
.pf-edit .field { display: grid; gap: 4px; margin-bottom: 8px; }
.pf-edit .field input { min-height: 36px; padding: 6px 10px; border-radius: var(--radius-xs); border: 1px solid var(--field-edge); background: var(--field); color: var(--field-text); font: inherit; }
.pf-check { display: flex; align-items: center; gap: 8px; margin: 8px 0; }

/* Header chip: your picture, streak and name, top right. */
.profile-chip {
  display: grid; justify-items: center; gap: 1px; flex: 0 0 auto;
  padding: 2px 6px; background: none; border: 0; cursor: pointer; color: var(--text);
  font: inherit; border-radius: var(--radius-xs);
}
.profile-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-av {
  width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: var(--btn); color: var(--text); font: 700 15px var(--font-head); border: 2px solid var(--accent);
}
.chip-av img { width: 100%; height: 100%; object-fit: cover; }
.chip-fire { font-size: 11px; font-weight: 700; line-height: 1.1; color: var(--text); }
.chip-name { font-size: 11px; line-height: 1.1; color: var(--text-dim); max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Shop */
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.shop-item { display: grid; gap: 6px; padding: 12px; border-radius: var(--radius-xs); background: var(--card); border: 1px solid var(--panel-edge); }
.shop-item b { font-family: var(--font-head); color: var(--text); }
.shop-item small { color: var(--text-dim); font-size: 12px; }
.shop-item.owned { border-color: var(--accent); }
.shop-act .btn[disabled] { opacity: .5; cursor: not-allowed; }
.shop-perks { margin: 4px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 13px; }
.shop-perks li.on { color: var(--text); font-weight: 700; }

/* Keybinds in Settings */
.keys { margin: 6px 0; }
.keys summary { cursor: pointer; font-family: var(--font-head); color: var(--text); margin-bottom: 6px; }
.keyrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0; font-size: 13px; color: var(--text); }
.keyrow .btn.on { outline: 2px solid var(--accent); }

/* The MEH title takes the logo's blue, and the profile chip sits top right, level with the logo. */
.brand h1 { color: #0078e0; text-shadow: none; }
.bar { position: relative; }
/* Compact chip: the picture, then the streak and name stacked tight under it, in the top right corner. */
.profile-chip { position: absolute; top: 10px; right: 14px; z-index: 2; gap: 0; padding: 0; line-height: 1; }
.chip-av { width: 44px; height: 44px; font-size: 17px; }
.chip-fire { font-size: 11px; line-height: 1; }
.chip-name { font-size: 11px; line-height: 1.1; max-width: 96px; }
.bar .tools { padding-right: 104px; }   /* keeps Settings and Halt clear of the chip */
@media (max-width: 720px) { .bar .tools { padding-right: 0; } }

/* Tools or Training choice, shown after the splash. */
.gate { position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 18px; padding: 24px; text-align: center; background: var(--bg-image); }
.gate[hidden] { display: none; }
.gate h2 { margin: 0; font-family: var(--font-head); font-size: 28px; color: var(--text); }
.gate-row { display: grid; grid-template-columns: repeat(2, minmax(150px, 230px)); gap: 14px; }
.gate-btn { display: grid; gap: 6px; padding: 22px 16px; border-radius: var(--radius); background: var(--card); color: var(--text); border: 1px solid var(--panel-edge); box-shadow: var(--panel-shadow); cursor: pointer; font: inherit; }
.gate-btn b { font-family: var(--font-head); font-size: 22px; }
.gate-btn span { font-size: 13px; color: var(--text-dim); }
.gate-btn:hover, .gate-btn:focus-visible { border-color: var(--accent); outline: none; }
@media (max-width: 520px) { .gate-row { grid-template-columns: 1fr; width: min(260px, 100%); } }
.tab.switch { border-style: dashed; }

/* Account prompt on the Profile page. Accounts are not built yet. */
.pf-account { display: grid; gap: 6px; padding: 14px; border-radius: var(--radius); background: var(--accent-soft); border: 1px solid var(--accent); color: var(--text); }
.pf-account b { font-family: var(--font-head); font-size: 16px; }
.pf-account span { font-size: 13px; }
.pf-account-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }

/* Note, chord and scale keys inside Keybinds. */
.keys-sub { margin: 8px 0 0; }
.keys-sub summary { cursor: pointer; font-size: 13px; font-weight: 700; color: var(--text); padding: 4px 0; }

/* Shop cards show their own theme. Two thick diagonal stripes sit in the bottom-left corner, clear of the text. */
.shop-item { position: relative; overflow: hidden; background: var(--bg-image); color: var(--text); border: 1px solid var(--panel-edge); padding-bottom: 44px; }
.shop-item::before {
  content: ""; position: absolute; left: 0; bottom: 0; width: 64px; height: 44px; pointer-events: none;
  background: linear-gradient(60deg, transparent 0 14%, var(--accent) 14% 44%, transparent 44% 52%, var(--accent2) 52% 82%, transparent 82%);
}
.shop-item > * { position: relative; }
.shop-item b { color: var(--text); }
.shop-item small { color: var(--text-dim); }
.shop-item .btn { background: var(--btn); color: var(--btn-text); }
.shop-item .btn.go { background: var(--go); color: var(--go-text); }
