<style>
  *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
  html, body { height: 100%; overflow: hidden; background: #fff; font-family: 'owners', sans-serif; }
  button, input, textarea { font-family: inherit; }
  button:focus, input:focus, textarea:focus { outline: none; }
  ::-webkit-scrollbar { width: 3px; height: 3px; }
  ::-webkit-scrollbar-track { background: transparent; }
  ::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }
  input[type="date"]::-webkit-calendar-picker-indicator { opacity: 0.4; cursor: pointer; }

#diy-sidebar::-webkit-scrollbar {
  width: 3px;
}
#diy-sidebar::-webkit-scrollbar-track {
  background: transparent;
  margin: 8px 0;
}
#diy-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.12);
  border-radius: 10px;
}

#room-viewport {
  flex: 1;
  position: relative;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

#room-scene {
  position: relative;
  width: 1200px;
  height: 550px;
  flex-shrink: 0;
  transform-origin: center center;
  background-image: url('img/background.jpg');
  background-size: 100% auto;
  background-position: center 240px;
  background-repeat: no-repeat;
}

/* ── TUTORIAL ── */
#tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  display: none;
}
#tutorial-overlay.active {
  display: block;
  pointer-events: none;
}
#tutorial-backdrop {
  display: none;
}
#tutorial-box {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 4px;
  border: 1.5px solid #1a1008;
  padding: 36px 44px;
  max-width: 560px;
  width: 90vw;
  text-align: center;
  pointer-events: all;
  box-shadow: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
#tutorial-text {
  font-family: 'owners', sans-serif;
  font-size: 18px;
  font-weight: 400;
  color: #1a1008;
  line-height: 1.75;
  margin-bottom: 28px;
  letter-spacing: 1px;
}
#tutorial-text em {
  font-style: italic;
}
#tutorial-text strong {
  font-weight: 600;
}
#tutorial-next {
  font-family: 'chauncy-pro', sans-serif;
  font-size: 14px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: #aaa;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
  display: block;
  margin: 0 auto;
  
}
#tutorial-next:hover { color: #1a1008; }

/* Highlight ring */
#tutorial-highlight {
  position: fixed;
  border-radius: 8px;
  border: 2px solid #1a1008;
  pointer-events: none;
  z-index: 4999;
  display: none;
  box-shadow: 0 0 0 4px rgba(26,16,8,0.08);
  animation: tutorialPulse 1.2s ease-in-out infinite;
  transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
}
#tutorial-highlight.round { border-radius: 50%; }
#tutorial-highlight.active { display: block; }

@keyframes tutorialPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(26,16,8,0.08); }
  50%       { box-shadow: 0 0 0 10px rgba(26,16,8,0.15); }
}

  /* ── PAGES ── */
  #app { height: 100vh; display: flex; flex-direction: column; }
  .page { flex: 1; overflow: hidden; display: none; animation: fadeIn 0.25s ease; }
  .page.active { display: flex; flex-direction: column; }


  /* ── SAFE ROOM ── */
  #room-viewport {
    flex: 1; position: relative; overflow: hidden; background: #fff;
  }
  #wall-block {
    position: absolute; left: 25%; top: 5%; width: 50%; height: 65%;
    pointer-events: none; z-index: 1; transition: background 0.6s ease;
  }
  /* Doors */
.door-wrapper {
  position: absolute;
  top: 18%;
  height: 60%;
  cursor: pointer;
  z-index: 9;
}

.door-wrapper.left  { left: 34px;  width: 60px; }
.door-wrapper.right { right: 32px; width: 60px; }

.door-wrapper img {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

.door-closed { opacity: 1; }
.door-open   { opacity: 0; }

.door-wrapper:hover .door-closed { opacity: 0; }
.door-wrapper:hover .door-open   { opacity: 1; }

  /* Furniture canvas */
  #furniture-canvas {
      position: absolute;
      inset: 0;
      z-index: 10;
      pointer-events: none;
  }
  /* SR Logo */
  #sr-logo {
    position: fixed; top: -40px; right: 16px;
    z-index: 20; pointer-events: none;

  }
@keyframes btnBounce {
  0%   { transform: translateY(0); }
  25%  { transform: translateY(-8px); }
  50%  { transform: translateY(0); }
  70%  { transform: translateY(-4px); }
  100% { transform: translateY(0); }
}

