:root {
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #283a31;
  background: #f6f4ed;
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
a,
label {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  border: 1px solid #d6dbd2;
  border-radius: 8px;
  padding: 12px 16px;
  background: #fffefa;
  color: #283a31;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
button:hover:not(:disabled),
.button:hover {
  border-color: #517861;
  background: #eff2e9;
}
button:focus-visible,
a:focus-visible,
label:has(input:focus-visible) {
  outline: 3px solid #b58a46;
  outline-offset: 4px;
}
.primary {
  background: #315941;
  color: white;
  border-color: #315941;
}
.primary:hover:not(:disabled) {
  background: #234730;
  color: white;
}
.wide {
  width: 100%;
  margin-top: 25px;
}
header {
  padding: 24px 4.5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #dedfd5;
  font-size: 11px;
  letter-spacing: 1.4px;
}
header a {
  color: inherit;
  text-decoration: none;
  letter-spacing: 0;
  font-size: 13px;
}
header i {
  font-style: normal;
  background: #e6e8d9;
  border-radius: 4px;
  padding: 5px;
  margin-left: 9px;
  font-size: 9px;
}
.private {
  font-size: 10px;
  letter-spacing: 0;
  color: #637362;
}
main {
  max-width: 1440px;
  padding: 0 4.5%;
  margin: auto;
}
.intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 43px 0 32px;
  gap: 25px;
}
.eyebrow {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 2px;
  color: #75836b;
}
h1 {
  font-family: Georgia, serif;
  font-weight: 400;
  font-size: 57px;
  line-height: 1.07;
  letter-spacing: -2px;
  margin: 14px 0;
}
h1 em {
  font-weight: 400;
  color: #638161;
}
.intro > p {
  max-width: 320px;
  font-size: 15px;
  line-height: 1.8;
  color: #738075;
}
h2 {
  font-family: Georgia, serif;
  font-size: 25px;
  font-weight: 400;
  margin: 14px 0;
}
h3 {
  font-size: 15px;
  margin: 10px 0 17px;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(290px, 1fr);
  gap: 28px;
}
.canvas-panel {
  min-width: 0;
}
.canvas-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 1.5px;
  min-height: 40px;
}
.canvas-top button {
  padding: 5px 10px;
  font-size: 11px;
}
.canvas {
  position: relative;
  background: #e8e9df;
  border: 1px solid #dfe2d6;
  border-radius: 16px;
  min-height: 275px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.canvas img,
.canvas video {
  width: auto;
  max-width: 100%;
  max-height: 580px;
  object-fit: contain;
}
.canvas #empty {
  text-align: center;
  padding: 28px 15px 38px;
  width: 100%;
}
.canvas p {
  font-size: 13px;
  line-height: 1.7;
  color: #778271;
}
.room-sketch {
  width: 240px;
  height: 160px;
  background: #f1efe3;
  border-radius: 100px 100px 8px 8px;
  margin: 0 auto 27px;
  position: relative;
  overflow: hidden;
  border-bottom: 8px solid #c2b29c;
}
.window {
  position: absolute;
  top: 30px;
  left: 43px;
  width: 55px;
  height: 60px;
  border: 5px solid #fffaf0;
  background:
    linear-gradient(90deg, transparent 46%, #fffaf0 46% 54%, transparent 54%),
    linear-gradient(0deg, transparent 46%, #fffaf0 46% 54%, transparent 54%),
    #ced7d0;
}
.shelf {
  position: absolute;
  right: 24px;
  top: 62px;
  width: 80px;
  border-bottom: 5px solid #b4a18a;
}
.counter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 48px;
  height: 10px;
  background: #d5c7ad;
}
.cupboards {
  position: absolute;
  bottom: 0;
  height: 48px;
  width: 100%;
  background: repeating-linear-gradient(
    90deg,
    #a4ad96 0 56px,
    #939c87 57px 60px
  );
}
.plant {
  position: absolute;
  right: 40px;
  bottom: 53px;
  font-size: 38px;
  color: #638161;
}
.canvas-tools {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 14px;
}
#status {
  font-size: 12px;
  line-height: 1.6;
  color: #697765;
  min-height: 36px;
}
.settings {
  background: #fffefa;
  padding: 27px;
  border: 1px solid #e0e3d9;
  border-radius: 16px;
}
.settings h2 {
  margin-bottom: 22px;
}
.palette {
  width: 100%;
  text-align: left;
  display: flex;
  justify-content: flex-start;
  gap: 13px;
  margin: 9px 0;
  padding: 12px;
  border: 1px solid transparent;
  background: transparent;
}
.palette[aria-pressed="true"] {
  background: #edf0e6;
  border-color: #9eaf99;
}
.swatches {
  display: flex;
  flex-shrink: 0;
}
.swatches i {
  width: 21px;
  height: 38px;
}
.swatches i:first-child {
  border-radius: 6px 0 0 6px;
}
.swatches i:last-child {
  border-radius: 0 6px 6px 0;
}
.palette small {
  display: block;
  font-weight: 400;
  color: #77816e;
  font-size: 10px;
  margin-top: 4px;
}
.divider {
  border-top: 1px solid #e8e9e1;
  margin: 22px 0;
}
#surfaces {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#surfaces label {
  font-size: 12px;
  border: 1px solid #d8decf;
  padding: 10px;
  border-radius: 7px;
  cursor: pointer;
}
#surfaces label:has(input:checked) {
  background: #edf0e6;
  border-color: #94a88c;
}
input[type="checkbox"] {
  accent-color: #315941;
}
.small {
  font-size: 11px !important;
  line-height: 1.6;
  color: #77816e;
}
.review {
  margin-top: 28px;
  background: white;
  border: 1px solid #bac6b2;
  border-radius: 16px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 35px;
  scroll-margin-top: 20px;
}
.review p,
.review a {
  font-size: 13px;
  line-height: 1.7;
  color: #566452;
}
.review img {
  max-height: 230px;
  max-width: 100%;
  border-radius: 8px;
}
.consent {
  display: flex;
  gap: 10px;
  font-size: 13px;
  line-height: 1.6;
  margin: 22px 0;
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
footer {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 1px;
  color: #86907e;
  padding: 35px 0;
}
footer span {
  letter-spacing: 0;
}
[hidden] {
  display: none !important;
}
@media (max-width: 850px) {
  .workspace {
    grid-template-columns: 1fr;
  }
  .intro {
    padding-top: 25px;
  }
  .intro > p {
    max-width: 230px;
    font-size: 13px;
  }
  h1 {
    font-size: 45px;
  }
  .private {
    display: none;
  }
  .canvas {
    min-height: 360px;
  }
  .review {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  header {
    padding: 18px 5%;
  }
  header > span {
    font-size: 9px;
  }
  header i {
    display: none;
  }
  .intro {
    display: block;
  }
  h1 {
    font-size: 43px;
  }
  .intro > p {
    max-width: 100%;
  }
  .workspace {
    gap: 16px;
  }
  .settings {
    padding: 22px;
  }
  .canvas {
    min-height: 330px;
  }
  .room-sketch {
    height: 130px;
    width: 200px;
  }
  footer {
    gap: 15px;
    line-height: 1.6;
  }
  .review {
    padding: 20px;
  }
}

/* The Studio uses the same paper village as the Storybook. */
:root {
  background: #faf6ee;
  color: #183b35;
}
header {
  border-bottom: 1px solid #dfdfd2;
}
.festive-hero {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 45px;
  padding: 50px 0 30px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(44px, 5.4vw, 80px);
  line-height: 1.04;
  letter-spacing: -0.055em;
}
.hero-copy h1 em {
  color: #b04f43;
}
.hero-copy p:not(.eyebrow) {
  max-width: 440px;
  font-size: 17px;
  line-height: 1.7;
  margin: 24px 0;
}
.storybook-link {
  display: block;
  width: fit-content;
  margin-top: 16px;
  color: #325a47;
  font-size: 14px;
  text-underline-offset: 4px;
}
.village {
  position: relative;
  aspect-ratio: 3 / 2;
  border: 1px solid #aa8866;
  border-radius: 14px;
  overflow: hidden;
  background: #183d32;
  isolation: isolate;
  box-shadow: 0 6px 0 -3px #633a33, 0 10px 0 -5px #bb936c, 0 18px 35px #35221730;
  --glow: #bfe8ff;
}
.village[data-mood="classic"] {
  --glow: #f5cb72;
}
.village[data-mood="maximalist"] {
  --glow: #ff9cac;
}
.village[data-mood="icicles"] {
  --glow: #fff;
}
.village-art,
.village-snow,
.eave-lights {
  display: block;
  position: absolute;
  width: 100%;
  height: 100%;
  inset: 0;
}
.village-art {
  object-fit: cover;
}
.village-snow,
.eave-lights {
  pointer-events: none;
}
.village-snow {
  filter: drop-shadow(0 0 3px #fff3c1);
  animation: paper-snow 8s ease-in-out infinite alternate;
}
.eave-lights {
  fill: none;
  stroke-linecap: round;
}
.eave-wire {
  stroke: #3b2c24;
  stroke-width: 1.5;
  opacity: .65;
}
.eave-bulbs {
  stroke: var(--glow);
  stroke-width: 4.5;
  stroke-dasharray: .1 2.55;
  filter: drop-shadow(0 0 2px var(--glow)) drop-shadow(0 0 4px var(--glow));
  animation: paper-lights 3s ease-in-out infinite alternate;
}
.reindeer {
  position: absolute;
  right: 14%;
  bottom: 22%;
  width: clamp(34px, 6.6%, 54px);
  padding: 0;
  aspect-ratio: 1;
  border: 0;
  background: transparent;
  color: #6a442d;
}
.reindeer svg {
  width: 78%;
  filter: drop-shadow(1px 2px 1px #29190a99);
}
.reindeer:hover {
  background: transparent !important;
  transform: scale(1.15);
}
.season-note,
.how {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.season-note {
  padding: 16px 0 30px;
  color: #65766c;
  font-size: 12px;
}
.how {
  border-block: 1px solid #dce2d7;
  padding: 17px 0;
  margin-bottom: 35px;
}
.how p {
  font-size: 14px;
}
.how b {
  color: #af5949;
  margin-right: 12px;
}
.workspace {
  scroll-margin-top: 25px;
}
.canvas {
  background: #eaf0e8;
}
.canvas #empty {
  padding: 10px;
}
.sample-house {
  margin: 0;
}
.sample-frame {
  --reveal: 34%;
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 10px;
  background: #1a3338;
}
.canvas .sample-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
}
#sample-unlit {
  clip-path: inset(0 calc(100% - var(--reveal)) 0 0);
}
.sample-divider {
  position: absolute;
  inset-block: 0;
  left: var(--reveal);
  border-left: 2px solid #fff2d3;
  pointer-events: none;
}
.sample-frame span:not(.sample-divider) {
  position: absolute;
  top: 10px;
  background: #152922e8;
  color: #fff7de;
  font-size: 12px;
  padding: 5px 9px;
  border-radius: 5px;
}
.before-label { left: 10px; }
.after-label { right: 10px; }
.sample-house figcaption { padding: 6px 7px 4px; }
#sample-reveal {
  display: block;
  width: 100%;
  height: 28px;
  accent-color: #325941;
  cursor: ew-resize;
}
.sample-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  text-align: left;
  gap: 8px 14px;
}
.sample-actions p { color: #455c50; margin: 0; }
.street-view-link {
  display: inline-block;
  margin-top: 7px;
  color: #245940;
  font-size: 13px;
  text-underline-offset: 3px;
}
.address-scout {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: 18px 32px;
  scroll-margin-top: 24px;
  border: 1px solid #cad6c9;
  border-radius: 16px;
  background: #edf1e7;
  padding: clamp(18px, 4vw, 32px);
  margin-bottom: 24px;
}
.address-intro {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}
.address-star {
  width: 30px;
  height: 30px;
  margin-top: 5px;
  flex: none;
}
.address-intro h2 {
  font-size: clamp(25px, 3vw, 39px);
  margin: 0 0 6px;
}
.address-scout p,
.maps-note p {
  line-height: 1.65;
  font-size: 13px;
  color: #52635a;
  margin: 0;
}
.address-search {
  min-width: 0;
}
#street-message {
  margin-top: 8px;
}
#street-fallback {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#street-fallback input,
gmp-place-autocomplete {
  flex: 1 1 230px;
  min-width: 0;
  width: 100%;
  min-height: 46px;
  border: 1px solid #7e9b88;
  border-radius: 8px;
  color: #233c31;
  background: #fffefa;
  font: inherit;
}
#street-fallback input { padding: 10px 13px; }
gmp-place-autocomplete { color-scheme: light; }
gmp-place-autocomplete:focus-within,
#street-fallback input:focus-visible {
  outline: 2px solid #22654b;
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.street-result {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  align-items: center;
  gap: 16px;
  padding: 12px;
  background: #fffdf7;
  border: 1px solid #dce2d7;
  border-radius: 10px;
}
.street-result img {
  display: block;
  width: 100%;
  max-height: 242px;
  object-fit: contain;
  background: #e8ede5;
  border-radius: 5px;
}
.street-choices h3 { margin: 0 0 6px; }
.street-angle-controls {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
#photo-credit { margin: 9px 0; overflow-wrap: anywhere; }
#result-frame { position: relative; max-width: 100%; }
#result-frame img { display: block; }
#result.tracing { cursor: crosshair; }
#roof-cursor {
  position: absolute;
  width: 15px;
  height: 15px;
  transform: translate(-50%, -50%);
  border: 2px solid #fff7e2;
  box-shadow: 0 0 0 2px #243e33;
  border-radius: 50%;
  pointer-events: none;
}
@media (max-width: 700px) {
  .address-scout, .street-result { grid-template-columns: minmax(0, 1fr); }
}
.maps-note {
  padding: 25px 0;
  max-width: 800px;
}
body.paused .village * {
  animation-play-state: paused !important;
}
@keyframes paper-snow {
  to { transform: translate(1%, 7%); opacity: .5; }
}
@keyframes paper-lights {
  to { opacity: .62; }
}
@media (max-width: 760px) {
  .festive-hero {
    grid-template-columns: 1fr;
    gap: 20px;
    padding-top: 30px;
  }
  .hero-copy h1 {
    font-size: 52px;
  }
  .hero-copy p:not(.eyebrow) {
    font-size: 15px;
  }
  .season-note {
    gap: 12px;
  }
  .how {
    gap: 6px;
  }
  .how p {
    font-size: 12px;
  }
  .workspace {
    grid-template-columns: 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  .village * {
    animation: none !important;
  }
  html {
    scroll-behavior: auto;
  }
}

/* Blue and white are fixed so the binary code remains readable in every mood. */
.lights {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  bottom: 8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(62%, 220px);
  padding: 7px 5px;
  border: 1px solid #fbdd9c70;
  border-radius: 7px;
  background: #182d26eb;
}
.coded-bulb {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  color: #143344;
  font:
    700 10px/1 ui-monospace,
    monospace;
  text-shadow: none;
}
.coded-bulb.bit-0 {
  background: #73caff;
  box-shadow: 0 0 11px #73caff99;
}
.coded-bulb.bit-1 {
  background: #fff;
  box-shadow: 0 0 11px #ffffff99;
}
.light-secret {
  border-top: 1px solid #dce2d7;
  padding: 17px 0;
  color: #456357;
  font-size: 13px;
}
.light-secret summary {
  cursor: pointer;
  line-height: 1.7;
}
.light-secret summary span {
  color: #8b6248;
  margin-left: 12px;
}
.light-secret summary:focus-visible {
  outline: 3px solid #b58a46;
  outline-offset: 4px;
}
.secret-content {
  max-width: 780px;
  padding: 12px 0;
  line-height: 1.7;
}
.secret-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
#all-bytes {
  display: block;
  overflow-wrap: anywhere;
  line-height: 2;
  padding: 12px 0;
}
#decoded-message {
  font:
    italic 25px Georgia,
    serif;
  color: #a04d41;
}
#reveal-message {
  margin-top: 16px;
}
