/* 打刻PWA — iPad第8世代 横向き 1080×810 / @1x 想定。巨大ボタン・高コントラスト。 */
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
:root {
  --margin: 24px;
  --radius: 20px;
  font-family: -apple-system, "Hiragino Sans", "Yu Gothic", sans-serif;
}
html, body {
  width: 100%; height: 100%;
  background: #1a1a1a; color: #fff;
  overflow: hidden; user-select: none; -webkit-user-select: none;
  touch-action: manipulation;
}
.screen { display: none; position: absolute; inset: 0; padding: var(--margin); padding-top: 28px; }
.screen.active { display: flex; flex-direction: column; }

/* ---- 上部の時計 ---- */
.clock {
  text-align: center; font-size: 96px; font-weight: 800; color: #fff;
  font-variant-numeric: tabular-nums; letter-spacing: 4px;
  padding: 8px 0 16px; flex-shrink: 0;
}

/* ---- 画面1：名前グリッド（色＋氏名のみ・2列×3行） ---- */
.name-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(3, 1fr);
  gap: 14px;
}
.name-btn {
  border: none; border-radius: var(--radius);
  color: #fff; font-size: 64px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform .05s;
}
.name-btn:active { transform: scale(.98); filter: brightness(.92); }

/* ---- 未送信インジケータ ---- */
.unsent {
  position: absolute; right: var(--margin); bottom: 12px;
  font-size: 22px; color: #888;
}
.unsent.warn { color: #fff; background: #B00020; padding: 6px 16px; border-radius: 999px; font-weight: 700; }

/* ---- 画面2：操作選択 ---- */
.action-header {
  display: flex; align-items: center; gap: 20px; margin-bottom: 24px;
  position: relative;
}
.back-btn {
  border: none; background: #333; color: #fff;
  font-size: 30px; font-weight: 700; padding: 18px 28px; border-radius: 16px; cursor: pointer;
}
.back-btn:active { background: #444; }
.action-chip {
  width: 64px; height: 120px; border-radius: 16px; flex-shrink: 0;
  background: var(--staff-color);
}
.action-name { font-size: 56px; font-weight: 800; }
.action-furigana { font-size: 26px; color: #aaa; }

.action-buttons {
  flex: 1; display: flex; gap: 24px; align-items: center; justify-content: center;
}
.action-btn {
  flex: 1; height: 100%; max-height: 420px;
  border: none; border-radius: var(--radius);
  font-size: 88px; font-weight: 800; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; line-height: 1.1; text-align: center;
}
.action-btn:active { filter: brightness(.85); }
.act-出 { background: #2E7D32; }
.act-退 { background: #C62828; }
.act-外 { background: #1565C0; }
.act-戻 { background: #EF6C00; }
.action-done { font-size: 44px; color: #aaa; }

.undo-btn {
  margin-top: 16px; align-self: center;
  border: none; background: transparent; color: #888;
  font-size: 24px; padding: 10px 20px; text-decoration: underline; cursor: pointer;
}

/* ---- 確認オーバーレイ ---- */
.overlay {
  position: absolute; inset: 0; z-index: 10;
  display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: 40px; text-align: center;
}
.overlay.visible { display: flex; }
.overlay-text { font-size: 72px; font-weight: 800; line-height: 1.3; }
.overlay-hint { position: absolute; bottom: 28px; font-size: 24px; opacity: .8; }
