.profile-form {
  gap: 22px;
}

.profile-form-heading,
.profile-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.profile-form-heading h2 {
  margin: 0;
}

#edit-profile {
  padding: 7px 12px;
  font-size: 13px;
}

.profile-username-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid #b8afc7;
  border-radius: 8px;
  background: #fff;
}

.profile-username-setting div {
  display: grid;
  gap: 2px;
}

.profile-username-setting span {
  font-size: 13px;
  font-weight: 700;
}

.profile-username-setting strong {
  font-size: 15px;
}

.profile-username-setting button {
  padding: 5px 8px;
  font-size: 11px;
}

.profile-view input[readonly],
.profile-view textarea[readonly] {
  border: 1px solid #b8afc7;
  background: #fff;
  box-shadow: none;
  color: #080714;
  cursor: default;
}

.profile-view .edit-only {
  display: none;
}

.profile-guide-games {
  display: grid;
  gap: 13px;
  padding: 16px;
  border: 1px solid rgba(0, 209, 24, .42);
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(0, 209, 24, .07), rgba(164, 114, 215, .1));
}

.profile-subsection-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.profile-subsection-heading > div {
  display: grid;
  gap: 3px;
}

.profile-subsection-heading small { color: var(--muted); }
.profile-subsection-heading button { width: auto; padding: 7px 11px; font-size: 12px; }
.profile-guide-games .guided-game { background: rgba(255,255,255,.72); }

.username-summary,
.username-form {
  max-width: 720px;
  margin: 0 auto 18px;
}

.profile-form .username-form {
  width: 100%;
  max-width: none;
  margin: -12px 0 0;
  padding: 14px;
  border: 1px solid rgba(164,114,215,.65);
  border-radius: 9px;
  background: #f8f3fc;
}

.username-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.username-summary div {
  display: grid;
  gap: 2px;
}

.username-summary button {
  padding: 5px 8px;
  font-size: 11px;
}

.username-warning {
  margin: 0;
  padding: 8px 10px;
  border-left: 3px solid #a472d7;
  background: #f4ecfb;
  color: #080714;
  font-size: 13px;
}

.username-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.username-actions button {
  width: auto;
}

.username-message {
  min-height: 20px;
  margin: 0;
  font-size: 13px;
  font-weight: 800;
}

.username-message.available { color: #087716; }
.username-message.unavailable { color: #a51d2d; }

.username-required {
  border: 2px solid #a472d7;
}

.username-required h2,
.username-required p {
  margin: 0;
}

.hidden {
  display: none !important;
}

.public-profile-details {
  max-width: 720px;
  margin: 0 auto;
}

.public-profile-missing {
  max-width: 650px;
  margin: 30px auto;
}

.crop-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8,7,20,.78);
}

.photo-editor-modal {
  position: fixed;
  inset: 0;
  z-index: 950;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(8,7,20,.84);
}

.photo-editor-dialog {
  width: min(690px,100%);
  max-height: 92vh;
  overflow: auto;
  padding: 20px;
  border: 1px solid rgba(164,114,215,.58);
  border-radius: 14px;
  background: #120b21;
  color: #fff;
  box-shadow: 0 18px 48px rgba(0,0,0,.5), 0 0 28px rgba(95,25,187,.2);
}

