.room-photo-intro { max-width: 420px; color: var(--muted); }
.room-photo-intro p { margin: 0 0 9px; }
.room-photo {
  scroll-margin-top: 15px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffdf8;
}
.room-photo summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px clamp(16px, 3vw, 28px);
  list-style: none;
  cursor: pointer;
}
.room-photo summary::-webkit-details-marker { display: none; }
.room-photo summary small { display: block; color: var(--muted); font-size: 11px; }
.room-photo summary strong { font: 400 clamp(22px, 3vw, 32px)/1.15 var(--serif); }
.room-photo-plus {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #eee5eb;
  color: var(--accent);
  font-size: 24px;
}
.room-photo[open] .room-photo-plus { transform: rotate(45deg); }
.room-photo-content { padding: 0 clamp(16px, 3vw, 28px) 20px; }
.room-photo-content > p:first-child { margin: 0 0 12px; max-width: 65ch; color: var(--muted); }
.room-photo-file { display: grid; gap: 6px; font-weight: 650; font-size: 13px; }
.room-photo-file input { width: min(100%, 450px); height: auto; }
.room-photo-file input::file-selector-button {
  margin-right: 9px;
  padding: 6px 10px;
  border: 0;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  cursor: pointer;
}
.room-photo-workspace {
  display: grid;
  grid-template-columns: minmax(0, 2.5fr) minmax(190px, 1fr);
  gap: 14px;
  align-items: start;
}
.room-photo-canvas { padding: 9px; min-width: 0; border-radius: 7px; background: #eeece3; }
.room-photo-canvas > p { margin: 8px 4px 2px; }
.room-photo-frame {
  position: relative;
  width: min(100%, calc(min(62dvh, 540px) * var(--room-ratio, 1)));
  overflow: hidden;
  margin-inline: auto;
  isolation: isolate;
}
.room-photo-frame.room-marking { cursor: crosshair; }
.room-photo-frame.room-brush { cursor: crosshair; touch-action: none; }
.room-photo-frame > img { display: block; width: 100%; height: auto; }
#room-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
}
#room-material {
  position: absolute;
  inset: 0 auto auto 0;
  width: 1024px;
  height: 1024px;
  transform-origin: 0 0;
}
#room-light { position: absolute; inset: 0; width: 100%; height: 100%; }
#room-guides, #room-markers { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#room-guides polyline { fill: none; stroke: #fff5d5; stroke-width: 2px; vector-effect: non-scaling-stroke; }
#room-markers span, #room-markers button, #room-cursor {
  position: absolute;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}
#room-markers span, #room-markers button {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid #fff5d5;
  background: #3c2635;
  color: white;
  font-size: 12px;
  font-weight: 700;
}
#room-markers button {
  width: 32px;
  height: 32px;
  padding: 0;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}
#room-markers button:active { cursor: grabbing; }
#room-cursor { display: none; width: 18px; height: 18px; border: 2px solid white; border-radius: 50%; box-shadow: 0 0 0 2px #3c2635; }
.room-marking:focus-visible #room-cursor, .room-brush:focus-visible #room-cursor { display: block; }
.room-photo-controls { display: grid; gap: 8px; min-width: 0; }
.room-photo-controls label { font-size: 13px; font-weight: 650; }
.room-photo-controls select { width: 100%; }
.room-photo-controls button:disabled { opacity: .53; cursor: default; }
.room-photo-controls #room-mask-label { display: flex; align-items: center; gap: 6px; }
.room-photo-controls #room-mask { min-height: 0; width: 18px; height: 18px; accent-color: var(--accent); }
.room-export { display: grid; gap: 8px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--line); }
.room-export .hint { margin: 0; }
.room-export .hint:empty, #saved-room-status:empty { display: none; }
.room-export a { font-size: 13px; font-weight: 650; }
.saved-room-project { margin: 0 0 22px; }
.saved-room-project > .hint { margin-top: 5px; }
.saved-room-card { overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: #fffdf8; }
.saved-room-card img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.saved-room-card > div { padding: 12px; }
.saved-room-card h4 { margin: 0; font: 400 22px/1.15 var(--serif); }
.saved-room-card .hint { margin: 4px 0 10px; }
.saved-room-share-status:empty { display: none; }
.saved-room-card .button { font-size: 12px; padding-inline: 9px; }
@media (max-width: 680px) {
  .room-photo-workspace { grid-template-columns: minmax(0, 1fr); }
  .saved-room-project .cards { grid-template-columns: minmax(0, 1fr); }
}
