/* The equipped background, portrait frame and profile track come from profile.js. */
.dc-ready #tab-profile .profile-card {
  --edge:#856d52; --accent:#8bff45;
  display:grid; grid-template-columns:minmax(205px,30%) minmax(0,1fr); gap:clamp(14px,2vw,34px);
  max-width:1440px; width:96%; padding:clamp(14px,2vw,32px); box-sizing:border-box;
  border:1px solid var(--edge); border-radius:15px; background:rgba(10,9,11,.96);
  color:#f6ead9; align-items:start;
}
.dc-ready #tab-profile .profile-card.hidden {display:none}
.dc-ready .profile-card[data-side=horror] {--edge:#935aa4;--accent:#f1a7ff}
.dc-ready .profile-card :is(.right-column,.left-column) {min-width:0}
.dc-ready .profile-card .right-column {padding:0}
.dc-ready #profile-info,.dc-ready .toggle-wrapper,.dc-ready #backgroundName,.dc-ready #borderName,
.dc-ready #tabBtn-edit {display:none!important}
.dc-ready .dc-identity {position:relative;padding:0 42px 12px 0}
.dc-ready .dc-identity h2 {font:bold clamp(2rem,4.4vw,4.4rem)/1 Georgia,serif;color:#f5e8d5;margin:0;overflow-wrap:anywhere}
.dc-ready .dc-identity small {font:bold .75rem Arial,sans-serif;color:#fff;background:#6b222e;padding:5px 8px;border-radius:8px;vertical-align:middle}
.dc-actions,#datingGalleryTools {display:flex;flex-wrap:wrap;gap:8px}
.dc-actions :is(button,a),#datingGalleryTools button,.dc-dialog button,#datingMediaBack,.dc-link {
  width:auto;min-height:40px;border:1px solid #ab87ac;border-radius:7px;background:#17131a;color:#f7eee3;
  padding:7px 12px;cursor:pointer;font:600 .93rem/1.3 Arial,sans-serif;text-decoration:none;
}
.dc-actions [aria-pressed=true] {border-color:var(--accent);color:var(--accent);background:#242126}
.dc-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dc-card,#datingGalleryTools {position:relative;min-width:0;padding:16px;box-sizing:border-box;background:#141215;border:1px solid var(--edge);border-radius:9px}
.dc-card:first-child {grid-column:1/-1}
.dc-card h3,#datingGalleryTools h3,.dc-card summary {color:#f6eada;font:bold 1.3rem/1.2 Georgia,serif;margin:0}
.dc-card summary {cursor:pointer}
.dc-card header {min-height:34px;padding-right:35px;border-bottom:1px solid var(--edge);margin-bottom:8px}
.dc-pencil {position:absolute;right:6px;top:5px;width:36px;height:36px;background:#252126;color:#eedbac;border:1px solid #726478;border-radius:7px;font:20px Georgia;cursor:pointer}
.dc-card[open] > .dc-pencil {position:static;float:right}
.dc-card p,.dc-identity p,#datingGalleryTools p {font:1rem/1.5 Arial,sans-serif;color:#f1e9de;margin:6px 0;overflow-wrap:anywhere;white-space:pre-line}
.dc-row strong {display:block;color:#d2bed7;font-size:.85em}
#datingGalleryTools {width:100%;justify-content:center}
#datingGalleryTools h3,#datingGalleryTools p {width:100%;text-align:center}
.dc-dialog {width:min(92vw,550px);max-height:85vh;overflow:auto;box-sizing:border-box;border:1px solid #c397d0;border-radius:12px;padding:24px;background:#161218;color:#f5eadd}
.dc-dialog::backdrop {background:#060509cb}
.dc-dialog h2 {font: bold 1.6rem Georgia,serif;color:#f3e5d2}
.dc-dialog fieldset {border:0;margin:0;padding:0;min-width:0}
.dc-dialog label,.dc-dialog legend {display:block;margin:8px 0 4px;font:600 .98rem Arial,sans-serif;color:#f1e9db}
.dc-dialog :is(input:not([type=checkbox]),select,textarea) {display:block;width:100%;box-sizing:border-box;border:1px solid #9979a3;padding:10px;font:1rem Arial,sans-serif;color:#faf3fa;background:#242027}
.dc-dialog textarea {min-height:90px}
.dc-dialog [hidden] {display:none!important}
.dc-dialog button {margin-right:8px}
.dc-dialog [type=submit] {background:#9ef946;color:#161312}
.dc-field {margin:14px 0}
.dc-ready #tab-edit[data-card-media] {display:block!important}
#tab-edit[data-card-media] > .edit-section {display:none!important}
#tab-edit[data-card-media=photos] > .edit-section:has(#normalSlots),
#tab-edit[data-card-media=atmosphere] > #atmosphereControls {display:block!important}
#tab-edit[data-photo-side=normal] .photo-manager:has(#horrorSlots),
#tab-edit[data-photo-side=horror] .photo-manager:has(#normalSlots) {display:none}
/* Phone and tablet profile layout */
@media (max-width: 1024px) {
  .dc-ready #tab-profile .profile-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: calc(100% - 24px);
    margin-inline: auto;
    padding: 16px;
    gap: 16px;
    box-sizing: border-box;
  }

  /* Let the identity, media panel and answer cards share the page grid. */
  .dc-ready #tab-profile .right-column,
  .dc-ready #datingCards {
    display: contents;
  }

  .dc-ready #tab-profile .dc-identity,
  .dc-ready #tab-profile .dc-card header {
    position: relative;
    inset: auto;
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    min-width: 0;
    box-sizing: border-box;
  }

  .dc-ready #tab-profile .dc-identity {
    grid-row: 1;
    padding: 12px;
  }

  .dc-ready #tab-profile .dc-identity h2 {
    margin: 0;
    padding-right: 50px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.08;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .dc-ready #tab-profile .dc-identity p {
    margin: 8px 0 12px;
  }

  .dc-ready #tab-profile .dc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .dc-ready #tab-profile .dc-actions :is(button, a),
  .dc-ready #datingGalleryTools button {
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    min-height: 44px;
    white-space: normal;
    text-align: center;
  }

  /* iPad: portrait and playback on the left, photo tools on the right. */
  .dc-ready #tab-profile .profile-card .left-column {
    grid-row: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "portrait tools"
      "track    tools"
      "playback tools"
      "gifts    tools";
    align-items: center;
    justify-items: center;
    gap: 8px 20px;
    width: 100%;
    max-width: none;
    min-width: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .dc-ready #profilePicWrap {
    grid-area: portrait;
    width: min(100%, 240px);
    max-width: 100%;
    height: auto;
    aspect-ratio: 1;
    margin: 0 auto;
  }

  .dc-ready #songTitle { grid-area: track; }
  .dc-ready .music-visitor-controls { grid-area: playback; }
  .dc-ready .left-column .gifts-box { grid-area: gifts; }

  .dc-ready #datingGalleryTools {
    grid-area: tools;
    align-self: center;
    box-sizing: border-box;
    max-width: 100%;
  }

  .dc-ready #tab-profile .dc-grid {
    grid-row: 3;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
  }

  .dc-ready #tab-profile .dc-card {
    min-width: 0;
    max-width: 100%;
  }

  .dc-ready #tab-profile .dc-card header {
    padding: 8px 46px 8px 0;
    min-height: 44px;
  }

  .dc-ready #tab-profile .dc-pencil {
    width: 44px;
    height: 44px;
    box-sizing: border-box;
  }
}

