:root {
  font-family: Arial, 'Malgun Gothic', sans-serif;
  color: #302637;
  background: #f5f2f8;
  font-size: 15px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  max-width: 720px;
  margin: auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
header > a {
  font-size: 22px;
  font-weight: 800;
  color: #765a91;
}
header span {
  font-size: 12px;
  color: #786f80;
}
a {
  color: inherit;
  text-decoration: none;
}
main {
  max-width: 640px;
  margin: 0 auto 60px;
  padding: 0 18px;
}
h1 {
  font-size: 26px;
}
h2 {
  font-size: 20px;
}
p {
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
button,
.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  padding: 10px 15px;
  border: 1px solid #ded5e5;
  background: #fff;
  color: #44334f;
  border-radius: 13px;
  font: inherit;
  cursor: pointer;
  text-align: center;
  gap: 6px;
}
button.primary {
  background: #765a91;
  color: #fff;
  border-color: #765a91;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #bca0d4;
  outline-offset: 3px;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0;
}
.actions > * {
  flex: 1;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 15px 0;
  font-size: 14px;
}
input,
textarea {
  font: inherit;
  width: 100%;
  min-width: 0;
  border: 1px solid #d8cfe0;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  color: #302637;
}
textarea {
  min-height: 90px;
  resize: vertical;
}
.check {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.check input {
  width: 19px;
  height: 19px;
  margin: 0;
  flex: none;
  accent-color: #765a91;
}
section.card,
.editor-block {
  background: #fff;
  border: 1px solid #e7dfed;
  border-radius: 20px;
  padding: 20px;
  margin: 16px 0;
  min-width: 0;
}
.editor-block .tools {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
}
.tools b {
  margin-right: auto;
}
.tools button {
  padding: 6px 10px;
  min-height: 36px;
}
.hint {
  color: #797080;
  font-size: 13px;
  line-height: 1.6;
}
.hero {
  position: relative;
  overflow: hidden;
  width: calc(100% + 36px);
  margin-left: -18px;
  max-height: 590px;
  border-radius: 24px;
  display: block;
}
.hero > img {
  position: absolute;
  inset: 0 auto auto 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: var(--cover-position, center);
}
.world-cover-editor {
  padding: 12px 0;
}
.world-cover-editor button {
  min-height: 44px;
}
.world-cover-editor [hidden] {
  display: none;
}
.world-cover-controls {
  display: grid;
  gap: 8px;
}
.world-cover-controls p {
  margin: 0;
  font-size: 13px;
}
.world-cover-controls label {
  display: flex;
  align-items: center;
  gap: 8px;
}
.world-cover-controls input {
  flex: 1;
  min-width: 0;
}
.world-cover-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.hero[data-cover-dragging] {
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.hero[data-cover-dragging]:active {
  cursor: grabbing;
}
.identity {
  text-align: center;
  margin: 26px 0;
}
.identity h1 {
  margin: 12px 0;
}
.avatar {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 50%;
}
.link-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: white;
  padding: 20px;
  border-radius: 18px;
  margin: 12px 0;
  border: 1px solid #e7dfed;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.link-button > .link-social-logo {
  background: #f1eaf7;
  color: #765a91;
  padding: 8px;
  border-radius: 10px;
  flex: none;
}
.gallery img {
  display: block;
  width: 100%;
  border-radius: 18px;
}
.gallery {
  margin: 20px 0;
}
.gallery figcaption {
  padding: 10px;
  text-align: center;
}
.video {
  margin: 20px 0;
}
.video iframe {
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 720px;
  border: 0;
  border-radius: 20px;
}
.video-placeholder {
  padding: 30px;
  background: #292331;
  color: #fff;
  border-radius: 20px;
  text-align: center;
}
.calendar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  text-align: center;
  gap: 5px;
  margin: 16px 0;
}
.calendar > * {
  padding: 8px 0;
  font-size: 13px;
  min-width: 0;
}
.calendar .has-event {
  background: #765a91;
  color: white;
  border-radius: 50%;
  font-weight: bold;
}
.event {
  padding: 15px 0;
  border-top: 1px solid #eee;
  display: flex;
  gap: 12px;
  align-items: center;
}
.event b {
  display: block;
  margin-bottom: 5px;
}
.event small {
  color: #797080;
}
.event > span {
  padding: 10px;
  border-radius: 30px;
  background: #f0eaf6;
  white-space: nowrap;
  font-size: 12px;
}
.event div {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
#notice {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #302637;
  color: #fff;
  padding: 12px 20px;
  border-radius: 14px;
  display: none;
  max-width: 90%;
  z-index: 10;
}
/* Phone editors grow in the parent document. Keep feedback in its visible slice. */
body.world-embedded #notice {
  bottom: calc(var(--world-visible-bottom, 0px) + 16px);
  box-sizing: border-box;
  max-width: calc(100% - 32px);
  width: max-content;
  text-align: center;
  pointer-events: none;
  z-index: 100;
}
html[data-world-viewport-visible='false'] body.world-embedded #notice {
  visibility: hidden;
}
.saved {
  border-left: 3px solid #765a91;
  padding-left: 12px;
}
.preview-image {
  max-width: 100%;
  max-height: 180px;
  border-radius: 12px;
}
.contact {
  display: block;
  text-align: center;
  padding: 20px;
  overflow-wrap: anywhere;
}
.page-footer {
  text-align: center;
  margin: 40px 0;
  font-size: 13px;
  color: #797080;
}
@media (max-width: 380px) {
  main {
    padding: 0 12px;
  }
  .hero {
    width: calc(100% + 24px);
    margin-left: -12px;
  }
  .editor-block,
  section.card {
    padding: 14px;
  }
  .calendar {
    gap: 2px;
  }
  header span {
    display: none;
  }
}
@media (prefers-color-scheme: dark) {
  :root {
    color: #eee6f4;
    background: #211d26;
  }
  header span,
  .hint,
  .event small,
  .page-footer {
    color: #bdb0c7;
  }
  section.card,
  .editor-block,
  .link-button,
  button,
  .button {
    background: #302936;
    border-color: #4f435b;
    color: #eee6f4;
  }
  input,
  textarea {
    background: #211d26;
    border-color: #5c4d69;
    color: #eee6f4;
  }
  .event {
    border-color: #4f435b;
  }
  .event > span,
  .link-button > .link-social-logo {
    background: #4f3c60;
    color: #efe3f8;
  }
}

