body:has(#room[data-photo-background="true"]) {
  --photo-ink: #fffdf7;
  --photo-edge: #11251e;
  --ink: var(--photo-ink);
  --muted: var(--photo-ink);
  color: var(--photo-ink);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  text-shadow:
    -1px 0 var(--photo-edge),
    1px 0 var(--photo-edge),
    0 -1px var(--photo-edge),
    0 1px var(--photo-edge),
    0 1px 3px var(--photo-edge);
}
body[data-photo-tone="dark"]:has(#room[data-photo-background="true"]) {
  --photo-ink: #11251e;
  --photo-edge: #fffdf7;
}
body:has(#room[data-photo-background="true"])
  :is(
    .site-header,
    .room-topline,
    .control-bar,
    .spectator-note,
    .empty,
    .room-apps,
    .invite-fallback,
    .screen-tile,
    .session-issue,
    .appearance-dialog,
    .feedback-panel,
    .host-file-action,
    .app-tabs,
    .workspace-navigation,
    .app-builder,
    .draft-preview
  ),
#room[data-photo-background="true"]
  .room-content
  .stage-wrap:has(.stage:not([hidden])) {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
  box-shadow: none;
  color: var(--photo-ink);
}
body:has(#room[data-photo-background="true"]) .appearance-dialog::backdrop {
  background: transparent;
}
body:has(#room[data-photo-background="true"]):has(.appearance-dialog[open])
  :is(.site-header, #app, .feedback-widget),
body:has(#room[data-photo-background="true"]):has(.feedback-panel:not([hidden]))
  :is(.site-header, #app) {
  visibility: hidden;
}
#room[data-photo-background="true"]
  .app-panel:has(.host-file-action)
  .app-frame {
  visibility: hidden;
}
body:has(#room[data-photo-background="true"])
  :is(button, input, select, textarea) {
  color: var(--photo-ink);
  background: var(--photo-edge);
  border-color: var(--photo-ink);
  text-shadow: none;
  transition-property: transform;
}
body:has(#room[data-photo-background="true"])
  :is(
    button.primary,
    .app-tabs [aria-selected="true"],
    #camera-button.live,
    #mic-button[aria-pressed="true"],
    #screen-button[aria-pressed="true"]
  ) {
  color: var(--photo-edge);
  background: var(--photo-ink);
  border-color: var(--photo-edge);
}
#room[data-photo-background="true"] .bubble-label {
  color: var(--photo-ink);
  background: transparent;
  border-color: transparent;
  text-shadow: inherit;
}
body:has(#room[data-photo-background="true"])
  :is(button, input, select, textarea):focus-visible {
  outline: 2px solid var(--photo-ink);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px var(--photo-edge);
}
#room[data-bubble-size="small"] .stage:not([hidden]) .bubble {
  width: 64px;
  flex-basis: 64px;
}
#room[data-bubble-size="medium"] .stage:not([hidden]) .bubble {
  width: 90px;
  flex-basis: 90px;
}
#room[data-bubble-size="large"] .stage:not([hidden]) .bubble {
  width: 120px;
  flex-basis: 120px;
}
#room[data-bubble-shape="rounded-square"] .bubble-media {
  border-radius: 24%;
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.header-actions:not(:has(button:not([hidden]))) {
  display: none;
}
.appearance-toggle {
  display: grid;
  place-items: center;
  width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 24px;
  line-height: 1;
}
#copy-link .invite-label {
  margin-right: 0;
}
@media (max-width: 500px) {
  .header-actions #copy-link {
    width: 44px;
    min-height: 44px;
    padding: 0;
    font-size: 20px;
  }
  #copy-link > span {
    margin-right: 0;
  }
  #copy-link .invite-label {
    display: none;
  }
}
.workspace-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}
.appearance-dialog {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  color: var(--ink);
  background: var(--paper);
  box-shadow: 0 20px 80px #203d3540;
}
.appearance-dialog::backdrop {
  background: #203d3555;
}
.appearance-dialog h2 {
  margin: 0;
  font:
    28px Georgia,
    serif;
}
.appearance-dialog p {
  font-size: 12px;
  line-height: 1.5;
}
.appearance-dialog fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.appearance-dialog label {
  display: block;
  font-size: 13px;
  margin: 12px 0 6px;
}
.appearance-dialog select,
.appearance-dialog input {
  display: block;
  width: 100%;
  min-width: 0;
  font: inherit;
  font-size: 13px;
}
.appearance-dialog select {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  background: #fffdf7;
  color: var(--ink);
}
.appearance-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.appearance-actions button {
  font-size: 12px;
  padding: 10px 14px;
}
.appearance-preview {
  display: grid;
  place-items: center;
  height: 150px;
  background-color: var(--mint);
  background-position: center;
  background-size: cover;
  border-radius: 12px;
}
.appearance-preview span {
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  border: 3px solid #fffdf7;
  border-radius: 50%;
  background: #c4d7c3;
  font-size: 42px;
}
.appearance-preview[data-size="small"] span {
  width: 64px;
  height: 64px;
}
.appearance-preview[data-size="large"] span {
  width: 120px;
  height: 120px;
}
.appearance-preview[data-shape="rounded-square"] span {
  border-radius: 24%;
}
@media (max-width: 500px) {
  .workspace-heading {
    flex-wrap: wrap;
  }
  .workspace-tools {
    justify-content: flex-start;
  }
  .appearance-dialog {
    padding: 16px;
  }
}