/* Phones: one reading column and two easy-to-tap side buttons. */
@media (max-width: 680px) {
  .dc-ready #tab-profile .profile-card {
    width: calc(100% - 16px);
    padding: 10px;
    gap: 12px;
  }

  .dc-ready #tab-profile .dc-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dc-ready #tab-profile .dc-actions > a {
    grid-column: 1 / -1;
    display: grid;
    place-items: center;
  }

  .dc-ready #tab-profile .profile-card .left-column {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "portrait" "track" "playback" "tools" "gifts";
    gap: 8px;
  }

  .dc-ready #profilePicWrap {
    width: min(100%, 210px);
  }

  .dc-ready #tab-profile .dc-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dc-ready #tab-profile .dc-card {
    padding: 12px;
  }
}
.dc-ready #tab-profile .profile-card.hidden,.dc-ready .profile-actions[hidden]{display:none!important}
#tab-edit[data-card-media=location] > .edit-section:has(#saveLocationBtn) {display:block!important}
#tab-edit[data-card-media=location] .edit-section:has(#saveLocationBtn) :is(.edit-field,.section-save-row,.subtab-desc,.edit-section-title) {display:none}
#tab-edit[data-card-media=location] .edit-section .edit-field:has(:is(#editCountry,#editState,#editCity,#saveLocationBtn)) {display:block}