.video-placeholder .hint {
  color: #cbbfd7;
}
.link-editor main {
  max-width: 1120px;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 40px;
  align-items: start;
}
.editor-layout form {
  min-width: 0;
}
.editor-layout aside {
  position: sticky;
  top: 18px;
  min-width: 0;
  margin-top: 16px;
}
.preview-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 8px;
  font-size: 14px;
}
.preview-heading span {
  font-size: 12px;
  color: #82748e;
}
#live-preview {
  display: block;
  width: 100%;
  height: 720px;
  border: 8px solid #312638;
  border-radius: 36px;
  background: #f5f2f8;
  box-shadow: 0 18px 50px #33224120;
}
.preview-document header {
  display: none;
}
.preview-document main {
  padding-top: 0;
}
.preview-document .hero {
  border-radius: 0 0 26px 26px;
}
.hero {
  mask-image: linear-gradient(#000 85%, transparent);
}
.identity {
  padding: 0 12px;
}
.identity h1 {
  letter-spacing: -0.6px;
}
.gallery {
  margin: 20px 0;
}
.link-button {
  box-shadow: 0 6px 20px #3d245009;
  transition:
    transform 0.18s,
    box-shadow 0.18s;
}
.link-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px #3d245018;
}
#import-profile {
  margin-right: 8px;
}
#preview-panel {
  scroll-margin-top: 20px;
}
@media (max-width: 850px) {
  .editor-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }
  .editor-layout aside {
    position: static;
    max-width: 390px;
    width: 100%;
    margin: 0 auto;
  }
  .link-editor main {
    max-width: 640px;
  }
  #live-preview {
    height: 660px;
  }
}
.design-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
}
.design-grid select {
  width: 100%;
  min-width: 0;
  padding: 12px;
  border: 1px solid #d8cfe0;
  border-radius: 10px;
  background: #fff;
  color: #302637;
  font: inherit;
}
.design-grid input[type='color'] {
  height: 48px;
  padding: 5px;
  cursor: pointer;
}
.design-grid input[type='range'] {
  accent-color: #765a91;
  padding: 8px 0;
}
.custom-link-design {
  background: var(--page-bg);
  color: var(--page-ink);
}
.custom-link-design .identity,
.custom-link-design header > a,
.custom-link-design header span,
.custom-link-design .page-footer {
  color: var(--page-ink);
}
.custom-link-design button,
.custom-link-design .button,
.custom-link-design .link-button {
  background: var(--button-bg);
  color: var(--button-ink);
  border-radius: var(--button-radius);
  border-color: color-mix(in srgb, var(--button-ink) 20%, transparent);
}
.custom-link-design .link-button span {
  background: transparent;
  color: inherit;
}
.custom-link-design section.card {
  background: #fff;
  color: #302637;
}
.custom-link-design .hero {
  height: var(--cover-height);
  max-height: none;
}
.page-blocks {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
}
.page-blocks > * {
  min-width: 0;
  margin: 0;
}
.photo-grid .page-blocks {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.photo-grid .page-blocks > :not(.gallery) {
  grid-column: 1/-1;
}
.gallery {
  width: var(--photo-width, 100%);
  margin: var(--photo-margin, 0 auto);
}
.gallery img {
  aspect-ratio: var(--photo-ratio, auto);
  object-fit: cover;
  object-position: var(--photo-position, center);
}
@media (max-width: 380px) {
  .design-grid {
    gap: 0 10px;
  }
  .design-grid label {
    font-size: 12px;
  }
}
.editor-block label {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.editor-block input:not([type='file']) {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 48px;
  min-height: 48px;
  margin: 0;
  overflow: hidden;
}
.editor-block input[type='date'],
.editor-block input[type='time'] {
  inline-size: 100%;
  min-inline-size: 0;
  max-inline-size: 100%;
  text-align: left;
}
.editor-block input[type='date']::-webkit-date-and-time-value,
.editor-block input[type='time']::-webkit-date-and-time-value {
  text-align: left;
  min-width: 0;
}
.editor-block .editor-native-control {
  position: relative;
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 48px;
  overflow: hidden;
  border: 1px solid #d8cfe0;
  border-radius: 10px;
  background: #fff;
  color: #302637;
}
.editor-block .editor-native-value {
  display: block;
  min-width: 0;
  width: 100%;
  padding: 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  line-height: 46px;
}
.editor-block .editor-native-value.empty {
  color: #797080;
}
.editor-block .editor-native-control .editor-native-picker {
  position: absolute;
  inset: 0;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}
.editor-block .editor-native-control:focus-within {
  outline: 3px solid #bca0d4;
  outline-offset: 2px;
}
@media (prefers-color-scheme: dark) {
  .editor-block .editor-native-control {
    background: #211d26;
    border-color: #5c4d69;
    color: #eee6f4;
  }
  .editor-block .editor-native-value.empty {
    color: #bdb0c7;
  }
}

/* Optional photo-first profile with directly actionable SNS logos. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.world-share-icon {
  display: none;
}
.social-icon-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 22px 30px;
  padding: 18px 14px 28px;
  grid-column: 1/-1;
}
.social-icon-link {
  display: grid;
  place-items: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  color: var(--page-ink);
  border-radius: 10px;
}
.social-icon-link svg {
  display: block;
  width: 38px;
  height: 38px;
}
.social-icon-link:hover {
  opacity: 0.7;
}
.social-icon-link:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 5px;
}
.world-social > header {
  display: none;
}
.world-social main {
  position: relative;
  max-width: 640px;
  padding-top: 0;
}
.world-social .hero {
  border-radius: 0;
  height: var(--cover-height);
  max-height: 85svh;
  mask-image: linear-gradient(#000 80%, transparent 100%);
}
.custom-link-design .hero[data-profile-cover] {
  height: auto;
  max-height: none;
  aspect-ratio: 2 / 1;
  mask-image: none;
}
.world-social .identity {
  margin: 18px 0 14px;
  padding: 0 10px;
}
.world-social .identity .avatar {
  display: none;
}
.world-social .identity h1 {
  font-size: 25px;
  margin: 16px 0;
}
.world-social .identity p {
  font-size: 17px;
  line-height: 1.65;
  margin: 12px 0 24px;
}
.world-social .identity .button {
  background: var(--button-bg);
  min-height: 48px;
  padding: 12px 20px;
  border: 0;
  border-radius: 28px;
}
.world-social .world-share-actions {
  position: absolute;
  left: 18px;
  top: 18px;
  margin: 0;
  z-index: 2;
}
.world-social .world-share-actions > a {
  display: none;
}
.world-social .world-share-actions button {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: var(--button-bg);
  border: 0;
}
.world-social .world-share-label {
  display: none;
}
.world-social .world-share-icon {
  display: inline;
  font-size: 29px;
  line-height: 1;
}
.world-social .contact {
  display: none;
}
.world-social .page-blocks {
  gap: 22px;
}
.world-social .page-footer {
  margin: 32px 0;
}
@media (max-width: 380px) {
  .social-icon-links {
    gap: 18px 22px;
  }
  .social-icon-link {
    flex-basis: 44px;
    width: 44px;
    height: 44px;
  }
  .social-icon-link svg {
    width: 34px;
    height: 34px;
  }
}

/* iOS keeps the viewport scale unchanged when focusing editor fields. */
@media (max-width: 850px) {
  .link-editor input:not([type='checkbox']):not([type='range']):not([type='color']),
  .link-editor textarea,
  .link-editor select {
    font-size: 16px;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
}

/* Studio is scoped separately from published member pages. */
.world-subscribe-dialog {
  width: min(460px, calc(100% - 24px));
  max-height: calc(100dvh - 40px);
  overflow: auto;
  border: 0;
  border-radius: 22px;
  background: var(--page-bg, #fff);
  color: var(--page-ink, #28232d);
  padding: 16px;
}
.world-subscribe-dialog::backdrop {
  background: #17121d99;
}
.world-subscribe-dialog > [data-close-subscribe] {
  float: right;
  min-height: 32px;
  padding: 3px 10px;
}
.world-subscribe-dialog .world-form-card {
  clear: both;
  border: 0;
  padding: 12px;
}
.world-social .world-share-actions .world-subscribe {
  width: auto;
  padding: 0 14px;
  font-size: 12px;
  border-radius: 24px;
}
.world-social .world-share-actions {
  right: 18px;
  justify-content: space-between;
  pointer-events: none;
}
.world-social .world-share-actions > * {
  pointer-events: auto;
  flex: none;
}
.world-builder {
  background: #f3f3f6;
  color: #25222b;
}
.world-builder > header {
  max-width: 1280px;
}
.world-builder main {
  max-width: 1280px;
  padding: 10px 28px 100px;
}
.wb-heading,
.wb-section-title,
.wb-publish {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.wb-heading h1 {
  margin: 4px 0 20px;
  font-size: 30px;
  letter-spacing: -1px;
}
.wb-heading p {
  font-size: 10px;
  letter-spacing: 2px;
  color: #887296;
  margin: 8px 0;
}
.wb-top-actions {
  display: flex;
  gap: 8px;
}
.wb-top-actions button {
  font-size: 14px;
  min-width: 80px;
}
.wb-publish {
  background: #fff;
  border: 1px solid #e8e5ec;
  padding: 0 18px;
  border-radius: 16px;
  margin-bottom: 20px;
}
.wb-publish a {
  font-size: 13px;
  color: #79598b;
}
.wb-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 42px;
  align-items: start;
}
.wb-edit-column {
  min-width: 0;
}
.wb-tabs {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f3f3f6;
  padding: 8px 0 12px;
  gap: 4px;
}
.wb-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  border-radius: 12px;
  color: #807889;
  padding: 12px 4px;
  font-size: 14px;
  white-space: nowrap;
}
.wb-tabs button[aria-current='page'] {
  background: #292331;
  color: #fff;
  font-weight: 700;
}
.world-builder .card {
  border: 1px solid #e8e5ec;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 4px 18px #32233d03;
}
.wb-section-title h2 {
  font-size: 18px;
  margin: 4px 0;
}
.wb-section-title h2 span {
  font-size: 13px;
  color: #897890;
}
.wb-section-title > button {
  font-size: 12px;
  min-height: 36px;
  padding: 6px 12px;
}
.wb-section-title .wb-switch {
  font-size: 12px;
}
.wb-switch {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
}
.wb-switch input {
  appearance: none;
  width: 36px !important;
  height: 22px !important;
  min-height: 0 !important;
  border: 0;
  border-radius: 20px;
  background: #c9c5ce;
  padding: 3px !important;
  cursor: pointer;
  flex: none;
  position: relative;
}
.wb-switch input:after {
  content: '';
  display: block;
  width: 16px;
  height: 16px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s;
}
.wb-switch input:checked {
  background: #856496;
}
.wb-switch input:checked:after {
  transform: translateX(14px);
}
.wb-layouts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0;
}
.wb-layouts button {
  display: flex;
  flex-direction: column;
  padding: 8px;
  gap: 8px;
  font-size: 12px;
  border-color: #e3dfe7;
}
.wb-layouts button[aria-pressed='true'] {
  border: 2px solid #8c6b9d;
  background: #f7f2fa;
}
.wb-layouts button > span {
  display: block;
  width: 100%;
  height: 70px;
  background: linear-gradient(#dedbe2 55%, #f4f2f6 55%);
  border-radius: 5px;
  position: relative;
}
.wb-layouts i {
  position: absolute;
  background: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  left: calc(50% - 12px);
  top: 25px;
}
.wb-layouts .layout-cover {
  background: linear-gradient(#d6d1dd, #8f849c) !important;
}
.wb-layouts .layout-avatar {
  background: #f0edf3 !important;
}
.wb-layouts .layout-banner i {
  display: none;
}
.wb-cover-picker {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  padding: 16px 0;
}
.wb-cover-picker > img {
  width: 92px;
  height: 92px;
  object-fit: cover;
  border-radius: 18px;
}
.wb-cover-picker .button,
.wb-cover-picker > button {
  font-size: 13px;
}
.wb-profile textarea {
  min-height: 100px;
}
.world-builder input,
.world-builder textarea,
.world-builder select {
  font-size: 16px;
  min-width: 0;
  max-width: 100%;
  background: #fff;
  color: #292331;
  border: 1px solid #ddd8e3;
  border-radius: 10px;
}
.world-builder input[type='file'] {
  font-size: 13px;
}
.world-builder input[type='date'],
.world-builder input[type='time'],
.world-builder input[type='datetime-local'] {
  min-height: 48px;
  width: 100%;
  display: block;
}
.world-builder button,
.world-builder .button {
  background: #fff;
  color: #44334f;
  border-color: #dfd9e6;
}
.world-builder button.primary {
  background: #795c8a;
  color: white;
  border-color: #795c8a;
}
.wb-block {
  border: 1px solid #e7e2eb;
  border-radius: 16px;
  background: #fff;
  margin: 12px 0;
  overflow: hidden;
}
.wb-block > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px;
  cursor: pointer;
  list-style: none;
  min-width: 0;
}
.wb-block > summary::-webkit-details-marker {
  display: none;
}
.wb-block > summary strong {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
}
.wb-grip {
  color: #aaa1b1;
  cursor: grab;
}
.wb-type {
  width: 30px;
  height: 30px;
  background: #eee8f4;
  color: #805b96;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: none;
}
.wb-state {
  font-size: 11px;
  color: #8b7d94;
}
.wb-block-body {
  padding: 0 22px 22px;
  border-top: 1px solid #eee9f2;
}
.wb-block-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding-top: 12px;
}
.wb-block-toolbar .wb-switch {
  margin-right: auto;
  font-size: 12px;
}
.wb-block-toolbar button {
  font-size: 12px;
  min-height: 32px;
  padding: 6px 10px;
}
.wb-options {
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 16px;
}
.wb-options summary {
  font-size: 13px;
  cursor: pointer;
  color: #8b7598;
}
.wb-add-large {
  width: 100%;
  border: 1px dashed #bdb0c8 !important;
  background: transparent !important;
  min-height: 58px;
}
.world-builder #preview-panel {
  position: sticky;
  top: 24px;
  margin: 0;
}
.world-builder #live-preview {
  height: 730px;
  border: 7px solid #312b37;
  border-radius: 36px;
  box-shadow: 0 18px 60px #3d2c4b15;
}
.world-builder .preview-heading button {
  display: none;
}
.wb-preview-toggle {
  display: none;
}
.wb-picker {
  position: fixed;
  inset: 30px 0;
  margin: auto;
  width: min(600px, calc(100% - 28px));
  height: calc(100dvh - 60px);
  max-height: 900px;
  border: 1px solid #dcd6e4;
  box-shadow:
    0 0 0 100vmax #17121d70,
    0 20px 70px #0003;
  border-radius: 24px;
  padding: 24px;
  z-index: 30;
  overflow-y: auto;
  background: #fff;
  color: #28232d;
}
.wb-picker-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: -24px;
  background: white;
  padding: 10px 0;
  z-index: 1;
}
.wb-picker-head h2 {
  margin: 0;
}
.wb-picker-head button {
  border: 0;
  font-size: 25px;
}
.wb-picker-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.wb-picker-list button {
  display: flex;
  align-items: center;
  text-align: left;
  justify-content: start;
  padding: 16px 10px;
  border: 0;
  border-radius: 13px;
  gap: 12px;
}
.wb-picker-list button:hover {
  background: #f4eff8;
}
.wb-picker-list button > span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  background: #eee8f4;
  border-radius: 13px;
  color: #76568b;
  font-size: 24px;
  flex: none;
}
.wb-picker-list div {
  min-width: 0;
}
.wb-picker-list small {
  display: block;
  font-size: 11px;
  color: #92849a;
  margin-top: 4px;
}
.wb-picker-list i {
  margin-left: auto;
  color: #ad9db7;
  font-style: normal;
}
.wb-link-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 80px 32px;
  gap: 8px;
  align-items: center;
  margin: 10px 0;
}
.wb-link-row > span svg {
  width: 24px;
  height: 24px;
}
.wb-link-row input {
  padding: 10px 8px;
  font-size: 14px;
}
.wb-link-row button {
  padding: 0;
  min-height: 36px;
}
.wb-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.wb-photo-grid > div {
  position: relative;
}
.wb-photo-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 9px;
}
.wb-photo-grid button {
  position: absolute;
  right: 0;
  top: 0;
  padding: 0;
  width: 28px;
  min-height: 28px;
  border-radius: 50%;
  background: #fff;
}
.wb-presets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}
.wb-presets button {
  display: flex;
  flex-direction: column;
  padding: 7px;
  font-size: 12px;
}
.wb-presets button > span {
  width: 100%;
  height: 85px;
  background: var(--swatch);
  border-radius: 8px;
  padding: 28px 8px 0;
}
.wb-presets i {
  height: 12px;
  width: 100%;
  display: block;
  margin-bottom: 6px;
  border-radius: 6px;
}
.wb-color {
  display: flex;
  gap: 10px;
  align-items: center;
}
.wb-color input {
  width: 50px;
  height: 44px;
  padding: 3px;
}
.wb-color span {
  font-size: 12px;
  color: #9a8ba4;
}
.wb-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #ede7f2;
  border-radius: 16px;
  overflow: hidden;
  margin: 22px 0;
}
.wb-metrics div {
  display: flex;
  flex-direction: column;
  background: #f6f1f9;
  text-align: center;
  padding: 22px 8px;
  gap: 8px;
}
.wb-metrics span {
  font-size: 12px;
  color: #84708f;
}
.wb-metrics b {
  font-size: 26px;
}
.wb-chart {
  margin: 25px 0;
}
.wb-chart svg {
  display: block;
  width: 100%;
}
.wb-chart span {
  font-size: 11px;
  color: #9784a1;
}
.wb-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee8f2;
  padding: 14px 0;
  font-size: 14px;
  gap: 10px;
  overflow-wrap: anywhere;
}
.wb-empty {
  padding: 30px 10px;
  color: #9b8ca5;
  text-align: center;
  font-size: 14px;
}
.wb-entry {
  border-top: 1px solid #eee;
  padding: 20px 0;
}
.wb-entry > div:first-child {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.wb-entry time {
  font-size: 11px;
  color: #9a8aa5;
}
.wb-entry p {
  white-space: pre-wrap;
}
.wb-entry .actions {
  align-items: center;
  font-size: 12px;
}
.wb-entry button {
  font-size: 12px;
}
.wb-entry-filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.wb-entry-filters button {
  font-size: 12px;
  min-height: 34px;
  padding: 6px 10px;
}
body.custom-link-design {
  font-family: var(--world-font, Arial, sans-serif);
  font-size: var(--world-size, 16px);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}
.custom-link-design main {
  max-width: var(--world-width, 560px);
}
.custom-link-design .page-blocks {
  gap: var(--world-gap, 16px);
}
.world-block[hidden] {
  display: none;
}
.world-block > * {
  margin: 0;
}
.world-text,
.world-form-card,
.world-group,
.world-contact {
  padding: 24px;
  border: 1px solid color-mix(in srgb, currentColor 12%, transparent);
  border-radius: var(--button-radius, 18px);
  background: color-mix(in srgb, var(--page-bg) 85%, white 15%);
}
.world-notice {
  border-left: 4px solid currentColor;
}
.world-text h2,
.world-form-card h2 {
  font-size: 1.2em;
  margin: 0 0 12px;
}
.world-text p {
  margin: 0;
}
.world-group summary {
  cursor: pointer;
  font-weight: bold;
}
.world-contact .button {
  margin: 6px;
}
.world-gallery {
  display: grid;
  gap: 8px;
}
.world-gallery img {
  width: 100%;
  display: block;
  border-radius: 14px;
}
.world-gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.world-gallery-grid img {
  aspect-ratio: 1;
  object-fit: cover;
}
.world-gallery-slide {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}
.world-gallery-slide img {
  width: 85%;
  flex: none;
  scroll-snap-align: start;
  object-fit: cover;
  aspect-ratio: 3/4;
}
.world-divider {
  border-top: 1px solid color-mix(in srgb, currentColor 25%, transparent);
}
.world-form-card input,
.world-form-card textarea,
.world-search input {
  font-size: 16px;
}
.world-form-card .check {
  font-size: 12px;
  align-items: flex-start;
}
.world-form-card .check input {
  margin-top: 3px;
}
.world-form-card article {
  padding: 14px 0;
  border-bottom: 1px solid #ddd;
}
.world-hide-profile .identity,
.world-hide-profile .hero {
  display: none;
}
.world-hide-share .world-share-actions,
.world-hide-brand .page-footer {
  display: none;
}
.custom-link-design[data-profile-layout='avatar'] .hero {
  display: none;
}
.custom-link-design[data-profile-layout='avatar'] .avatar {
  display: inline-block !important;
  width: 110px;
  height: 110px;
}
.custom-link-design[data-profile-layout='overlap'] .hero {
  height: 260px;
  mask-image: none;
  border-radius: 0;
}
.custom-link-design[data-profile-layout='overlap'] .identity {
  margin-top: -48px;
  position: relative;
}
.custom-link-design[data-profile-layout='overlap'] .avatar {
  display: inline-block !important;
  width: 96px;
  height: 96px;
  border: 4px solid var(--page-bg);
}
.custom-link-design[data-profile-layout='banner'] .hero {
  height: 200px;
  mask-image: none;
}
.custom-link-design[data-profile-layout='banner'] .avatar {
  display: none;
}
.custom-link-design[data-button-style='outline'] .link-button {
  background: transparent;
  border: 1px solid currentColor;
}
.custom-link-design[data-button-style='shadow'] .link-button {
  box-shadow: 4px 5px 0 color-mix(in srgb, var(--page-ink) 30%, transparent);
}
.custom-link-design[data-animation='lift'] .link-button:hover {
  transform: translateY(-4px);
}
.custom-link-design[data-animation='pulse'] .link-button:hover {
  transform: scale(1.025);
}
@media (prefers-reduced-motion: reduce) {
  .custom-link-design .link-button {
    transition: none;
    transform: none !important;
  }
}
@media (max-width: 850px) {
  .world-builder main {
    padding: 8px 16px 100px;
    max-width: 650px;
  }
  .wb-heading h1 {
    font-size: 25px;
  }
  .wb-heading {
    gap: 8px;
  }
  .wb-top-actions {
    gap: 5px;
  }
  .wb-top-actions button {
    min-width: 0;
    padding: 9px 12px;
    font-size: 12px;
  }
  .wb-workspace {
    display: block;
  }
  .wb-tabs {
    top: 0;
    gap: 0;
  }
  .wb-tabs button {
    font-size: 13px;
  }
  .world-builder .card {
    padding: 20px;
  }
  .world-builder #preview-panel {
    display: none;
    position: fixed;
    inset: 10px;
    width: min(410px, calc(100% - 20px));
    margin: auto;
    z-index: 20;
    background: #f4f0f7;
    border-radius: 28px;
    padding: 8px;
    box-shadow: 0 0 0 100vmax #16111c99;
    max-height: calc(100dvh - 20px);
  }
  .world-builder #preview-panel.wb-preview-open {
    display: block;
  }
  .world-builder #live-preview {
    height: calc(100dvh - 140px);
    max-height: 750px;
    border-width: 3px;
    border-radius: 22px;
  }
  .world-builder .preview-heading button {
    display: inline-flex;
    min-height: 32px;
    font-size: 12px;
  }
  .wb-preview-toggle {
    display: block;
    position: fixed;
    bottom: 22px;
    right: 22px;
    background: #765a91 !important;
    color: white !important;
    box-shadow: 0 6px 30px #44255840;
    border: 0 !important;
    z-index: 10;
  }
  .wb-picker-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .wb-picker-list button {
    padding: 12px;
  }
  .wb-picker {
    inset: 10px 0;
    width: calc(100% - 20px);
    height: calc(100dvh - 20px);
  }
  .wb-link-row {
    grid-template-columns: 24px minmax(0, 1fr) 32px;
  }
  .wb-link-row [data-link-title] {
    grid-column: 2;
    grid-row: auto;
  }
  .wb-link-row > button {
    grid-column: 3;
    grid-row: 1/3;
  }
  .wb-block-body {
    padding: 0 16px 18px;
  }
  .wb-profile .wb-switch span {
    font-size: 11px;
  }
  .wb-metrics b {
    font-size: 23px;
  }
  .world-builder header span {
    display: none;
  }
  .wb-picker-head {
    top: -24px;
  }
}
@media (max-width: 360px) {
  .world-builder main {
    padding-left: 10px;
    padding-right: 10px;
  }
  .world-builder .card {
    padding: 15px;
  }
  .wb-layouts {
    gap: 4px;
  }
  .wb-layouts button {
    font-size: 10px;
    padding: 5px;
  }
  .wb-presets {
    gap: 5px;
  }
  .wb-presets button {
    font-size: 10px;
  }
  .wb-tabs button {
    font-size: 12px;
  }
  .wb-block > summary {
    padding: 13px;
    gap: 8px;
  }
  .wb-section-title h2 {
    font-size: 16px;
  }
  .wb-metrics div {
    padding: 18px 3px;
  }
}