#next-4.bounce {
  animation: btnBounce 0.5s ease !important;
}

  /* ── FURNITURE ITEMS ── */
  .furniture-item {
    position: absolute; user-select: none; transition: filter 0.2s;
  }
  .furniture-item img {
    width: 100%; height: 100%; object-fit: contain; display: block;
    pointer-events: none; 
    transition: transform 0.25s ease;
  }
  .furniture-item.locked {
    filter: grayscale(1) brightness(0.6) opacity(0.5);
    cursor: not-allowed !important;
  }
  .furniture-item.selected { z-index: 60 !important; }
  .furniture-item .lock-overlay {
    position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; font-size: 22px;
    background: rgba(255,255,255,0.3); border-radius: 4px;
  }
  .furniture-item .ctrl-bar {
    position: absolute; top: -42px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 4px; align-items: center;
    background: rgba(15,9,5,0.88); border-radius: 20px;
    padding: 5px 10px; border: 1px solid rgba(255,255,255,0.12);
    z-index: 300; white-space: nowrap;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  }
  .ctrl-bar .ctrl-label {
    font-size: 11px; color: rgba(255,255,255,0.6); letter-spacing: 0.5px;
    padding-right: 6px; border-right: 1px solid rgba(255,255,255,0.1);
  }
  .ctrl-bar .ctrl-btn {
    background: transparent; border: none; cursor: pointer;
    color: rgba(255,255,255,0.7); font-size: 14px;
    padding: 2px 6px; border-radius: 6px; transition: all 0.15s;
    display: flex; align-items: center; gap: 3px;
  }
  .ctrl-bar .ctrl-btn:hover { background: rgba(255,255,255,0.12); }
  .ctrl-bar .ctrl-size {
    font-size: 9px; color: rgba(255,255,255,0.3); padding: 0 4px;
  }
  .ctrl-bar .ctrl-remove {
    background: transparent; border: none; cursor: pointer;
    color: rgba(255,120,100,0.8); font-size: 14px;
    padding: 2px 6px; border-radius: 6px; line-height: 1; transition: all 0.15s;
  }
  .ctrl-bar .ctrl-remove:hover { color: #ff7864; }
  .resize-handle {
    position: absolute; width: 13px; height: 13px;
    background: #1a1008; border: 2px solid #fff; border-radius: 3px;
    z-index: 200; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }
  .resize-handle.nw { top: -6px; left: -6px;   cursor: nw-resize; }
  .resize-handle.ne { top: -6px; right: -6px;  cursor: ne-resize; }
  .resize-handle.sw { bottom: -6px; left: -6px;  cursor: sw-resize; }
  .resize-handle.se { bottom: -6px; right: -6px; cursor: se-resize; }

#thesis-credit {
  position: fixed;
  top: 16px;
  right: 16px;
  font-family: 'owners', sans-serif;
  font-size: 12px;
  color: #000;
  text-align: right;
  line-height: 1.6;
  pointer-events: none;
  z-index: 20;
  letter-spacing: 1px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1;
}

#thesis-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 1;
}

.cat-alert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  background: #000;
  color: #fff;
  font-family: 'chauncy-pro', sans-serif;
  font-size: 10px;
  font-weight: 300;
  border-radius: 50%;
  margin-left: 5px;
  animation: catAlertPulse 1s ease-in-out infinite;
  vertical-align: middle;
  line-height: 1;
}

@keyframes catAlertPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.2); opacity: 0.7; }
}

 /* ── TOP INVENTORY ── */
#inv-trigger {
  position: fixed;
  top: 30px;
  left: 30px;
  z-index: 1;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 70px;
  height: 70px;
  transition: transform 0.1s;
}

#inv-trigger:hover {
  transform: scale(1.1);
}

#inv-trigger img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

#top-inventory {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-bottom: 1px solid #ddd;
  z-index: 40;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#top-inventory.open {
  transform: translateY(0);
}

#inv-header {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 20px;
  height: 38px;
  border-bottom: 1px solid #ddd;
}

#inv-title {
  font-family: 'chauncy-pro', sans-serif;
  font-size: 18px;
  color: #000000;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.5px;
}

#inv-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-tab {
  font-family: 'owners', serif;
  font-size: 15px;
  color: #bbb;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: color 0.2s;
  user-select: none;
  padding: 2px 0;
}

