* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-wall: #6b6b3a;
  --bg-floor: #a9783e;
  --floor-split-y: 74px;

  --bg-left: #141d0b;
  --bg-right: #0f1609;

  --line-dark: #1a1a1a;
  --line-soft: #3a4a28;

  --fridge-color: #f0ede6;
  --handle-color: #c8c5bc;
  --handle-border: #aaa;

  --table-dark: #5b321f;

  --text-date: #d8c7a8;
  --text-main: #e8dec8;
  --text-muted: #7d8b5a;
  --text-back: #5a6a4a;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  font-family: Georgia, serif;
  user-select: none;
  background: linear-gradient(
    to bottom,
    var(--bg-wall) calc(100% - var(--floor-split-y)),
    var(--bg-floor) calc(100% - var(--floor-split-y))
  );
}

button {
  font: inherit;
  border: none;
  background: none;
}

#flash {
  position: fixed;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  transition: opacity 0.12s;
}

#floor-line {
  position: fixed;
  left: 0;
  right: 0;
  bottom: var(--floor-split-y);
  height: 2px;
  background: var(--bg-floor);
  pointer-events: none;
}

#back-button {
  position: fixed;
  top: 22px;
  left: 22px;
  display: none;
  z-index: 200;
  cursor: pointer;
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-back);
}

#app {
  position: relative;
  width: 100%;
  height: 100%;
}

#scene {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 8vw;
  padding-bottom: var(--floor-split-y);
  transition: opacity 0.4s;
}

.ceiling-light {
  position: absolute;
  top: 0;
  left: 53%;
  transform: translateX(-50%);
  width: 260px;
  height: 360px;
  pointer-events: none;
  z-index: 3;
}

.ceiling-light__rod {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 100px;
  background: #222;
  transform: translateX(-50%);
}

.ceiling-light__shade {
  position: absolute;
  top: 92px;
  left: 50%;
  width: 112px;
  height: 54px;
  transform: translateX(-50%);
  background: #e5d6aa;
  border: none;
  border-radius: 50% 50% 14px 14px;
  z-index: 3;
}

.ceiling-light__glow {
  position: absolute;
  top: 122px;
  left: 50%;
  width: 360px;
  height: 300px;
  transform: translateX(-50%);
  background: radial-gradient(
    ellipse at top,
    rgba(255, 226, 145, 0.34),
    rgba(255, 226, 145, 0.14) 40%,
    rgba(255, 226, 145, 0) 72%
  );
}

.window {
  width: 210px;
  height: 265px;
  border: 9px solid #f4f0e8;
  position: relative;
  margin-bottom: 140px;
  overflow: hidden;
}

.window__sky {
  position: absolute;
  inset: 0;
}

.window__sky--morning {
  background: linear-gradient(to bottom, #8fc9ee, #dcefbf);
  animation: morning-fade 18s ease-in-out infinite;
}

.window__sky--sunset {
  background: linear-gradient(to bottom, #ee9b5f, #b85c4d 55%, #49314e);
  animation: sunset-fade 18s ease-in-out infinite;
}

.window__sky--night {
  background: linear-gradient(to bottom, #071734, #122b58 55%, #050814);
  animation: night-fade 18s ease-in-out infinite;
}

@keyframes morning-fade {
  0%, 20% { opacity: 1; }
  35%, 85% { opacity: 0; }
  100% { opacity: 1; }
}

@keyframes sunset-fade {
  0%, 15% { opacity: 0; }
  35%, 55% { opacity: 1; }
  75%, 100% { opacity: 0; }
}

@keyframes night-fade {
  0%, 50% { opacity: 0; }
  70%, 90% { opacity: 1; }
  100% { opacity: 0; }
}

.window__cross {
  position: absolute;
  background: #f4f0e8;
  z-index: 5;
}

.window__cross--vertical {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 8px;
  transform: translateX(-50%);
}

.window__cross--horizontal {
  left: 0;
  right: 0;
  top: 50%;
  height: 8px;
  transform: translateY(-50%);
}

.fridge {
  position: relative;
  width: 205px;
  height: 380px;
  flex-shrink: 0;
}

.fridge__body {
  position: relative;
  width: 100%;
  height: 100%;
  background: var(--fridge-color);
  border: 2.5px solid var(--line-dark);
  border-radius: 7px 7px 3px 3px;
}

.fridge__divider {
  position: absolute;
  top: 37%;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--line-dark);
}

.fridge__handle {
  position: absolute;
  right: 16px;
  width: 8px;
  height: 58px;
  background: var(--handle-color);
  border: 1px solid var(--handle-border);
  border-radius: 3px;
}

.fridge__handle--top {
  top: 13%;
}

.fridge__handle--bottom {
  top: 52%;
}

.table-scene {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.table-scene__top {
  position: relative;
  width: 380px;
  height: 32px;
  background: var(--table-dark);
  border: 2.5px solid var(--line-dark);
  border-radius: 2px;
}

.table-scene__legs {
  display: flex;
  justify-content: space-between;
  width: 310px;
}

.table-scene__leg {
  width: 25px;
  height: 130px;
  background: var(--table-dark);
  border: 2px solid var(--line-dark);
  border-top: none;
}

.table-scene__plate {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  width: 125px;
  height: 40px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.plate-svg {
  width: 100%;
  height: 100%;
  transform-origin: center bottom;
  animation: plate-pulse 1.8s ease-in-out infinite;
}

.table-scene:hover .plate-svg {
  animation: none;
  transform: scale(1.12);
}

@keyframes plate-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.12); }
}

#split-view {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.split-panel {
  position: absolute;
  top: 0;
  height: 100%;
  opacity: 0;
  transition: opacity 0.55s 0.15s;
}

