/*
  loqo Roster の見た目。
  現場でグローブをしたまま押せるように、押すところは大きめ（最低 44px）にしている。
  色は loqo のほかのアプリに合わせた暗い配色（背景 #0d0f14 / 紫 #7700cc 系）。
*/

:root {
  --bg: #0d0f14;
  --panel: #161a22;
  --field: #1e232d;
  --line: #2b323f;
  --text: #e8ecf3;
  --muted: #8b95a7;
  --accent: #9b3ddb;
  --accent-deep: #7700cc;
  --ok: #2f9e5e;
  --warn: #c9a227;
  --danger: #c0392b;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}

/* --- 上のバー --- */
header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}
.title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .04em;
  flex: 0 0 auto;
}
.who {
  margin-left: auto;
  min-width: 7.5em;
}

main {
  padding: 14px 14px calc(28px + env(safe-area-inset-bottom));
  max-width: 560px;
  margin: 0 auto;
}

section { margin-bottom: 18px; }

label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}

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

/* --- 入力部品 --- */
input, select, textarea, button {
  font-family: inherit;
  font-size: 16px;      /* iPhone で勝手に拡大されないように 16px 以上 */
  color: var(--text);
}

input[type="date"], input[type="time"], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  appearance: none;
}
textarea { min-height: 62px; resize: vertical; }

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.row.small { margin-top: 8px; }
.tilde { color: var(--muted); flex: 0 0 auto; }

.step {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 15px;
}
.step:active { background: var(--line); }

.ghost {
  flex: 1 1 0;
  min-height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
}
.ghost:active { background: var(--field); }

/* --- 札（タップで選ぶ） --- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  min-height: 44px;
  padding: 8px 14px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 22px;
  font-size: 15px;
}
.chip[aria-pressed="true"] {
  background: var(--accent-deep);
  border-color: var(--accent);
  font-weight: 700;
}
.chip:active { transform: scale(.97); }

/* 休みの種別は色を変えて、間違えにくくする */
.chip.off[aria-pressed="true"] {
  background: #3a3f4b;
  border-color: var(--muted);
}

/* --- まとめ --- */
.summary {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  margin-bottom: 14px;
  white-space: pre-wrap;
}

/* --- 送るボタン --- */
.send {
  width: 100%;
  min-height: 54px;
  background: var(--accent-deep);
  border: 1px solid var(--accent);
  border-radius: 12px;
  font-size: 18px;
  font-weight: 700;
}
.send:active { background: var(--accent); }
.send:disabled { opacity: .45; }

.status {
  margin-top: 12px;
  font-size: 14px;
  min-height: 1.5em;
}
.status.ok { color: var(--ok); }
.status.ng { color: var(--danger); }
.status.busy { color: var(--muted); }

/* 上のバーの小さなボタン（出る） */
.icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  font-size: 16px;
}
.icon:active { background: var(--field); }

/* --- ログインの画面 --- */
.gate {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 24px;
  z-index: 20;
}
.gate.hidden { display: none; }
.gate-box {
  width: 100%;
  max-width: 320px;
}
.gate-title {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
  margin-bottom: 28px;
}
.gate-box label {
  margin-top: 10px;
}
.gate-box label:first-of-type { margin-top: 0; }
.gate-box input {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 14px;
}
.hidden { display: none; }

/* 「ほかにも」を押すまで隠しておく札 */
.chip.later { display: none; }
.chip.more {
  color: var(--muted);
  border-style: dashed;
}

/* 休んだ日は、現場や時間の欄をまるごと隠す */
#worked.hidden { display: none; }
#companyBox.hidden { display: none; }