.inv-tab:hover { color: #555; }

.inv-tab.active {
  color: #1a1008;
  font-weight: 600;
}

.inv-sep {
  color: #ddd;
  font-size: 15px;
}

#inv-unlock-counter {
  font-family: 'owners', serif;
  font-weight: 500;
  font-size: 15px;
  color: #000000;
  letter-spacing: 0.5px;
  text-align: right;
}

#inv-shelf {
    display: flex;
  align-items: center;
  position: relative;
   overflow: hidden;
  max-height: 88px;
}
.inv-arrow {
  flex-shrink: 0;
  background: none;
  border: none;
  font-size: 40px;
  color: #bbb;
  cursor: pointer;
  padding: 0 12px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 2;
  user-select: none;
}

.inv-arrow:hover { color: #1a1008; }
#inventory-items {
  display: flex;
  align-items: center;
  padding: 40px 40px;
  gap: 28px;
  overflow-x: auto;
  height: 88px;
  max-height: 88px;
}

/* Hide scrollbar on shelf */
#inventory-items::-webkit-scrollbar { display: none; }

.inv-item img {
  width: 100px !important;
  height: 70px !important;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.inv-item {

  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: relative;
  transition: all 0.2s;
  cursor: default;
  overflow: hidden;
  padding: 0 16px;
}

.inv-item.unlocked {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.inv-item.unlocked:hover {
  transform: scale(1.1);
}

.inv-item.locked img:first-child {
  opacity: 0.2;
  filter: grayscale(1);
}


#diy-trigger {
  position: fixed;
  top: 30px;
  left: 120px;
  z-index: 30;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  width: 60px;
  height: 60px;
  transition: transform 0.1s;
}

#diy-trigger:hover { transform: scale(1.1); }
#diy-trigger img { width: 100%; height: 100%; object-fit: contain; }

#diy-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
}
#diy-modal.open { display: flex; }

#diy-box {
  background: #fff;
  width: 80vw;
  height: 80vh;
  max-width: 1000px;
  display: flex;
  flex-direction: column;
  position: relative;
}

#diy-header {
  display: flex;
  align-items: flex-start;
  padding: 18px 20px 12px;
  flex-shrink: 0;
  gap: 0;
}
#diy-header-text { display: flex; flex-direction: column; gap: 2px; }
#diy-title {
  font-family: 'chauncy-pro', sans-serif;
  font-size: 40px;
  font-weight: 600;
  color: #1a1008;
  line-height: 1.1;
}
#diy-subtitle {
  font-family: 'owners', sans-serif;
  font-size: 12px;
  letter-spacing: 1px;
  color: #aaa;
}
#diy-close {
  margin-left: auto;
  background: none;
  border: none;
  font-size: 14px;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
  padding: 0;
  line-height: 1;
}
#diy-close:hover { color: #1a1008; }

#diy-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  padding: 0 20px 20px;
  gap: 16px;
}

/* Large drawing area */
#diy-canvas-wrap {
  flex: 1;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background: #d0d0d0;
  position: relative;
}
#diy-canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: url('img/hammer.png') 0 15, crosshair;
  background: #d0d0d0;
}
#diy-canvas-hint {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: 'chauncy-pro', sans-serif;
  font-weight: 500;
  font-size: 20px;
  font-style: italic;
  color: #aaa;
  pointer-events: none;
  transition: opacity 0.3s;
}

