.game {
  max-width: 1040px;
  margin: 0 auto 28px;
  color: #2c2824;
}
.game-head p {
  margin: 0 0 6px;
  color: #8a704e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.game-head h1, .game h1 {
  margin: 0 0 10px;
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  line-height: 1.3;
  letter-spacing: -0.04em;
}
.game-lead, .game-foot, .game-insight, .drift-empty {
  margin: 0 0 16px;
  line-height: 1.7;
  color: #5c564e;
}
.game-insight { color: #1c1a17; font-weight: 650; }
.game-error { color: #9d4b6c; margin: 0 0 12px; }
.game-btn, .date-cards button, .date-times button, .drift-beach button, .house-dock-item, .house-scenes button, .drift-inbox button {
  font: inherit;
  cursor: pointer;
}
.game-btn {
  border: 0;
  border-radius: 999px;
  background: #1c1a17;
  color: #f7f3ec;
  min-height: 46px;
  padding: 0 18px;
  font-weight: 700;
}
.game-btn[disabled] { opacity: 0.45; cursor: default; }
.game-foot a { color: #8a704e; }

.house-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); gap: 18px; }
.house-stage { position: relative; }
.house-room {
  position: relative;
  height: 420px;
  border-radius: 28px;
  overflow: hidden;
  background: linear-gradient(#f4d7c4, #f7efe6 42%, #efe2d2);
  box-shadow: inset 0 0 0 8px rgba(255,252,247,0.7);
}
.house-window {
  position: absolute; left: 18%; right: 18%; top: 16px; height: 72px;
  border-radius: 40px 40px 12px 12px;
  background: linear-gradient(#f6c7b0, #9eb7d4);
}
.house-floor {
  position: absolute; left: 7%; right: 7%; bottom: 8%; height: 62%;
  border-radius: 18px;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,252,247,0.7), transparent 28%),
    repeating-linear-gradient(90deg, #f6efe4, #f6efe4 18px, #f3e7d8 18px, #f3e7d8 20px);
}
.house-piece {
  position: absolute;
  border: 0;
  border-radius: 16px;
  box-shadow: 0 8px 0 rgba(28,26,23,0.08);
  color: #1c1a17;
  font-weight: 700;
  font-size: 0.72rem;
  cursor: grab;
}
.house-piece span { position: relative; z-index: 1; }
.house-piece.is-sofa { border-radius: 18px 18px 8px 8px; }
.house-piece.is-bed { border-radius: 20px; box-shadow: inset 0 10px 0 rgba(255,255,255,0.65), 0 8px 0 rgba(28,26,23,0.08); }
.house-piece.is-table { border-radius: 10px; }
.house-piece.is-plant { border-radius: 0 0 12px 12px; }
.house-piece.is-lamp { border-radius: 40% 40% 12px 12px; }
.house-piece.is-player { border-radius: 50%; }
.house-mate {
  position: absolute; bottom: 6%; width: 18px; height: 28px; border-radius: 10px 10px 6px 6px;
  background: #e7a3b5;
  z-index: 2;
}
.house-mate.is-b { left: 70%; background: #8fbf9f; }
.house-mate.is-a { left: 24%; }
.house-mate:before {
  content: "";
  position: absolute;
  left: 1px; top: -10px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #f3d2b5;
}
.house-stage.is-playing .house-mate.is-a { animation: walk-a 6s ease-in-out; }
.house-stage.is-playing .house-mate.is-b { animation: walk-b 6s ease-in-out; }
@keyframes walk-a { 50% { left: 62%; } }
@keyframes walk-b { 50% { left: 30%; } }
.house-day {
  position: absolute; inset: auto 16px 16px 16px;
  background: rgba(255,252,247,0.92);
  border-radius: 16px;
  padding: 12px;
}
.house-side { display: flex; flex-direction: column; gap: 10px; }
.house-mission, .house-timer, .house-coins, .house-wait { margin: 0; line-height: 1.55; }
.house-mission b, .house-timer b, .house-coins b { display: block; }
.house-mission.is-hidden { color: #8a8076; }
.house-dock { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.house-dock-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  border: 1px solid rgba(28,26,23,0.08);
  background: rgba(255,252,247,0.8);
  border-radius: 14px;
  padding: 8px;
}
.house-dock-item i { width: 28px; height: 16px; border-radius: 8px; display: block; }
.house-dock-item em { font-style: normal; color: #8a704e; font-size: 0.75rem; }
.house-chat, .house-scenes form, .drift-check, .game label { display: grid; gap: 6px; }
.house-log { max-height: 120px; overflow: auto; }
.house-log p, .date-bubble { margin: 0 0 6px; }
.house-scenes { margin-top: 18px; display: grid; gap: 12px; }
.house-scenes article { padding-top: 12px; border-top: 1px solid rgba(28,26,23,0.1); }
.house-notes span { display: block; margin-top: 4px; }
.game input, .game textarea, .game select {
  width: 100%;
  font: inherit;
  border: 1px solid rgba(28,26,23,0.14);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,252,247,0.9);
}
.date-thread, .date-pair { display: grid; gap: 8px; margin-bottom: 12px; }
.date-thread {
  background: linear-gradient(#f6e7dc, #f7f3ec);
  border-radius: 28px;
  padding: 18px 14px 14px;
  box-shadow: inset 0 0 0 7px #fffdf8;
  min-height: 160px;
}
.date-bubble {
  max-width: 80%;
  padding: 10px 12px;
  border-radius: 16px;
  background: #fff;
  line-height: 1.55;
}
.date-bubble.is-me { margin-left: auto; background: #f6e4ea; }
.date-cards, .date-times, .drift-beach, .drift-inbox { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.date-cards button, .date-times button, .drift-beach button, .drift-inbox button, .date-marks button, .house-scenes button {
  border: 1px solid rgba(28,26,23,0.1);
  background: #fff;
  border-radius: 999px;
  padding: 8px 12px;
}
.date-cards button.is-on, .date-times button.is-on, .drift-beach button.is-on { background: #1c1a17; color: #f7f3ec; }
.date-pair { grid-template-columns: 1fr 1fr; }
.date-pair section, .drift-letter, .drift-map {
  background: rgba(255,252,247,0.78);
  border: 1px solid rgba(176,137,104,0.28);
  border-radius: 18px;
  padding: 14px;
}
.date-moment { margin-bottom: 12px; }
.drift-island {
  position: relative; height: 220px; margin: 8px 0 16px;
  background: linear-gradient(#f7d3c4, #8eb4d6 55%, #2f6f93);
  border-radius: 24px; overflow: hidden;
}
.drift-sand { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; background: #f3ddb8; border-radius: 50% 50% 0 0; }
.drift-palm { position: absolute; left: 16%; bottom: 30%; width: 8px; height: 70px; background: #6d8f62; }
.drift-palm:after { content: ""; position: absolute; left: -18px; top: -10px; border: 16px solid transparent; border-bottom-color: #7eaa6d; }
.drift-light { position: absolute; right: 18%; bottom: 38%; width: 14px; height: 54px; background: #f7f3ec; }
.drift-light.is-lit { box-shadow: 0 0 24px #f6d98a; background: #f6d98a; }
.drift-person { position: absolute; left: 42%; bottom: 22%; width: 16px; height: 28px; border-radius: 10px; background: #e7a3b5; }
.drift-person.is-moss { background: #8fbf9f; }
.drift-person.is-tide { background: #7ea0c4; }
.drift-island.is-throw .drift-person { animation: toss 1.1s ease; }
.drift-bottle {
  position: absolute; left: 46%; bottom: 28%;
  width: 14px; height: 28px; border-radius: 6px 6px 8px 8px;
  background: rgba(255,252,247,0.85);
  border: 2px solid rgba(47,111,147,0.45);
  animation: bottle 1.3s ease forwards;
}
.drift-bottle:before {
  content: "";
  position: absolute; left: 3px; top: -7px;
  width: 8px; height: 8px; border-radius: 3px;
  background: #c9845a;
}
@keyframes toss { 40% { left: 58%; bottom: 40%; } }
@keyframes bottle { 100% { left: 92%; bottom: 62%; opacity: 0; } }
.drift-map { display: flex; align-items: center; gap: 10px; margin: 12px 0; }
.drift-map i { width: 42px; height: 28px; border-radius: 40%; background: #f3ddb8; box-shadow: 0 10px 0 #2f6f93; }
.game-drift textarea { min-height: 110px; margin: 8px 0; }

@media (max-width: 800px) {
  .house-layout, .date-pair { grid-template-columns: 1fr; }
  .house-room { height: 300px; }
}
