:root {
  --bg: #fdf6ec;
  --card: #ffffff;
  --ink: #4a3f35;
  --muted: #a89a89;
  --accent: #f4a259;
  --accent-2: #8cb369;
  --pink: #f2c1b6;
  --shadow: 0 4px 14px rgba(120, 90, 60, .12);
  --radius: 18px;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.5;
}
.wrap { max-width: 640px; margin: 0 auto; padding: 18px 14px 40px; }
h1 { margin: .2em 0; font-size: 1.7rem; }
h2 { margin: .1em 0 .4em; font-size: 1.2rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.center { text-align: center; }
.error { color: #c0392b; font-weight: 600; }
hr { border: none; border-top: 1px dashed var(--pink); margin: 22px 0; }

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.big-emoji { font-size: 3rem; }

/* forms */
.stack { display: flex; flex-direction: column; gap: 10px; }
input, textarea, button, .btn {
  font: inherit;
  border-radius: 12px;
  border: 2px solid #f0e6d8;
  padding: 11px 14px;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); }
button, .btn {
  background: var(--accent);
  color: #fff;
  border: none;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: transform .05s ease;
}
button:active, .btn:active { transform: scale(.97); }

/* gate + home */
.gate input { text-align: center; }
.animal-grid { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0; }
.animal-chip {
  display: flex; align-items: center; gap: 8px;
  background: #fff7ee; border: 2px solid #f0e6d8; border-radius: 999px;
  padding: 8px 14px; text-decoration: none; color: var(--ink); font-weight: 600;
}
.animal-chip:hover { border-color: var(--accent); }
.animal-chip .emoji { font-size: 1.3rem; }
.species-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.species-opt input { display: none; }
.species-opt span {
  display: block; text-align: center; font-size: .72rem; cursor: pointer;
  padding: 6px 2px; border-radius: 10px; border: 2px solid transparent;
}
.species-opt span:first-line { font-size: 1.4rem; }
.species-opt input:checked + span { border-color: var(--accent); background: #fff3e6; }
.new-animal { margin-top: 6px; }

/* topbar */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px; padding: 4px 2px;
}
.topbar .me { font-size: 1.05rem; }
.topbar nav { display: flex; gap: 12px; align-items: center; }
.topbar nav a { text-decoration: none; color: var(--ink); font-weight: 600; }
.topbar nav a.on { color: var(--accent); }

/* who's home */
.whos-home { padding: 10px 16px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.here { font-size: 1.25rem; }
.away { font-size: 1.1rem; filter: grayscale(1); opacity: .55; }
.away-sep { margin-left: 6px; }

/* post box */
.post-box textarea { width: 100%; resize: vertical; margin-bottom: 8px; }
.post-box { display: flex; flex-direction: column; }
.post-box button { align-self: flex-end; }

/* feed */
.msg-head { display: flex; justify-content: space-between; align-items: baseline; }
.msg-head .who { font-weight: 700; }
.msg-body { margin: 6px 0 10px; white-space: pre-wrap; word-break: break-word; }
.msg-reacts { display: flex; gap: 6px; flex-wrap: wrap; }
.react {
  text-decoration: none; font-size: .95rem; padding: 3px 9px; border-radius: 999px;
  border: 1.5px solid #f0e6d8; background: #fff; color: var(--ink);
}
.react.has { background: #fff3e6; border-color: var(--accent); }
.react .n { font-size: .75rem; font-weight: 700; }

/* games */
.game .prompt { font-size: 1.15rem; font-weight: 600; margin: 4px 0 12px; }
.answers { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.answer { background: #fff7ee; border-radius: 12px; padding: 8px 12px; }
.answer .who { font-weight: 700; margin-right: 6px; }
.progress { background: #f0e6d8; border-radius: 999px; height: 14px; overflow: hidden; margin: 8px 0 4px; }
.progress .bar { background: var(--accent-2); height: 100%; transition: width .4s ease; }
.checkins { margin: 8px 0; min-height: 1.4rem; }
.done-note { color: var(--accent-2); font-weight: 700; }

footer { text-align: center; color: var(--muted); font-size: .78rem; padding: 20px 0 30px; }

/* ─────────────── the house scene ─────────────── */
.house-scene {
  background: linear-gradient(#fff6e9, #ffffff);
  border: 2px solid #f0e6d8;
  position: relative;
}
.house-scene.cool { background: linear-gradient(#e9f3ff, #ffffff); border-color: #cfe3f5; }
.roofline { font-size: 1.25rem; font-weight: 800; text-align: center; margin-bottom: 12px; }
.house-status {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  align-items: center; margin-bottom: 16px;
}
.ac-toggle {
  text-decoration: none; color: var(--ink); background: #fff; font-weight: 700;
  border: 2px solid #f0e6d8; border-radius: 999px; padding: 5px 12px;
}
.ac-toggle.on { background: #e3f0ff; border-color: #7fb2e6; color: #2c6bb3; }
.fridge-badge, .home-badge {
  background: #fff; border: 2px solid #f0e6d8; border-radius: 999px; padding: 5px 12px;
}
.rooms { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.room {
  display: block; text-decoration: none; color: var(--ink);
  background: #fff; border: 2px solid #f0e6d8; border-radius: 16px; padding: 14px;
  transition: transform .06s ease, border-color .1s;
}
.room:hover { border-color: var(--accent); transform: translateY(-2px); }
.room-title { font-weight: 800; margin-bottom: 8px; }
.room-items { font-size: 1.9rem; letter-spacing: 4px; margin-bottom: 8px; }
.room-caption { }

/* ─────────────── the fridge ─────────────── */
.fridge-shelves { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.food .eat {
  display: flex; flex-direction: column; align-items: center; text-decoration: none;
  color: var(--ink); background: #f4faff; border: 2px solid #dcecf7;
  border-radius: 14px; padding: 10px 12px; min-width: 74px;
}
.food .eat:hover { border-color: #c0392b; background: #fff0ee; }
.food-emoji { font-size: 1.9rem; }
.food-label { font-weight: 700; font-size: .82rem; }
.food-by { font-size: .8rem; opacity: .7; }
.stock-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stock-btn {
  background: #fff7ee; color: var(--ink); border: 2px solid #f0e6d8; font-size: 1.4rem;
  border-radius: 12px; padding: 8px 4px; cursor: pointer;
}
.stock-btn:hover { border-color: var(--accent); }
.stock-btn .small { font-size: .72rem; font-weight: 700; }

/* ─────────────── the trip / shared car ─────────────── */
.trip-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.trip-form input[name="destination"] { flex: 1 1 160px; }
.trip-head { display: flex; justify-content: space-between; align-items: baseline; }
.trip-head .dest { font-weight: 800; font-size: 1.1rem; }
.car {
  display: flex; align-items: center; gap: 8px; margin: 10px 0 4px;
  background: #f4faff; border: 2px solid #dcecf7; border-radius: 14px; padding: 10px 14px;
}
.car-body { font-size: 2rem; }
.seats { display: flex; gap: 4px; flex-wrap: wrap; }
.rider { font-size: 1.4rem; }
.btn.ghost { background: #fff; color: var(--muted); border: 2px solid #f0e6d8; }
.btn { margin-top: 8px; }

/* SSO button */
.sso-btn { display: block; margin: 8px auto 4px; max-width: 320px;
  background: #2c6bb3; }
.sso-btn:hover { background: #245a99; }

/* ─────────────── the forest expedition ─────────────── */
.explore-head { background: linear-gradient(#eef6e8, #ffffff); border: 2px solid #d8e8cf; text-align: center; }
.party { margin: 10px 0; min-height: 1.5rem; }
.depth { margin: 8px 0 14px; }
.depth-num { font-size: 2rem; font-weight: 800; color: var(--accent-2); }
.btn.big { display: inline-block; font-size: 1.05rem; padding: 12px 20px; }
.explore-head .btn.big { background: var(--accent-2); }
.explore-head .btn.big:hover { background: #789a56; }
.leave-link { display: block; margin-top: 8px; }
.trail { display: flex; flex-direction: column; gap: 10px; }
.trail-spot { display: flex; align-items: center; gap: 14px; }
.spot-emoji { font-size: 2.2rem; }
.spot-place { font-weight: 800; }
.spot-blurb { margin: 2px 0 4px; }

/* email verification dev code */
.devcode { background: #fff7ee; border: 2px dashed var(--accent); border-radius: 12px;
  padding: 8px 12px; display: inline-block; margin: 6px 0; }
.devcode strong { font-size: 1.3rem; letter-spacing: 3px; }

/* visit / guest */
.visit-btn { background: var(--accent-2); display: block; max-width: 340px; margin: 6px auto 2px; }
.visit-btn:hover { background: #789a56; }
.guest-banner { background: #fff3e6; border: 2px solid var(--accent); border-radius: 12px;
  padding: 8px 12px; margin-bottom: 12px; font-size: .9rem; text-align: center; }

/* ─────────────── SVG emoji (Twemoji) ─────────────── */
img.emoji { height: 1em; width: 1em; margin: 0 .05em 0 .1em;
  vertical-align: -0.125em; display: inline-block; }
.big-emoji img.emoji { height: 1em; width: 1em; }

/* ─────────────── go-out nudge ─────────────── */
.goout-nudge { background: linear-gradient(#fff7e6, #fffdf8);
  border: 2px solid #f2d9a8; text-align: center; font-weight: 600; }
.goout-nudge a { color: var(--accent); }

/* ─────────────── intro "video" ─────────────── */
.intro { text-align: center; }
.intro-stage { position: relative; height: 360px; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  background: linear-gradient(#bfe3ff 0%, #e8f6d8 62%, #cdeaa2 100%); }
.sky { position: absolute; inset: 0; }
.sun { position: absolute; top: 26px; right: 34px; font-size: 2.4rem;
  animation: sun-rise 3s ease-out both; }
@keyframes sun-rise { from { transform: translateY(60px) scale(.6); opacity: 0; }
  to { transform: none; opacity: 1; } }
.cloud { position: absolute; font-size: 1.8rem; opacity: .9; }
.cloud.c1 { top: 40px; left: -60px; animation: drift 9s linear infinite; }
.cloud.c2 { top: 90px; left: -120px; font-size: 1.3rem; animation: drift 13s linear infinite; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(560px); } }
.scene { position: absolute; bottom: 84px; left: 0; right: 0; height: 120px; }
.cottage { position: absolute; left: 22px; bottom: 0; font-size: 3.4rem; }
.trees { position: absolute; right: 16px; bottom: 4px; font-size: 2.6rem; letter-spacing: -6px; }
.walker { position: absolute; bottom: 6px; font-size: 2.6rem; left: 70px;
  animation: walk-out 4s ease-in-out .4s both; }
@keyframes walk-out {
  0%   { left: 60px; transform: scaleX(1); opacity: 0; }
  12%  { opacity: 1; }
  100% { left: 240px; transform: scaleX(1); opacity: 1; }
}
.intro-lines { position: absolute; bottom: 12px; left: 0; right: 0; }
.intro-lines .line { margin: 2px 0; font-weight: 700; color: #4a3f35; opacity: 0; }
.line.l1 { animation: fade 1s ease .2s both; }
.line.l2 { animation: fade 1s ease 1.4s both; }
.line.l3 { animation: fade 1s ease 2.6s both; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.enter-btn { margin: 16px auto 4px; display: inline-block;
  animation: fade 1s ease 3.4s both; }

/* ─────────────── event + travel walls ─────────────── */
.wall-head { text-align: center; }
.events, .deals { display: flex; flex-direction: column; gap: 10px; }
.event-card, .deal-card { display: block; text-decoration: none; color: var(--ink);
  transition: transform .06s ease, border-color .1s; border: 2px solid transparent; }
.event-card:hover, .deal-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.ev-tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 9px;
  border-radius: 999px; margin-bottom: 6px; }
.ev-ai { background: #eaf1ff; color: #3157a8; }
.ev-marketing { background: #ffeede; color: #b5651d; }
.ev-title { font-weight: 800; }
.ev-when { margin-top: 4px; font-weight: 600; }

.deal-card.watching { border-left: 5px solid var(--accent); }
.deal-head { display: flex; justify-content: space-between; align-items: baseline; }
.deal-place { font-weight: 800; }
.deal-status { font-size: .74rem; font-weight: 800; padding: 2px 9px; border-radius: 999px; }
.status-watching { background: #fff3e6; color: var(--accent); }
.status-available { background: #eaf6e2; color: #5a8a3c; }
.deal-title { font-weight: 700; margin: 4px 0 2px; }
.deal-price { margin-top: 6px; font-weight: 700; color: #5a8a3c; }
.topbar nav { flex-wrap: wrap; row-gap: 4px; }

/* ─────────────── fun: spin an adventure ─────────────── */
.spin-card { text-align: center; }
.spin-btn { font-size: 1.05rem; }
.dare { margin-top: 12px; font-size: 1.15rem; font-weight: 700; min-height: 1.6em;
  color: var(--accent-2); transition: opacity .1s; }
.dare.spinning { opacity: .55; }

/* ─────────────── weekly go-out rule ─────────────── */
.zoo-rule { text-align: center; background: linear-gradient(#eef6e8,#fffdf8);
  border: 2px solid #cfe3c0; font-size: .95rem; }
.goout-nudge.out-done { background: linear-gradient(#eaf6e2,#fffdf8); border-color: #b9dca0; }
