.profile-showcase {
  background: var(--mode-surface, #fffdf7);
  border: 1px solid var(--mode-line, #e5e5da);
  border-radius: 24px;
  overflow: hidden;
  margin-bottom: 24px;
}
.personality-banner {
  height: 165px;
  position: relative;
  isolation: isolate;
}
.banner-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  z-index: -1;
}
.pattern-dots .banner-pattern {
  background-image: radial-gradient(#fff 2px, transparent 2px);
  background-size: 20px 20px;
}
.pattern-stars .banner-pattern {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='70' height='70'%3E%3Cpath d='M35 13l5 17 17 5-17 5-5 17-5-17-17-5 17-5z' fill='white'/%3E%3C/svg%3E");
}
.pattern-waves .banner-pattern {
  background: repeating-linear-gradient(
    135deg,
    transparent 0 15px,
    #fff 16px 18px,
    transparent 19px 35px
  );
}
.profile-sticker {
  position: absolute;
  right: 25px;
  bottom: 20px;
  background: var(--mode-surface, #fffcf0);
  transform: rotate(12deg);
  padding: 15px;
  border-radius: 18px;
  color: var(--mode-text, #586348);
  box-shadow: 0 3px 0 #0001;
}
.profile-edit-pill {
  position: absolute;
  right: 18px;
  top: 18px;
  border: 0;
  border-radius: 30px;
  background: var(--mode-surface, #fffdf2);
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 10px 14px;
  font-weight: 600;
  font-size: 12px;
}
.banner-caption {
  position: absolute;
  left: 25px;
  top: 25px;
  background: var(--mode-surface, #fffdf2e8);
  color: var(--mode-text, #515640);
  font-size: 11px;
  letter-spacing: 0.04em;
  padding: 7px 12px;
  border-radius: 20px;
}
.showcase-content {
  padding: 0 30px 26px;
  position: relative;
}
.profile-portrait {
  width: 112px;
  height: 112px;
  margin-top: -48px;
  position: relative;
  border: 5px solid var(--mode-line, #fffdf7);
  border-radius: 50%;
  background: var(--mode-surface, #fffdf7);
  flex-shrink: 0;
}
.portrait-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--mode-soft, #e6ebd7);
  display: grid;
  place-items: center;
}
.portrait-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.portrait-inner svg {
  width: 95%;
  height: 115%;
  align-self: end;
}
.portrait-initials {
  font-size: 32px;
  font-weight: 600;
  color: var(--mode-text, #55694a);
}
.decoration-halo {
  box-shadow:
    0 0 0 3px #d2b972,
    0 0 0 7px #f3e9c8;
}
.portrait-decoration span {
  position: absolute;
  color: var(--mode-muted, #b57796);
  font-size: 34px;
  line-height: 1;
  text-shadow: 0 2px #fff;
}
.portrait-decoration span:first-child {
  left: -11px;
  top: 12px;
}
.portrait-decoration span:nth-child(2) {
  right: -10px;
  bottom: 13px;
}
.portrait-decoration span:nth-child(3) {
  right: 5px;
  top: -9px;
  font-size: 25px;
}
.decoration-sparkles span {
  color: var(--mode-muted, #ad8b37);
}
.portrait-orbit {
  position: absolute;
  inset: -9px;
  border: 1.5px solid var(--mode-line, #8e89ad);
  border-radius: 50%;
  transform: rotate(-25deg);
}
.portrait-orbit i {
  position: absolute;
  width: 12px;
  height: 12px;
  background: var(--mode-soft, #b3a6d4);
  border: 2px solid var(--mode-line, #fffdf7);
  border-radius: 50%;
  left: 10px;
  top: 9px;
}
.portrait-orbit i:nth-child(2) {
  left: auto;
  right: -4px;
  top: 45px;
}
.portrait-orbit i:nth-child(3) {
  top: auto;
  bottom: 0;
  left: 36px;
}
.profile-name-block {
  margin-top: 15px;
}
.profile-name-block h2 {
  font-size: 30px;
  margin: 0 0 5px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.profile-mini-spark {
  font-size: 21px;
  color: var(--mode-muted, #9ba66a);
}
.profile-name-block p {
  margin: 0 0 7px;
  color: var(--mode-text, #68715f);
  font-size: 14px;
}
.profile-campus {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--mode-muted, #777e70);
  font-size: 12px;
}
.profile-status {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--mode-muted, #76806c);
}
.profile-status strong {
  color: var(--mode-text, #495540);
  font-size: 12px;
  font-weight: 500;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8aa867;
  display: inline-block;
  flex-shrink: 0;
}
.profile-bio {
  font-size: 14px;
  line-height: 1.7;
  margin: 17px 0;
  color: var(--mode-text, #535b4c);
  overflow-wrap: anywhere;
}
.profile-interest-chips {
  gap: 6px;
}
.profile-interest-chips span {
  font-size: 11px;
}
.profile-friendship {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--mode-muted, #748065);
  font-size: 12px;
  margin-top: 18px;
}
.hangout-note {
  display: flex;
  gap: 13px;
  padding: 18px 0;
  border-top: 1px solid var(--mode-line, #ececdf);
  margin-top: 20px;
  align-items: center;
}
.hangout-note > svg {
  color: var(--mode-muted, #9b8b61);
  flex-shrink: 0;
}
.hangout-note span,
.profile-pet small {
  font-size: 9px;
  letter-spacing: 0.1em;
  color: var(--mode-muted, #8b907d);
}
.hangout-note p {
  margin: 5px 0 0;
  font-size: 13px;
  overflow-wrap: anywhere;
}
.showcase-section-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--mode-muted, #8a9277);
  margin: 10px 0 15px;
}
.showcase-section-title h3 {
  font-size: 12px;
  color: var(--mode-text, #626c54);
  margin: 0;
}
.friendship-prompt {
  padding: 15px 0;
  border-bottom: 1px solid var(--mode-line, #e9eadd);
}
.friendship-prompt span {
  font-size: 11px;
  color: var(--mode-muted, #848873);
}
.friendship-prompt p {
  font-size: 16px;
  line-height: 1.6;
  margin: 6px 0 0;
  color: var(--mode-text, #424c38);
  overflow-wrap: anywhere;
}
.profile-pet {
  margin-top: 23px;
  background: var(--mode-soft, #f3efdf);
  border-radius: 17px;
  padding: 5px 15px;
}
.pet-intro {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  text-align: left;
  gap: 12px;
  padding: 0;
  color: var(--mode-text, #515a44);
}
.pet-portrait {
  width: 74px;
  height: 90px;
  flex-shrink: 0;
}
.pet-portrait svg {
  width: 100%;
  height: 100%;
}
.pet-intro strong {
  display: block;
  font-size: 19px;
  margin-top: 4px;
}
.pet-intro strong span {
  margin-left: 6px;
  color: var(--mode-muted, #bb8d79);
}
.pet-intro p {
  font-size: 10px;
  color: var(--mode-muted, #7e836f);
  margin: 6px 0;
}
.pet-star {
  margin-left: auto;
  font-size: 24px;
  color: var(--mode-muted, #bdac7e);
}
.pet-story {
  border-top: 1px dashed var(--mode-line, #d8d1b7);
  text-align: center;
  padding-bottom: 14px;
}
.pet-story svg {
  width: 140px;
  height: 140px;
}
.pet-story p {
  font-size: 12px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.preview-footnote {
  font-size: 10px;
  text-align: center;
  color: var(--mode-muted, #909582);
  margin: 25px 0 0;
}
.profile-studio-modal.modal {
  width: min(1040px, calc(100vw - 40px));
  max-width: 1040px;
  padding: 26px 30px;
  max-height: 92dvh;
}
.studio-intro {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 3px 0 24px;
}
.studio-intro-icon {
  border-radius: 14px;
  background: var(--mode-soft, #e9eddc);
  color: var(--mode-muted, #7b8f59);
  padding: 12px;
  display: grid;
  place-items: center;
}
.studio-intro h3 {
  font-size: 20px;
  margin: 0 0 5px;
}
.studio-intro p {
  font-size: 12px;
  color: var(--mode-muted, #7c8370);
  margin: 0;
}
.studio-tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid var(--mode-line, #e5e8dc);
  padding-bottom: 14px;
  margin-bottom: 24px;
  overflow-x: auto;
}
.studio-tabs button {
  display: flex;
  gap: 7px;
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--mode-muted, #7c836f);
  font-size: 12px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 10px;
  white-space: nowrap;
}
.studio-tabs button.active {
  background: var(--mode-soft, #e9eedc);
  color: var(--mode-text, #4d6139);
}
.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.88fr);
  gap: 36px;
  align-items: start;
}
.studio-controls h3 {
  font-size: 18px;
  margin: 0 0 9px;
}
.studio-controls h4 {
  font-size: 13px;
  margin: 23px 0 12px;
}
.studio-help {
  font-size: 12px;
  color: var(--mode-muted, #858b7a);
  line-height: 1.6;
  margin: 0 0 20px;
}
.studio-controls .field {
  margin: 0 0 17px;
  font-size: 12px;
}
.studio-controls input,
.studio-controls textarea,
.studio-controls select {
  background: var(--mode-surface, #fffef9);
}
.input-counter {
  font-size: 10px;
  color: var(--mode-muted, #9b9f91);
  text-align: right;
}
.optional-label {
  font-weight: 400;
  color: var(--mode-muted, #989d8c);
  font-size: 10px;
}
.studio-preview {
  position: sticky;
  top: 0;
  min-width: 0;
}
.studio-preview-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
  margin-bottom: 13px;
  color: var(--mode-muted, #7c856d);
}
.studio-preview-label > span:last-child {
  margin-left: auto;
  font-weight: 400;
  letter-spacing: 0;
  color: var(--mode-muted, #969d8a);
}
.studio-preview .personality-banner {
  height: 133px;
}
.studio-preview .showcase-content {
  padding-left: 22px;
  padding-right: 22px;
}
.studio-preview .profile-name-block h2 {
  font-size: 26px;
}
.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px 10px;
  margin: 23px 0;
}
.theme-grid button {
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  color: var(--mode-muted, #768067);
}
.theme-grid button > span {
  height: 50px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  border: 2px solid transparent;
  color: var(--mode-text, #3e5437);
}
.theme-grid button[aria-pressed="true"] > span {
  outline: 2px solid #85996a;
  outline-offset: 2px;
}
.theme-grid strong {
  display: block;
  font-size: 9px;
  font-weight: 500;
  margin-top: 8px;
  white-space: nowrap;
}
.studio-choices,
.studio-swatches {
  border: 0;
  padding: 0;
  margin: 20px 0;
}
.studio-choices legend,
.studio-swatches legend {
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 10px;
}
.studio-choices > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.studio-choices button {
  border: 1px solid var(--mode-line, #e0e4d6);
  border-radius: 9px;
  background: var(--mode-surface, #fffef9);
  color: var(--mode-muted, #79836c);
  padding: 8px 11px;
  font-size: 11px;
  text-transform: capitalize;
}
.studio-choices button.selected {
  background: var(--mode-soft, #edf1e3);
  border-color: var(--mode-muted, #a4b38f);
  color: var(--mode-text, #4c6238);
}
.gradient-controls {
  display: flex;
  gap: 17px;
  margin: 20px 0;
}
.gradient-controls label {
  font-size: 11px;
  color: var(--mode-muted, #79836b);
  display: flex;
  align-items: center;
  gap: 8px;
}
.gradient-controls input[type="color"] {
  width: 34px;
  height: 32px;
  padding: 2px;
  border: 1px solid #ddd;
  border-radius: 7px;
}
.studio-swatches button {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 2px solid var(--mode-line, #fffdf7);
  border-radius: 50%;
  margin: 3px 8px 3px 0;
  color: white;
  text-shadow: 0 1px #333;
}
.studio-swatches button[aria-pressed="true"] {
  outline: 2px solid #748c5b;
  outline-offset: 2px;
}
.persona-builder-preview,
.pet-builder-preview {
  background: radial-gradient(circle, #f4eedc, #e7ecd9);
  border-radius: 20px;
  display: flex;
  justify-content: center;
  position: relative;
  height: 190px;
  overflow: hidden;
}
.persona-builder-preview svg,
.pet-builder-preview svg {
  height: 180px;
  width: 180px;
  align-self: end;
}
.builder-spark {
  position: absolute;
  right: 30px;
  top: 35px;
  font-size: 40px;
  color: var(--mode-muted, #bac693);
}
.pet-builder-preview {
  margin: 20px 0;
  flex-direction: column;
  align-items: center;
  height: 205px;
}
.pet-builder-preview svg {
  height: 170px;
  align-self: center;
}
.pet-builder-preview > span {
  font-size: 13px;
  color: var(--mode-muted, #88775c);
  margin-bottom: 12px;
}
.pet-enable {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  background: var(--mode-soft, #f0f1e6);
  padding: 16px;
  border-radius: 13px;
}
.pet-enable strong {
  font-size: 12px;
  display: block;
}
.pet-enable small {
  font-size: 10px;
  color: var(--mode-muted, #89927b);
  display: block;
  margin-top: 5px;
}
.pet-enable input {
  width: 20px;
  height: 20px;
  accent-color: var(--mode-muted, #778d56);
}
.prompt-editor {
  border: 1px solid var(--mode-line, #e6e8dc);
  border-radius: 14px;
  padding: 17px;
  margin-bottom: 16px;
  background: var(--mode-surface, #fafaf3);
}
.prompt-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.prompt-editor-head > span {
  font-size: 9px;
  letter-spacing: 0.08em;
  color: var(--mode-muted, #919b80);
}
.prompt-editor-head > div {
  display: flex;
  gap: 6px;
}
.prompt-editor-head button {
  border: 0;
  background: transparent;
  padding: 4px;
  color: var(--mode-muted, #8e977e);
}
.prompt-editor .field:last-child {
  margin-bottom: 0;
}
.add-prompt-button {
  border: 1px dashed var(--mode-line, #b3bda3);
  background: var(--mode-surface, #f7f9ef);
  color: var(--mode-text, #6c8150);
  border-radius: 12px;
  width: 100%;
  padding: 14px;
  font-size: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}
.studio-tip {
  margin-top: 25px;
  display: flex;
  gap: 10px;
  color: var(--mode-muted, #a49973);
  font-size: 12px;
  line-height: 1.7;
}
.studio-tip svg {
  flex-shrink: 0;
  margin-top: 3px;
}
.studio-tip p {
  margin: 0;
}
.studio-save-bar {
  position: sticky;
  bottom: -26px;
  background: var(--mode-surface, #fffdf5f5);
  border-top: 1px solid var(--mode-line, #e7e9dd);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 0 4px;
  margin-top: 24px;
  gap: 15px;
  z-index: 5;
  backdrop-filter: blur(12px);
}
.studio-save-bar p {
  font-size: 11px;
  color: var(--mode-muted, #8c947d);
  margin: 0;
}
.preview-toggle {
  display: none;
}
.profile-studio input[type="range"] {
  padding: 0;
  accent-color: var(--mode-muted, #829767);
}
.profile-studio .form-error {
  font-size: 12px;
}
@media (max-width: 700px) {
  .profile-studio-modal.modal {
    width: 100%;
    max-height: 96dvh;
    padding: 20px;
    border-radius: 22px 22px 0 0;
  }
  .studio-intro {
    flex-wrap: wrap;
    gap: 10px;
  }
  .studio-intro h3 {
    font-size: 17px;
  }
  .studio-intro p {
    font-size: 11px;
    max-width: 245px;
  }
  .studio-intro-icon {
    display: none;
  }
  .preview-toggle {
    display: flex !important;
    font-size: 11px;
    margin-top: 4px;
  }
  .studio-layout {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .studio-preview {
    display: none;
    position: static;
  }
  .studio-layout.preview-visible .studio-controls {
    display: none;
  }
  .studio-layout.preview-visible .studio-preview {
    display: block;
  }
  .studio-tabs {
    gap: 0;
    margin-bottom: 22px;
  }
  .studio-tabs button {
    padding: 10px 11px;
    font-size: 11px;
  }
  .studio-save-bar {
    bottom: -20px;
    align-items: flex-start;
    flex-direction: column;
    padding: 15px 0 0;
    gap: 10px;
  }
  .studio-save-bar .button {
    width: 100%;
    justify-content: center;
  }
  .showcase-content {
    padding: 0 21px 23px;
  }
  .personality-banner {
    height: 145px;
  }
  .profile-campus {
    font-size: 10px;
  }
  .theme-grid strong {
    font-size: 9px;
  }
  .profile-pet {
    padding: 5px 11px;
  }
  .pet-intro {
    gap: 8px;
  }
  .pet-intro strong {
    font-size: 17px;
  }
  .pet-intro p {
    font-size: 9px;
  }
  .pet-star {
    display: none;
  }
  .studio-preview .personality-banner {
    height: 145px;
  }
}
@media (max-width: 700px) {
  .personality-banner:has(.profile-edit-pill) .banner-caption {
    top: 65px;
  }
}