/* Narrow sidebar */
#diy-sidebar {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding-right: 12px;
  scrollbar-gutter: stable;
}
.diy-section-label {
  font-family: 'owners', sans-serif;
  font-size: 9px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #000000;
  margin-bottom: 8px;
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.diy-section-label:first-child { margin-top: 0; }

/* Colour swatches — black and white only */
#diy-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
.diy-tool {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.15s;
  flex-shrink: 0;
}
.diy-tool[data-tool="pen"] {
  background: #1a1008;
}
.diy-tool[data-tool="white"] {
  background: #fff;
  border-color: #ddd;
}
.diy-tool[data-tool="eraser"] {
  background: #d0d0d0;
  border-color: #ccc;
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  border-radius: 6px;
  width: 44px;
  font-family: 'owners', sans-serif;
  letter-spacing: 0.5px;
}
.diy-tool.active {
  border-color: #1a1008 !important;
}
.diy-tool[data-tool="white"].active { border-color: #888 !important; }

#diy-brush-size {
  width: 100%;
  accent-color: #1a1008;
}

#diy-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}
#diy-clear {
  background: transparent;
  border: 1px solid #000000;
  border-radius: 50px;
  padding: 7px 0;
  font-family: 'owners', sans-serif;
  font-size: 12px;
  color: #888;
  cursor: pointer;
  transition: all 0.2s;
}
#diy-clear:hover { border-color: #1a1008; color: #1a1008; }
#diy-save {
  background: #1a1008;
  border: none;
  border-radius: 50px;
  padding: 9px 0;
  font-family: 'owners', sans-serif;
  font-size: 12px;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.2s;
}
#diy-save:hover { opacity: 0.75; }
#diy-save:disabled { background: #eee; color: #bbb; cursor: not-allowed; }

#diy-saved-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.diy-saved-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 6px;
  border: 1px solid #bbb;
  cursor: pointer;
  transition: background 0.15s;
}
.diy-saved-item:hover { background: #ededed; }
.diy-saved-item img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  border-radius: 3px;
  background: #d0d0d0;
}
.diy-saved-item span {
  font-family: 'owners', sans-serif;
  font-size: 11px;
  color: #555;
  flex: 1;
}
.diy-item-del {
  background: none;
  border: none;
  color: #ccc;
  font-size: 11px;
  cursor: pointer;
  padding: 0 2px;
  transition: color 0.15s;
}
.diy-item-del:hover { color: #e05a5a; }

#diy-locked-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.diy-locked-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 6px;
  border-radius: 6px;
  border: 1.5px dashed #e8e4de;
  opacity: 0.5;
  background: #f5f5f5;
}
.diy-locked-slot span {
  font-family: 'owners', sans-serif;
  font-size: 10px;
  color: #000000;
}

#room-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 0 20px;
  background: #fff;
  border-top: 2px solid #000000;
  z-index: 30;
}

#footer-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

#footer-logo img {
  display: block;
}

#footer-room-name {
  font-family: 'chauncy-pro', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #000000;
  letter-spacing: 0.5px;
  text-align: left;
}

#footer-entry-counter {
  font-family: 'owners', sans-serif;
  font-size: 13px;
  color: #000000;
  letter-spacing: 0.5px;
  font-weight: 500;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;

}

#reset-tutorial-btn {
  background: none;
  border: none;
  font-family: 'owners', sans-serif;
  font-size: 11px;
  color: #737373 ;
  cursor: pointer;
  padding: 0;
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
#reset-tutorial-btn:hover {
  color: #000;
}



  /* ── CULTURE ROOM ── */
  #culture-header {
    display: flex; align-items: center; gap: 12px; padding: 14px 28px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.85); backdrop-filter: blur(10px);
    flex-shrink: 0; z-index: 10;
  }
  #culture-header button { font-family: 'owners', sans-serif, serif; cursor: pointer; }
  #culture-back-btn {
    background: transparent; border: 1px solid rgba(0,0,0,0.2);
    padding: 5px 16px; border-radius: 20px; font-size: 13px;
  }
  #culture-name-display {
    font-family: 'owners', sans-serif; font-size: 22px; font-weight: 400; letter-spacing: 1px;
  }
 #rename-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 80px 0 0 40px;

}

#culture-rename-btn {
  font-family: 'owners' , sans-serif;
  font-size: 15px;
  color: #000;
  cursor: pointer;
  letter-spacing: 0.5px;
}


#culture-rename-btn:hover {
  text-decoration: underline;
  transition: all 0.2s ease;
}

.rename-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px 44px;
  width: 400px;
  max-width: 93vw;
  box-shadow: 0 24px 60px rgba(0,0,0,0.18);
}

.rename-title {
  font-family: 'owners', sans-serif;
  font-size: 15px;
  font-weight: 400;
  margin-bottom: 8px;
  color: #1a1008;
}


.rename-input {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid #000000;
  border-radius: 10px;
  font-family: 'owners', sans-serif;
  font-size: 17px;
  color: #1a1008;
  padding: 10px;
    margin-bottom: 10px;
  outline: none;
  box-sizing: border-box;

  transition: border-color 0.2s;
}