.split-panel--left {
  left: 0;
  width: 25%;
  z-index: 2;
  background: var(--bg-left);
  border-right: 1px solid var(--line-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.split-panel--right {
  right: 0;
  width: 75%;
  z-index: 1;
  background: var(--bg-right);
  overflow: hidden;
}

body.is-split #scene {
  opacity: 0;
  pointer-events: none;
}

body.is-split .split-panel {
  opacity: 1;
  pointer-events: auto;
}

body.is-split #floor-line {
  opacity: 0;
}

body.is-split #back-button {
  display: block;
}

.text-archive {
  width: 72%;
  max-width: 280px;
  color: var(--text-main);
}

.text-archive__small {
  margin-bottom: 42px;
  font-size: 9px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-muted);
}

#food-name {
  margin-bottom: 42px;
  font-size: 13px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-date);
}

#ingredient-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-bottom: 48px;
}

.ingredient-text {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #8ab050;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s, transform 0.35s;
}

.ingredient-text.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#space-hint {
  font-size: 9px;
  letter-spacing: 3px;
  color: var(--text-muted);
}

.archive-table {
  position: relative;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.08) 0 2px, transparent 2px 120px),
    linear-gradient(#b9854d, #9d6b38);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 네비게이션 버튼 글자 색상 수정 부분 */
.nav-btn {
  position: absolute;
  top: 15%;
  padding: 10px 20px;
  color: var(--text-main); /* 가독성을 위해 밝은 색상으로 변경 */
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  z-index: 10;
  transition: color 0.3s, transform 0.2s;
}

.nav-btn:hover {
  color: #8ab050; /* 호버 시 포인트 컬러로 변경 */
  transform: translateY(-2px);
}

.nav-btn--prev { left: 8%; }
.nav-btn--next { right: 8%; }

.archive-table::before {
  content: "";
  position: absolute;
  inset: 6vh 5vw;
  border: 2px solid rgba(50, 30, 10, 0.25);
  pointer-events: none;
}

.archive-plate {
  position: relative;
  width: min(58vw, 660px);
  height: min(58vw, 660px);
  border-radius: 50%;
  background: #f3efe7;
  border: 4px solid #211a13;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 0 0 24px #ddd3c3,
    inset 0 0 0 28px #1a1a1a,
    0 20px 60px rgba(0,0,0,0.25);
}

.archive-plate::after {
  content: "";
  position: absolute;
  width: 64%;
  height: 64%;
  border-radius: 50%;
  border: 2px solid #b8ad9c;
  pointer-events: none;
}

#photo-frame {
  position: relative;
  width: 64%;
  height: 64%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #6f604d;
  background: #1a2210;
  color: #8d806c;
  font-size: 11px;
  letter-spacing: 3px;
  z-index: 2;
  border-radius: 100%;
}

#photo-image {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* note */
.archive-note {
  position: absolute;
  right: 7vw;
  bottom: 9vh;
  width: 290px;
  min-height: 155px;
  padding: 22px 24px;
  background: rgba(246, 235, 214, 0.9);
  border: 1.5px solid #3a2a18;
  color: #2a2016;
  transform: rotate(-2deg);
  box-shadow: 8px 10px 0 rgba(0,0,0,0.18);
  z-index: 5;
}

.archive-note::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  width: 74px;
  height: 22px;
  transform: translateX(-50%) rotate(2deg);
  background: rgba(230, 214, 170, 0.75);
  border: 1px solid rgba(80, 60, 30, 0.35);
}

#note-date {
  margin-bottom: 18px;
  font-size: 10px;
  letter-spacing: 3px;
  color: #7a5d35;
  font-style: normal;
}

#photo-caption {
  line-height: 2;
  font-size: 13px;
  font-style: italic;
  color: #3a2a18;
}