:root {
  color-scheme: light;
  font: 15px/1.5 Inter, "Helvetica Neue", Arial, sans-serif;
  --paper: #f6f3ec;
  --ink: #222520;
  --muted: #555b51;
  --line: #dcd7cc;
  --accent: #27372e;
  --accent-hover: #374d3f;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, a { font: inherit; }
button:not(:disabled), a, label[for] { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible + label {
  outline: 2px solid #333;
  outline-offset: 4px;
}
.topbar, .shell {
  width: min(calc(100% - clamp(40px, 6.4vw, 100px)), 1480px);
  margin-inline: auto;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 20px 0 15px;
  border-bottom: 1px solid var(--line);
}
.identity, .header-actions { display: grid; gap: 6px; }
.identity { justify-items: start; }
.header-actions { justify-items: end; }
.wordmark-heading { margin: 0; }
.brand {
  display: inline-grid;
  justify-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}
.brand-symbol {
  display: block;
  width: 51px;
  height: 35px;
  background: url('/assets/logo.png') -1px -1px / 128px auto no-repeat;
}
.brand-wordmark {
  font: 32px/1.06 Georgia, "Times New Roman", serif;
  letter-spacing: -.025em;
}
.descriptor, .credit { color: var(--muted); }
.descriptor { font-size: 12px; }
.credit { font-size: 11px; }
.header-actions .button { border-color: #ccc7bb; }
.shell { padding: 18px 0 24px; }
.gallery {
  display: grid;
  grid-template-columns: minmax(0, 3.1fr) minmax(0, 1fr);
  grid-template-rows: clamp(350px, 64svh, 690px);
  gap: 10px;
}
.featured, .room {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: #e9e3db;
  border-radius: 12px;
}
.featured img, .room img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 64%;
}
.featured img[data-room="entrada"] { object-position: 50% 56%; }
.featured img[data-room="living"] { object-position: 50% 68%; }
img[data-room="bedroom"], [data-room="bedroom"] img { object-position: 50% 70%; }
.gallery-options { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; min-height: 0; }
.room {
  isolation: isolate;
  border: 0;
  padding: 0;
  text-align: start;
}
.room img { transition: transform .28s ease; }
@media (hover: hover) {
  .room:hover img { transform: scale(1.025); }
}
.room span {
  position: absolute;
  bottom: 10px;
  left: 10px;
  color: #fff;
  background: #211b16bf;
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 8px;
}
.play-example {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  left: 18px;
  bottom: 17px;
  min-height: 44px;
  padding: 8px 15px 8px 12px;
  border-radius: 30px;
  border: 1px solid #ffffff50;
  color: white;
  background: var(--accent);
  box-shadow: 0 2px 10px #17171724;
  font-weight: 600;
  font-size: 13px;
}
.play-example:hover { background: var(--accent-hover); }
.play-example:focus-visible { outline-color: white; }
.play-example span { color: #dedfd9; font-size: 11px; font-weight: 400; }
.gallery-caption {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 12px;
}
.inline {
  color: #303030;
  text-decoration: underline;
  text-underline-offset: 3px;
  background: transparent;
  border: 0;
  padding: 6px 0;
  align-self: start;
  text-align: left;
  white-space: nowrap;
}
.inline:disabled { opacity: .5; }
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 2.35fr) minmax(210px, 1fr);
  gap: clamp(16px, 3vw, 34px);
  align-items: center;
}
.editor-preview {
  display: grid;
  min-width: 0;
  height: clamp(320px, 64dvh, 620px);
  place-items: center;
  border-radius: 11px;
  overflow: hidden;
  background: #e9e3db;
}
.editor-preview img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 50% 67%;
}
.editor-preview .media-player {
  width: 100%;
  height: 100%;
  min-height: 0;
}
.media-player {
  position: relative;
  display: grid;
  place-items: center;
  background: #151515;
  border-radius: 9px;
  overflow: hidden;
}
.media-player video { width: 100%; height: 100%; object-fit: contain; display: block; }
.fullscreen {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 1px solid #ffffff75;
  border-radius: 8px;
  color: white;
  background: #151515d9;
  font-size: 24px;
  line-height: 1;
}
.media-player:fullscreen, .media-player.is-expanded {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: #111;
}
.media-player.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 10;
}
#aiControls { display: grid; gap: 6px; font-size: 12px; }
#aiControls input { min-width: 0; padding: 7px 9px; border-radius: 7px; border: 1px solid #ddd9d1; }
.composer { display: flex; flex-direction: column; min-width: 0; gap: 10px; }
.composer p { color: #68655f; margin: 0; font-size: 12px; }
.composer .button { width: 100%; }
.composer-actions { display: grid; gap: 8px; }
.upload { position: relative; }
#photos {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9px;
  border: 1px solid #181818;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 620;
  text-decoration: none;
  white-space: nowrap;
}
.primary { background: var(--accent); border-color: var(--accent); color: white; }
.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.primary:disabled { color: #6b6862; background: #ece9e4; border-color: #ece9e4; }
.secondary { border-color: #ddd9d1; background: transparent; color: #292929; }
.secondary:hover { background: #f1eee9; }
#photos:disabled + label { opacity: .6; cursor: default; }
.thumbnails {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.thumbnails img, .thumbnails video {
  display: block;
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 7px;
}
.status { grid-column: 1 / -1; }
.status:empty { display: none; }
dialog {
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 20px);
  padding: 12px;
  border: 1px solid #e6e4e0;
  border-radius: 14px;
  background: var(--paper);
}
.editor-dialog {
  width: min(calc(100vw - 40px), 1050px);
  padding: 16px;
  overscroll-behavior: contain;
}
.editor-dialog .dialog-header { margin-bottom: 11px; }
#editorTitle { font-size: 17px; font-weight: 620; margin: 0; letter-spacing: -.035em; }
dialog[open] { animation: show-dialog .22s cubic-bezier(.2,.75,.2,1); }
dialog::backdrop { background: #121111a8; backdrop-filter: blur(3px); }
@keyframes show-dialog {
  from { opacity: 0; transform: translateY(7px) scale(.986); }
  to { opacity: 1; transform: none; }
}
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 7px; }
.dialog-header h2 { margin: 0; font-size: 14px; font-weight: 620; }
.close { min-width: 35px; min-height: 35px; border: 0; border-radius: 8px; background: #eeeae4; font-size: 21px; line-height: 1; }
.example-dialog {
  width: min(calc(100vw - 28px), calc((100dvh - 82px) * 1.7778), 1050px);
}
.example-dialog .media-player { aspect-ratio: 16/9; }
@media (max-width: 680px) {
  .topbar, .shell { width: calc(100% - 32px); }
  .topbar { padding: 14px 0; }
  .identity, .header-actions { gap: 4px; }
  .brand-wordmark { font-size: 28px; }
  .descriptor { font-size: 11px; }
  .header-actions .button { padding-inline: 10px; }
  .shell { padding-top: 13px; }
  .gallery {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: clamp(265px, 52svh, 420px) auto;
    gap: 6px;
  }
  .gallery-options { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: 1fr; gap: 6px; }
  .room { height: clamp(76px, 24vw, 110px); }
  .room span { bottom: 6px; left: 6px; font-size: 10px; padding: 3px 7px; }
  .featured { border-radius: 10px; }
  .featured img[data-room="living"] { object-position: 50% 71%; }
  .play-example { left: 12px; bottom: 12px; }
  .gallery-caption { font-size: 11px; }
  .editor-dialog { width: calc(100vw - 16px); max-width: none; padding: 11px; }
  .editor-layout { grid-template-columns: 1fr; gap: 12px; }
  .editor-preview { height: clamp(230px, 43svh, 390px); }
  .composer { gap: 8px; }
  .composer-actions { display: grid; grid-template-columns: 1fr 1fr; }

}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