.rename-input:focus {
  border-color: #000000;
}

.rename-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rename-cancel {
  background: transparent;
  border: none;
  font-family: 'owners', sans-serif;
  font-size: 13px;
  color: #bbb;
  cursor: pointer;
  transition: color 0.2s;
}

.rename-cancel:hover {
  color: #1a1008;
}

.rename-save {
  background: #000000;
  border: none;
  color: #fff;
  padding: 11px 32px;
  border-radius: 50px;
  font-family: 'owners', sans-serif;
  font-size: 14px;
  cursor: pointer;
  transition: opacity 0.2s;
}

.rename-save:hover {
  opacity: 0.8;
}

  #culture-bubble-count {
    margin-left: auto; font-family: 'owners', sans-serif; color: #000000; font-size: 13px; font-weight: 400; letter-spacing: 0.5px;
  }
  #culture-canvas {
    flex: 1; position: relative; overflow: hidden; background: #ffffff;
  }
  #culture-aura {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%,-55%);
    border-radius: 50%; pointer-events: none; animation: pulseGlow 5s ease-in-out infinite;
  }
  #culture-center-label {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
    text-align: center; z-index: 20; pointer-events: none;
    font-family: 'chauncy-pro', sans-serif; font-weight: 700; letter-spacing: 1px; white-space: nowrap;
  }
  #culture-add-btn-wrap {
    position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 20;
  }
  #culture-add-btn {
    width: 50px; height: 50px; border-radius: 50%; font-size: 26px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    border: 1.5px solid; transition: all 0.25s;
  }
