* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
  background-color: #f4f7f6;
  color: #333;
}

#app-container {
  max-width: 480px;
  margin: 0 auto;
  background-color: #ffffff;
  min-height: 100vh;
  box-shadow: 0 0 15px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

header {
  background-color: #ff8c00;
  color: white;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

main { padding: 20px; flex: 1; }

.hidden { display: none !important; }
.message { margin-top: 10px; font-size: 0.9rem; color: #d32f2f; text-align: center; }

button {
  cursor: pointer; border: none; border-radius: 5px;
  padding: 12px 15px; font-size: 1rem; font-weight: bold;
  transition: opacity 0.2s;
}
button:active { opacity: 0.8; }
.primary-btn { background-color: #ff8c00; color: white; }
.secondary-btn { background-color: #e0e0e0; color: #333; }

.input-group { margin-bottom: 15px; }
.input-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 0.9rem;}
input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1rem; }

.auth-buttons { display: flex; gap: 10px; margin-top: 20px;}
.auth-buttons button { flex: 1; }

#logout-btn { background-color: transparent; border: 1px solid white; color: white; padding: 5px 10px; font-size: 0.9rem; }

/* ホーム画面 */
.user-welcome { font-size: 1.1rem; font-weight: bold; margin-bottom: 15px; }
.action-box { background-color: #fff3e0; padding: 12px; border-radius: 8px; margin-bottom: 15px; }
.action-box h3 { margin-bottom: 8px; font-size: 0.95rem; }
.inline-form { display: flex; gap: 8px; }
.inline-form input { flex: 1; padding: 10px; }

#house-list { list-style: none; margin-top: 10px;}
#house-list li {
  background-color: white; border: 2px solid #ff8c00; padding: 12px;
  margin-bottom: 10px; border-radius: 8px; cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.1s;
}
#house-list li:active { transform: scale(0.98); }
.house-list-header { font-weight: bold; font-size: 1.05rem; margin-bottom: 5px; display: flex; justify-content: space-between; }
.house-status-tags { font-size: 0.85rem; color: #555; display: flex; gap: 10px; }
.status-tag.ok { color: #2e7d32; font-weight: bold; }
.status-tag.no { color: #c62828; }

/* 家詳細画面 */
#back-btn { margin-bottom: 15px; background: transparent; border: 1px solid #ccc; }
.house-header { margin-bottom: 20px; text-align: center; }
.invite-info { font-size: 0.9rem; color: #666; background: #eee; display: inline-block; padding: 4px 12px; border-radius: 15px; margin-top: 5px;}

.check-items { display: flex; flex-direction: column; gap: 12px; }
.check-item {
  background-color: white; border: 1px solid #ddd; border-radius: 8px;
  padding: 15px; display: flex; justify-content: space-between; align-items: center;
}
.item-info { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: bold;}
.icon { font-size: 1.5rem; }

.toggle-btn { padding: 10px; border-radius: 20px; font-size: 0.9rem; width: 100px; background-color: #e0e0e0; }
.toggle-btn.checked { background-color: #4caf50; color: white; }

.last-action-info { text-align: center; margin-top: 20px; font-size: 0.9rem; color: #666; }

/* したっけ！ボタン */
.shitakke-container { margin-top: 25px; text-align: center; }
#shitakke-btn {
  background-color: #ff4757; color: white; width: 200px; height: 100px;
  border-radius: 50px; font-size: 1.5rem; box-shadow: 0 8px 15px rgba(255, 71, 87, 0.4);
  animation: pulse 2s infinite;
}
#shitakke-btn small { font-size: 0.9rem; font-weight: normal; }

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 8px 15px rgba(255, 71, 87, 0.4); }
  50% { transform: scale(1.05); box-shadow: 0 12px 20px rgba(255, 71, 87, 0.6); }
  100% { transform: scale(1); box-shadow: 0 8px 15px rgba(255, 71, 87, 0.4); }
}

/* アラート用オーバーレイ */
#alert-overlay {
  position: absolute; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.8); display: flex; justify-content: center; align-items: center; z-index: 100;
}
.alert-box {
  background: white; padding: 30px 20px; border-radius: 12px; text-align: center; width: 80%;
}
.alert-box h2 { margin-bottom: 10px; }
.alert-box #alert-close-btn { margin-top: 20px; width: 100%; }