/* Equipped items and owner controls */
.dc-ready #datingGalleryTools {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.dc-equipment {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.dc-ready #datingGalleryTools .dc-equipment h3 {
  text-align: left;
  margin-bottom: 4px;
}

.dc-ready #datingGalleryTools .dc-equipment button {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  width: 100%;
  min-width: 0;
  text-align: left;
}

.dc-equipment small {
  color: #d5b9da;
}

.dc-equipment span {
  overflow-wrap: anywhere;
}

.dc-owner-tools {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}

.dc-ready .dc-more > details {
  margin-top: 10px;
  border-top: 1px solid var(--edge);
  padding: 10px 0 0;
}

.dc-ready .dc-more > details.dc-card {
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 0;
}

/* Use three columns only when the answer area itself has room. */
.dc-ready .dc-grid {
  container-type: inline-size;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.dc-ready .dc-grid > * {
  grid-column: span 3;
}

.dc-ready .dc-grid > [data-profile-card="bio"],
.dc-ready .dc-grid > [data-profile-card="horrorBio"] {
  grid-column: 1 / -1;
}

@container (min-width: 620px) {
  .dc-ready .dc-grid > * {
    grid-column: span 2;
  }

  /* Two lead cards fill the row while visitor quiz results are unavailable. */
  .dc-ready .dc-grid:not(:has([data-profile-card="compatibility"]))
    > :is([data-profile-card="date"], [data-profile-card="signal"],
          [data-profile-card="looking"], [data-profile-card="life"]) {
    grid-column: span 3;
  }
}

@container (max-width: 459px) {
  .dc-ready .dc-grid > * {
    grid-column: 1 / -1;
  }
}

/* Account for the site's older global mobile layout rules. */
@media (max-width: 1024px) {
  .dc-ready #tab-profile .profile-card:not(.hidden) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .dc-ready #tab-profile .profile-card > .right-column,
  .dc-ready #tab-profile #datingCards {
    display: contents !important;
  }

  .dc-ready #tab-profile .dc-identity {
    grid-row: 1;
  }

  .dc-ready #tab-profile .left-column {
    grid-row: 2;
  }

  .dc-ready #tab-profile .dc-grid {
    grid-row: 3;
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .dc-ready #tab-profile :is(.dc-identity, .dc-card header) {
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }
}

/* Editors open above the profile, including on phones. */
.dc-media-dialog {
  position: fixed;
  inset: 0;
  margin: auto;
  width: min(94vw, 740px);
  max-width: 94vw;
  max-height: 86dvh;
  padding: clamp(12px, 3vw, 24px);
  overflow: auto;
  overscroll-behavior: contain;
}

.dc-media-dialog #tab-edit[data-card-media] {
  display: block !important;
  width: 100% !important;
  min-width: 0;
  padding: 0 !important;
  box-sizing: border-box;
}

.dc-media-dialog #datingMediaBack {
  display: block;
  margin: 0 0 12px auto;
  min-height: 44px;
}

.dc-media-dialog .photo-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dc-media-dialog .edit-section,
.dc-media-dialog select,
.dc-media-dialog input {
  max-width: 100%;
  box-sizing: border-box;
}

body:has(.dc-media-dialog[open]) {
  overflow: hidden;
}

.dc-save-notice {
  position: fixed;
  z-index: 10000;
  bottom: max(20px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 32px);
  box-sizing: border-box;
  padding: 12px 18px;
  border: 1px solid #86ed49;
  border-radius: 8px;
  background: #10170e;
  color: #ecffe5;
  text-align: center;
  box-shadow: 0 4px 20px #0009;
}

.dc-save-notice[hidden] {
  display: none;
}