#culture-empty-hint {
  position: absolute;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
}
  #culture-empty-hint p {
    font-family: 'owners', sans-serif; font-size: 15px; text-align: center;
    max-width: 220px; line-height: 1.7;
  }
  /* Bubbles */
  .bubble-pos {
    position: absolute; z-index: 5;
  }
  .bubble-wrap { cursor: pointer; }
  .bubble-glow {
    position: absolute; inset: -18px; border-radius: 50%;
    pointer-events: none;
  }
  .bubble-circle {
    width: 116px; height: 116px; border-radius: 50%;
    background: #ffffff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 12px 10px; text-align: center; position: relative;
    box-shadow: 0 6px 24px rgba(0,0,0,0.08), inset 0 1px 0 rgba(255,255,255,1);
  }
  .bubble-topic {
    font-size: 9px; letter-spacing: 1.8px; text-transform: uppercase;
    font-family: 'owners', sans-serif; margin-bottom: 4px; opacity: 0.75; line-height: 1;
  }
  .bubble-title {
    font-family: 'chauncy-pro', sans-serif; font-size: 14px; font-weight: 600;
    color: #1a1008; line-height: 1.2; max-width: 88px;
    overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  }
  .bubble-date {
    font-family: 'owners', sans-serif, serif; font-size: 9px; color: #bbb; margin-top: 5px;
  }
  .bubble-del {
    position: absolute; top: 5px; right: 5px; background: rgba(0,0,0,0.05);
    border: none; color: #000000; width: 16px; height: 16px; border-radius: 50%;
    cursor: pointer; font-size: 9px; display: flex; align-items: center; justify-content: center;
  }

  /* ── TOPIC DROPDOWN ── */
  #topic-dropdown {
    position: absolute; bottom: calc(100% + 12px); left: 50%; transform: translateX(-50%);
    background: #fff; border-radius: 18px;
    box-shadow: 0 12px 48px rgba(0,0,0,0.18);
    padding: 10px 8px; z-index: 50; min-width: 188px;
    animation: dropIn 0.18s ease; display: none;
  }
  #topic-dropdown.open { display: block; }
  #topic-dropdown .drop-label {
    font-family: 'owners', sans-serif; color: #000000; font-size: 12px;
    letter-spacing: 2px; text-transform: uppercase; padding: 4px 12px 8px;
  }
  .topic-option {
    display: flex; align-items: center; gap: 10px; padding: 9px 14px;
    border-radius: 10px; cursor: pointer; font-family: 'owners', sans-serif;
    font-size: 14px; color: #1a1008; transition: background 0.15s; letter-spacing: 0.5px;
  }
  .topic-option:hover { background: rgba(0,0,0,0.06); }
  .topic-icon { font-size: 17px; }

  /* ── MODALS ── */
  .modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,9,5,0.5);
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s ease;
  }
  .modal-box {
    background: #fff; border-radius: 24px; padding: 40px 44px;
    box-shadow: 0 32px 80px rgba(0,0,0,0.2);
    animation: modalIn 0.22s ease; max-height: 90vh; overflow-y: auto;
  }
  .modal-header {
    display: flex; align-items: center; gap: 14px; margin-bottom: 26px;
  }
  .modal-icon-circle {
    width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 22px;
  }
  .modal-title-block .modal-title {
    font-family: 'owners', sans-serif; font-size: 20px; font-weight: 400;
    letter-spacing: 0.5px; line-height: 1.1;
  }
  .modal-title-block .modal-sub {
    font-family: 'chauncy-pro', sans-serif; color: #c0b090; font-size: 12px; margin-top: 2px;
  }
  .modal-close {
    margin-left: auto; background: transparent; border: none;
    color: #ccc; font-size: 22px; cursor: pointer; line-height: 1;
  }
  .modal-divider {
    height: 1px; margin-bottom: 24px;
    background: linear-gradient(90deg,transparent,rgba(0,0,0,0.1),transparent);
  }
  .field-label {
    display: block; font-family: 'owners', sans-serif; color: #a09070;
    font-size: 10px; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 7px;
  }
  .field-input {
    width: 100%; background: #f9f6f1; border: 1.5px solid #e4ddd0; border-radius: 10px;
    font-family: 'owners', sans-serif; font-size: 15px; color: #1a1008;
    padding: 11px 15px; outline: none; box-sizing: border-box; transition: border 0.2s;
    margin-bottom: 16px;
  }
  .field-input:focus { border-color: currentColor; }
  .field-input.title-input { font-family: 'owners', sans-serif; font-size: 18px; }
  textarea.field-input { min-height: 150px; resize: none; line-height: 1.8; }
  .modal-footer {
    display: flex; justify-content: space-between; align-items: center; margin-top: 22px;
  }
  .modal-char-count { font-family: 'owners', sans-serif; color: #c0b090; font-size: 12px; }
  .save-btn {
    border: none; color: #fff; padding: 11px 34px; border-radius: 50px;
    font-family: 'owners', sans-serif; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
  }
  .save-btn:disabled { background: #eee8de !important; color: #c0b090; cursor: not-allowed; }

  /* View modal */
  .view-modal-box { width: 520px; max-width: 93vw; }
  .view-topic-tag {
    display: flex; align-items: center; gap: 10px; margin-bottom: 8px;
  }
  .view-topic-label {
    font-family: 'owners', sans-serif, serif; font-size: 11px;
    letter-spacing: 2.5px; text-transform: uppercase;
  }
  .view-title {
    font-family: 'owners', sans-serif; color: #1a1008;
    font-size: 28px; font-weight: 500; line-height: 1.2; margin-bottom: 6px;
  }
  .view-date { font-family: 'owners', sans-serif, serif; color: #000000; font-size: 13px; margin-bottom: 24px; }
  .view-text {
    font-family: 'owners', sans-serif, serif; color: #2a1a0e; font-size: 16px;
    line-height: 1.85; white-space: pre-wrap; max-height: 48vh; overflow-y: auto;
  }
  .view-footer { margin-top: 28px; display: flex; justify-content: flex-end; }
  .delete-btn {
    background: transparent; border: 1px solid #ecddd0; color: #c0a080;
    padding: 8px 22px; border-radius: 50px; font-family: 'owners', sans-serif;
    font-size: 13px; cursor: pointer; transition: all 0.2s;
  }
  .delete-btn:hover { background: #fff5ee; }

  

  /* Toast */
  #unlock-toast {
    position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%);
    background: #ffffff; color: #000000;
    padding: 18px 32px; border-radius: 50px; font-family: 'owners', sans-serif;
    font-size: 20px; box-shadow: 0 8px 32px rgba(0,0,0,0.35);
    z-index: 9999; display: none; align-items: center; gap: 10px; white-space: nowrap;
    border: 1px solid rgba(201,169,110,0.2); animation: slideUp 0.4s ease;
  }
  #unlock-toast.show { display: flex; }

  /* ── KEYFRAMES ── */
  @keyframes fadeIn    { from{opacity:0}         to{opacity:1} }
  @keyframes slideUp   { from{opacity:0;transform:translateX(-50%) translateY(14px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }
  @keyframes modalIn   { from{opacity:0;transform:scale(0.95) translateY(10px)} to{opacity:1;transform:scale(1) translateY(0)} }
  @keyframes dropIn    { from{opacity:0;transform:translateX(-50%) translateY(10px)} to{opacity:1;transform:translateX(-50%) translateY(0)} }
  @keyframes pulseGlow { 0%,100%{opacity:0.75;transform:translate(-50%,-55%) scale(1)} 50%{opacity:1;transform:translate(-50%,-55%) scale(1.06)} }









/* ──---------------------------------------------------------------ONBOARDING----------------------------------------------------------------── */



/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body {
  height: 100%;
  font-family: 'Crimson Text', serif;
  background: #fff;
  color: #1a1008;
  overflow: hidden;
}
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input  { font-family: inherit; border: none; background: none; outline: none; }

/* ── SCREEN SYSTEM ── */
#app {
  width: 100vw;
  height: 100vh;
  position: relative;
}
.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}
.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* ── CONSENT SCREEN ── */
.consent-box {
  max-width: 700px;
  width: 88vw;
  padding: 52px 56px;
  border: 1.5px solid #1a1008;
  border-radius: 10px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.consent-title {
  font-family: 'owners', sans-serif;
  font-size: 26px;
  font-weight: 400;
  color: #1a1008;
  letter-spacing: 0.5px;
}

.consent-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.consent-body p {
  font-family: 'owners', sans-serif;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: #444;
  line-height: 1.75;
}

.consent-body ul {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.consent-body li {
  font-family: 'owners', sans-serif;
  font-size: 16px;
  letter-spacing: 0.5px;
  color: #444;
  line-height: 1.7;
}

.consent-body strong {
  color: #1a1008;
  font-weight: 600;
}

.consent-check-wrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.consent-check-wrap input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #1a1008;
  cursor: pointer;
}

.consent-check-label {
  font-family: 'owners', sans-serif;
  font-size: 14px;
  letter-spacing: 0.5px;
  color: #555;
  line-height: 1.65;
}

.consent-btn {
  font-family: 'chauncy-pro', sans-serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #fff;
  background: #1a1008;
  border: none;
  padding: 13px 0;
  cursor: pointer;
  transition: opacity 0.2s;
  width: 100%;
  border-radius: 4px;
}

.consent-btn:hover:not(:disabled) { opacity: 0.75; }

.consent-btn:disabled {
  background: #e8e4de;
  color: #bbb;
  cursor: not-allowed;
}

/* ── DOOR ANIMATION ── */
.landing-door {
  position: absolute;
  left: 27%;
  top: 46.5%;
  width: 130px;
  height: 250px;
  cursor: pointer;
  z-index: 10;

}

.landing-door img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  transition: opacity 0.1s ease;
}

.landing-door .door-closed { opacity: 1; }
.landing-door .door-open   { opacity: 0; }

.landing-door:hover .door-closed { opacity: 0; }
.landing-door:hover .door-open   { opacity: 1; }

.door-enter-label {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  font-family: 'chauncy-pro', sans-serif;
  font-size: 30px;
  letter-spacing: 2px;
  font-weight: 700;
  color: #000000;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  transform: translateX(-50%) translateY(6px);
  pointer-events: none;
}

.landing-door:hover .door-enter-label {
  opacity: 1;
  transform: translateX(-50%) translateY(0px);
}

/* ── BACK ARROW ── */
.nav-left {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 100;
  font-family: 'owners', sans-serif;
  font-size: 13px;
  letter-spacing: 1.5px;
  color: #888;
  padding: 12px 28px;
  cursor: pointer;
  transition: color 0.2s;
  user-select: none;
}
.nav-left:hover { color: #1a1008; }
.nav-left.hidden { opacity: 0; pointer-events: none; }

/* ── PROGRESS DOTS ── */
#progress {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 100;
}
.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #d4c8b0;
  transition: background 0.3s, transform 0.3s;
}
.dot.active {
  background: #1a1008;
  transform: scale(1.3);
}

/* ── SHARED LABEL ── */
.screen-label {
  font-family: 'owners', sans-serif;
  font-size: 30px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #1a1008;
  text-align: center;
}
.screen-label-2 {
  font-family: 'owners', sans-serif;
  font-size: 20px;
  font-weight: 400;
  letter-spacing: 0.5px;
  color: #1a1008;
  text-align: center;
  padding: 5px;
}

/* ── SHARED NEXT BUTTON ── */
.next-btn {
  font-family: 'owners', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #888;
  border-bottom: 1px solid #d4c8b0;
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.next-btn:hover:not(:disabled) { color: #1a1008; border-color: #1a1008; }
.next-btn:disabled { opacity: 0.3; cursor: not-allowed; }


/* Read-only filled circle for culture1 in step B */
.circle-ring-filled {
  font-family: 'owners', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #1a1008;
  letter-spacing: 0.5px;
  font-style: italic;
  text-align: center;
  width: 180px;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.screen.active > * {
  animation: fadeUp 0.5s ease both;
}
.screen.active > *:nth-child(1) { animation-delay: 0.05s; }
.screen.active > *:nth-child(2) { animation-delay: 0.13s; }
.screen.active > *:nth-child(3) { animation-delay: 0.21s; }
.screen.active > *:nth-child(4) { animation-delay: 0.29s; }

/* ════════════════════════════════════════
   SCREEN 0 — LANDING
════════════════════════════════════════ */
#screen-0 {
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
}

.landing-graphic {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
}
.house-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.house-placeholder img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Body text overlay — positioned over the graphic */
.landing-body-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-40%, -50%);
  max-width: 240px;
  font-family: 'Crimson Text', serif;
  font-size: 13px;
  line-height: 1.75;f
  color: #2a1a0e;
}



/* Begin button */
.begin-btn {
  position: absolute;
  bottom: 60px;
  right: 60px;
  font-family:'owners', sans-serif;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #1a1008;
  border-bottom: 1px solid #1a1008;
  padding-bottom: 2px;
  cursor: pointer;
  transition: opacity 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.begin-btn:hover { opacity: 0.5; }

/* ════════════════════════════════════════
   SCREEN 1 — NAME YOUR SAFEROOM
════════════════════════════════════════ */
#screen-1 { gap: 40px; }

/* Circle input */
.circle-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.circle-ring {
  width: 260px;
  height: 260px;

  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.circle-ring:focus-within {}
.circle-ring input {
  width: 180px;
  text-align: center;
  font-family: 'owners', sans-serif;
  font-size: 20px;
  font-weight: 400;
  color: #1a1008;
  letter-spacing: 0.5px;
  position: relative;
  z-index: 2;
}
.circle-ring input::placeholder {

  font-style: italic;
}
.circle-png {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  z-index: 1;
}
/* ════════════════════════════════════════
   SCREEN 2 — TWO CULTURES
════════════════════════════════════════ */
#screen-2 { gap: 40; }

.two-cultures-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  width: 100%;
}
.culture-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;

}
.culture-question {
  font-family: 'owners', sans-serif;
  font-size: 30px;
  font-style: ;
  font-weight: 400;
  color: #1a1008;
  text-align: center;
  letter-spacing: 0.3px;
}
.culture-sub {
  font-family: 'owners', sans-serif;
  font-size: 25px;
  color: #888;
  text-align: center;
  letter-spacing: 0.5px;
  margin-top: -18px;
}

/* ════════════════════════════════════════
   SCREEN 3 — COLOUR DUO
════════════════════════════════════════ */
#screen-3 { gap: 40px; }

.colour-duo-grid {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 80px;
  padding: 100px;
}
.colour-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 0.2s;
}
.colour-option:hover { transform: translateY(-4px); }

.colour-object {
  width: 110px;
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;

}
.colour-object img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  transition: filter 0.2s;
}
.colour-option:not(.selected) .colour-object img {

  transition: filter 0.2s;
}
.colour-option.selected .colour-object img {
  filter: drop-shadow(0px 8px 16px rgba(249,212,6,0.6));
  transition: filter 0.2s;
}

.colour-object-placeholder {
  width: 90px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  text-align: center;
  padding: 8px;
  line-height: 1.5;
}

.colour-label {
  font-family: 'owners', sans serif;
  font-size: 12px;
  color: #000000;
  letter-spacing: 0.5px;
  text-align: center;
  transition: color 0.2s;
  padding-top: 20px;
}




</style>