/* Keep original gallery sizing when blocks are wrapped for analytics. */
.photo-grid .page-blocks > .world-block:has(> .gallery) {
  grid-column: auto;
}
.world-block > .gallery {
  margin: var(--photo-margin, 0 auto);
}
.world-hide-share .world-share-actions {
  display: flex;
}
.world-hide-share .world-share-actions > :not(.world-subscribe) {
  display: none;
}

/* Keep action labels on one line, including the narrow mobile preview. */
.world-share-actions {
  flex-wrap: nowrap;
  gap: 8px;
}
.world-share-actions > button,
.world-share-actions > .button {
  white-space: nowrap;
  min-width: 0;
  padding-inline: 10px;
  font-size: clamp(12px, 3.8vw, 16px);
  min-height: 44px;
  line-height: 1.4;
}
.world-share-label {
  white-space: nowrap;
}
/* Links and native buttons use the same label box; icon fonts must not move it. */
.custom-link-design .identity > .world-contact-action,
.custom-link-design .world-share-actions > button,
.custom-link-design .world-share-actions > .button {
  align-items: center;
  justify-content: center;
  font-family: inherit;
  line-height: 1.25;
  text-align: center;
  vertical-align: middle;
}
.world-action-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  line-height: 1.25;
}
.world-action-label {
  display: block;
  line-height: 1.25;
}
.world-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 1em;
  height: 1em;
  line-height: 0;
}
.world-action-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}
.world-social .world-share-icon svg {
  display: block;
}
/* Toggle geometry is independent of input borders and text baselines. */
.world-builder .wb-switch input {
  appearance: none;
  display: block;
  position: relative;
  box-sizing: border-box;
  width: 38px !important;
  height: 24px !important;
  min-width: 38px !important;
  min-height: 24px !important;
  max-height: 24px !important;
  border: 0 !important;
  margin: 0;
  padding: 0 !important;
  border-radius: 20px;
  flex: 0 0 38px;
  background: #c9c5ce;
  box-shadow: none;
}
.world-builder .wb-switch input::after {
  content: '';
  position: absolute;
  display: block;
  box-sizing: border-box;
  left: 3px;
  top: 3px;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: white;
  transform: none;
  transition: left 0.15s;
}
.world-builder .wb-switch input:checked {
  background: #856496;
}
.world-builder .wb-switch input:checked::after {
  left: 17px;
  transform: none;
}
.world-builder .wb-type,
.world-builder .wb-picker-list button > span {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  overflow: hidden;
}
.world-builder .wb-type svg {
  display: block;
  width: 20px;
  height: 20px;
  flex: none;
  margin: 0;
  vertical-align: initial;
}
.world-builder .wb-picker-list button > span svg {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
  margin: 0;
  vertical-align: initial;
}
.wb-link-row > span {
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.wb-link-row > span svg {
  display: block;
  flex: none;
  margin: 0;
}
.world-embedded > header {
  display: none;
}
.world-embedded.world-builder main {
  padding-top: 8px;
}
.world-embedded .wb-heading p {
  margin-top: 0;
}
.world-embedded .wb-heading h1 {
  margin-bottom: 12px;
}
.world-embedded {
  overscroll-behavior-y: contain;
}
/* Use the same choice-popover interaction and pill/menu shape as SUBCUL. */
.link-editor {
  --ink: #292331;
  --surface2: #f5f1f8;
  --accent-bg: #eee5f5;
  --accent-fg: #76558b;
  --control-bg: #fff;
  --control-line: #ddd7e4;
  --control-radius: 999px;
  --menu-radius: 26px;
  --control-shadow: 0 2px 8px #30203905;
  --menu-shadow: 0 8px 28px #00000018;
}
.gc-select-shell {
  display: block;
  position: relative;
  width: 100%;
  min-width: 0;
}
.gc-select-shell > select.subcul-native-select {
  display: none !important;
}
.gc-select-menu[hidden] {
  display: none !important;
}
.world-builder .gc-select-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 48px;
  padding: 12px 20px;
  border: 1px solid var(--control-line);
  border-radius: var(--control-radius);
  background: var(--control-bg);
  box-shadow: var(--control-shadow);
  color: var(--ink);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  word-break: keep-all;
  text-align: left;
}
.gc-select-trigger::after {
  content: '';
  display: block;
  flex: none;
  width: 9px;
  height: 9px;
  margin: 0 2px 4px 6px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}
