* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f5f5f7;
  color: #1c1c1e;
  min-height: 100vh;
}

.screen {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hidden {
  display: none !important;
}

.card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

h1 {
  text-align: center;
  font-size: 28px;
  margin: 0 0 4px;
}

h2 {
  text-align: center;
  margin-top: 0;
}

h3 {
  margin-top: 0;
  font-size: 15px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.subtitle {
  text-align: center;
  color: #666;
  margin-bottom: 24px;
}

input[type="text"],
input[type="email"],
input[type="password"] {
  width: 100%;
  padding: 14px;
  margin-bottom: 12px;
  border: 1px solid #e0e0e5;
  border-radius: 10px;
  font-size: 16px;
  background: #f9f9fb;
}

input:focus {
  outline: none;
  border-color: #007aff;
  background: white;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: #007aff;
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 8px;
}

.btn-primary:disabled {
  background: #c7c7cc;
  cursor: not-allowed;
}

.btn-secondary {
  width: 100%;
  padding: 14px;
  background: #f0f0f5;
  color: #1c1c1e;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
}

.btn-link {
  width: 100%;
  background: none;
  border: none;
  color: #007aff;
  font-size: 14px;
  padding: 8px;
  cursor: pointer;
}

.error {
  color: #ff3b30;
  font-size: 13px;
  margin: -4px 0 12px;
}

.muted {
  color: #999;
  font-size: 14px;
}

.tabs {
  display: flex;
  background: #f0f0f5;
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  color: #666;
}

.tab.active {
  background: white;
  color: #1c1c1e;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.status-toggle {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.status-pill {
  flex: 1;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  background: #e5e5ea;
  color: #1c1c1e;
}

.status-pill.free.active {
  background: #34c759;
  color: white;
}

.status-pill.busy.active {
  background: #ff3b30;
  color: white;
}

.circle-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.circle-tab {
  padding: 8px 14px;
  border-radius: 20px;
  border: 1px solid #e0e0e5;
  background: #f9f9fb;
  font-size: 13px;
  cursor: pointer;
  color: #1c1c1e;
}

.circle-tab.active {
  background: #007aff;
  border-color: #007aff;
  color: white;
  font-weight: 600;
}

.inline-row {
  display: flex;
  gap: 8px;
}

.inline-row input {
  margin-bottom: 0;
  flex: 1;
}

.btn-inline {
  width: auto;
  padding: 12px 16px;
  white-space: nowrap;
}

.btn-danger {
  width: 100%;
  padding: 14px;
  background: #fff0f0;
  color: #ff3b30;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.text-btn {
  text-decoration: none;
  font-size: 18px;
  padding: 4px 6px;
}

.remove-btn {
  background: none;
  border: none;
  color: #c7c7cc;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
}

.remove-btn:hover {
  color: #ff3b30;
}

.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 100;
}

.modal-card {
  background: white;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 20px 20px 0 0;
  padding: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 18px;
  color: #666;
  cursor: pointer;
  padding: 4px 8px;
}

.update-entry {
  margin-bottom: 18px;
}

.update-entry h4 {
  margin: 0 0 4px;
  font-size: 15px;
}

.update-entry ul {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 14px;
  color: #444;
}

.update-entry li {
  margin-bottom: 3px;
}

.board-header {
  max-width: 480px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
}

.board-header h1 {
  margin: 0;
  font-size: 20px;
}

#members-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

#members-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f5;
}

#members-list li:last-child {
  border-bottom: none;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot.free { background: #34c759; }
.dot.busy { background: #ff3b30; }

.member-info {
  flex: 1;
}

.member-name {
  font-size: 15px;
}

.member-child {
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

.member-note {
  font-size: 12px;
  color: #999;
}

.member-status-label {
  font-size: 13px;
  font-weight: 700;
}

.member-status-label.free { color: #34c759; }
.member-status-label.busy { color: #ff3b30; }