.photo-editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.photo-editor-heading h2 { margin: 3px 0 0; color: #fff; }
.photo-editor-heading .eyebrow { color: #a472d7; }
.photo-editor-close { padding: 1px 9px; background: transparent; color: #fff; box-shadow: none; font-size: 25px; }

.photo-upload-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;
  background: rgba(255,255,255,.045);
}

.photo-upload-primary h3,
.photo-upload-primary p { margin: 0; }
.photo-upload-primary p { margin-top: 4px; color: #cfc5db; font-size: 13px; }
.photo-upload-primary button { flex: 0 0 auto; }

.gamerguideify-callout {
  position: relative;
  display: grid;
  grid-template-columns: 38px 1fr;
  gap: 12px;
  margin-top: 15px;
  padding: 17px;
  overflow: hidden;
  border: 1px solid rgba(0,209,24,.48);
  border-radius: 12px;
  background: radial-gradient(circle at 92% 5%,rgba(0,209,24,.13),transparent 34%),linear-gradient(145deg,rgba(95,25,187,.32),rgba(8,7,20,.45));
  box-shadow: inset 0 0 25px rgba(95,25,187,.12);
}

.sparkle-icon { font-size: 27px; filter: drop-shadow(0 0 7px rgba(164,114,215,.8)); }
.gamerguideify-callout h3 { margin: 0 0 6px; color: #fff; }
.gamerguideify-callout p { margin: 5px 0; color: #e9e1f2; line-height: 1.45; }
.gamerguideify-callout > div > button { margin: 10px 0 7px; background: #5f19bb; color: #fff; box-shadow: 0 3px 0 #3d0f78; }
.gamerguideify-callout > div > button.copied { background: #00d118; color: #080714; box-shadow: 0 3px 0 #008b10; }
.gamerguideify-callout small { display: block; margin-top: 9px; color: #bdb2c9; line-height: 1.4; }
.gamerguideify-callout .return-instruction { margin-top: 10px; color: #c9ffcf; font-weight: 800; }

.prompt-preview { margin-top: 7px; }
.prompt-preview summary { width: max-content; color: #d6b7f2; font-size: 12px; font-weight: 800; cursor: pointer; }
.prompt-preview pre { max-height: 240px; overflow: auto; margin: 9px 0 0; padding: 12px; border: 1px solid rgba(164,114,215,.3); border-radius: 8px; background: rgba(8,7,20,.68); color: #e9e1f2; font: 11px/1.5 system-ui,sans-serif; white-space: pre-wrap; }

.crop-dialog {
  width: min(680px, 100%);
  max-height: 94vh;
  overflow: auto;
  padding: 20px;
  border-radius: 14px;
  background: #f7f3fb;
  color: #080714;
  box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.crop-heading,
.crop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.crop-heading h2 {
  margin: 0;
}

.crop-close {
  padding: 2px 10px;
  background: transparent;
  color: #080714;
  box-shadow: none;
  font-size: 26px;
}

.crop-canvas {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 46vh;
  margin: 16px auto;
  border: 3px solid #5f19bb;
  border-radius: 8px;
  background: #080714;
}

.crop-dialog label {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  font-weight: 700;
  color: #080714;
}

.crop-dialog input[type="range"] {
  width: 100%;
  accent-color: #5f19bb;
}

.crop-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span,
.field-title {
  font-weight: 700;
}

.about-field {
  min-height: 150px;
  resize: none;
  line-height: 1.55;
}

.tagline-field {
  min-height: 66px;
  resize: none;
  line-height: 1.4;
}

.guide-style-selected {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  min-height: 38px;
}

.guide-style-selected > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 9px;
  border: 1px solid rgba(164,114,215,.62);
  border-radius: 999px;
  background: rgba(95,25,187,.16);
  color: #5f19bb;
  font-size: 12px;
  font-weight: 800;
}

.remove-style-tag {
  width: 19px;
  height: 19px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  color: currentColor;
  box-shadow: none;
  line-height: 1;
}

.guide-style-picker {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 9px;
}

.guide-style-picker input { min-width: 0; }
.guide-style-picker > button { width: auto; white-space: nowrap; }
.guide-style-picker .game-suggestions { top: calc(100% + 5px); left: 0; right: auto; width: min(440px,100%); }

.games-played-list {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  min-height: 43px;
}

.game-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px 8px 13px;
  border-radius: 7px;
  background: #eee3f8;
  color: #5f19bb;
  font-weight: 700;
}

.remove-game {
  padding: 0;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: transparent;
  color: #5f19bb;
  box-shadow: none;
  font-size: 18px;
  line-height: 1;
}

.remove-game:hover,
.remove-game:active {
  transform: none;
  box-shadow: none;
  background: rgba(95,25,187,.1);
}

.game-add-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.game-add-row button {
  white-space: nowrap;
}

@media(max-width:560px){.game-add-row{grid-template-columns:1fr}.game-add-row button{width:100%}.username-summary,.profile-username-setting,.profile-subsection-heading{align-items:flex-start;flex-direction:column}.username-summary button,.profile-username-setting button,.profile-subsection-heading button{width:100%}.photo-editor-dialog{padding:15px}.photo-upload-primary{align-items:stretch;flex-direction:column}.photo-upload-primary button{width:100%}.gamerguideify-callout{grid-template-columns:1fr}.sparkle-icon{font-size:24px}}