.gc-select-trigger[aria-expanded='true']::after {
  transform: translateY(4px) rotate(225deg);
}
.world-builder .gc-select-menu {
  display: block;
  margin-top: 8px;
  padding: 8px;
  border: 1px solid var(--control-line);
  border-radius: var(--menu-radius);
  background: var(--control-bg);
  color: var(--ink);
  box-shadow: var(--menu-shadow);
  max-height: min(400px, 50vh);
  overflow-y: auto;
  scroll-padding-block: 8px;
}
.world-builder .gc-select-option {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 0;
  border-radius: 16px;
  background: transparent;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--ink);
  white-space: normal;
  word-break: keep-all;
  text-align: left;
}
.world-builder .gc-select-option:hover {
  background: var(--surface2);
}
.world-builder .gc-select-option[aria-selected='true'] {
  background: var(--accent-bg);
  color: var(--accent-fg);
  font-weight: 600;
}
.world-builder .gc-select-menu[data-choice-popover] {
  position: fixed;
  inset: auto;
  z-index: 1100;
  box-sizing: border-box;
  min-width: 0;
  margin: 0;
  padding: 8px;
  border: 1px solid var(--control-line);
  border-radius: 26px;
  background: var(--control-bg);
  color: var(--ink);
  box-shadow: var(--menu-shadow);
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-padding-block: 8px;
}
[data-choice-popover]::backdrop {
  background: transparent;
  pointer-events: none;
}
@media (max-width: 850px) {
  .world-builder .gc-select-trigger,
  .world-builder .gc-select-option {
    font-size: 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .world-builder .wb-switch input::after,
  .gc-select-trigger::after {
    transition: none;
  }
}

.world-builder .wb-feature-section {
  margin: 14px 0;
  border: 1px solid #e6dfed;
  border-radius: 18px;
  background: #fff;
  overflow: visible;
  padding: 0;
  min-width: 0;
}
.wb-feature-section > summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  min-height: 72px;
}
.wb-feature-section > summary::-webkit-details-marker {
  display: none;
}
.wb-feature-section > summary > strong {
  flex: 1;
  font-size: 16px;
  min-width: 0;
  overflow-wrap: anywhere;
}
.wb-feature-section > summary > small {
  font-size: 12px;
  color: #9988a5;
}
.wb-feature-section > summary .wb-switch {
  position: relative;
  flex: none;
  margin: 0;
  gap: 6px;
}
.wb-toggle-state {
  font-size: 10px;
  font-weight: 700;
  min-width: 22px;
  color: #8a699c;
}
.wb-section-disabled .wb-toggle-state {
  color: #928a99;
}
.wb-section-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #f0e8f6;
  color: #805b96;
  line-height: 1;
  flex: none;
}
.wb-section-icon svg {
  width: 20px;
  height: 20px;
  display: block;
  flex: none;
  margin: 0;
}
.wb-section-chevron {
  display: block;
  width: 9px;
  height: 9px;
  border: solid #8d7a99;
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  flex: none;
  margin: 0 2px 5px 4px;
}
.wb-feature-section[open] > summary .wb-section-chevron {
  transform: translateY(4px) rotate(225deg);
}
.wb-feature-section[open] > summary {
  border-bottom: 1px solid #eee8f3;
}
.wb-feature-body {
  padding: 4px 22px 22px;
  min-width: 0;
}
.wb-section-disabled > .wb-feature-body {
  background: #faf8fc;
}
.wb-feature-body .wb-block {
  box-shadow: none;
  border-radius: 12px;
}
.wb-feature-body .wb-block > summary {
  padding: 14px;
}
.wb-feature-body .wb-block .wb-type {
  display: none;
}
.wb-item-switch {
  flex: none;
}
.wb-feature-body .wb-block-toolbar > .wb-switch {
  display: none;
}
.wb-inner-add {
  width: 100%;
  margin: 12px 0 4px;
  background: #f4eff8 !important;
  border: 1px dashed #bba9c7 !important;
  font-size: 14px;
  min-height: 46px;
}
.wb-feature-hint {
  margin-bottom: 0;
}
.wb-social-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px 12px;
  border-bottom: 1px solid #eee8f3;
  padding: 16px 0;
  margin: 0;
  align-items: center;
}
.wb-social-row > .wb-social-logo {
  grid-column: 1;
  grid-row: 1/3;
  align-self: center;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wb-social-row > .wb-social-logo svg {
  width: 27px;
  height: 27px;
  display: block;
  margin: 0;
}
.wb-social-row .wb-platform-choice {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}
.wb-social-row > [data-link-url] {
  grid-column: 2;
  grid-row: 2;
  padding: 12px;
  font-size: 16px;
}
.wb-social-row > [data-link-title] {
  grid-column: 2;
  grid-row: 3;
  font-size: 13px;
  padding: 10px 12px;
}
.wb-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  grid-column: 2;
  grid-row: 4;
}
.wb-row-actions button {
  min-height: 34px;
  padding: 5px 12px;
  font-size: 12px;
}
.wb-social-row > .visually-hidden {
  position: absolute;
}
.wb-platform-choice .gc-select-trigger {
  min-height: 42px;
  font-size: 14px;
}
.wb-social-editor > label:first-child {
  margin-bottom: 0;
}
.wb-profile .wb-layouts {
  margin-top: 22px;
}
.wb-feature-section > summary .wb-switch input {
  cursor: pointer;
}
.world-builder .wb-feature-section .wb-item-switch input {
  width: 38px !important;
}
@media (max-width: 380px) {
  .wb-feature-section > summary {
    padding: 16px 13px;
    gap: 7px;
  }
  .wb-feature-section > summary > strong {
    font-size: 14px;
  }
  .wb-feature-body {
    padding: 4px 13px 16px;
  }
  .wb-toggle-state {
    display: none;
  }
  .wb-section-icon {
    width: 28px;
    height: 28px;
  }
  .wb-feature-section .wb-social-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
  }
  .wb-social-row > .wb-social-logo {
    width: 28px;
  }
  .wb-row-actions button {
    padding: 5px 10px;
  }
  .wb-feature-section .gc-select-trigger {
    padding-left: 14px;
    padding-right: 14px;
  }
}

