/* 色は tumugi の画面に合わせる（apps/tumugi/docs/13_Design_System.md の主ボタン #4277C6） */
:root {
  --primary: #4277c6;
  --primary-dark: #2f5ea6;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --ok: #15803d;
  --ok-bg: #ecfdf3;
  --wait: #b45309;
  --wait-bg: #fffbeb;
  --error: #b91c1c;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

main {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

h1 {
  font-size: 22px;
  margin: 0 0 16px;
}

h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 16px;
}

.status {
  text-align: center;
}

.status-label {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.status-text {
  margin: 4px 0;
  font-size: 30px;
  font-weight: 700;
}

.status.awake {
  background: var(--ok-bg);
}

.status.awake .status-text {
  color: var(--ok);
}

.status.waking {
  background: var(--wait-bg);
}

.status.waking .status-text {
  color: var(--wait);
}

.status-detail {
  margin: 0 0 16px;
}

button {
  font: inherit;
  cursor: pointer;
}

button.primary {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  min-height: 48px;
}

button.primary:hover {
  background: var(--primary-dark);
}

button:disabled {
  opacity: 0.6;
  cursor: wait;
}

button.link {
  background: none;
  border: none;
  color: var(--primary);
  text-decoration: underline;
  padding: 4px;
}

button.link.danger {
  color: var(--error);
}

.hint {
  color: var(--muted);
  font-size: 14px;
  margin: 12px 0 0;
}

.error {
  color: var(--error);
  margin: 8px 0 0;
}

.error:empty {
  display: none;
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: var(--muted);
}

form label:first-child {
  grid-column: 1 / -1;
}

form input {
  font: inherit;
  color: var(--text);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
}

form button {
  grid-column: 1 / -1;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  text-align: center;
}

.cal-head {
  font-size: 13px;
  color: var(--muted);
}

.cal-day {
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 44px;
  position: relative;
}

.cal-day.reserved::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 5px;
  width: 6px;
  height: 6px;
  margin-left: -3px;
  border-radius: 50%;
  background: var(--primary);
}

.cal-day.selected {
  border-color: var(--primary);
  border-width: 2px;
  font-weight: 700;
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.list li {
  display: grid;
  grid-template-columns: 1fr auto;
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}

.list .when {
  font-weight: 700;
}

.list .by {
  grid-row: 2;
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.list button {
  grid-row: 1 / span 2;
  grid-column: 2;
  align-self: center;
}

.account {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}