.wb-row-actions button[data-row-move],
.wb-block-toolbar button[data-wb-move] {
  width: 36px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.wb-row-actions button svg,
.wb-block-toolbar button svg {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
}
.wb-grip {
  width: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  flex: none;
}
.wb-grip svg,
.wb-block-chevron {
  display: block;
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
}
.wb-block[open] > summary .wb-block-chevron {
  transform: rotate(180deg);
}

/* Keep the mobile heading and each action label on one line. */
@media (max-width: 850px) {
  .world-builder .wb-heading {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 16px;
  }
  .world-builder .wb-heading h1 {
    white-space: nowrap;
    font-size: 25px;
    margin: 4px 0 0;
    line-height: 1.3;
  }
  .world-builder .wb-top-actions {
    width: 100%;
    gap: 8px;
    flex-shrink: 0;
  }
  .world-builder .wb-top-actions button {
    flex: 1 0 auto;
    white-space: nowrap;
    min-height: 44px;
    padding: 10px 16px;
    line-height: 1.2;
    margin: 0;
  }
}

/* Direct SNS address entry; detailed controls remain optional. */
.world-builder .wb-social-quick {
  grid-template-columns: 32px minmax(0, 1fr) 38px;
  gap: 4px 10px;
  padding: 14px 0;
  align-items: center;
}
.world-builder .wb-social-quick > .wb-social-logo {
  grid-column: 1;
  grid-row: 1;
  width: 32px;
  height: 44px;
  align-self: center;
  line-height: normal;
}
.world-builder .wb-social-quick > [data-link-url] {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  padding: 10px;
  font-size: 16px;
}
.world-builder .wb-social-quick > .wb-social-delete {
  grid-column: 3;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 44px;
  min-height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: normal;
}
.wb-social-delete svg {
  display: block;
  width: 20px;
  height: 20px;
  margin: 0;
  flex: none;
}
.world-builder .wb-social-settings {
  grid-column: 2/4;
  grid-row: 2;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.wb-social-settings > summary {
  color: #816992;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  padding: 2px 0;
  list-style: none;
}
.wb-social-settings > summary::-webkit-details-marker {
  display: none;
}
.wb-social-settings > summary::after {
  content: ' ▾';
}
.wb-social-settings[open] > summary::after {
  content: ' ▴';
}
.world-builder .wb-social-settings input {
  font-size: 16px;
  margin: 8px 0;
}
.wb-social-settings .wb-row-actions {
  margin-top: 6px;
}
@media (max-width: 380px) {
  .world-builder .wb-social-quick {
    grid-template-columns: 28px minmax(0, 1fr) 32px;
    gap: 4px 7px;
  }
  .world-builder .wb-social-quick > .wb-social-logo {
    width: 28px;
  }
  .world-builder .wb-social-quick > .wb-social-delete {
    width: 32px;
  }
}

.wb-feature-section > summary > .wb-reorder-handle,
.wb-block > summary > .wb-reorder-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  line-height: 1;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.wb-reorder-handle svg {
  display: block;
  width: 24px;
  height: 24px;
  flex: none;
}
.wb-reorder-handle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.wb-reordering {
  opacity: 0.65;
  outline: 2px solid var(--accent);
}
.wb-reorder-before {
  box-shadow: 0 -4px 0 var(--accent);
}
.wb-reorder-after {
  box-shadow: 0 4px 0 var(--accent);
}
.wb-reorder-status {
  font-size: 13px;
  color: var(--muted);
  margin: 8px 0;
}
.wb-reorder-status:empty {
  display: none;
}

body.link-editor.world-builder {
  background: #fff;
}

.link-button > .link-social-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 6px;
  flex: none;
  line-height: normal;
  background: transparent;
}
.link-social-logo svg {
  display: block;
  width: 28px;
  height: 28px;
  flex: none;
}
.custom-link-design .link-button {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
}
.link-button > .link-social-logo {
  grid-column: 1;
}
.link-button > .link-button-label {
  grid-column: 2;
  min-width: 0;
  line-height: 1.5;
  text-align: center;
}
.link-button > .link-button-arrow {
  grid-column: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  line-height: 1;
}
.custom-link-design .link-button-plain {
  grid-template-columns: 20px minmax(0, 1fr) 20px;
}
.link-button-plain > .link-button-arrow {
  width: 20px;
}

/* Editor chrome follows the selected site theme, including sticky tabs and controls. */
:root {
  --wb-page: #fff;
  --wb-surface: #fff;
  --wb-soft: #f7f5f9;
  --wb-input: #fff;
  --wb-ink: #302637;
  --wb-muted: #786b83;
  --wb-line: #e3dce9;
  --wb-active: #302637;
  --wb-active-ink: #fff;
}
html[data-theme='dark'] {
  --wb-page: #17141d;
  --wb-surface: #24202b;
  --wb-soft: #302938;
  --wb-input: #1c1823;
  --wb-ink: #f0eaf5;
  --wb-muted: #bdb0ca;
  --wb-line: #494050;
  --wb-active: #b795cf;
  --wb-active-ink: #211829;
}
html:has(body.world-builder) {
  background: var(--wb-page);
}
body.link-editor.world-builder,
.world-builder .wb-tabs {
  background: var(--wb-page);
  color: var(--wb-ink);
}
.world-builder
  :is(
    .wb-publish,
    .card,
    .wb-block,
    .wb-feature-section,
    .wb-picker-list,
    .wb-social-settings,
    .wb-preview-actions
  ) {
  background: var(--wb-surface);
  border-color: var(--wb-line);
  color: var(--wb-ink);
}
.world-builder
  :is(
    input:not([type='checkbox']):not([type='range']):not([type='color']),
    textarea,
    select,
    .gc-select-trigger,
    .gc-select-menu,
    .editor-native-control
  ) {
  background: var(--wb-input);
  border-color: var(--wb-line);
  color: var(--wb-ink);
}
.world-builder input::placeholder,
.world-builder textarea::placeholder {
  color: var(--wb-muted);
  opacity: 1;
}
.world-builder :is(button, .button) {
  background: var(--wb-surface);
  border-color: var(--wb-line);
  color: var(--wb-ink);
}
.world-builder .wb-tabs button[aria-current='page'] {
  background: var(--wb-active);
  color: var(--wb-active-ink);
}
.world-builder :is(.primary, [aria-pressed='true'].primary) {
  background: #806196;
  color: #fff;
  border-color: #806196;
}
.world-builder
  :is(
    .hint,
    .form-hint,
    .wb-heading p,
    .wb-feature-hint,
    .preview-heading,
    .wb-type,
    .wb-section-title h2 span,
    .wb-feature-section > summary > small,
    .wb-social-settings > summary,
    .editor-native-value.empty
  ) {
  color: var(--wb-muted);
}
.world-builder
  :is(.wb-feature-body, .wb-social-row, .wb-block > summary, .wb-feature-section[open] > summary) {
  border-color: var(--wb-line);
}
.world-builder .wb-section-disabled > .wb-feature-body,
.world-builder .wb-inner-add,
.world-builder .wb-layouts button[aria-pressed='true'] {
  background: var(--wb-soft) !important;
  color: var(--wb-ink);
}
.world-builder .wb-section-icon {
  background: var(--wb-soft);
  color: var(--wb-muted);
}
.world-builder .gc-select-option {
  background: transparent;
  color: var(--wb-ink);
}
.world-builder .gc-select-option:hover,
.world-builder .gc-select-option[aria-selected='true'] {
  background: var(--wb-soft);
  color: var(--wb-ink);
}
#live-preview {
  background: var(--wb-page);
  border-color: #342d3d;
}
html[data-theme='dark'] .custom-link-design section.card {
  background: var(--button-bg);
  color: var(--button-ink);
  border-color: color-mix(in srgb, var(--page-ink) 24%, transparent);
}

@media (max-width: 850px) {
  .world-embedded .wb-preview-toggle {
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
  }
}

.world-builder .wb-publish a {
  color: var(--wb-muted);
}

/* Fixed editor controls follow the visible parent viewport without moving/reloading the iframe. */
@media (max-width: 850px) {
  .world-builder.world-embedded .wb-preview-toggle {
    bottom: calc(var(--world-visible-bottom, 0px) + 14px);
  }
  html[data-world-viewport-visible='false'] .world-embedded .wb-preview-toggle {
    visibility: hidden;
  }
  .world-builder #preview-panel.wb-preview-open {
    box-sizing: border-box;
    top: calc(var(--world-visible-top, 0px) + 12px);
    bottom: auto;
    height: calc(var(--world-visible-height, 100dvh) - 24px);
    max-height: calc(var(--world-visible-height, 100dvh) - 24px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }
  .world-builder #preview-panel.wb-preview-open .preview-heading,
  .world-builder #preview-panel.wb-preview-open > .hint {
    flex: none;
  }
  .world-builder #preview-panel.wb-preview-open #live-preview {
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
    height: auto;
    max-height: none;
    width: 100%;
  }
}

/* Picker surfaces and interaction states use the same readable theme palette. */
.world-builder .wb-picker,
.world-builder .wb-picker-head {
  background: var(--wb-surface);
  border-color: var(--wb-line);
  color: var(--wb-ink);
}
.world-builder .wb-picker-list button {
  background: transparent;
  color: var(--wb-ink);
}
.world-builder .wb-picker-list button:is(:hover, :focus-visible, :active) {
  background: var(--wb-soft);
  color: var(--wb-ink);
}
.world-builder .wb-picker-list small,
.world-builder .wb-picker-list i {
  color: var(--wb-muted);
}
.world-builder .wb-picker-list button:focus-visible {
  outline: 2px solid var(--wb-active);
  outline-offset: -2px;
}
:root {
  --wb-delete-ink: #9d234b;
  --wb-delete-hover: #fff0f4;
}
html[data-theme='dark'] {
  --wb-delete-ink: #ffb4c9;
  --wb-delete-hover: #4b2637;
}
.world-builder :is(.wb-section-delete, .wb-block-delete) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  gap: 5px;
  min-height: 44px;
  min-width: 44px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--wb-line);
  border-radius: 10px;
  background: transparent;
  color: var(--wb-delete-ink);
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  cursor: pointer;
}
.world-builder :is(.wb-section-delete, .wb-block-delete):is(:hover, :focus-visible) {
  background: var(--wb-delete-hover);
  color: var(--wb-delete-ink);
}
.world-builder :is(.wb-section-delete, .wb-block-delete) > svg {
  display: block;
  width: 18px;
  height: 18px;
  flex: none;
}
@media (max-width: 600px) {
  .wb-feature-section > summary:has(> .wb-section-delete) {
    display: grid;
    grid-template-columns: 44px 36px 28px minmax(0, 1fr) auto 16px;
    gap: 6px;
  }
  .wb-feature-section > summary:has(> .wb-section-delete) > .wb-reorder-handle {
    grid-column: 1;
    grid-row: 1;
  }
  .wb-feature-section > summary:has(> .wb-section-delete) > .wb-switch {
    grid-column: 2;
    grid-row: 1;
  }
  .wb-feature-section > summary:has(> .wb-section-delete) > .wb-switch .wb-toggle-state {
    display: none;
  }
  .wb-feature-section > summary:has(> .wb-section-delete) > .wb-section-icon {
    grid-column: 3;
    grid-row: 1;
  }
  .wb-feature-section > summary:has(> .wb-section-delete) > strong {
    grid-column: 4;
    grid-row: 1;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .wb-feature-section > summary:has(> .wb-section-delete) > small {
    grid-column: 5;
    grid-row: 1;
  }
  .wb-feature-section > summary:has(> .wb-section-delete) > .wb-section-chevron {
    grid-column: 6;
    grid-row: 1;
  }
  .wb-feature-section > summary > .wb-section-delete {
    grid-column: 4/-1;
    grid-row: 2;
    justify-self: end;
  }
  .wb-block > summary:has(> .wb-block-delete) {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 38px 16px;
    gap: 6px;
  }
  .wb-block > summary:has(> .wb-block-delete) > .wb-reorder-handle {
    grid-column: 1;
    grid-row: 1;
  }
  .wb-block > summary:has(> .wb-block-delete) > strong {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .wb-block > summary:has(> .wb-block-delete) > .wb-item-switch {
    grid-column: 3;
    grid-row: 1;
  }
  .wb-block > summary:has(> .wb-block-delete) > .wb-block-chevron {
    grid-column: 4;
    grid-row: 1;
  }
  .wb-block > summary > .wb-block-delete {
    grid-column: 2/-1;
    grid-row: 2;
    justify-self: end;
  }
}

/* The phone editor grows with its content and scrolls in the parent page. */
@media (max-width: 719px) {
  html:has(body.world-embedded),
  body.world-embedded {
    overflow: visible;
    overscroll-behavior-y: auto;
  }
  .world-embedded.world-builder main {
    margin-bottom: 0;
    padding-bottom: 24px;
  }
  .world-embedded .wb-picker {
    top: calc(var(--world-visible-top, 0px) + 12px);
    bottom: auto;
    height: calc(var(--world-visible-height, 100dvh) - 24px);
    max-height: calc(var(--world-visible-height, 100dvh) - 24px);
    margin: 0 auto;
  }
}

/* Standalone world editor uses its own theme tokens. */
:root .world-builder button[data-popup-close] {
  color: var(--wb-ink, #302637);
  --popup-close-bg: var(--wb-surface, #fff);
  --popup-close-line: var(--wb-line, #ded5e5);
  --popup-close-focus: var(--wb-ink, #302637);
}

.wb-save-status {
  margin: 0 0 14px;
  min-height: 22px;
  font-size: 14px;
  font-weight: 700;
  color: var(--wb-ink, #302637);
}
.wb-save-status:empty {
  display: none;
}
.wb-reordering {
  opacity: 0.3;
}
.wb-reorder-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.world-builder :is(.wb-feature-section, .wb-block) {
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}
.world-builder :is(.wb-feature-section, .wb-block) :is(input, textarea, [contenteditable='true']) {
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

/* Calendar details follow their card's text color, including an explicitly
   selected dark theme that differs from the device's color-scheme preference. */
.event small {
  display: block;
  color: inherit;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.82;
}
.event > span {
  background: color-mix(in srgb, currentColor 12%, transparent);
  color: inherit;
}
.event {
  border-top-color: color-mix(in srgb, currentColor 22%, transparent);
}
.custom-link-design section.card .hint {
  color: inherit;
  opacity: 0.82;
}

/* Public event/plan projection follows the current account, with no nested scroll. */
.card .calendar-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.card .calendar-head button {
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  display: grid;
  place-items: center;
}
.world-plan-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 16px;
  padding-top: 20px;
  border-top: 1px solid rgba(128, 116, 140, 0.24);
}
.world-plan-heading h3 {
  font-size: 17px;
  margin: 0;
}
.world-plan-heading span {
  font-size: 12px;
  opacity: 0.65;
}
.world-plan-list {
  display: grid;
  gap: 14px;
}
.world-plan-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
  border: 1px solid rgba(128, 116, 140, 0.24);
  border-radius: 16px;
  align-items: center;
}
.world-plan-card img,
.world-plan-no-photo {
  width: 88px;
  height: 120px;
  object-fit: cover;
  border-radius: 11px;
  background: rgba(128, 100, 156, 0.08);
}
.world-plan-no-photo {
  display: grid;
  place-items: center;
  font-size: 12px;
  letter-spacing: 0.14em;
  opacity: 0.55;
}
.world-plan-card h4 {
  font-size: 18px;
  margin: 5px 0 7px;
  overflow-wrap: anywhere;
}
.world-plan-card time {
  font-size: 12px;
  opacity: 0.8;
}
.world-plan-card p {
  font-size: 12px;
  margin: 4px 0;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.world-plan-event {
  font-weight: 700;
}
.world-plan-character {
  opacity: 0.7;
}
.world-plan-caption {
  white-space: pre-wrap;
}
.wb-calendar-link {
  margin: 20px 0;
  padding: 20px;
  display: grid;
  gap: 12px;
}
.wb-calendar-link label {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-weight: 700;
}
.wb-calendar-link input {
  width: 20px;
  height: 20px;
  flex: none;
}
.wb-calendar-link p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.75;
}
@media (max-width: 480px) {
  .world-plan-card {
    padding: 12px;
    gap: 12px;
    grid-template-columns: 76px minmax(0, 1fr);
  }
  .world-plan-card img,
  .world-plan-no-photo {
    width: 76px;
    height: 108px;
  }
  .wb-calendar-link {
    padding: 16px;
  }
}

/* Calendar preferences stay compact; long guidance is a separate disclosure. */
body.world-builder #editor .wb-calendar-link {
  padding: 14px 16px;
  gap: 0;
}
body.world-builder #editor .wb-calendar-link h2 {
  margin: 0 0 6px;
  font-size: 16px;
  line-height: 1.5;
}
body.world-builder #editor .wb-calendar-link label.wb-calendar-option {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  min-height: 44px;
  margin: 0 !important;
  padding: 4px 0 !important;
  text-align: left !important;
  line-height: 1.5;
}
body.world-builder #editor .wb-calendar-option > input {
  flex: 0 0 18px;
  margin: 0 !important;
}
body.world-builder #editor .wb-calendar-option > span {
  flex: 1;
  min-width: 0;
}
body.world-builder #editor .wb-calendar-help {
  margin: 2px 0 0;
  border: 0;
  padding: 0;
}
body.world-builder #editor .wb-calendar-help > summary {
  display: flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  padding: 0;
  font-size: 12px;
  color: var(--wb-muted, #706677);
  cursor: pointer;
}
body.world-builder #editor .wb-calendar-help > summary::before {
  content: '›';
  display: inline-block;
  transform: rotate(90deg);
}
body.world-builder #editor .wb-calendar-help[open] > summary::before {
  transform: rotate(-90deg);
}
body.world-builder #editor .wb-calendar-help p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--wb-muted, #706677);
}
